blob: 35f37bcbc0d9f517833ebf215d1b7941aee6baed [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 */
Martin Willieee9dc62015-06-01 13:43:59 +02003054 .plaintext = "\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 "\x00\x00\x00\x00\x00\x00\x00\x00"
3059 "\x00\x00\x00\x00\x00\x00\x00\x00"
3060 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003061 "\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"
Martin Willieee9dc62015-06-01 13:43:59 +02003065 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003066 .psize = 96,
Martin Willieee9dc62015-06-01 13:43:59 +02003067 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3068 "\x00\x00\x00\x00\x00\x00\x00\x00",
3069 }, { /* Test Vector #2 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003070 .plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003071 "\x00\x00\x00\x00\x00\x00\x00\x00"
3072 "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003073 "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3074 "\x41\x6e\x79\x20\x73\x75\x62\x6d"
Martin Willieee9dc62015-06-01 13:43:59 +02003075 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3076 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3077 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3078 "\x64\x65\x64\x20\x62\x79\x20\x74"
3079 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3080 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3081 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3082 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3083 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3084 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3085 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3086 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3087 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3088 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3089 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3090 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3091 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3092 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3093 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3094 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3095 "\x45\x54\x46\x20\x61\x63\x74\x69"
3096 "\x76\x69\x74\x79\x20\x69\x73\x20"
3097 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3098 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3099 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3100 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3101 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3102 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3103 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3104 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3105 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3106 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3107 "\x54\x46\x20\x73\x65\x73\x73\x69"
3108 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3109 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3110 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3111 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3112 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3113 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3114 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3115 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3116 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3117 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3118 "\x20\x77\x68\x69\x63\x68\x20\x61"
3119 "\x72\x65\x20\x61\x64\x64\x72\x65"
3120 "\x73\x73\x65\x64\x20\x74\x6f",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003121 .psize = 407,
Martin Willieee9dc62015-06-01 13:43:59 +02003122 .digest = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3123 "\xf0\xef\xca\x96\x22\x7a\x86\x3e",
3124 }, { /* Test Vector #3 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003125 .plaintext = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
Martin Willieee9dc62015-06-01 13:43:59 +02003126 "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3127 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003128 "\x00\x00\x00\x00\x00\x00\x00\x00"
3129 "\x41\x6e\x79\x20\x73\x75\x62\x6d"
Martin Willieee9dc62015-06-01 13:43:59 +02003130 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3131 "\x6f\x20\x74\x68\x65\x20\x49\x45"
3132 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3133 "\x64\x65\x64\x20\x62\x79\x20\x74"
3134 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3135 "\x69\x62\x75\x74\x6f\x72\x20\x66"
3136 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3137 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3138 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3139 "\x20\x70\x61\x72\x74\x20\x6f\x66"
3140 "\x20\x61\x6e\x20\x49\x45\x54\x46"
3141 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3142 "\x74\x2d\x44\x72\x61\x66\x74\x20"
3143 "\x6f\x72\x20\x52\x46\x43\x20\x61"
3144 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3145 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3146 "\x20\x6d\x61\x64\x65\x20\x77\x69"
3147 "\x74\x68\x69\x6e\x20\x74\x68\x65"
3148 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3149 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3150 "\x45\x54\x46\x20\x61\x63\x74\x69"
3151 "\x76\x69\x74\x79\x20\x69\x73\x20"
3152 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3153 "\x65\x64\x20\x61\x6e\x20\x22\x49"
3154 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3155 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3156 "\x22\x2e\x20\x53\x75\x63\x68\x20"
3157 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3158 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3159 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3160 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3161 "\x74\x73\x20\x69\x6e\x20\x49\x45"
3162 "\x54\x46\x20\x73\x65\x73\x73\x69"
3163 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3164 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3165 "\x77\x72\x69\x74\x74\x65\x6e\x20"
3166 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3167 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3168 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3169 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3170 "\x64\x65\x20\x61\x74\x20\x61\x6e"
3171 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3172 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3173 "\x20\x77\x68\x69\x63\x68\x20\x61"
3174 "\x72\x65\x20\x61\x64\x64\x72\x65"
3175 "\x73\x73\x65\x64\x20\x74\x6f",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003176 .psize = 407,
Martin Willieee9dc62015-06-01 13:43:59 +02003177 .digest = "\xf3\x47\x7e\x7c\xd9\x54\x17\xaf"
3178 "\x89\xa6\xb8\x79\x4c\x31\x0c\xf0",
3179 }, { /* Test Vector #4 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003180 .plaintext = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
Martin Willieee9dc62015-06-01 13:43:59 +02003181 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
3182 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003183 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
3184 "\x27\x54\x77\x61\x73\x20\x62\x72"
Martin Willieee9dc62015-06-01 13:43:59 +02003185 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
3186 "\x6e\x64\x20\x74\x68\x65\x20\x73"
3187 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
3188 "\x76\x65\x73\x0a\x44\x69\x64\x20"
3189 "\x67\x79\x72\x65\x20\x61\x6e\x64"
3190 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
3191 "\x69\x6e\x20\x74\x68\x65\x20\x77"
3192 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
3193 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
3194 "\x65\x72\x65\x20\x74\x68\x65\x20"
3195 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
3196 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
3197 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
3198 "\x72\x61\x74\x68\x73\x20\x6f\x75"
3199 "\x74\x67\x72\x61\x62\x65\x2e",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003200 .psize = 159,
Martin Willieee9dc62015-06-01 13:43:59 +02003201 .digest = "\x45\x41\x66\x9a\x7e\xaa\xee\x61"
3202 "\xe7\x08\xdc\x7c\xbc\xc5\xeb\x62",
3203 }, { /* Test Vector #5 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003204 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003205 "\x00\x00\x00\x00\x00\x00\x00\x00"
3206 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003207 "\x00\x00\x00\x00\x00\x00\x00\x00"
3208 "\xff\xff\xff\xff\xff\xff\xff\xff"
3209 "\xff\xff\xff\xff\xff\xff\xff\xff",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003210 .psize = 48,
3211 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003212 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003213 }, { /* Test Vector #6 */
3214 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
3215 "\x00\x00\x00\x00\x00\x00\x00\x00"
3216 "\xff\xff\xff\xff\xff\xff\xff\xff"
3217 "\xff\xff\xff\xff\xff\xff\xff\xff"
3218 "\x02\x00\x00\x00\x00\x00\x00\x00"
3219 "\x00\x00\x00\x00\x00\x00\x00\x00",
3220 .psize = 48,
Martin Willieee9dc62015-06-01 13:43:59 +02003221 .digest = "\x03\x00\x00\x00\x00\x00\x00\x00"
3222 "\x00\x00\x00\x00\x00\x00\x00\x00",
3223 }, { /* Test Vector #7 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003224 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003225 "\x00\x00\x00\x00\x00\x00\x00\x00"
3226 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003227 "\x00\x00\x00\x00\x00\x00\x00\x00"
3228 "\xff\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003229 "\xff\xff\xff\xff\xff\xff\xff\xff"
3230 "\xf0\xff\xff\xff\xff\xff\xff\xff"
3231 "\xff\xff\xff\xff\xff\xff\xff\xff"
3232 "\x11\x00\x00\x00\x00\x00\x00\x00"
3233 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003234 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003235 .digest = "\x05\x00\x00\x00\x00\x00\x00\x00"
3236 "\x00\x00\x00\x00\x00\x00\x00\x00",
3237 }, { /* Test Vector #8 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003238 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003239 "\x00\x00\x00\x00\x00\x00\x00\x00"
3240 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003241 "\x00\x00\x00\x00\x00\x00\x00\x00"
3242 "\xff\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003243 "\xff\xff\xff\xff\xff\xff\xff\xff"
3244 "\xfb\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3245 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3246 "\x01\x01\x01\x01\x01\x01\x01\x01"
3247 "\x01\x01\x01\x01\x01\x01\x01\x01",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003248 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003249 .digest = "\x00\x00\x00\x00\x00\x00\x00\x00"
3250 "\x00\x00\x00\x00\x00\x00\x00\x00",
3251 }, { /* Test Vector #9 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003252 .plaintext = "\x02\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003253 "\x00\x00\x00\x00\x00\x00\x00\x00"
3254 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003255 "\x00\x00\x00\x00\x00\x00\x00\x00"
3256 "\xfd\xff\xff\xff\xff\xff\xff\xff"
Martin Willieee9dc62015-06-01 13:43:59 +02003257 "\xff\xff\xff\xff\xff\xff\xff\xff",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003258 .psize = 48,
Martin Willieee9dc62015-06-01 13:43:59 +02003259 .digest = "\xfa\xff\xff\xff\xff\xff\xff\xff"
3260 "\xff\xff\xff\xff\xff\xff\xff\xff",
3261 }, { /* Test Vector #10 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003262 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003263 "\x04\x00\x00\x00\x00\x00\x00\x00"
3264 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003265 "\x00\x00\x00\x00\x00\x00\x00\x00"
3266 "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
Martin Willieee9dc62015-06-01 13:43:59 +02003267 "\x00\x00\x00\x00\x00\x00\x00\x00"
3268 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3269 "\x01\x00\x00\x00\x00\x00\x00\x00"
3270 "\x00\x00\x00\x00\x00\x00\x00\x00"
3271 "\x00\x00\x00\x00\x00\x00\x00\x00"
3272 "\x01\x00\x00\x00\x00\x00\x00\x00"
3273 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003274 .psize = 96,
Martin Willieee9dc62015-06-01 13:43:59 +02003275 .digest = "\x14\x00\x00\x00\x00\x00\x00\x00"
3276 "\x55\x00\x00\x00\x00\x00\x00\x00",
3277 }, { /* Test Vector #11 */
Martin Willic2b7b20a2015-06-16 11:34:16 +02003278 .plaintext = "\x01\x00\x00\x00\x00\x00\x00\x00"
Martin Willieee9dc62015-06-01 13:43:59 +02003279 "\x04\x00\x00\x00\x00\x00\x00\x00"
3280 "\x00\x00\x00\x00\x00\x00\x00\x00"
Martin Willic2b7b20a2015-06-16 11:34:16 +02003281 "\x00\x00\x00\x00\x00\x00\x00\x00"
3282 "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
Martin Willieee9dc62015-06-01 13:43:59 +02003283 "\x00\x00\x00\x00\x00\x00\x00\x00"
3284 "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3285 "\x01\x00\x00\x00\x00\x00\x00\x00"
3286 "\x00\x00\x00\x00\x00\x00\x00\x00"
3287 "\x00\x00\x00\x00\x00\x00\x00\x00",
Martin Willic2b7b20a2015-06-16 11:34:16 +02003288 .psize = 80,
Martin Willieee9dc62015-06-01 13:43:59 +02003289 .digest = "\x13\x00\x00\x00\x00\x00\x00\x00"
3290 "\x00\x00\x00\x00\x00\x00\x00\x00",
3291 },
3292};
3293
3294/*
Herbert Xuda7f0332008-07-31 17:08:25 +08003295 * DES test vectors.
3296 */
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003297#define DES_ENC_TEST_VECTORS 11
3298#define DES_DEC_TEST_VECTORS 5
3299#define DES_CBC_ENC_TEST_VECTORS 6
3300#define DES_CBC_DEC_TEST_VECTORS 5
3301#define DES_CTR_ENC_TEST_VECTORS 2
3302#define DES_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003303#define DES3_EDE_ENC_TEST_VECTORS 4
3304#define DES3_EDE_DEC_TEST_VECTORS 4
3305#define DES3_EDE_CBC_ENC_TEST_VECTORS 2
3306#define DES3_EDE_CBC_DEC_TEST_VECTORS 2
3307#define DES3_EDE_CTR_ENC_TEST_VECTORS 2
3308#define DES3_EDE_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08003309
3310static struct cipher_testvec des_enc_tv_template[] = {
3311 { /* From Applied Cryptography */
3312 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3313 .klen = 8,
3314 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3315 .ilen = 8,
3316 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3317 .rlen = 8,
3318 }, { /* Same key, different plaintext block */
3319 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3320 .klen = 8,
3321 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
3322 .ilen = 8,
3323 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3324 .rlen = 8,
3325 }, { /* Sbox test from NBS */
3326 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3327 .klen = 8,
3328 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3329 .ilen = 8,
3330 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3331 .rlen = 8,
3332 }, { /* Three blocks */
3333 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3334 .klen = 8,
3335 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3336 "\x22\x33\x44\x55\x66\x77\x88\x99"
3337 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3338 .ilen = 24,
3339 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3340 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3341 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3342 .rlen = 24,
3343 }, { /* Weak key */
David Howells09e21782015-04-28 15:36:36 +01003344 .fail = true,
Herbert Xuda7f0332008-07-31 17:08:25 +08003345 .wk = 1,
3346 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
3347 .klen = 8,
3348 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3349 .ilen = 8,
3350 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3351 .rlen = 8,
3352 }, { /* Two blocks -- for testing encryption across pages */
3353 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3354 .klen = 8,
3355 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3356 "\x22\x33\x44\x55\x66\x77\x88\x99",
3357 .ilen = 16,
3358 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3359 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3360 .rlen = 16,
3361 .np = 2,
3362 .tap = { 8, 8 }
3363 }, { /* Four blocks -- for testing encryption with chunking */
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 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
3369 "\x22\x33\x44\x55\x66\x77\x88\x99",
3370 .ilen = 32,
3371 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3372 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3373 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
3374 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3375 .rlen = 32,
3376 .np = 3,
3377 .tap = { 14, 10, 8 }
3378 }, {
3379 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3380 .klen = 8,
3381 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3382 "\x22\x33\x44\x55\x66\x77\x88\x99"
3383 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3384 .ilen = 24,
3385 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3386 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3387 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3388 .rlen = 24,
3389 .np = 4,
3390 .tap = { 2, 1, 3, 18 }
3391 }, {
3392 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3393 .klen = 8,
3394 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3395 "\x22\x33\x44\x55\x66\x77\x88\x99",
3396 .ilen = 16,
3397 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3398 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3399 .rlen = 16,
3400 .np = 5,
3401 .tap = { 2, 2, 2, 2, 8 }
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 .ilen = 8,
3407 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3408 .rlen = 8,
3409 .np = 8,
3410 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003411 }, { /* Generated with Crypto++ */
3412 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3413 .klen = 8,
3414 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3415 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3416 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3417 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3418 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3419 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3420 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3421 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3422 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3423 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3424 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3425 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3426 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3427 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3428 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3429 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3430 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3431 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3432 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3433 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3434 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3435 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3436 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3437 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3438 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3439 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3440 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3441 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3442 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3443 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3444 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3445 .ilen = 248,
3446 .result = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3447 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3448 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3449 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3450 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3451 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3452 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3453 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3454 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3455 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3456 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3457 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3458 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3459 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3460 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3461 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3462 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3463 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3464 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3465 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3466 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3467 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3468 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3469 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3470 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3471 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3472 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3473 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3474 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3475 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3476 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3477 .rlen = 248,
3478 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003479 .np = 3,
3480 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003481 },
3482};
3483
3484static struct cipher_testvec des_dec_tv_template[] = {
3485 { /* From Applied Cryptography */
3486 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3487 .klen = 8,
3488 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3489 .ilen = 8,
3490 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3491 .rlen = 8,
3492 }, { /* Sbox test from NBS */
3493 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3494 .klen = 8,
3495 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3496 .ilen = 8,
3497 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3498 .rlen = 8,
3499 }, { /* Two blocks, for chunking test */
3500 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3501 .klen = 8,
3502 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3503 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3504 .ilen = 16,
3505 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3506 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3507 .rlen = 16,
3508 .np = 2,
3509 .tap = { 8, 8 }
3510 }, {
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 = 3,
3520 .tap = { 3, 12, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003521 }, { /* Generated with Crypto++ */
3522 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3523 .klen = 8,
3524 .input = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3525 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3526 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3527 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3528 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3529 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3530 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3531 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3532 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3533 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3534 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3535 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3536 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3537 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3538 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3539 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3540 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3541 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3542 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3543 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3544 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3545 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3546 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3547 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3548 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3549 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3550 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3551 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3552 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3553 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3554 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3555 .ilen = 248,
3556 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3557 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3558 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3559 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3560 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3561 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3562 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3563 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3564 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3565 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3566 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3567 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3568 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3569 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3570 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3571 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3572 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3573 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3574 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3575 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3576 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3577 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3578 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3579 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3580 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3581 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3582 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3583 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3584 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3585 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3586 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3587 .rlen = 248,
3588 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003589 .np = 3,
3590 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003591 },
3592};
3593
3594static struct cipher_testvec des_cbc_enc_tv_template[] = {
3595 { /* From OpenSSL */
3596 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3597 .klen = 8,
3598 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3599 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
3600 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3601 "\x68\x65\x20\x74\x69\x6d\x65\x20",
3602 .ilen = 24,
3603 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3604 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3605 "\x46\x8e\x91\x15\x78\x88\xba\x68",
3606 .rlen = 24,
3607 }, { /* FIPS Pub 81 */
3608 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3609 .klen = 8,
3610 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3611 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3612 .ilen = 8,
3613 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3614 .rlen = 8,
3615 }, {
3616 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3617 .klen = 8,
3618 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3619 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3620 .ilen = 8,
3621 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3622 .rlen = 8,
3623 }, {
3624 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3625 .klen = 8,
3626 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3627 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3628 .ilen = 8,
3629 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3630 .rlen = 8,
3631 }, { /* Copy of openssl vector for chunk testing */
3632 /* From OpenSSL */
3633 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3634 .klen = 8,
3635 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3636 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
3637 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3638 "\x68\x65\x20\x74\x69\x6d\x65\x20",
3639 .ilen = 24,
3640 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3641 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3642 "\x46\x8e\x91\x15\x78\x88\xba\x68",
3643 .rlen = 24,
3644 .np = 2,
3645 .tap = { 13, 11 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003646 }, { /* Generated with Crypto++ */
3647 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3648 .klen = 8,
3649 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3650 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3651 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3652 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3653 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3654 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3655 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3656 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3657 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3658 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3659 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3660 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3661 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3662 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3663 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3664 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3665 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3666 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3667 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3668 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3669 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3670 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3671 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3672 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3673 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3674 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3675 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3676 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3677 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3678 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3679 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3680 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3681 .ilen = 248,
3682 .result = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
3683 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
3684 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
3685 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
3686 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
3687 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
3688 "\x81\x72\x74\xDE\x30\x19\x69\x49"
3689 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
3690 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
3691 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
3692 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
3693 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
3694 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
3695 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
3696 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
3697 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
3698 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
3699 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
3700 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
3701 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
3702 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
3703 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
3704 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
3705 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
3706 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
3707 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
3708 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
3709 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
3710 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
3711 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
3712 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
3713 .rlen = 248,
3714 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003715 .np = 3,
3716 .tap = { 248 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003717 },
3718};
3719
3720static struct cipher_testvec des_cbc_dec_tv_template[] = {
3721 { /* FIPS Pub 81 */
3722 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3723 .klen = 8,
3724 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3725 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3726 .ilen = 8,
3727 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3728 .rlen = 8,
3729 }, {
3730 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3731 .klen = 8,
3732 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3733 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3734 .ilen = 8,
3735 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3736 .rlen = 8,
3737 }, {
3738 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3739 .klen = 8,
3740 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3741 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3742 .ilen = 8,
3743 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3744 .rlen = 8,
3745 }, { /* Copy of above, for chunk testing */
3746 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3747 .klen = 8,
3748 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3749 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3750 .ilen = 8,
3751 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3752 .rlen = 8,
3753 .np = 2,
3754 .tap = { 4, 4 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003755 }, { /* Generated with Crypto++ */
3756 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3757 .klen = 8,
3758 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3759 .input = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
3760 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
3761 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
3762 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
3763 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
3764 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
3765 "\x81\x72\x74\xDE\x30\x19\x69\x49"
3766 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
3767 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
3768 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
3769 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
3770 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
3771 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
3772 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
3773 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
3774 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
3775 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
3776 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
3777 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
3778 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
3779 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
3780 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
3781 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
3782 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
3783 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
3784 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
3785 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
3786 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
3787 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
3788 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
3789 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
3790 .ilen = 248,
3791 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3792 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3793 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3794 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3795 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3796 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3797 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3798 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3799 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3800 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3801 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3802 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3803 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3804 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3805 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3806 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3807 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3808 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3809 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3810 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3811 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3812 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3813 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3814 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3815 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3816 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3817 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3818 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3819 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3820 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3821 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3822 .rlen = 248,
3823 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003824 .np = 3,
3825 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003826 },
3827};
3828
3829static struct cipher_testvec des_ctr_enc_tv_template[] = {
3830 { /* Generated with Crypto++ */
3831 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3832 .klen = 8,
3833 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3834 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3835 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3836 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3837 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3838 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3839 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3840 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3841 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3842 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3843 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3844 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3845 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3846 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3847 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3848 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3849 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3850 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3851 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3852 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3853 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3854 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3855 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3856 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3857 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3858 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3859 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3860 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3861 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3862 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3863 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3864 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3865 .ilen = 248,
3866 .result = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
3867 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
3868 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
3869 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
3870 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
3871 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
3872 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
3873 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
3874 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
3875 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
3876 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
3877 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
3878 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
3879 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
3880 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
3881 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
3882 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
3883 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
3884 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
3885 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
3886 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
3887 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
3888 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
3889 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
3890 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
3891 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
3892 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
3893 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
3894 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
3895 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
3896 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
3897 .rlen = 248,
3898 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02003899 .np = 3,
3900 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03003901 }, { /* Generated with Crypto++ */
3902 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3903 .klen = 8,
3904 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3905 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3906 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3907 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3908 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3909 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3910 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3911 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3912 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3913 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3914 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3915 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3916 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3917 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3918 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3919 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3920 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3921 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3922 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3923 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3924 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3925 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3926 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3927 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3928 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3929 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3930 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3931 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3932 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3933 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3934 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3935 "\xC6\x2F\xBB\x24\x8D\x19\x82",
3936 .ilen = 247,
3937 .result = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
3938 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
3939 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
3940 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
3941 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
3942 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
3943 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
3944 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
3945 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
3946 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
3947 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
3948 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
3949 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
3950 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
3951 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
3952 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
3953 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
3954 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
3955 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
3956 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
3957 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
3958 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
3959 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
3960 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
3961 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
3962 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
3963 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
3964 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
3965 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
3966 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
3967 "\x91\x45\x05\x3E\x58\xBF\x32",
3968 .rlen = 247,
3969 .also_non_np = 1,
3970 .np = 2,
3971 .tap = { 247 - 8, 8 },
3972 },
3973};
3974
3975static struct cipher_testvec des_ctr_dec_tv_template[] = {
3976 { /* Generated with Crypto++ */
3977 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3978 .klen = 8,
3979 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3980 .input = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
3981 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
3982 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
3983 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
3984 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
3985 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
3986 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
3987 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
3988 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
3989 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
3990 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
3991 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
3992 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
3993 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
3994 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
3995 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
3996 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
3997 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
3998 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
3999 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
4000 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
4001 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
4002 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
4003 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
4004 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
4005 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
4006 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4007 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4008 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4009 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4010 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4011 .ilen = 248,
4012 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4013 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4014 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4015 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4016 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4017 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4018 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4019 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4020 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4021 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4022 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4023 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4024 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4025 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4026 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4027 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4028 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4029 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4030 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4031 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4032 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4033 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4034 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4035 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4036 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4037 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4038 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4039 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4040 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4041 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4042 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4043 .rlen = 248,
4044 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004045 .np = 3,
4046 .tap = { 248 - 10, 2, 8 },
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03004047 }, { /* Generated with Crypto++ */
4048 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4049 .klen = 8,
4050 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4051 .input = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4052 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4053 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4054 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4055 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4056 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4057 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4058 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4059 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4060 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4061 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4062 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4063 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4064 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4065 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4066 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4067 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4068 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4069 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4070 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4071 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4072 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4073 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4074 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4075 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4076 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4077 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4078 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4079 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4080 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4081 "\x91\x45\x05\x3E\x58\xBF\x32",
4082 .ilen = 247,
4083 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4084 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4085 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4086 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4087 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4088 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4089 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4090 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4091 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4092 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4093 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4094 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4095 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4096 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4097 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4098 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4099 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4100 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4101 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4102 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4103 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4104 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4105 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4106 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4107 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4108 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4109 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4110 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4111 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4112 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4113 "\xC6\x2F\xBB\x24\x8D\x19\x82",
4114 .rlen = 247,
4115 .also_non_np = 1,
4116 .np = 2,
4117 .tap = { 247 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004118 },
4119};
4120
4121static struct cipher_testvec des3_ede_enc_tv_template[] = {
4122 { /* These are from openssl */
4123 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4124 "\x55\x55\x55\x55\x55\x55\x55\x55"
4125 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4126 .klen = 24,
4127 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4128 .ilen = 8,
4129 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4130 .rlen = 8,
4131 }, {
4132 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4133 "\x86\x02\x87\x66\x59\x08\x21\x98"
4134 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4135 .klen = 24,
4136 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4137 .ilen = 8,
4138 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4139 .rlen = 8,
4140 }, {
4141 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4142 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4143 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4144 .klen = 24,
4145 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
4146 .ilen = 8,
4147 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4148 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004149 }, { /* Generated with Crypto++ */
4150 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4151 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4152 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4153 .klen = 24,
4154 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4155 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4156 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4157 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4158 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4159 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4160 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4161 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4162 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4163 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4164 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4165 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4166 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4167 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4168 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4169 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4170 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4171 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4172 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4173 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4174 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4175 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4176 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4177 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4178 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4179 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4180 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4181 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4182 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4183 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4184 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4185 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4186 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4187 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4188 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4189 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4190 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4191 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4192 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4193 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4194 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4195 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4196 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4197 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4198 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4199 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4200 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4201 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4202 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4203 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4204 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4205 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4206 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4207 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4208 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4209 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4210 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4211 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4212 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4213 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4214 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4215 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4216 .ilen = 496,
4217 .result = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4218 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4219 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4220 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4221 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4222 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4223 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4224 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4225 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4226 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4227 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4228 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4229 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4230 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4231 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4232 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4233 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4234 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4235 "\x45\x86\x50\x01\x70\x35\x99\x92"
4236 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4237 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4238 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4239 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4240 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4241 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4242 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4243 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4244 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4245 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4246 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4247 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4248 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4249 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4250 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4251 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4252 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4253 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4254 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4255 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4256 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4257 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4258 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4259 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4260 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4261 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4262 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4263 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4264 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4265 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4266 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4267 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4268 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4269 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4270 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4271 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4272 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4273 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4274 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4275 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4276 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4277 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4278 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4279 .rlen = 496,
4280 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004281 .np = 3,
4282 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004283 },
4284};
4285
4286static struct cipher_testvec des3_ede_dec_tv_template[] = {
4287 { /* These are from openssl */
4288 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4289 "\x55\x55\x55\x55\x55\x55\x55\x55"
4290 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4291 .klen = 24,
4292 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4293 .ilen = 8,
4294 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4295 .rlen = 8,
4296 }, {
4297 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
4298 "\x86\x02\x87\x66\x59\x08\x21\x98"
4299 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4300 .klen = 24,
4301 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4302 .ilen = 8,
4303 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4304 .rlen = 8,
4305 }, {
4306 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
4307 "\x91\x07\xd0\x15\x89\x19\x01\x01"
4308 "\x19\x07\x92\x10\x98\x1a\x01\x01",
4309 .klen = 24,
4310 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4311 .ilen = 8,
4312 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
4313 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004314 }, { /* Generated with Crypto++ */
4315 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4316 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4317 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4318 .klen = 24,
4319 .input = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4320 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4321 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4322 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4323 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4324 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4325 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4326 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4327 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4328 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4329 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4330 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4331 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4332 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4333 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4334 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4335 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4336 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4337 "\x45\x86\x50\x01\x70\x35\x99\x92"
4338 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4339 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4340 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4341 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4342 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4343 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4344 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4345 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4346 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4347 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4348 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4349 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4350 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4351 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4352 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4353 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4354 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4355 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4356 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4357 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4358 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4359 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4360 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4361 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4362 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4363 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4364 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4365 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4366 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4367 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4368 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4369 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4370 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4371 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4372 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4373 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4374 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4375 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4376 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4377 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4378 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4379 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4380 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4381 .ilen = 496,
4382 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4383 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4384 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4385 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4386 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4387 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4388 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4389 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4390 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4391 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4392 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4393 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4394 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4395 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4396 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4397 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4398 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4399 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4400 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4401 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4402 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4403 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4404 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4405 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4406 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4407 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4408 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4409 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4410 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4411 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4412 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4413 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4414 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4415 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4416 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4417 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4418 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4419 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4420 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4421 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4422 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4423 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4424 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4425 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4426 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4427 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4428 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4429 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4430 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4431 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4432 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4433 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4434 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4435 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4436 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4437 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4438 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4439 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4440 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4441 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4442 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4443 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4444 .rlen = 496,
4445 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004446 .np = 3,
4447 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004448 },
4449};
4450
4451static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
4452 { /* Generated from openssl */
4453 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4454 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4455 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4456 .klen = 24,
4457 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4458 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4459 "\x53\x20\x63\x65\x65\x72\x73\x74"
4460 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4461 "\x20\x79\x65\x53\x72\x63\x74\x65"
4462 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4463 "\x79\x6e\x53\x20\x63\x65\x65\x72"
4464 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4465 "\x6e\x61\x20\x79\x65\x53\x72\x63"
4466 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4467 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4468 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4469 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4470 "\x72\x63\x74\x65\x20\x73\x6f\x54"
4471 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4472 "\x63\x65\x65\x72\x73\x74\x54\x20"
4473 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4474 .ilen = 128,
4475 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4476 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4477 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4478 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4479 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4480 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4481 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4482 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4483 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4484 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4485 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4486 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4487 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4488 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4489 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4490 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4491 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004492 }, { /* Generated with Crypto++ */
4493 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4494 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4495 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4496 .klen = 24,
4497 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4498 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4499 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4500 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4501 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4502 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4503 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4504 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4505 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4506 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4507 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4508 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4509 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4510 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4511 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4512 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4513 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4514 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4515 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4516 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4517 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4518 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4519 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4520 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4521 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4522 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4523 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4524 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4525 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4526 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4527 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4528 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4529 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4530 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4531 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4532 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4533 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4534 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4535 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4536 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4537 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4538 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4539 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4540 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4541 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4542 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4543 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4544 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4545 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4546 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4547 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4548 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4549 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4550 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4551 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4552 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4553 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4554 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4555 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4556 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4557 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4558 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4559 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4560 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4561 .ilen = 496,
4562 .result = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4563 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4564 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4565 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4566 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4567 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4568 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4569 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4570 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4571 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4572 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4573 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4574 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4575 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4576 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4577 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4578 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4579 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4580 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4581 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4582 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4583 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4584 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4585 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4586 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4587 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4588 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4589 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4590 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4591 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4592 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4593 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4594 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4595 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4596 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4597 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4598 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4599 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4600 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4601 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4602 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4603 "\x73\x50\x08\x56\x20\x9B\x94\x23"
4604 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4605 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4606 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4607 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4608 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4609 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4610 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4611 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4612 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4613 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4614 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4615 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4616 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4617 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4618 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4619 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4620 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4621 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4622 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4623 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4624 .rlen = 496,
4625 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004626 .np = 3,
4627 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004628 },
4629};
4630
4631static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
4632 { /* Generated from openssl */
4633 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4634 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4635 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4636 .klen = 24,
4637 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4638 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4639 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4640 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4641 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4642 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4643 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4644 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4645 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4646 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4647 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4648 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4649 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4650 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4651 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4652 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4653 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4654 .ilen = 128,
4655 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4656 "\x53\x20\x63\x65\x65\x72\x73\x74"
4657 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4658 "\x20\x79\x65\x53\x72\x63\x74\x65"
4659 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4660 "\x79\x6e\x53\x20\x63\x65\x65\x72"
4661 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4662 "\x6e\x61\x20\x79\x65\x53\x72\x63"
4663 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4664 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4665 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4666 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4667 "\x72\x63\x74\x65\x20\x73\x6f\x54"
4668 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4669 "\x63\x65\x65\x72\x73\x74\x54\x20"
4670 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4671 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004672 }, { /* Generated with Crypto++ */
4673 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4674 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4675 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4676 .klen = 24,
4677 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4678 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4679 .input = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4680 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4681 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4682 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4683 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4684 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4685 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4686 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4687 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4688 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4689 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4690 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4691 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4692 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4693 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4694 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4695 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4696 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4697 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4698 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4699 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4700 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4701 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4702 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4703 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4704 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4705 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4706 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4707 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4708 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4709 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4710 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4711 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4712 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4713 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4714 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4715 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4716 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4717 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4718 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4719 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4720 "\x73\x50\x08\x56\x20\x9B\x94\x23"
4721 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4722 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4723 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4724 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4725 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4726 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4727 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4728 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4729 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4730 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4731 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4732 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4733 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4734 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4735 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4736 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4737 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4738 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4739 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4740 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4741 .ilen = 496,
4742 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4743 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4744 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4745 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4746 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4747 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4748 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4749 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4750 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4751 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4752 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4753 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4754 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4755 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4756 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4757 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4758 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4759 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4760 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4761 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4762 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4763 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4764 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4765 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4766 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4767 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4768 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4769 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4770 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4771 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4772 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4773 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4774 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4775 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4776 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4777 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4778 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4779 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4780 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4781 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4782 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4783 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4784 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4785 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4786 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4787 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4788 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4789 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4790 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4791 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4792 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4793 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4794 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4795 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4796 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4797 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4798 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4799 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4800 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4801 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4802 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4803 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4804 .rlen = 496,
4805 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004806 .np = 3,
4807 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004808 },
4809};
4810
4811static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = {
4812 { /* Generated with Crypto++ */
4813 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4814 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4815 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4816 .klen = 24,
4817 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
4818 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4819 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4820 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4821 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4822 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4823 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4824 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4825 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4826 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4827 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4828 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4829 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4830 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4831 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4832 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4833 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4834 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4835 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4836 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4837 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4838 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4839 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4840 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4841 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4842 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4843 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4844 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4845 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4846 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4847 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4848 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4849 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4850 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4851 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4852 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4853 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4854 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4855 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4856 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4857 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4858 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4859 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4860 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4861 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4862 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4863 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4864 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4865 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4866 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4867 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4868 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4869 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4870 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4871 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4872 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4873 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4874 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4875 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4876 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4877 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4878 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4879 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4880 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4881 .ilen = 496,
4882 .result = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
4883 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
4884 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
4885 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
4886 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
4887 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
4888 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
4889 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
4890 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
4891 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
4892 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
4893 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
4894 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
4895 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
4896 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
4897 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
4898 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
4899 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
4900 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
4901 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
4902 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
4903 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
4904 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
4905 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
4906 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
4907 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
4908 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
4909 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
4910 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
4911 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
4912 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
4913 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
4914 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
4915 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
4916 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
4917 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
4918 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
4919 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
4920 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
4921 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
4922 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
4923 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
4924 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
4925 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
4926 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
4927 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
4928 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
4929 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
4930 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
4931 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
4932 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
4933 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
4934 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
4935 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
4936 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
4937 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
4938 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
4939 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
4940 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
4941 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
4942 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
4943 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
4944 .rlen = 496,
4945 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02004946 .np = 3,
4947 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03004948 }, { /* Generated with Crypto++ */
4949 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4950 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4951 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4952 .klen = 24,
4953 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4954 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4955 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4956 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4957 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4958 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4959 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4960 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4961 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4962 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4963 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4964 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4965 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4966 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4967 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4968 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4969 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4970 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4971 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4972 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4973 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4974 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4975 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4976 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4977 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4978 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4979 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4980 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4981 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4982 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4983 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4984 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4985 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4986 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4987 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4988 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4989 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4990 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4991 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4992 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4993 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4994 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4995 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4996 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4997 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4998 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4999 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5000 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5001 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5002 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5003 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5004 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5005 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5006 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5007 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5008 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5009 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5010 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5011 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5012 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5013 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5014 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5015 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5016 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5017 "\x2E\xB1\x18",
5018 .ilen = 499,
5019 .result = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5020 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5021 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5022 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5023 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5024 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5025 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5026 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5027 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5028 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5029 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5030 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5031 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5032 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5033 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5034 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5035 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5036 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5037 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5038 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5039 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5040 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5041 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5042 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5043 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5044 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5045 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5046 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5047 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5048 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5049 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5050 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5051 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5052 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5053 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5054 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5055 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5056 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5057 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5058 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5059 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5060 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5061 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5062 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5063 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5064 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5065 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5066 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5067 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5068 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5069 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5070 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5071 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5072 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5073 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5074 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5075 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5076 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5077 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5078 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5079 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5080 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5081 "\xF2\x79\xD9",
5082 .rlen = 499,
5083 .also_non_np = 1,
5084 .np = 2,
5085 .tap = { 499 - 16, 16 },
5086 },
5087};
5088
5089static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = {
5090 { /* Generated with Crypto++ */
5091 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5092 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5093 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5094 .klen = 24,
5095 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5096 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5097 .input = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5098 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5099 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5100 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5101 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5102 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5103 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5104 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5105 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5106 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5107 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5108 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5109 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5110 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5111 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5112 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5113 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5114 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5115 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5116 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5117 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5118 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5119 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5120 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5121 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5122 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5123 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5124 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5125 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5126 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5127 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5128 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5129 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5130 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5131 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5132 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5133 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5134 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5135 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5136 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5137 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5138 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5139 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5140 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5141 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5142 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5143 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5144 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5145 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5146 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5147 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5148 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5149 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5150 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5151 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5152 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5153 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5154 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5155 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5156 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5157 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5158 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5159 .ilen = 496,
5160 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5161 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5162 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5163 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5164 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5165 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5166 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5167 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5168 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5169 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5170 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5171 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5172 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5173 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5174 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5175 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5176 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5177 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5178 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5179 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5180 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5181 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5182 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5183 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5184 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5185 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5186 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5187 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5188 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5189 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5190 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5191 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5192 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5193 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5194 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5195 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5196 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5197 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5198 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5199 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5200 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5201 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5202 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5203 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5204 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5205 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5206 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5207 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5208 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5209 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5210 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5211 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5212 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5213 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5214 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5215 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5216 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5217 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5218 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5219 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5220 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5221 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5222 .rlen = 496,
5223 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005224 .np = 3,
5225 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnae080b172012-10-20 14:53:12 +03005226 }, { /* Generated with Crypto++ */
5227 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5228 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5229 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5230 .klen = 24,
5231 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5232 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5233 .input = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5234 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5235 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5236 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5237 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5238 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5239 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5240 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5241 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5242 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5243 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5244 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5245 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5246 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5247 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5248 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5249 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5250 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5251 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5252 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5253 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5254 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5255 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5256 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5257 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5258 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5259 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5260 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5261 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5262 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5263 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5264 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5265 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5266 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5267 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5268 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5269 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5270 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5271 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5272 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5273 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5274 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5275 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5276 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5277 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5278 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5279 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5280 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5281 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5282 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5283 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5284 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5285 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5286 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5287 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5288 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5289 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5290 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5291 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5292 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5293 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5294 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5295 "\xF2\x79\xD9",
5296 .ilen = 499,
5297 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5298 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5299 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5300 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5301 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5302 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5303 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5304 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5305 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5306 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5307 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5308 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5309 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5310 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5311 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5312 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5313 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5314 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5315 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5316 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5317 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5318 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5319 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5320 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5321 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5322 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5323 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5324 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5325 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5326 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5327 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5328 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5329 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5330 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5331 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5332 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5333 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5334 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5335 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5336 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5337 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5338 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5339 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5340 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5341 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5342 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5343 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5344 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5345 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5346 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5347 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5348 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5349 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5350 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5351 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5352 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5353 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5354 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5355 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5356 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5357 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5358 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5359 "\x2E\xB1\x18",
5360 .rlen = 499,
5361 .also_non_np = 1,
5362 .np = 2,
5363 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005364 },
5365};
5366
5367/*
5368 * Blowfish test vectors.
5369 */
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005370#define BF_ENC_TEST_VECTORS 7
5371#define BF_DEC_TEST_VECTORS 7
5372#define BF_CBC_ENC_TEST_VECTORS 2
5373#define BF_CBC_DEC_TEST_VECTORS 2
5374#define BF_CTR_ENC_TEST_VECTORS 2
5375#define BF_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08005376
5377static struct cipher_testvec bf_enc_tv_template[] = {
5378 { /* DES test vectors from OpenSSL */
5379 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
5380 .klen = 8,
5381 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
5382 .ilen = 8,
5383 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5384 .rlen = 8,
5385 }, {
5386 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5387 .klen = 8,
5388 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5389 .ilen = 8,
5390 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5391 .rlen = 8,
5392 }, {
5393 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5394 .klen = 8,
5395 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5396 .ilen = 8,
5397 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5398 .rlen = 8,
5399 }, { /* Vary the keylength... */
5400 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5401 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5402 .klen = 16,
5403 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5404 .ilen = 8,
5405 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5406 .rlen = 8,
5407 }, {
5408 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5409 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5410 "\x00\x11\x22\x33\x44",
5411 .klen = 21,
5412 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5413 .ilen = 8,
5414 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5415 .rlen = 8,
5416 }, { /* Generated with bf488 */
5417 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5418 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5419 "\x00\x11\x22\x33\x44\x55\x66\x77"
5420 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5421 "\x58\x40\x23\x64\x1a\xba\x61\x76"
5422 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5423 "\xff\xff\xff\xff\xff\xff\xff\xff",
5424 .klen = 56,
5425 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5426 .ilen = 8,
5427 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5428 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005429 }, { /* Generated with Crypto++ */
5430 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5431 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5432 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5433 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5434 .klen = 32,
5435 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5436 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5437 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5438 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005439 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5440 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5441 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5442 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5443 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5444 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5445 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5446 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5447 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5448 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5449 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5450 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5451 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5452 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5453 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5454 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5455 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5456 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5457 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5458 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5459 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5460 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5461 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5462 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5463 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5464 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5465 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5466 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5467 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5468 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5469 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5470 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5471 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5472 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5473 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5474 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5475 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5476 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5477 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5478 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5479 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5480 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5481 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5482 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5483 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5484 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5485 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5486 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5487 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5488 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5489 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5490 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5491 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5492 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5493 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5494 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5495 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5496 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5497 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5498 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005499 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5500 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5501 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5502 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005503 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5504 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5505 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5506 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5507 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5508 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5509 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5510 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5511 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5512 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5513 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5514 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5515 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5516 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5517 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5518 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5519 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5520 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5521 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5522 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5523 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5524 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5525 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5526 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5527 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5528 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5529 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5530 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5531 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5532 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5533 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5534 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5535 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5536 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5537 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5538 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5539 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5540 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5541 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5542 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5543 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5544 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5545 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5546 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5547 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5548 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5549 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5550 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5551 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5552 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5553 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5554 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5555 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5556 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5557 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5558 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5559 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5560 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5561 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5562 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005563 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005564 .np = 3,
5565 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005566 },
5567};
5568
5569static struct cipher_testvec bf_dec_tv_template[] = {
5570 { /* DES test vectors from OpenSSL */
5571 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
5572 .klen = 8,
5573 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5574 .ilen = 8,
5575 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
5576 .rlen = 8,
5577 }, {
5578 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5579 .klen = 8,
5580 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5581 .ilen = 8,
5582 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5583 .rlen = 8,
5584 }, {
5585 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5586 .klen = 8,
5587 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5588 .ilen = 8,
5589 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5590 .rlen = 8,
5591 }, { /* Vary the keylength... */
5592 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5593 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5594 .klen = 16,
5595 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5596 .ilen = 8,
5597 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5598 .rlen = 8,
5599 }, {
5600 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5601 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5602 "\x00\x11\x22\x33\x44",
5603 .klen = 21,
5604 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5605 .ilen = 8,
5606 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5607 .rlen = 8,
5608 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
5609 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5610 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5611 "\x00\x11\x22\x33\x44\x55\x66\x77"
5612 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5613 "\x58\x40\x23\x64\x1a\xba\x61\x76"
5614 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5615 "\xff\xff\xff\xff\xff\xff\xff\xff",
5616 .klen = 56,
5617 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5618 .ilen = 8,
5619 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5620 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005621 }, { /* Generated with Crypto++ */
5622 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5623 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5624 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5625 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5626 .klen = 32,
5627 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5628 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5629 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5630 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005631 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5632 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5633 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5634 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5635 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5636 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5637 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5638 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5639 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5640 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5641 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5642 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5643 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5644 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5645 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5646 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5647 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5648 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5649 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5650 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5651 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5652 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5653 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5654 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5655 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5656 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5657 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5658 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5659 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5660 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5661 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5662 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5663 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5664 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5665 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5666 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5667 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5668 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5669 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5670 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5671 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5672 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5673 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5674 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5675 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5676 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5677 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5678 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5679 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5680 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5681 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5682 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5683 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5684 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5685 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5686 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5687 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5688 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5689 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5690 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005691 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5692 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5693 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5694 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005695 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5696 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5697 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5698 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5699 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5700 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5701 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5702 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5703 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5704 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5705 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5706 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5707 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5708 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5709 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5710 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5711 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5712 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5713 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5714 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5715 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5716 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5717 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5718 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5719 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5720 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5721 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5722 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5723 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5724 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5725 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5726 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5727 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5728 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5729 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5730 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5731 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5732 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5733 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5734 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5735 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5736 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5737 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5738 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5739 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5740 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5741 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5742 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5743 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5744 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5745 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5746 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5747 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5748 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5749 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5750 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5751 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5752 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5753 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5754 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005755 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005756 .np = 3,
5757 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005758 },
5759};
5760
5761static struct cipher_testvec bf_cbc_enc_tv_template[] = {
5762 { /* From OpenSSL */
5763 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5764 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5765 .klen = 16,
5766 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5767 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
5768 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
5769 "\x68\x65\x20\x74\x69\x6d\x65\x20"
5770 "\x66\x6f\x72\x20\x00\x00\x00\x00",
5771 .ilen = 32,
5772 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
5773 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
5774 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
5775 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
5776 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005777 }, { /* Generated with Crypto++ */
5778 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5779 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5780 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5781 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5782 .klen = 32,
5783 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5784 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5785 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5786 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5787 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005788 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5789 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5790 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5791 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5792 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5793 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5794 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5795 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5796 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5797 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5798 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5799 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5800 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5801 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5802 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5803 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5804 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5805 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5806 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5807 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5808 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5809 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5810 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5811 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5812 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5813 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5814 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5815 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5816 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5817 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5818 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5819 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5820 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5821 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5822 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5823 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5824 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5825 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5826 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5827 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5828 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5829 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5830 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5831 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5832 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5833 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5834 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5835 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5836 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5837 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5838 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5839 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5840 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5841 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5842 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5843 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5844 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5845 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5846 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5847 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005848 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
5849 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
5850 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
5851 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005852 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
5853 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
5854 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
5855 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
5856 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
5857 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
5858 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
5859 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
5860 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
5861 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
5862 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
5863 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
5864 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
5865 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
5866 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
5867 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
5868 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
5869 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
5870 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
5871 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
5872 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
5873 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
5874 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
5875 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
5876 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
5877 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
5878 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
5879 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
5880 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
5881 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
5882 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
5883 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
5884 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
5885 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
5886 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
5887 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
5888 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
5889 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
5890 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
5891 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
5892 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
5893 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
5894 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
5895 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
5896 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
5897 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
5898 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
5899 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
5900 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
5901 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
5902 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
5903 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
5904 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
5905 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
5906 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
5907 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
5908 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
5909 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
5910 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
5911 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005912 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02005913 .np = 3,
5914 .tap = { 504 - 10, 2, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005915 },
5916};
5917
5918static struct cipher_testvec bf_cbc_dec_tv_template[] = {
5919 { /* From OpenSSL */
5920 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5921 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5922 .klen = 16,
5923 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5924 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
5925 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
5926 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
5927 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
5928 .ilen = 32,
5929 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
5930 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
5931 "\x68\x65\x20\x74\x69\x6d\x65\x20"
5932 "\x66\x6f\x72\x20\x00\x00\x00\x00",
5933 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005934 }, { /* Generated with Crypto++ */
5935 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5936 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5937 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5938 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5939 .klen = 32,
5940 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5941 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
5942 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
5943 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
5944 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005945 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
5946 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
5947 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
5948 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
5949 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
5950 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
5951 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
5952 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
5953 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
5954 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
5955 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
5956 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
5957 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
5958 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
5959 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
5960 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
5961 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
5962 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
5963 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
5964 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
5965 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
5966 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
5967 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
5968 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
5969 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
5970 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
5971 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
5972 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
5973 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
5974 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
5975 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
5976 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
5977 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
5978 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
5979 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
5980 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
5981 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
5982 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
5983 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
5984 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
5985 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
5986 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
5987 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
5988 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
5989 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
5990 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
5991 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
5992 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
5993 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
5994 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
5995 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
5996 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
5997 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
5998 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
5999 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
6000 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
6001 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
6002 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
6003 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
6004 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006005 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6006 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6007 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6008 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006009 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6010 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6011 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6012 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6013 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6014 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6015 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6016 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6017 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6018 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6019 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6020 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6021 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6022 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6023 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6024 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6025 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6026 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6027 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6028 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6029 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6030 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6031 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6032 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6033 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6034 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6035 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6036 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6037 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6038 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6039 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6040 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6041 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6042 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6043 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6044 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6045 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6046 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6047 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6048 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6049 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6050 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6051 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6052 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6053 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6054 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6055 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6056 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6057 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6058 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6059 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6060 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6061 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6062 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6063 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6064 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6065 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6066 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6067 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6068 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006069 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02006070 .np = 3,
6071 .tap = { 504 - 10, 2, 8 },
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006072 },
6073};
6074
6075static struct cipher_testvec bf_ctr_enc_tv_template[] = {
6076 { /* Generated with Crypto++ */
6077 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6078 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6079 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6080 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6081 .klen = 32,
6082 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6083 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6084 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6085 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6086 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006087 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6088 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6089 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6090 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6091 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6092 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6093 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6094 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6095 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6096 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6097 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6098 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6099 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6100 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6101 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6102 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6103 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6104 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6105 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6106 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6107 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6108 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6109 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6110 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6111 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6112 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6113 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6114 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6115 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6116 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6117 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6118 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6119 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6120 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6121 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6122 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6123 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6124 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6125 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6126 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6127 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6128 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6129 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6130 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6131 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6132 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6133 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6134 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6135 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6136 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6137 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6138 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6139 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6140 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6141 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6142 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6143 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6144 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6145 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6146 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006147 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6148 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6149 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6150 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006151 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6152 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6153 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6154 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6155 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6156 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6157 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6158 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6159 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6160 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6161 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6162 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6163 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6164 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6165 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6166 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6167 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6168 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6169 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6170 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6171 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6172 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6173 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6174 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6175 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6176 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6177 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6178 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6179 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6180 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6181 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6182 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6183 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6184 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6185 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6186 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6187 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6188 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6189 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6190 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6191 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6192 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6193 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6194 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6195 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6196 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6197 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6198 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6199 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6200 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6201 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6202 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6203 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6204 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6205 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6206 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6207 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6208 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6209 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6210 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006211 }, { /* Generated with Crypto++ */
6212 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6213 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6214 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6215 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6216 .klen = 32,
6217 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6218 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6219 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6220 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6221 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6222 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006223 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6224 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6225 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6226 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6227 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6228 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6229 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6230 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6231 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6232 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6233 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6234 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6235 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6236 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6237 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6238 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6239 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6240 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6241 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6242 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6243 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6244 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6245 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6246 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6247 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6248 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6249 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6250 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6251 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6252 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6253 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6254 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6255 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6256 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6257 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6258 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6259 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6260 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6261 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6262 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6263 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6264 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6265 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6266 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6267 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6268 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6269 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6270 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6271 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6272 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6273 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6274 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6275 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6276 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6277 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6278 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6279 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6280 "\x2B\xC2\x59\xF0\x64\xFB\x92",
6281 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006282 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6283 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6284 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6285 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6286 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006287 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6288 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6289 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6290 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6291 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6292 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6293 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6294 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6295 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6296 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6297 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6298 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6299 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6300 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6301 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6302 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6303 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6304 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6305 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6306 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6307 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6308 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6309 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6310 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6311 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6312 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6313 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6314 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6315 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6316 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6317 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6318 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6319 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6320 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6321 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6322 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6323 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6324 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6325 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6326 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6327 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6328 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6329 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6330 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6331 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6332 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6333 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6334 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6335 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6336 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6337 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6338 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6339 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6340 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6341 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6342 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6343 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6344 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6345 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006346 .also_non_np = 1,
6347 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006348 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006349 }, { /* Generated with Crypto++ */
6350 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6351 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6352 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6353 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6354 .klen = 32,
6355 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6356 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6357 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6358 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6359 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6360 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6361 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6362 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6363 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6364 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6365 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6366 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6367 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6368 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6369 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6370 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6371 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6372 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6373 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6374 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6375 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6376 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6377 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6378 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6379 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6380 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6381 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6382 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6383 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6384 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6385 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6386 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6387 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6388 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6389 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6390 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6391 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6392 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6393 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6394 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6395 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6396 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6397 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6398 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6399 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6400 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6401 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6402 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6403 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6404 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6405 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6406 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6407 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6408 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6409 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6410 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6411 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6412 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6413 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6414 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6415 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6416 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6417 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6418 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6419 .ilen = 504,
6420 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6421 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6422 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6423 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6424 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6425 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6426 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6427 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6428 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6429 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6430 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6431 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6432 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6433 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6434 "\x0B\x82\x59\x14\x26\x67\x08\x09"
6435 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6436 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6437 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6438 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6439 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6440 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6441 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6442 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6443 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6444 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6445 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6446 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6447 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6448 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
6449 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
6450 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
6451 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
6452 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
6453 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
6454 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
6455 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
6456 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
6457 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
6458 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
6459 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
6460 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
6461 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
6462 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
6463 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
6464 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
6465 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
6466 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
6467 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
6468 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
6469 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
6470 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
6471 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
6472 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
6473 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
6474 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
6475 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
6476 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
6477 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
6478 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
6479 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
6480 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
6481 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
6482 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
6483 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006484 },
6485};
6486
6487static struct cipher_testvec bf_ctr_dec_tv_template[] = {
6488 { /* Generated with Crypto++ */
6489 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6490 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6491 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6492 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6493 .klen = 32,
6494 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6495 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6496 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6497 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6498 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006499 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6500 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6501 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6502 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6503 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6504 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6505 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6506 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6507 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6508 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6509 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6510 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6511 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6512 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6513 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6514 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6515 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6516 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6517 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6518 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6519 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6520 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6521 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6522 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6523 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6524 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6525 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6526 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6527 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6528 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6529 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6530 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6531 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6532 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6533 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6534 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6535 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6536 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6537 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6538 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6539 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6540 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6541 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6542 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6543 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6544 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6545 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6546 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6547 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6548 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6549 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6550 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6551 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6552 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6553 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6554 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6555 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6556 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6557 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6558 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006559 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6560 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6561 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6562 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006563 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6564 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6565 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6566 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6567 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6568 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6569 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6570 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6571 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6572 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6573 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6574 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6575 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6576 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6577 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6578 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6579 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6580 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6581 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6582 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6583 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6584 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6585 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6586 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6587 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6588 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6589 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6590 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6591 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6592 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6593 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6594 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6595 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6596 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6597 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6598 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6599 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6600 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6601 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6602 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6603 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6604 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6605 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6606 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6607 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6608 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6609 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6610 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6611 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6612 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6613 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6614 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6615 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6616 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6617 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6618 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6619 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6620 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6621 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6622 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006623 }, { /* Generated with Crypto++ */
6624 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6625 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6626 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6627 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6628 .klen = 32,
6629 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6630 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6631 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6632 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6633 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6634 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006635 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6636 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6637 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6638 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6639 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6640 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6641 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6642 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6643 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6644 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6645 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6646 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6647 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6648 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6649 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6650 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6651 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6652 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6653 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6654 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6655 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6656 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6657 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6658 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6659 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6660 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6661 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6662 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6663 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6664 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6665 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6666 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6667 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6668 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6669 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6670 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6671 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6672 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6673 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6674 "\x82\x63\x11\xB3\x54\x49\x00\x08"
6675 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6676 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6677 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6678 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6679 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6680 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6681 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6682 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6683 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6684 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6685 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6686 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6687 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6688 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6689 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6690 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6691 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6692 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6693 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03006694 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6695 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6696 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6697 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6698 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006699 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6700 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6701 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6702 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6703 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6704 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6705 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6706 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6707 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6708 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6709 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6710 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6711 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6712 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6713 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6714 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6715 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6716 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6717 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6718 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6719 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6720 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6721 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6722 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6723 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6724 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6725 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6726 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6727 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6728 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6729 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6730 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6731 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6732 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6733 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6734 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6735 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6736 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6737 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6738 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6739 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6740 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6741 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6742 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6743 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6744 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6745 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6746 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6747 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6748 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6749 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6750 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6751 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6752 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6753 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6754 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6755 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6756 "\x2B\xC2\x59\xF0\x64\xFB\x92",
6757 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006758 .also_non_np = 1,
6759 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03006760 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006761 }, { /* Generated with Crypto++ */
6762 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6763 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6764 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6765 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6766 .klen = 32,
6767 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6768 .input = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6769 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6770 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6771 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6772 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6773 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6774 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6775 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6776 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6777 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6778 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6779 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6780 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6781 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6782 "\x0B\x82\x59\x14\x26\x67\x08\x09"
6783 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6784 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6785 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6786 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6787 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6788 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6789 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6790 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6791 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6792 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6793 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6794 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6795 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6796 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
6797 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
6798 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
6799 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
6800 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
6801 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
6802 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
6803 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
6804 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
6805 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
6806 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
6807 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
6808 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
6809 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
6810 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
6811 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
6812 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
6813 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
6814 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
6815 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
6816 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
6817 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
6818 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
6819 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
6820 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
6821 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
6822 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
6823 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
6824 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
6825 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
6826 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
6827 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
6828 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
6829 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
6830 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
6831 .ilen = 504,
6832 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6833 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6834 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6835 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6836 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6837 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6838 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6839 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6840 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6841 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6842 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6843 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6844 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6845 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6846 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6847 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6848 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6849 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6850 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6851 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6852 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6853 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6854 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6855 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6856 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6857 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6858 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6859 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6860 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6861 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6862 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6863 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6864 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6865 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6866 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6867 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6868 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6869 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6870 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6871 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6872 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6873 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6874 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6875 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6876 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6877 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6878 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6879 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6880 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6881 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6882 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6883 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6884 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6885 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6886 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6887 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6888 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6889 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6890 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6891 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6892 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6893 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6894 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6895 .rlen = 504,
Herbert Xuda7f0332008-07-31 17:08:25 +08006896 },
6897};
6898
6899/*
6900 * Twofish test vectors.
6901 */
Jussi Kivilinna573da622011-10-10 23:03:12 +03006902#define TF_ENC_TEST_VECTORS 4
6903#define TF_DEC_TEST_VECTORS 4
6904#define TF_CBC_ENC_TEST_VECTORS 5
6905#define TF_CBC_DEC_TEST_VECTORS 5
6906#define TF_CTR_ENC_TEST_VECTORS 2
6907#define TF_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03006908#define TF_LRW_ENC_TEST_VECTORS 8
6909#define TF_LRW_DEC_TEST_VECTORS 8
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03006910#define TF_XTS_ENC_TEST_VECTORS 5
6911#define TF_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08006912
6913static struct cipher_testvec tf_enc_tv_template[] = {
6914 {
6915 .key = zeroed_string,
6916 .klen = 16,
6917 .input = zeroed_string,
6918 .ilen = 16,
6919 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6920 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
6921 .rlen = 16,
6922 }, {
6923 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6924 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
6925 "\x00\x11\x22\x33\x44\x55\x66\x77",
6926 .klen = 24,
6927 .input = zeroed_string,
6928 .ilen = 16,
6929 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
6930 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
6931 .rlen = 16,
6932 }, {
6933 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6934 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
6935 "\x00\x11\x22\x33\x44\x55\x66\x77"
6936 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
6937 .klen = 32,
6938 .input = zeroed_string,
6939 .ilen = 16,
6940 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
6941 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
6942 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006943 }, { /* Generated with Crypto++ */
6944 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
6945 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
6946 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
6947 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
6948 .klen = 32,
6949 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6950 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6951 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6952 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6953 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6954 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6955 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006956 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6957 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6958 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6959 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6960 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6961 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6962 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6963 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6964 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6965 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6966 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6967 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6968 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6969 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6970 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6971 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6972 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6973 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6974 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6975 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6976 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6977 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6978 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6979 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6980 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6981 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6982 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6983 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6984 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6985 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6986 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6987 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6988 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6989 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6990 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6991 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6992 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6993 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6994 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6995 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6996 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6997 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6998 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6999 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7000 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7001 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7002 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7003 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7004 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7005 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7006 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7007 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7008 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7009 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7010 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7011 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007012 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7013 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7014 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7015 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7016 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7017 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7018 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007019 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7020 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7021 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7022 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7023 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7024 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7025 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7026 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7027 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7028 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7029 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7030 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7031 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7032 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7033 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7034 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7035 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7036 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7037 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7038 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7039 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7040 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7041 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7042 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7043 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7044 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7045 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7046 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7047 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7048 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7049 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7050 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7051 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7052 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7053 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7054 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7055 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7056 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7057 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7058 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7059 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7060 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7061 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7062 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7063 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7064 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7065 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7066 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7067 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7068 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7069 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7070 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7071 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7072 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7073 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7074 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007075 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007076 .np = 3,
7077 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007078 },
7079};
7080
7081static struct cipher_testvec tf_dec_tv_template[] = {
7082 {
7083 .key = zeroed_string,
7084 .klen = 16,
7085 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7086 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7087 .ilen = 16,
7088 .result = zeroed_string,
7089 .rlen = 16,
7090 }, {
7091 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7092 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7093 "\x00\x11\x22\x33\x44\x55\x66\x77",
7094 .klen = 24,
7095 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7096 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7097 .ilen = 16,
7098 .result = zeroed_string,
7099 .rlen = 16,
7100 }, {
7101 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7102 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7103 "\x00\x11\x22\x33\x44\x55\x66\x77"
7104 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7105 .klen = 32,
7106 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7107 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7108 .ilen = 16,
7109 .result = zeroed_string,
7110 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007111 }, { /* Generated with Crypto++ */
7112 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7113 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7114 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7115 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7116 .klen = 32,
7117 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7118 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7119 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7120 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7121 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7122 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7123 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007124 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7125 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7126 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7127 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7128 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7129 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7130 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7131 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7132 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7133 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7134 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7135 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7136 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7137 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7138 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7139 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7140 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7141 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7142 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7143 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7144 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7145 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7146 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7147 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7148 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7149 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7150 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7151 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7152 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7153 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7154 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7155 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7156 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7157 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7158 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7159 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7160 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7161 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7162 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7163 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7164 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7165 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7166 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7167 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7168 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7169 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7170 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7171 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7172 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7173 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7174 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7175 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7176 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7177 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7178 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7179 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007180 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7181 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7182 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7183 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7184 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7185 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7186 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007187 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7188 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7189 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7190 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7191 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7192 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7193 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7194 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7195 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7196 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7197 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7198 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7199 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7200 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7201 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7202 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7203 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7204 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7205 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7206 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7207 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7208 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7209 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7210 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7211 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7212 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7213 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7214 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7215 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7216 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7217 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7218 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7219 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7220 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7221 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7222 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7223 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7224 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7225 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7226 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7227 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7228 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7229 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7230 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7231 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7232 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7233 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7234 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7235 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7236 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7237 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7238 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7239 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7240 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7241 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7242 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007243 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007244 .np = 3,
7245 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007246 },
7247};
7248
7249static struct cipher_testvec tf_cbc_enc_tv_template[] = {
7250 { /* Generated with Nettle */
7251 .key = zeroed_string,
7252 .klen = 16,
7253 .iv = zeroed_string,
7254 .input = zeroed_string,
7255 .ilen = 16,
7256 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7257 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7258 .rlen = 16,
7259 }, {
7260 .key = zeroed_string,
7261 .klen = 16,
7262 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7263 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7264 .input = zeroed_string,
7265 .ilen = 16,
7266 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7267 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7268 .rlen = 16,
7269 }, {
7270 .key = zeroed_string,
7271 .klen = 16,
7272 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7273 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7274 .input = zeroed_string,
7275 .ilen = 16,
7276 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7277 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7278 .rlen = 16,
7279 }, {
7280 .key = zeroed_string,
7281 .klen = 16,
7282 .iv = zeroed_string,
7283 .input = zeroed_string,
7284 .ilen = 48,
7285 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7286 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7287 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7288 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7289 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7290 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7291 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007292 }, { /* Generated with Crypto++ */
7293 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7294 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7295 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7296 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7297 .klen = 32,
7298 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7299 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7300 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7301 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7302 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7303 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7304 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7305 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7306 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007307 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7308 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7309 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7310 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7311 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7312 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7313 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7314 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7315 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7316 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7317 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7318 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7319 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7320 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7321 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7322 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7323 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7324 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7325 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7326 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7327 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7328 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7329 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7330 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7331 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7332 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7333 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7334 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7335 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7336 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7337 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7338 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7339 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7340 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7341 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7342 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7343 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7344 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7345 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7346 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7347 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7348 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7349 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7350 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7351 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7352 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7353 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7354 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7355 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7356 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7357 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7358 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7359 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7360 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7361 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7362 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007363 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7364 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7365 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7366 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7367 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7368 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7369 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007370 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7371 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7372 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7373 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7374 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7375 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7376 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7377 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7378 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7379 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7380 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7381 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7382 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7383 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7384 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7385 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7386 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7387 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7388 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7389 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7390 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7391 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7392 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7393 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7394 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7395 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7396 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7397 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7398 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7399 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7400 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7401 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7402 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7403 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7404 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7405 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7406 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7407 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7408 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7409 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7410 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7411 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7412 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7413 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7414 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7415 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7416 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7417 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7418 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7419 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7420 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7421 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7422 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7423 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7424 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7425 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007426 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007427 .np = 3,
7428 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007429 },
7430};
7431
7432static struct cipher_testvec tf_cbc_dec_tv_template[] = {
7433 { /* Reverse of the first four above */
7434 .key = zeroed_string,
7435 .klen = 16,
7436 .iv = zeroed_string,
7437 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7438 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7439 .ilen = 16,
7440 .result = zeroed_string,
7441 .rlen = 16,
7442 }, {
7443 .key = zeroed_string,
7444 .klen = 16,
7445 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7446 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7447 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7448 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7449 .ilen = 16,
7450 .result = zeroed_string,
7451 .rlen = 16,
7452 }, {
7453 .key = zeroed_string,
7454 .klen = 16,
7455 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7456 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7457 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7458 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7459 .ilen = 16,
7460 .result = zeroed_string,
7461 .rlen = 16,
7462 }, {
7463 .key = zeroed_string,
7464 .klen = 16,
7465 .iv = zeroed_string,
7466 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7467 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7468 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7469 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7470 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7471 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7472 .ilen = 48,
7473 .result = zeroed_string,
7474 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007475 }, { /* Generated with Crypto++ */
7476 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7477 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7478 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7479 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7480 .klen = 32,
7481 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7482 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7483 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7484 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7485 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7486 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7487 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7488 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7489 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007490 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7491 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7492 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7493 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7494 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7495 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7496 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7497 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7498 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7499 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7500 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7501 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7502 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7503 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7504 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7505 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7506 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7507 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7508 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7509 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7510 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7511 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7512 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7513 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7514 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7515 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7516 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7517 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7518 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7519 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7520 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7521 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7522 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7523 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7524 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7525 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7526 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7527 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7528 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7529 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7530 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7531 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7532 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7533 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7534 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7535 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7536 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7537 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7538 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7539 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7540 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7541 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7542 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7543 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7544 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7545 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007546 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7547 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7548 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7549 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7550 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7551 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7552 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007553 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7554 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7555 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7556 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7557 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7558 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7559 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7560 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7561 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7562 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7563 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7564 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7565 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7566 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7567 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7568 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7569 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7570 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7571 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7572 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7573 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7574 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7575 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7576 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7577 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7578 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7579 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7580 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7581 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7582 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7583 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7584 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7585 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7586 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7587 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7588 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7589 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7590 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7591 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7592 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7593 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7594 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7595 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7596 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7597 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7598 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7599 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7600 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7601 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7602 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7603 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7604 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7605 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7606 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7607 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7608 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007609 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02007610 .np = 3,
7611 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03007612 },
7613};
7614
7615static struct cipher_testvec tf_ctr_enc_tv_template[] = {
7616 { /* Generated with Crypto++ */
7617 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7618 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7619 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7620 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7621 .klen = 32,
7622 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7623 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7624 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7625 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7626 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7627 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7628 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7629 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7630 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007631 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7632 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7633 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7634 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7635 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7636 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7637 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7638 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7639 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7640 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7641 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7642 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7643 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7644 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7645 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7646 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7647 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7648 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7649 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7650 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7651 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7652 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7653 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7654 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7655 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7656 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7657 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7658 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7659 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7660 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7661 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7662 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7663 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7664 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7665 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7666 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7667 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7668 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7669 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7670 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7671 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7672 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7673 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7674 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7675 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7676 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7677 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7678 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7679 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7680 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7681 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7682 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7683 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7684 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7685 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7686 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007687 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
7688 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
7689 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
7690 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
7691 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
7692 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
7693 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007694 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
7695 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
7696 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
7697 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
7698 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
7699 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
7700 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
7701 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
7702 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
7703 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
7704 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
7705 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
7706 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
7707 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
7708 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
7709 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
7710 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
7711 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
7712 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
7713 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
7714 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
7715 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
7716 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
7717 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
7718 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
7719 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
7720 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
7721 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
7722 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
7723 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
7724 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
7725 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
7726 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
7727 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
7728 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
7729 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
7730 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
7731 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
7732 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
7733 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
7734 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
7735 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
7736 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
7737 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
7738 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
7739 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
7740 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
7741 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
7742 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
7743 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
7744 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
7745 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
7746 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
7747 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
7748 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
7749 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007750 }, { /* Generated with Crypto++ */
7751 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7752 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7753 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7754 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7755 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03007756 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
7757 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
7758 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7759 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7760 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7761 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7762 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7763 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7764 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7765 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7766 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7767 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7768 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7769 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7770 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7771 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7772 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7773 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7774 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7775 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7776 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7777 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7778 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7779 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7780 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7781 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7782 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7783 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7784 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7785 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7786 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7787 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7788 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7789 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7790 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7791 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7792 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7793 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7794 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7795 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7796 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7797 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7798 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7799 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7800 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7801 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7802 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7803 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7804 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7805 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7806 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7807 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7808 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7809 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7810 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7811 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7812 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7813 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7814 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7815 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7816 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7817 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7818 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7819 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7820 .ilen = 496,
7821 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
7822 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
7823 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
7824 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
7825 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
7826 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
7827 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
7828 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
7829 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
7830 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
7831 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
7832 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
7833 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
7834 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
7835 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
7836 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
7837 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
7838 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
7839 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
7840 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
7841 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
7842 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
7843 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
7844 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
7845 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
7846 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
7847 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
7848 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
7849 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
7850 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
7851 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
7852 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
7853 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
7854 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
7855 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
7856 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
7857 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
7858 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
7859 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
7860 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
7861 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
7862 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
7863 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
7864 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
7865 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
7866 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
7867 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
7868 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
7869 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
7870 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
7871 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
7872 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
7873 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
7874 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
7875 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
7876 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
7877 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
7878 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
7879 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
7880 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
7881 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
7882 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
7883 .rlen = 496,
7884 }, { /* Generated with Crypto++ */
7885 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7886 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7887 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7888 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7889 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007890 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7891 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7892 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7893 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7894 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7895 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7896 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7897 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7898 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7899 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007900 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7901 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7902 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7903 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7904 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7905 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7906 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7907 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7908 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7909 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7910 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7911 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7912 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7913 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7914 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7915 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7916 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7917 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7918 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7919 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7920 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7921 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7922 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7923 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7924 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7925 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7926 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7927 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7928 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7929 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7930 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7931 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7932 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7933 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7934 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7935 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7936 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7937 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7938 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7939 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7940 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7941 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7942 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7943 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7944 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7945 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7946 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7947 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7948 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7949 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7950 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7951 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7952 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7953 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7954 "\x2B\xC2\x59",
7955 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007956 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
7957 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
7958 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
7959 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
7960 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
7961 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
7962 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
7963 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007964 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
7965 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
7966 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
7967 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
7968 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
7969 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
7970 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
7971 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
7972 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
7973 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
7974 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
7975 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
7976 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
7977 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
7978 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
7979 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
7980 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
7981 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
7982 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
7983 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
7984 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
7985 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
7986 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
7987 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
7988 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
7989 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
7990 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
7991 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
7992 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
7993 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
7994 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
7995 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
7996 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
7997 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
7998 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
7999 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8000 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8001 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8002 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8003 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8004 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8005 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8006 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8007 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8008 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8009 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8010 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8011 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8012 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8013 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8014 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8015 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8016 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8017 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8018 "\x6C\x82\x9D",
8019 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008020 .also_non_np = 1,
8021 .np = 2,
8022 .tap = { 499 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03008023 },
8024};
8025
8026static struct cipher_testvec tf_ctr_dec_tv_template[] = {
8027 { /* Generated with Crypto++ */
8028 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8029 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8030 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8031 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8032 .klen = 32,
8033 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8034 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8035 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8036 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8037 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8038 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8039 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8040 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8041 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008042 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
8043 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8044 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8045 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8046 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8047 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8048 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8049 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8050 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8051 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8052 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8053 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8054 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8055 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8056 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8057 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8058 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8059 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8060 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8061 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8062 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8063 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8064 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8065 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8066 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8067 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8068 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8069 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8070 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8071 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8072 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8073 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8074 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8075 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8076 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8077 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8078 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8079 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8080 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8081 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8082 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8083 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8084 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8085 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8086 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8087 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8088 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8089 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8090 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8091 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8092 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8093 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8094 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8095 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8096 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
8097 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008098 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8099 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8100 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8101 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8102 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8103 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8104 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008105 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8106 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8107 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8108 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8109 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8110 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8111 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8112 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8113 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8114 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8115 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8116 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8117 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8118 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8119 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8120 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8121 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8122 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8123 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8124 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8125 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8126 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8127 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8128 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8129 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8130 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8131 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8132 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8133 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8134 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8135 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8136 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8137 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8138 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8139 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8140 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8141 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8142 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8143 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8144 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8145 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8146 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8147 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8148 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8149 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8150 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8151 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8152 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8153 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8154 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8155 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8156 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8157 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8158 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8159 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8160 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008161 }, { /* Generated with Crypto++ */
8162 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8163 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8164 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8165 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8166 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03008167 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
8168 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
8169 .input = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8170 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8171 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8172 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8173 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8174 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8175 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8176 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8177 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8178 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8179 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8180 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8181 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8182 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8183 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8184 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8185 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8186 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8187 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8188 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8189 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8190 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8191 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8192 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8193 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8194 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8195 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8196 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8197 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8198 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8199 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8200 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8201 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8202 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8203 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8204 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8205 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8206 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8207 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8208 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8209 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8210 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8211 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8212 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8213 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8214 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8215 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8216 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8217 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8218 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8219 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8220 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8221 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8222 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8223 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8224 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8225 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8226 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8227 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8228 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8229 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8230 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8231 .ilen = 496,
8232 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8233 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8234 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8235 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8236 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8237 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8238 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8239 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8240 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8241 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8242 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8243 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8244 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8245 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8246 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8247 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8248 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8249 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8250 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8251 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8252 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8253 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8254 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8255 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8256 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8257 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8258 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8259 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8260 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8261 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8262 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8263 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8264 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8265 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8266 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8267 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8268 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8269 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8270 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8271 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8272 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8273 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8274 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8275 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8276 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8277 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8278 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8279 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8280 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8281 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8282 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8283 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8284 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8285 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8286 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8287 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8288 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8289 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8290 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8291 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8292 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8293 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8294 .rlen = 496,
8295 }, { /* Generated with Crypto++ */
8296 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8297 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8298 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8299 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8300 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008301 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8302 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8303 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8304 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8305 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8306 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8307 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8308 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8309 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8310 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008311 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8312 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8313 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8314 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8315 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8316 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8317 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8318 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8319 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8320 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8321 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8322 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8323 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8324 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8325 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8326 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8327 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8328 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8329 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8330 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8331 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8332 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8333 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8334 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8335 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8336 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8337 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8338 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8339 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8340 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8341 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8342 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8343 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8344 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8345 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8346 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8347 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8348 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8349 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8350 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8351 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8352 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8353 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8354 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8355 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8356 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8357 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8358 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8359 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8360 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8361 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8362 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8363 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8364 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8365 "\x6C\x82\x9D",
8366 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03008367 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8368 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8369 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8370 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8371 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8372 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8373 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8374 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02008375 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8376 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8377 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8378 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8379 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8380 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8381 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8382 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8383 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8384 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8385 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8386 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8387 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8388 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8389 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8390 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8391 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8392 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8393 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8394 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8395 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8396 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8397 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8398 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8399 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8400 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8401 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8402 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8403 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8404 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8405 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8406 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8407 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8408 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8409 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8410 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8411 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8412 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8413 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8414 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8415 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8416 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8417 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8418 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8419 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8420 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8421 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8422 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8423 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8424 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8425 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8426 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8427 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8428 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
8429 "\x2B\xC2\x59",
8430 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008431 .also_non_np = 1,
8432 .np = 2,
8433 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08008434 },
8435};
8436
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008437static struct cipher_testvec tf_lrw_enc_tv_template[] = {
8438 /* Generated from AES-LRW test vectors */
8439 {
8440 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8441 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8442 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8443 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8444 .klen = 32,
8445 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8446 "\x00\x00\x00\x00\x00\x00\x00\x01",
8447 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8448 "\x38\x39\x41\x42\x43\x44\x45\x46",
8449 .ilen = 16,
8450 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8451 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8452 .rlen = 16,
8453 }, {
8454 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8455 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8456 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8457 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8458 .klen = 32,
8459 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8460 "\x00\x00\x00\x00\x00\x00\x00\x02",
8461 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8462 "\x38\x39\x41\x42\x43\x44\x45\x46",
8463 .ilen = 16,
8464 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8465 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8466 .rlen = 16,
8467 }, {
8468 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8469 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8470 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8471 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8472 .klen = 32,
8473 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8474 "\x00\x00\x00\x02\x00\x00\x00\x00",
8475 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8476 "\x38\x39\x41\x42\x43\x44\x45\x46",
8477 .ilen = 16,
8478 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8479 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8480 .rlen = 16,
8481 }, {
8482 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8483 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8484 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8485 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8486 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8487 .klen = 40,
8488 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8489 "\x00\x00\x00\x00\x00\x00\x00\x01",
8490 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8491 "\x38\x39\x41\x42\x43\x44\x45\x46",
8492 .ilen = 16,
8493 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8494 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8495 .rlen = 16,
8496 }, {
8497 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8498 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8499 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8500 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8501 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8502 .klen = 40,
8503 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8504 "\x00\x00\x00\x02\x00\x00\x00\x00",
8505 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8506 "\x38\x39\x41\x42\x43\x44\x45\x46",
8507 .ilen = 16,
8508 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8509 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8510 .rlen = 16,
8511 }, {
8512 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8513 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8514 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8515 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8516 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8517 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8518 .klen = 48,
8519 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8520 "\x00\x00\x00\x00\x00\x00\x00\x01",
8521 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8522 "\x38\x39\x41\x42\x43\x44\x45\x46",
8523 .ilen = 16,
8524 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8525 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8526 .rlen = 16,
8527 }, {
8528 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8529 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8530 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8531 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8532 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8533 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8534 .klen = 48,
8535 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8536 "\x00\x00\x00\x02\x00\x00\x00\x00",
8537 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
8538 "\x38\x39\x41\x42\x43\x44\x45\x46",
8539 .ilen = 16,
8540 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8541 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8542 .rlen = 16,
8543 }, {
8544 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8545 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8546 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8547 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8548 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8549 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8550 .klen = 48,
8551 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8552 "\x00\x00\x00\x00\x00\x00\x00\x01",
8553 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8554 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8555 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8556 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8557 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8558 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8559 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8560 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8561 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8562 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8563 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8564 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8565 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8566 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8567 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8568 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8569 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8570 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8571 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8572 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8573 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8574 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8575 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8576 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8577 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8578 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8579 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8580 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8581 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8582 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8583 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8584 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8585 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8586 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8587 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8588 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8589 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8590 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8591 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8592 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8593 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8594 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8595 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8596 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8597 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8598 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8599 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8600 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8601 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8602 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8603 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8604 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8605 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8606 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8607 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8608 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8609 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8610 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8611 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8612 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8613 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8614 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8615 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8616 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8617 .ilen = 512,
8618 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
8619 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
8620 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
8621 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
8622 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
8623 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
8624 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
8625 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
8626 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
8627 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
8628 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
8629 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
8630 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
8631 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
8632 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
8633 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
8634 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
8635 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
8636 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
8637 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
8638 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
8639 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
8640 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
8641 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
8642 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
8643 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
8644 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
8645 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
8646 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
8647 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
8648 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
8649 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
8650 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
8651 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
8652 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
8653 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
8654 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
8655 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
8656 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
8657 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
8658 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
8659 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
8660 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
8661 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
8662 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
8663 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
8664 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
8665 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
8666 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
8667 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
8668 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
8669 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
8670 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
8671 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
8672 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
8673 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
8674 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
8675 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
8676 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
8677 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
8678 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
8679 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
8680 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
8681 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
8682 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008683 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02008684 .np = 3,
8685 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008686 },
8687};
8688
8689static struct cipher_testvec tf_lrw_dec_tv_template[] = {
8690 /* Generated from AES-LRW test vectors */
8691 /* same as enc vectors with input and result reversed */
8692 {
8693 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8694 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8695 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8696 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8697 .klen = 32,
8698 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8699 "\x00\x00\x00\x00\x00\x00\x00\x01",
8700 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8701 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8702 .ilen = 16,
8703 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8704 "\x38\x39\x41\x42\x43\x44\x45\x46",
8705 .rlen = 16,
8706 }, {
8707 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8708 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8709 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8710 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8711 .klen = 32,
8712 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8713 "\x00\x00\x00\x00\x00\x00\x00\x02",
8714 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8715 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8716 .ilen = 16,
8717 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8718 "\x38\x39\x41\x42\x43\x44\x45\x46",
8719 .rlen = 16,
8720 }, {
8721 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8722 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8723 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8724 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8725 .klen = 32,
8726 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8727 "\x00\x00\x00\x02\x00\x00\x00\x00",
8728 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8729 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8730 .ilen = 16,
8731 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8732 "\x38\x39\x41\x42\x43\x44\x45\x46",
8733 .rlen = 16,
8734 }, {
8735 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8736 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8737 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8738 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8739 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8740 .klen = 40,
8741 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8742 "\x00\x00\x00\x00\x00\x00\x00\x01",
8743 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8744 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8745 .ilen = 16,
8746 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8747 "\x38\x39\x41\x42\x43\x44\x45\x46",
8748 .rlen = 16,
8749 }, {
8750 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8751 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8752 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8753 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8754 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8755 .klen = 40,
8756 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8757 "\x00\x00\x00\x02\x00\x00\x00\x00",
8758 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8759 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8760 .ilen = 16,
8761 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8762 "\x38\x39\x41\x42\x43\x44\x45\x46",
8763 .rlen = 16,
8764 }, {
8765 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8766 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8767 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8768 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8769 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8770 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8771 .klen = 48,
8772 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8773 "\x00\x00\x00\x00\x00\x00\x00\x01",
8774 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8775 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8776 .ilen = 16,
8777 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8778 "\x38\x39\x41\x42\x43\x44\x45\x46",
8779 .rlen = 16,
8780 }, {
8781 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8782 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8783 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8784 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8785 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8786 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8787 .klen = 48,
8788 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8789 "\x00\x00\x00\x02\x00\x00\x00\x00",
8790 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8791 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8792 .ilen = 16,
8793 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8794 "\x38\x39\x41\x42\x43\x44\x45\x46",
8795 .rlen = 16,
8796 }, {
8797 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8798 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8799 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8800 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8801 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8802 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8803 .klen = 48,
8804 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8805 "\x00\x00\x00\x00\x00\x00\x00\x01",
8806 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
8807 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
8808 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
8809 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
8810 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
8811 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
8812 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
8813 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
8814 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
8815 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
8816 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
8817 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
8818 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
8819 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
8820 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
8821 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
8822 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
8823 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
8824 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
8825 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
8826 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
8827 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
8828 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
8829 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
8830 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
8831 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
8832 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
8833 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
8834 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
8835 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
8836 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
8837 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
8838 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
8839 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
8840 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
8841 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
8842 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
8843 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
8844 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
8845 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
8846 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
8847 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
8848 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
8849 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
8850 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
8851 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
8852 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
8853 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
8854 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
8855 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
8856 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
8857 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
8858 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
8859 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
8860 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
8861 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
8862 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
8863 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
8864 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
8865 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
8866 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
8867 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
8868 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
8869 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
8870 .ilen = 512,
8871 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8872 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8873 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8874 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8875 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8876 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8877 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8878 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8879 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8880 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8881 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8882 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8883 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8884 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8885 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8886 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8887 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8888 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8889 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8890 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8891 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8892 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8893 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8894 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8895 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8896 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8897 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8898 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8899 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8900 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8901 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8902 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8903 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8904 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8905 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8906 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8907 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8908 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8909 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8910 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8911 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8912 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8913 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8914 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8915 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8916 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8917 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8918 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8919 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8920 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8921 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8922 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8923 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8924 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8925 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8926 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8927 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8928 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8929 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8930 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8931 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8932 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8933 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8934 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8935 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008936 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02008937 .np = 3,
8938 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03008939 },
8940};
8941
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03008942static struct cipher_testvec tf_xts_enc_tv_template[] = {
8943 /* Generated from AES-XTS test vectors */
8944{
8945 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
8946 "\x00\x00\x00\x00\x00\x00\x00\x00"
8947 "\x00\x00\x00\x00\x00\x00\x00\x00"
8948 "\x00\x00\x00\x00\x00\x00\x00\x00",
8949 .klen = 32,
8950 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8951 "\x00\x00\x00\x00\x00\x00\x00\x00",
8952 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
8953 "\x00\x00\x00\x00\x00\x00\x00\x00"
8954 "\x00\x00\x00\x00\x00\x00\x00\x00"
8955 "\x00\x00\x00\x00\x00\x00\x00\x00",
8956 .ilen = 32,
8957 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
8958 "\x30\x74\xe4\x44\x52\x77\x97\x43"
8959 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
8960 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
8961 .rlen = 32,
8962 }, {
8963 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
8964 "\x11\x11\x11\x11\x11\x11\x11\x11"
8965 "\x22\x22\x22\x22\x22\x22\x22\x22"
8966 "\x22\x22\x22\x22\x22\x22\x22\x22",
8967 .klen = 32,
8968 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8969 "\x00\x00\x00\x00\x00\x00\x00\x00",
8970 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
8971 "\x44\x44\x44\x44\x44\x44\x44\x44"
8972 "\x44\x44\x44\x44\x44\x44\x44\x44"
8973 "\x44\x44\x44\x44\x44\x44\x44\x44",
8974 .ilen = 32,
8975 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
8976 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
8977 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
8978 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
8979 .rlen = 32,
8980 }, {
8981 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
8982 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
8983 "\x22\x22\x22\x22\x22\x22\x22\x22"
8984 "\x22\x22\x22\x22\x22\x22\x22\x22",
8985 .klen = 32,
8986 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8987 "\x00\x00\x00\x00\x00\x00\x00\x00",
8988 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
8989 "\x44\x44\x44\x44\x44\x44\x44\x44"
8990 "\x44\x44\x44\x44\x44\x44\x44\x44"
8991 "\x44\x44\x44\x44\x44\x44\x44\x44",
8992 .ilen = 32,
8993 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
8994 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
8995 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
8996 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
8997 .rlen = 32,
8998 }, {
8999 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9000 "\x23\x53\x60\x28\x74\x71\x35\x26"
9001 "\x31\x41\x59\x26\x53\x58\x97\x93"
9002 "\x23\x84\x62\x64\x33\x83\x27\x95",
9003 .klen = 32,
9004 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9005 "\x00\x00\x00\x00\x00\x00\x00\x00",
9006 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9007 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9008 "\x10\x11\x12\x13\x14\x15\x16\x17"
9009 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9010 "\x20\x21\x22\x23\x24\x25\x26\x27"
9011 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9012 "\x30\x31\x32\x33\x34\x35\x36\x37"
9013 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9014 "\x40\x41\x42\x43\x44\x45\x46\x47"
9015 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9016 "\x50\x51\x52\x53\x54\x55\x56\x57"
9017 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9018 "\x60\x61\x62\x63\x64\x65\x66\x67"
9019 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9020 "\x70\x71\x72\x73\x74\x75\x76\x77"
9021 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9022 "\x80\x81\x82\x83\x84\x85\x86\x87"
9023 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9024 "\x90\x91\x92\x93\x94\x95\x96\x97"
9025 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9026 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9027 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9028 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9029 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9030 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9031 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9032 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9033 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9034 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9035 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9036 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9037 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9038 "\x00\x01\x02\x03\x04\x05\x06\x07"
9039 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9040 "\x10\x11\x12\x13\x14\x15\x16\x17"
9041 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9042 "\x20\x21\x22\x23\x24\x25\x26\x27"
9043 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9044 "\x30\x31\x32\x33\x34\x35\x36\x37"
9045 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9046 "\x40\x41\x42\x43\x44\x45\x46\x47"
9047 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9048 "\x50\x51\x52\x53\x54\x55\x56\x57"
9049 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9050 "\x60\x61\x62\x63\x64\x65\x66\x67"
9051 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9052 "\x70\x71\x72\x73\x74\x75\x76\x77"
9053 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9054 "\x80\x81\x82\x83\x84\x85\x86\x87"
9055 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9056 "\x90\x91\x92\x93\x94\x95\x96\x97"
9057 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9058 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9059 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9060 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9061 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9062 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9063 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9064 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9065 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9066 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9067 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9068 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9069 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9070 .ilen = 512,
9071 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9072 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9073 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9074 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9075 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9076 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9077 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9078 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9079 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9080 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9081 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9082 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9083 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9084 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9085 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9086 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9087 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9088 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9089 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9090 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9091 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9092 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9093 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9094 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9095 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9096 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9097 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9098 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9099 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9100 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9101 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9102 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9103 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9104 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9105 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9106 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9107 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9108 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9109 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9110 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9111 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9112 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9113 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9114 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9115 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9116 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9117 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9118 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9119 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9120 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9121 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9122 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9123 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9124 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9125 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9126 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9127 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9128 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9129 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9130 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9131 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9132 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9133 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9134 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9135 .rlen = 512,
9136 }, {
9137 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9138 "\x23\x53\x60\x28\x74\x71\x35\x26"
9139 "\x62\x49\x77\x57\x24\x70\x93\x69"
9140 "\x99\x59\x57\x49\x66\x96\x76\x27"
9141 "\x31\x41\x59\x26\x53\x58\x97\x93"
9142 "\x23\x84\x62\x64\x33\x83\x27\x95"
9143 "\x02\x88\x41\x97\x16\x93\x99\x37"
9144 "\x51\x05\x82\x09\x74\x94\x45\x92",
9145 .klen = 64,
9146 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9147 "\x00\x00\x00\x00\x00\x00\x00\x00",
9148 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9149 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9150 "\x10\x11\x12\x13\x14\x15\x16\x17"
9151 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9152 "\x20\x21\x22\x23\x24\x25\x26\x27"
9153 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9154 "\x30\x31\x32\x33\x34\x35\x36\x37"
9155 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9156 "\x40\x41\x42\x43\x44\x45\x46\x47"
9157 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9158 "\x50\x51\x52\x53\x54\x55\x56\x57"
9159 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9160 "\x60\x61\x62\x63\x64\x65\x66\x67"
9161 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9162 "\x70\x71\x72\x73\x74\x75\x76\x77"
9163 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9164 "\x80\x81\x82\x83\x84\x85\x86\x87"
9165 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9166 "\x90\x91\x92\x93\x94\x95\x96\x97"
9167 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9168 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9169 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9170 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9171 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9172 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9173 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9174 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9175 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9176 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9177 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9178 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9179 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9180 "\x00\x01\x02\x03\x04\x05\x06\x07"
9181 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9182 "\x10\x11\x12\x13\x14\x15\x16\x17"
9183 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9184 "\x20\x21\x22\x23\x24\x25\x26\x27"
9185 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9186 "\x30\x31\x32\x33\x34\x35\x36\x37"
9187 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9188 "\x40\x41\x42\x43\x44\x45\x46\x47"
9189 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9190 "\x50\x51\x52\x53\x54\x55\x56\x57"
9191 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9192 "\x60\x61\x62\x63\x64\x65\x66\x67"
9193 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9194 "\x70\x71\x72\x73\x74\x75\x76\x77"
9195 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9196 "\x80\x81\x82\x83\x84\x85\x86\x87"
9197 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9198 "\x90\x91\x92\x93\x94\x95\x96\x97"
9199 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9200 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9201 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9202 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9203 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9204 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9205 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9206 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9207 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9208 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9209 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9210 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9211 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9212 .ilen = 512,
9213 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9214 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9215 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9216 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9217 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9218 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9219 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9220 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9221 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9222 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9223 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9224 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9225 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9226 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9227 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9228 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9229 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9230 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9231 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9232 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9233 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9234 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9235 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9236 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9237 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9238 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9239 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9240 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9241 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9242 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9243 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9244 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9245 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9246 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9247 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9248 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9249 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9250 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9251 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9252 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9253 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9254 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9255 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9256 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9257 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9258 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9259 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9260 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9261 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9262 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9263 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9264 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9265 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9266 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9267 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9268 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9269 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9270 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9271 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9272 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9273 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9274 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9275 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9276 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9277 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009278 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009279 .np = 3,
9280 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009281 },
9282};
9283
9284static struct cipher_testvec tf_xts_dec_tv_template[] = {
9285 /* Generated from AES-XTS test vectors */
9286 /* same as enc vectors with input and result reversed */
9287 {
9288 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
9289 "\x00\x00\x00\x00\x00\x00\x00\x00"
9290 "\x00\x00\x00\x00\x00\x00\x00\x00"
9291 "\x00\x00\x00\x00\x00\x00\x00\x00",
9292 .klen = 32,
9293 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9294 "\x00\x00\x00\x00\x00\x00\x00\x00",
9295 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9296 "\x30\x74\xe4\x44\x52\x77\x97\x43"
9297 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9298 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9299 .ilen = 32,
9300 .result = "\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 "\x00\x00\x00\x00\x00\x00\x00\x00",
9304 .rlen = 32,
9305 }, {
9306 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
9307 "\x11\x11\x11\x11\x11\x11\x11\x11"
9308 "\x22\x22\x22\x22\x22\x22\x22\x22"
9309 "\x22\x22\x22\x22\x22\x22\x22\x22",
9310 .klen = 32,
9311 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9312 "\x00\x00\x00\x00\x00\x00\x00\x00",
9313 .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9314 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9315 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9316 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
9317 .ilen = 32,
9318 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9319 "\x44\x44\x44\x44\x44\x44\x44\x44"
9320 "\x44\x44\x44\x44\x44\x44\x44\x44"
9321 "\x44\x44\x44\x44\x44\x44\x44\x44",
9322 .rlen = 32,
9323 }, {
9324 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9325 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9326 "\x22\x22\x22\x22\x22\x22\x22\x22"
9327 "\x22\x22\x22\x22\x22\x22\x22\x22",
9328 .klen = 32,
9329 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
9330 "\x00\x00\x00\x00\x00\x00\x00\x00",
9331 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9332 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9333 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9334 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9335 .ilen = 32,
9336 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9337 "\x44\x44\x44\x44\x44\x44\x44\x44"
9338 "\x44\x44\x44\x44\x44\x44\x44\x44"
9339 "\x44\x44\x44\x44\x44\x44\x44\x44",
9340 .rlen = 32,
9341 }, {
9342 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9343 "\x23\x53\x60\x28\x74\x71\x35\x26"
9344 "\x31\x41\x59\x26\x53\x58\x97\x93"
9345 "\x23\x84\x62\x64\x33\x83\x27\x95",
9346 .klen = 32,
9347 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
9348 "\x00\x00\x00\x00\x00\x00\x00\x00",
9349 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9350 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9351 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9352 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9353 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9354 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9355 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9356 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9357 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9358 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9359 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9360 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9361 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9362 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9363 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9364 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9365 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9366 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9367 "\x39\x80\x39\x09\x97\x65\xf2\x83"
9368 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9369 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9370 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9371 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9372 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9373 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9374 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9375 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9376 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9377 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9378 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9379 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9380 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9381 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9382 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9383 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9384 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9385 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9386 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9387 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9388 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9389 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9390 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9391 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9392 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9393 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9394 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9395 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9396 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9397 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9398 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9399 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9400 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9401 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9402 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9403 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9404 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9405 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9406 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9407 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9408 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9409 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9410 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9411 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9412 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9413 .ilen = 512,
9414 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9415 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9416 "\x10\x11\x12\x13\x14\x15\x16\x17"
9417 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9418 "\x20\x21\x22\x23\x24\x25\x26\x27"
9419 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9420 "\x30\x31\x32\x33\x34\x35\x36\x37"
9421 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9422 "\x40\x41\x42\x43\x44\x45\x46\x47"
9423 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9424 "\x50\x51\x52\x53\x54\x55\x56\x57"
9425 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9426 "\x60\x61\x62\x63\x64\x65\x66\x67"
9427 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9428 "\x70\x71\x72\x73\x74\x75\x76\x77"
9429 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9430 "\x80\x81\x82\x83\x84\x85\x86\x87"
9431 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9432 "\x90\x91\x92\x93\x94\x95\x96\x97"
9433 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9434 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9435 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9436 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9437 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9438 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9439 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9440 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9441 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9442 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9443 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9444 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9445 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9446 "\x00\x01\x02\x03\x04\x05\x06\x07"
9447 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9448 "\x10\x11\x12\x13\x14\x15\x16\x17"
9449 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9450 "\x20\x21\x22\x23\x24\x25\x26\x27"
9451 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9452 "\x30\x31\x32\x33\x34\x35\x36\x37"
9453 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9454 "\x40\x41\x42\x43\x44\x45\x46\x47"
9455 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9456 "\x50\x51\x52\x53\x54\x55\x56\x57"
9457 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9458 "\x60\x61\x62\x63\x64\x65\x66\x67"
9459 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9460 "\x70\x71\x72\x73\x74\x75\x76\x77"
9461 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9462 "\x80\x81\x82\x83\x84\x85\x86\x87"
9463 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9464 "\x90\x91\x92\x93\x94\x95\x96\x97"
9465 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9466 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9467 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9468 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9469 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9470 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9471 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9472 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9473 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9474 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9475 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9476 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9477 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9478 .rlen = 512,
9479 }, {
9480 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
9481 "\x23\x53\x60\x28\x74\x71\x35\x26"
9482 "\x62\x49\x77\x57\x24\x70\x93\x69"
9483 "\x99\x59\x57\x49\x66\x96\x76\x27"
9484 "\x31\x41\x59\x26\x53\x58\x97\x93"
9485 "\x23\x84\x62\x64\x33\x83\x27\x95"
9486 "\x02\x88\x41\x97\x16\x93\x99\x37"
9487 "\x51\x05\x82\x09\x74\x94\x45\x92",
9488 .klen = 64,
9489 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
9490 "\x00\x00\x00\x00\x00\x00\x00\x00",
9491 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9492 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9493 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9494 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9495 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9496 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9497 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9498 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9499 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9500 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9501 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9502 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9503 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9504 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9505 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9506 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9507 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9508 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9509 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9510 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9511 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9512 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9513 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9514 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9515 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9516 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9517 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9518 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9519 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9520 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9521 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9522 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9523 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9524 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9525 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9526 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9527 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9528 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9529 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9530 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9531 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9532 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9533 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9534 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9535 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9536 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9537 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9538 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9539 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9540 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9541 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9542 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9543 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9544 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9545 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9546 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9547 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9548 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9549 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9550 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9551 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9552 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9553 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9554 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9555 .ilen = 512,
9556 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9557 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9558 "\x10\x11\x12\x13\x14\x15\x16\x17"
9559 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9560 "\x20\x21\x22\x23\x24\x25\x26\x27"
9561 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9562 "\x30\x31\x32\x33\x34\x35\x36\x37"
9563 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9564 "\x40\x41\x42\x43\x44\x45\x46\x47"
9565 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9566 "\x50\x51\x52\x53\x54\x55\x56\x57"
9567 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9568 "\x60\x61\x62\x63\x64\x65\x66\x67"
9569 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9570 "\x70\x71\x72\x73\x74\x75\x76\x77"
9571 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9572 "\x80\x81\x82\x83\x84\x85\x86\x87"
9573 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9574 "\x90\x91\x92\x93\x94\x95\x96\x97"
9575 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9576 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9577 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9578 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9579 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9580 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9581 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9582 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9583 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9584 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9585 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9586 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9587 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9588 "\x00\x01\x02\x03\x04\x05\x06\x07"
9589 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9590 "\x10\x11\x12\x13\x14\x15\x16\x17"
9591 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9592 "\x20\x21\x22\x23\x24\x25\x26\x27"
9593 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9594 "\x30\x31\x32\x33\x34\x35\x36\x37"
9595 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9596 "\x40\x41\x42\x43\x44\x45\x46\x47"
9597 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9598 "\x50\x51\x52\x53\x54\x55\x56\x57"
9599 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9600 "\x60\x61\x62\x63\x64\x65\x66\x67"
9601 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9602 "\x70\x71\x72\x73\x74\x75\x76\x77"
9603 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9604 "\x80\x81\x82\x83\x84\x85\x86\x87"
9605 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9606 "\x90\x91\x92\x93\x94\x95\x96\x97"
9607 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9608 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9609 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9610 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9611 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9612 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9613 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9614 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9615 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9616 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9617 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9618 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9619 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9620 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009621 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009622 .np = 3,
9623 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03009624 },
9625};
9626
Herbert Xuda7f0332008-07-31 17:08:25 +08009627/*
9628 * Serpent test vectors. These are backwards because Serpent writes
9629 * octet sequences in right-to-left mode.
9630 */
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009631#define SERPENT_ENC_TEST_VECTORS 5
9632#define SERPENT_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08009633
9634#define TNEPRES_ENC_TEST_VECTORS 4
9635#define TNEPRES_DEC_TEST_VECTORS 4
9636
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009637#define SERPENT_CBC_ENC_TEST_VECTORS 1
9638#define SERPENT_CBC_DEC_TEST_VECTORS 1
9639
9640#define SERPENT_CTR_ENC_TEST_VECTORS 2
9641#define SERPENT_CTR_DEC_TEST_VECTORS 2
9642
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03009643#define SERPENT_LRW_ENC_TEST_VECTORS 8
9644#define SERPENT_LRW_DEC_TEST_VECTORS 8
9645
Jussi Kivilinna18be20b92011-10-18 13:33:17 +03009646#define SERPENT_XTS_ENC_TEST_VECTORS 5
9647#define SERPENT_XTS_DEC_TEST_VECTORS 5
9648
Herbert Xuda7f0332008-07-31 17:08:25 +08009649static struct cipher_testvec serpent_enc_tv_template[] = {
9650 {
9651 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9652 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9653 .ilen = 16,
9654 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
9655 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
9656 .rlen = 16,
9657 }, {
9658 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9659 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9660 .klen = 16,
9661 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9662 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9663 .ilen = 16,
9664 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
9665 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
9666 .rlen = 16,
9667 }, {
9668 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9669 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9670 "\x10\x11\x12\x13\x14\x15\x16\x17"
9671 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9672 .klen = 32,
9673 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
9674 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9675 .ilen = 16,
9676 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
9677 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
9678 .rlen = 16,
9679 }, {
9680 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
9681 .klen = 16,
9682 .input = zeroed_string,
9683 .ilen = 16,
9684 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
9685 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
9686 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009687 }, { /* Generated with Crypto++ */
9688 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9689 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9690 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9691 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9692 .klen = 32,
9693 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9694 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9695 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9696 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9697 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9698 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9699 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9700 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9701 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9702 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9703 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9704 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9705 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9706 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9707 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9708 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9709 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009710 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9711 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9712 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9713 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9714 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9715 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9716 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9717 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9718 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9719 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9720 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9721 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9722 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9723 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9724 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9725 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9726 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9727 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9728 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9729 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9730 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9731 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9732 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9733 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9734 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9735 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9736 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9737 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9738 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9739 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9740 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9741 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9742 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9743 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9744 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9745 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9746 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9747 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9748 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9749 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9750 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9751 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9752 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9753 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9754 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9755 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009756 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
9757 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
9758 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
9759 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
9760 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
9761 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
9762 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
9763 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
9764 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
9765 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
9766 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
9767 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
9768 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
9769 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
9770 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
9771 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
9772 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009773 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
9774 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
9775 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
9776 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
9777 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
9778 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
9779 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
9780 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
9781 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
9782 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
9783 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
9784 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
9785 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
9786 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
9787 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
9788 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
9789 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
9790 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
9791 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
9792 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
9793 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
9794 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
9795 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
9796 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
9797 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
9798 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
9799 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
9800 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
9801 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
9802 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
9803 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
9804 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
9805 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
9806 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
9807 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
9808 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
9809 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
9810 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
9811 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
9812 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
9813 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
9814 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
9815 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
9816 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
9817 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
9818 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009819 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +02009820 .np = 3,
9821 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08009822 },
9823};
9824
9825static struct cipher_testvec tnepres_enc_tv_template[] = {
9826 { /* KeySize=128, PT=0, I=1 */
9827 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9828 "\x00\x00\x00\x00\x00\x00\x00\x00",
9829 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
9830 "\x00\x00\x00\x00\x00\x00\x00\x00",
9831 .klen = 16,
9832 .ilen = 16,
9833 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
9834 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
9835 .rlen = 16,
9836 }, { /* KeySize=192, PT=0, I=1 */
9837 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
9838 "\x00\x00\x00\x00\x00\x00\x00\x00"
9839 "\x00\x00\x00\x00\x00\x00\x00\x00",
9840 .klen = 24,
9841 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9842 "\x00\x00\x00\x00\x00\x00\x00\x00",
9843 .ilen = 16,
9844 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
9845 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
9846 .rlen = 16,
9847 }, { /* KeySize=256, 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 "\x00\x00\x00\x00\x00\x00\x00\x00",
9852 .klen = 32,
9853 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
9854 "\x00\x00\x00\x00\x00\x00\x00\x00",
9855 .ilen = 16,
9856 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
9857 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
9858 .rlen = 16,
9859 }, { /* KeySize=256, I=257 */
9860 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
9861 "\x17\x16\x15\x14\x13\x12\x11\x10"
9862 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
9863 "\x07\x06\x05\x04\x03\x02\x01\x00",
9864 .klen = 32,
9865 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
9866 "\x07\x06\x05\x04\x03\x02\x01\x00",
9867 .ilen = 16,
9868 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
9869 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
9870 .rlen = 16,
9871 },
9872};
9873
9874
9875static struct cipher_testvec serpent_dec_tv_template[] = {
9876 {
9877 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
9878 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
9879 .ilen = 16,
9880 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9881 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9882 .rlen = 16,
9883 }, {
9884 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9885 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9886 .klen = 16,
9887 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
9888 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
9889 .ilen = 16,
9890 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9891 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9892 .rlen = 16,
9893 }, {
9894 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
9895 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9896 "\x10\x11\x12\x13\x14\x15\x16\x17"
9897 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9898 .klen = 32,
9899 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
9900 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
9901 .ilen = 16,
9902 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9903 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9904 .rlen = 16,
9905 }, {
9906 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
9907 .klen = 16,
9908 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
9909 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
9910 .ilen = 16,
9911 .result = zeroed_string,
9912 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009913 }, { /* Generated with Crypto++ */
9914 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9915 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9916 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9917 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9918 .klen = 32,
9919 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
9920 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
9921 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
9922 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
9923 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
9924 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
9925 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
9926 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
9927 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
9928 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
9929 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
9930 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
9931 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
9932 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
9933 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
9934 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
9935 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009936 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
9937 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
9938 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
9939 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
9940 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
9941 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
9942 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
9943 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
9944 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
9945 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
9946 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
9947 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
9948 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
9949 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
9950 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
9951 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
9952 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
9953 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
9954 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
9955 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
9956 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
9957 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
9958 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
9959 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
9960 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
9961 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
9962 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
9963 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
9964 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
9965 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
9966 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
9967 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
9968 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
9969 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
9970 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
9971 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
9972 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
9973 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
9974 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
9975 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
9976 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
9977 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
9978 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
9979 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
9980 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
9981 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009982 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9983 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9984 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9985 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9986 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9987 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9988 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9989 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9990 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9991 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9992 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9993 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9994 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9995 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9996 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9997 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9998 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009999 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10000 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10001 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10002 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10003 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10004 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10005 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10006 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10007 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10008 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10009 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10010 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10011 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10012 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10013 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10014 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10015 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10016 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10017 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10018 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10019 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10020 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10021 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10022 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10023 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10024 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10025 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10026 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10027 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10028 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10029 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10030 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10031 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10032 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10033 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10034 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10035 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10036 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10037 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10038 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10039 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10040 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10041 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10042 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10043 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10044 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010045 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010046 .np = 3,
10047 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080010048 },
10049};
10050
10051static struct cipher_testvec tnepres_dec_tv_template[] = {
10052 {
10053 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
10054 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
10055 .ilen = 16,
10056 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10057 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10058 .rlen = 16,
10059 }, {
10060 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10061 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10062 .klen = 16,
10063 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
10064 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
10065 .ilen = 16,
10066 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10067 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10068 .rlen = 16,
10069 }, {
10070 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
10071 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10072 "\x10\x11\x12\x13\x14\x15\x16\x17"
10073 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10074 .klen = 32,
10075 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
10076 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
10077 .ilen = 16,
10078 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10079 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10080 .rlen = 16,
10081 }, { /* KeySize=128, I=121 */
10082 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10083 .klen = 16,
10084 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
10085 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
10086 .ilen = 16,
10087 .result = zeroed_string,
10088 .rlen = 16,
10089 },
10090};
10091
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010092static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
10093 { /* Generated with Crypto++ */
10094 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10095 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10096 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10097 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10098 .klen = 32,
10099 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10100 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10101 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10102 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10103 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10104 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10105 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10106 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10107 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10108 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10109 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10110 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10111 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10112 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10113 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10114 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10115 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10116 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10117 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010118 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10119 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10120 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10121 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10122 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10123 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10124 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10125 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10126 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10127 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10128 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10129 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10130 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10131 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10132 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10133 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10134 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10135 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10136 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10137 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10138 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10139 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10140 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10141 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10142 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10143 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10144 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10145 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10146 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10147 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10148 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10149 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10150 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10151 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10152 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10153 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10154 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10155 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10156 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10157 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10158 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10159 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10160 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10161 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10162 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10163 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010164 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10165 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10166 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10167 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10168 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10169 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10170 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10171 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10172 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10173 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10174 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10175 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10176 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10177 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10178 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10179 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10180 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010181 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10182 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10183 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10184 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10185 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10186 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10187 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10188 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10189 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10190 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10191 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10192 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10193 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10194 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10195 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10196 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10197 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10198 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10199 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10200 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10201 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10202 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10203 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10204 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10205 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10206 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10207 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10208 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10209 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10210 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10211 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10212 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10213 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10214 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10215 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10216 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10217 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10218 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10219 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10220 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10221 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10222 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10223 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10224 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10225 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10226 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010227 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010228 .np = 3,
10229 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010230 },
10231};
10232
10233static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
10234 { /* Generated with Crypto++ */
10235 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10236 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10237 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10238 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10239 .klen = 32,
10240 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10241 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10242 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10243 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10244 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10245 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10246 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10247 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10248 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10249 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10250 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10251 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10252 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10253 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10254 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10255 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10256 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10257 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10258 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010259 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10260 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10261 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10262 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10263 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10264 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10265 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10266 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10267 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10268 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10269 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10270 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10271 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10272 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10273 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10274 "\x81\x92\x66\x67\x15\x1E\x39\x98"
10275 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10276 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10277 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10278 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10279 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10280 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10281 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10282 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10283 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10284 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10285 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10286 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10287 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10288 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10289 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10290 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10291 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10292 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10293 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10294 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10295 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10296 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10297 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10298 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10299 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10300 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10301 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10302 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10303 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10304 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010305 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10306 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10307 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10308 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10309 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10310 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10311 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10312 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10313 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10314 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10315 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10316 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10317 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10318 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10319 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10320 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10321 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010322 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10323 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10324 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10325 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10326 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10327 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10328 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10329 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10330 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10331 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10332 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10333 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10334 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10335 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10336 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10337 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10338 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10339 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10340 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10341 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10342 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10343 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10344 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10345 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10346 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10347 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10348 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10349 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10350 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10351 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10352 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10353 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10354 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10355 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10356 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10357 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10358 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10359 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10360 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10361 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10362 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10363 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10364 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10365 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10366 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10367 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010368 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020010369 .np = 3,
10370 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010371 },
10372};
10373
10374static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
10375 { /* Generated with Crypto++ */
10376 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10377 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10378 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10379 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10380 .klen = 32,
10381 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10382 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10383 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10384 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10385 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10386 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10387 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10388 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10389 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10390 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10391 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10392 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10393 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10394 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10395 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10396 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10397 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10398 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10399 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010400 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10401 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10402 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10403 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10404 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10405 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10406 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10407 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10408 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10409 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10410 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10411 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10412 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10413 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10414 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10415 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10416 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10417 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10418 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10419 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10420 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10421 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10422 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10423 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10424 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10425 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10426 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10427 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10428 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10429 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10430 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10431 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10432 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10433 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10434 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10435 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10436 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10437 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10438 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10439 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10440 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10441 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10442 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10443 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10444 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10445 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010446 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10447 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10448 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10449 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10450 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10451 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10452 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10453 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10454 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10455 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10456 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10457 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10458 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10459 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10460 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10461 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10462 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010463 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10464 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10465 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10466 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10467 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10468 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10469 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10470 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10471 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10472 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10473 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10474 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10475 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10476 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10477 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10478 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10479 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10480 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10481 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10482 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10483 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10484 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10485 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10486 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10487 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10488 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10489 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10490 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10491 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10492 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10493 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10494 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10495 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10496 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10497 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10498 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10499 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10500 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10501 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10502 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10503 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10504 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10505 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10506 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10507 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
10508 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010509 }, { /* Generated with Crypto++ */
10510 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10511 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10512 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10513 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10514 .klen = 32,
10515 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10516 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10517 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10518 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10519 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10520 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10521 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10522 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10523 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10524 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10525 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10526 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10527 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10528 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10529 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10530 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10531 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10532 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10533 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10534 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010535 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10536 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10537 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10538 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10539 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10540 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10541 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10542 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10543 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10544 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10545 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10546 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10547 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10548 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10549 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10550 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10551 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10552 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10553 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10554 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10555 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10556 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10557 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10558 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10559 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10560 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10561 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10562 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10563 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10564 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10565 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10566 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10567 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10568 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10569 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10570 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10571 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10572 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10573 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10574 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10575 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10576 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10577 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10578 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
10579 "\x2B\xC2\x59",
10580 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010581 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10582 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10583 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10584 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10585 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10586 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10587 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10588 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10589 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10590 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10591 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10592 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10593 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10594 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10595 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10596 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10597 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
10598 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010599 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10600 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10601 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10602 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10603 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10604 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10605 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10606 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10607 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10608 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10609 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10610 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10611 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10612 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10613 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10614 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10615 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10616 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10617 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10618 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10619 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10620 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10621 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10622 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10623 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10624 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10625 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10626 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10627 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10628 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10629 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10630 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10631 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10632 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10633 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10634 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10635 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10636 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10637 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10638 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10639 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10640 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10641 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10642 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
10643 "\x38\xE2\xE5",
10644 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010645 .also_non_np = 1,
10646 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010647 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030010648 }, { /* Generated with Crypto++ */
10649 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10650 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10651 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10652 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10653 .klen = 32,
10654 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
10655 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
10656 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10657 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10658 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10659 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10660 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10661 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10662 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10663 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10664 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10665 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10666 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10667 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10668 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10669 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10670 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10671 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10672 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10673 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10674 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10675 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10676 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10677 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10678 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10679 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10680 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10681 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10682 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10683 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10684 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10685 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10686 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10687 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10688 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10689 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10690 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10691 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10692 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10693 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10694 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10695 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10696 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10697 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10698 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10699 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10700 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10701 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10702 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10703 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10704 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10705 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10706 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10707 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10708 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10709 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10710 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10711 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10712 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10713 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10714 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10715 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10716 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10717 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10718 .ilen = 496,
10719 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
10720 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
10721 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
10722 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
10723 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
10724 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
10725 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
10726 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
10727 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
10728 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
10729 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
10730 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
10731 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
10732 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
10733 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
10734 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
10735 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
10736 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
10737 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
10738 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
10739 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
10740 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
10741 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
10742 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
10743 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
10744 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
10745 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
10746 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
10747 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
10748 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
10749 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
10750 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
10751 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
10752 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
10753 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
10754 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
10755 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
10756 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
10757 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
10758 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
10759 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
10760 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
10761 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
10762 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
10763 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
10764 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
10765 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
10766 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
10767 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
10768 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
10769 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
10770 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
10771 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
10772 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
10773 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
10774 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
10775 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
10776 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
10777 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
10778 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
10779 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
10780 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
10781 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010782 },
10783};
10784
10785static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
10786 { /* Generated with Crypto++ */
10787 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10788 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10789 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10790 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10791 .klen = 32,
10792 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10793 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10794 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10795 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10796 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10797 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10798 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10799 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10800 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10801 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10802 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10803 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10804 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10805 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10806 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10807 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10808 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10809 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10810 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010811 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10812 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10813 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10814 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10815 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10816 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10817 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10818 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10819 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10820 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10821 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10822 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10823 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10824 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10825 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10826 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10827 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10828 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10829 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10830 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10831 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10832 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10833 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10834 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10835 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10836 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10837 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10838 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10839 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10840 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10841 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10842 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10843 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10844 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10845 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10846 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10847 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10848 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10849 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10850 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10851 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10852 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10853 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10854 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10855 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
10856 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010857 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10858 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10859 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10860 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10861 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10862 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10863 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10864 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10865 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10866 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10867 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10868 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10869 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10870 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10871 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10872 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10873 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010874 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10875 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10876 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10877 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10878 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10879 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10880 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10881 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10882 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10883 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10884 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10885 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10886 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10887 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10888 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10889 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10890 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10891 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10892 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10893 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10894 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10895 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10896 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10897 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10898 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10899 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10900 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10901 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10902 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10903 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10904 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10905 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10906 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10907 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10908 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10909 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10910 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10911 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10912 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10913 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10914 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10915 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10916 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10917 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10918 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10919 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010920 }, { /* Generated with Crypto++ */
10921 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10922 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10923 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10924 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10925 .klen = 32,
10926 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10927 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10928 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10929 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10930 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10931 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10932 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10933 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10934 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10935 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10936 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10937 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10938 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10939 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10940 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10941 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10942 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10943 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10944 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
10945 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030010946 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10947 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10948 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10949 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10950 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10951 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10952 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10953 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10954 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10955 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10956 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10957 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10958 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10959 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10960 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10961 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10962 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10963 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10964 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10965 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10966 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10967 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10968 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10969 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10970 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10971 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10972 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10973 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10974 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10975 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10976 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10977 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10978 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10979 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10980 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10981 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10982 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10983 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10984 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10985 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10986 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10987 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10988 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10989 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
10990 "\x38\xE2\xE5",
10991 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010992 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10993 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10994 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10995 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10996 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10997 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10998 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10999 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11000 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11001 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11002 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11003 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11004 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11005 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11006 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11007 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11008 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11009 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011010 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11011 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11012 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11013 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11014 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11015 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11016 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11017 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11018 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11019 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11020 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11021 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11022 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11023 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11024 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11025 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11026 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11027 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11028 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11029 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11030 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11031 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11032 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11033 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11034 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11035 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11036 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11037 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11038 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11039 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11040 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11041 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11042 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11043 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11044 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11045 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11046 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11047 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11048 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11049 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11050 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11051 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11052 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11053 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
11054 "\x2B\xC2\x59",
11055 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011056 .also_non_np = 1,
11057 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +030011058 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030011059 }, { /* Generated with Crypto++ */
11060 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11061 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11062 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11063 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11064 .klen = 32,
11065 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
11066 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
11067 .input = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
11068 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
11069 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
11070 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
11071 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
11072 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
11073 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
11074 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
11075 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
11076 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
11077 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
11078 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
11079 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
11080 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
11081 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
11082 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
11083 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
11084 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
11085 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
11086 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
11087 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
11088 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
11089 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
11090 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
11091 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
11092 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
11093 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
11094 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
11095 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
11096 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
11097 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
11098 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
11099 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
11100 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
11101 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
11102 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
11103 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
11104 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
11105 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
11106 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
11107 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
11108 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
11109 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
11110 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
11111 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
11112 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
11113 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
11114 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
11115 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
11116 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
11117 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
11118 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
11119 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
11120 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
11121 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
11122 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
11123 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
11124 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
11125 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
11126 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
11127 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
11128 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
11129 .ilen = 496,
11130 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11131 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11132 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11133 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11134 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11135 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11136 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11137 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11138 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11139 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11140 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11141 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11142 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11143 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11144 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11145 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11146 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11147 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11148 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11149 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11150 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11151 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11152 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11153 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11154 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11155 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11156 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11157 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11158 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11159 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11160 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11161 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11162 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11163 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11164 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11165 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11166 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11167 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11168 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11169 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11170 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11171 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11172 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11173 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11174 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11175 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11176 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11177 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11178 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11179 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11180 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11181 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11182 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11183 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11184 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11185 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11186 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11187 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11188 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11189 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11190 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11191 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11192 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030011193 },
11194};
Herbert Xuda7f0332008-07-31 17:08:25 +080011195
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011196static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
11197 /* Generated from AES-LRW test vectors */
11198 {
11199 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11200 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11201 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11202 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11203 .klen = 32,
11204 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11205 "\x00\x00\x00\x00\x00\x00\x00\x01",
11206 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11207 "\x38\x39\x41\x42\x43\x44\x45\x46",
11208 .ilen = 16,
11209 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11210 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11211 .rlen = 16,
11212 }, {
11213 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11214 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11215 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11216 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11217 .klen = 32,
11218 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11219 "\x00\x00\x00\x00\x00\x00\x00\x02",
11220 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11221 "\x38\x39\x41\x42\x43\x44\x45\x46",
11222 .ilen = 16,
11223 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11224 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11225 .rlen = 16,
11226 }, {
11227 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11228 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11229 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11230 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11231 .klen = 32,
11232 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11233 "\x00\x00\x00\x02\x00\x00\x00\x00",
11234 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11235 "\x38\x39\x41\x42\x43\x44\x45\x46",
11236 .ilen = 16,
11237 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11238 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11239 .rlen = 16,
11240 }, {
11241 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11242 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11243 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11244 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11245 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11246 .klen = 40,
11247 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11248 "\x00\x00\x00\x00\x00\x00\x00\x01",
11249 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11250 "\x38\x39\x41\x42\x43\x44\x45\x46",
11251 .ilen = 16,
11252 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11253 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11254 .rlen = 16,
11255 }, {
11256 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11257 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11258 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11259 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11260 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11261 .klen = 40,
11262 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11263 "\x00\x00\x00\x02\x00\x00\x00\x00",
11264 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11265 "\x38\x39\x41\x42\x43\x44\x45\x46",
11266 .ilen = 16,
11267 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11268 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11269 .rlen = 16,
11270 }, {
11271 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11272 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11273 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11274 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11275 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11276 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11277 .klen = 48,
11278 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11279 "\x00\x00\x00\x00\x00\x00\x00\x01",
11280 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11281 "\x38\x39\x41\x42\x43\x44\x45\x46",
11282 .ilen = 16,
11283 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11284 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11285 .rlen = 16,
11286 }, {
11287 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11288 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11289 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11290 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11291 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11292 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11293 .klen = 48,
11294 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11295 "\x00\x00\x00\x02\x00\x00\x00\x00",
11296 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
11297 "\x38\x39\x41\x42\x43\x44\x45\x46",
11298 .ilen = 16,
11299 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11300 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11301 .rlen = 16,
11302 }, {
11303 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11304 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11305 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11306 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11307 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11308 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11309 .klen = 48,
11310 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11311 "\x00\x00\x00\x00\x00\x00\x00\x01",
11312 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11313 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11314 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11315 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11316 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11317 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11318 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11319 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11320 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11321 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11322 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11323 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11324 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11325 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11326 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11327 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11328 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11329 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11330 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11331 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11332 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11333 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11334 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11335 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11336 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11337 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11338 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11339 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11340 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11341 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11342 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11343 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11344 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11345 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11346 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11347 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11348 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11349 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11350 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11351 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11352 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11353 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11354 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11355 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11356 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11357 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11358 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11359 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11360 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11361 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11362 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11363 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11364 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11365 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11366 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11367 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11368 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11369 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11370 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11371 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11372 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11373 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11374 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11375 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11376 .ilen = 512,
11377 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11378 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11379 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11380 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11381 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11382 "\xce\xab\xda\x33\x30\x20\x12\xfa"
11383 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11384 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11385 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11386 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11387 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11388 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11389 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11390 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11391 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11392 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11393 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11394 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11395 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11396 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11397 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11398 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11399 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11400 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11401 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11402 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11403 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11404 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11405 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11406 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11407 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11408 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11409 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11410 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11411 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11412 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11413 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11414 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11415 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11416 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11417 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11418 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11419 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11420 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11421 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11422 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11423 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11424 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11425 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11426 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11427 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11428 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11429 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11430 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11431 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11432 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11433 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11434 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11435 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11436 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11437 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11438 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11439 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11440 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11441 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011442 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020011443 .np = 3,
11444 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011445 },
11446};
11447
11448static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
11449 /* Generated from AES-LRW test vectors */
11450 /* same as enc vectors with input and result reversed */
11451 {
11452 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11453 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11454 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11455 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11456 .klen = 32,
11457 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11458 "\x00\x00\x00\x00\x00\x00\x00\x01",
11459 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11460 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11461 .ilen = 16,
11462 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11463 "\x38\x39\x41\x42\x43\x44\x45\x46",
11464 .rlen = 16,
11465 }, {
11466 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11467 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11468 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11469 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11470 .klen = 32,
11471 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11472 "\x00\x00\x00\x00\x00\x00\x00\x02",
11473 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11474 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11475 .ilen = 16,
11476 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11477 "\x38\x39\x41\x42\x43\x44\x45\x46",
11478 .rlen = 16,
11479 }, {
11480 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11481 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11482 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11483 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11484 .klen = 32,
11485 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11486 "\x00\x00\x00\x02\x00\x00\x00\x00",
11487 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11488 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11489 .ilen = 16,
11490 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11491 "\x38\x39\x41\x42\x43\x44\x45\x46",
11492 .rlen = 16,
11493 }, {
11494 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11495 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11496 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11497 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11498 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11499 .klen = 40,
11500 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11501 "\x00\x00\x00\x00\x00\x00\x00\x01",
11502 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11503 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11504 .ilen = 16,
11505 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11506 "\x38\x39\x41\x42\x43\x44\x45\x46",
11507 .rlen = 16,
11508 }, {
11509 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11510 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11511 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11512 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11513 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11514 .klen = 40,
11515 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11516 "\x00\x00\x00\x02\x00\x00\x00\x00",
11517 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11518 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11519 .ilen = 16,
11520 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11521 "\x38\x39\x41\x42\x43\x44\x45\x46",
11522 .rlen = 16,
11523 }, {
11524 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11525 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11526 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11527 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11528 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11529 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11530 .klen = 48,
11531 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11532 "\x00\x00\x00\x00\x00\x00\x00\x01",
11533 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11534 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11535 .ilen = 16,
11536 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11537 "\x38\x39\x41\x42\x43\x44\x45\x46",
11538 .rlen = 16,
11539 }, {
11540 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11541 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11542 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11543 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11544 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11545 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11546 .klen = 48,
11547 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11548 "\x00\x00\x00\x02\x00\x00\x00\x00",
11549 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11550 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11551 .ilen = 16,
11552 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11553 "\x38\x39\x41\x42\x43\x44\x45\x46",
11554 .rlen = 16,
11555 }, {
11556 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11557 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11558 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11559 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11560 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11561 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11562 .klen = 48,
11563 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11564 "\x00\x00\x00\x00\x00\x00\x00\x01",
11565 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11566 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11567 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11568 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11569 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11570 "\xce\xab\xda\x33\x30\x20\x12\xfa"
11571 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11572 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11573 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11574 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11575 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11576 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11577 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11578 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11579 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11580 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11581 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11582 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11583 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11584 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11585 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11586 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11587 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11588 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11589 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11590 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11591 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11592 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11593 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11594 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11595 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11596 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11597 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11598 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11599 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11600 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11601 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11602 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11603 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11604 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11605 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11606 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11607 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11608 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11609 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11610 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11611 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11612 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11613 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11614 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11615 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11616 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11617 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11618 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11619 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11620 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11621 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11622 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11623 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11624 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11625 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11626 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11627 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11628 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11629 .ilen = 512,
11630 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11631 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11632 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11633 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11634 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11635 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11636 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11637 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11638 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11639 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11640 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11641 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11642 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11643 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11644 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11645 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11646 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11647 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11648 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11649 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11650 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11651 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11652 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11653 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11654 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11655 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11656 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11657 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11658 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11659 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11660 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11661 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11662 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11663 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11664 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11665 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11666 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11667 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11668 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11669 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11670 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11671 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11672 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11673 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11674 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11675 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11676 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11677 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11678 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11679 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11680 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11681 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11682 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11683 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11684 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11685 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11686 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11687 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11688 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11689 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11690 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11691 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11692 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11693 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11694 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011695 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020011696 .np = 3,
11697 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030011698 },
11699};
11700
Jussi Kivilinna18be20b92011-10-18 13:33:17 +030011701static struct cipher_testvec serpent_xts_enc_tv_template[] = {
11702 /* Generated from AES-XTS test vectors */
11703 {
11704 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
11705 "\x00\x00\x00\x00\x00\x00\x00\x00"
11706 "\x00\x00\x00\x00\x00\x00\x00\x00"
11707 "\x00\x00\x00\x00\x00\x00\x00\x00",
11708 .klen = 32,
11709 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11710 "\x00\x00\x00\x00\x00\x00\x00\x00",
11711 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
11712 "\x00\x00\x00\x00\x00\x00\x00\x00"
11713 "\x00\x00\x00\x00\x00\x00\x00\x00"
11714 "\x00\x00\x00\x00\x00\x00\x00\x00",
11715 .ilen = 32,
11716 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
11717 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
11718 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
11719 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
11720 .rlen = 32,
11721 }, {
11722 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
11723 "\x11\x11\x11\x11\x11\x11\x11\x11"
11724 "\x22\x22\x22\x22\x22\x22\x22\x22"
11725 "\x22\x22\x22\x22\x22\x22\x22\x22",
11726 .klen = 32,
11727 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11728 "\x00\x00\x00\x00\x00\x00\x00\x00",
11729 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
11730 "\x44\x44\x44\x44\x44\x44\x44\x44"
11731 "\x44\x44\x44\x44\x44\x44\x44\x44"
11732 "\x44\x44\x44\x44\x44\x44\x44\x44",
11733 .ilen = 32,
11734 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
11735 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
11736 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
11737 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
11738 .rlen = 32,
11739 }, {
11740 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
11741 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
11742 "\x22\x22\x22\x22\x22\x22\x22\x22"
11743 "\x22\x22\x22\x22\x22\x22\x22\x22",
11744 .klen = 32,
11745 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
11746 "\x00\x00\x00\x00\x00\x00\x00\x00",
11747 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
11748 "\x44\x44\x44\x44\x44\x44\x44\x44"
11749 "\x44\x44\x44\x44\x44\x44\x44\x44"
11750 "\x44\x44\x44\x44\x44\x44\x44\x44",
11751 .ilen = 32,
11752 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
11753 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
11754 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
11755 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
11756 .rlen = 32,
11757 }, {
11758 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11759 "\x23\x53\x60\x28\x74\x71\x35\x26"
11760 "\x31\x41\x59\x26\x53\x58\x97\x93"
11761 "\x23\x84\x62\x64\x33\x83\x27\x95",
11762 .klen = 32,
11763 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
11764 "\x00\x00\x00\x00\x00\x00\x00\x00",
11765 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11766 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11767 "\x10\x11\x12\x13\x14\x15\x16\x17"
11768 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11769 "\x20\x21\x22\x23\x24\x25\x26\x27"
11770 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11771 "\x30\x31\x32\x33\x34\x35\x36\x37"
11772 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11773 "\x40\x41\x42\x43\x44\x45\x46\x47"
11774 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11775 "\x50\x51\x52\x53\x54\x55\x56\x57"
11776 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11777 "\x60\x61\x62\x63\x64\x65\x66\x67"
11778 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11779 "\x70\x71\x72\x73\x74\x75\x76\x77"
11780 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11781 "\x80\x81\x82\x83\x84\x85\x86\x87"
11782 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11783 "\x90\x91\x92\x93\x94\x95\x96\x97"
11784 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11785 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11786 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11787 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11788 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11789 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11790 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11791 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11792 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11793 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11794 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11795 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11796 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11797 "\x00\x01\x02\x03\x04\x05\x06\x07"
11798 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11799 "\x10\x11\x12\x13\x14\x15\x16\x17"
11800 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11801 "\x20\x21\x22\x23\x24\x25\x26\x27"
11802 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11803 "\x30\x31\x32\x33\x34\x35\x36\x37"
11804 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11805 "\x40\x41\x42\x43\x44\x45\x46\x47"
11806 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11807 "\x50\x51\x52\x53\x54\x55\x56\x57"
11808 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11809 "\x60\x61\x62\x63\x64\x65\x66\x67"
11810 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11811 "\x70\x71\x72\x73\x74\x75\x76\x77"
11812 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11813 "\x80\x81\x82\x83\x84\x85\x86\x87"
11814 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11815 "\x90\x91\x92\x93\x94\x95\x96\x97"
11816 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11817 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11818 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11819 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11820 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11821 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11822 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11823 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11824 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11825 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11826 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11827 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11828 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11829 .ilen = 512,
11830 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
11831 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
11832 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
11833 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
11834 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
11835 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
11836 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
11837 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
11838 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
11839 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
11840 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
11841 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
11842 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
11843 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
11844 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
11845 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
11846 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
11847 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
11848 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
11849 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
11850 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
11851 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
11852 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
11853 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
11854 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
11855 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
11856 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
11857 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
11858 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
11859 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
11860 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
11861 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
11862 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
11863 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
11864 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
11865 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
11866 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
11867 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
11868 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
11869 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
11870 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
11871 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
11872 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
11873 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
11874 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
11875 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
11876 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
11877 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
11878 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
11879 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
11880 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
11881 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
11882 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
11883 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
11884 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
11885 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
11886 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
11887 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
11888 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
11889 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
11890 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
11891 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
11892 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
11893 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
11894 .rlen = 512,
11895 }, {
11896 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11897 "\x23\x53\x60\x28\x74\x71\x35\x26"
11898 "\x62\x49\x77\x57\x24\x70\x93\x69"
11899 "\x99\x59\x57\x49\x66\x96\x76\x27"
11900 "\x31\x41\x59\x26\x53\x58\x97\x93"
11901 "\x23\x84\x62\x64\x33\x83\x27\x95"
11902 "\x02\x88\x41\x97\x16\x93\x99\x37"
11903 "\x51\x05\x82\x09\x74\x94\x45\x92",
11904 .klen = 64,
11905 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
11906 "\x00\x00\x00\x00\x00\x00\x00\x00",
11907 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
11908 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11909 "\x10\x11\x12\x13\x14\x15\x16\x17"
11910 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11911 "\x20\x21\x22\x23\x24\x25\x26\x27"
11912 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11913 "\x30\x31\x32\x33\x34\x35\x36\x37"
11914 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11915 "\x40\x41\x42\x43\x44\x45\x46\x47"
11916 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11917 "\x50\x51\x52\x53\x54\x55\x56\x57"
11918 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11919 "\x60\x61\x62\x63\x64\x65\x66\x67"
11920 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11921 "\x70\x71\x72\x73\x74\x75\x76\x77"
11922 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11923 "\x80\x81\x82\x83\x84\x85\x86\x87"
11924 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11925 "\x90\x91\x92\x93\x94\x95\x96\x97"
11926 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11927 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11928 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11929 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11930 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11931 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11932 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11933 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11934 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11935 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11936 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11937 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11938 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11939 "\x00\x01\x02\x03\x04\x05\x06\x07"
11940 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11941 "\x10\x11\x12\x13\x14\x15\x16\x17"
11942 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11943 "\x20\x21\x22\x23\x24\x25\x26\x27"
11944 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11945 "\x30\x31\x32\x33\x34\x35\x36\x37"
11946 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11947 "\x40\x41\x42\x43\x44\x45\x46\x47"
11948 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11949 "\x50\x51\x52\x53\x54\x55\x56\x57"
11950 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11951 "\x60\x61\x62\x63\x64\x65\x66\x67"
11952 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11953 "\x70\x71\x72\x73\x74\x75\x76\x77"
11954 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11955 "\x80\x81\x82\x83\x84\x85\x86\x87"
11956 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11957 "\x90\x91\x92\x93\x94\x95\x96\x97"
11958 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11959 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11960 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11961 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11962 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11963 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11964 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11965 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11966 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11967 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11968 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11969 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11970 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11971 .ilen = 512,
11972 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
11973 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
11974 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
11975 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
11976 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
11977 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
11978 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
11979 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
11980 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
11981 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
11982 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
11983 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
11984 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
11985 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
11986 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
11987 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
11988 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
11989 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
11990 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
11991 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
11992 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
11993 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
11994 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
11995 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
11996 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
11997 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
11998 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
11999 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12000 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12001 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12002 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12003 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12004 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12005 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12006 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12007 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12008 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12009 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12010 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12011 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12012 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12013 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12014 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12015 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12016 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12017 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12018 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12019 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12020 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12021 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12022 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12023 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12024 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12025 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12026 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12027 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12028 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12029 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12030 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12031 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12032 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12033 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12034 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12035 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12036 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012037 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012038 .np = 3,
12039 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b92011-10-18 13:33:17 +030012040 },
12041};
12042
12043static struct cipher_testvec serpent_xts_dec_tv_template[] = {
12044 /* Generated from AES-XTS test vectors */
12045 /* same as enc vectors with input and result reversed */
12046 {
12047 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
12048 "\x00\x00\x00\x00\x00\x00\x00\x00"
12049 "\x00\x00\x00\x00\x00\x00\x00\x00"
12050 "\x00\x00\x00\x00\x00\x00\x00\x00",
12051 .klen = 32,
12052 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12053 "\x00\x00\x00\x00\x00\x00\x00\x00",
12054 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
12055 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
12056 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
12057 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
12058 .ilen = 32,
12059 .result = "\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 "\x00\x00\x00\x00\x00\x00\x00\x00",
12063 .rlen = 32,
12064 }, {
12065 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
12066 "\x11\x11\x11\x11\x11\x11\x11\x11"
12067 "\x22\x22\x22\x22\x22\x22\x22\x22"
12068 "\x22\x22\x22\x22\x22\x22\x22\x22",
12069 .klen = 32,
12070 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12071 "\x00\x00\x00\x00\x00\x00\x00\x00",
12072 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
12073 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
12074 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
12075 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
12076 .ilen = 32,
12077 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12078 "\x44\x44\x44\x44\x44\x44\x44\x44"
12079 "\x44\x44\x44\x44\x44\x44\x44\x44"
12080 "\x44\x44\x44\x44\x44\x44\x44\x44",
12081 .rlen = 32,
12082 }, {
12083 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12084 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12085 "\x22\x22\x22\x22\x22\x22\x22\x22"
12086 "\x22\x22\x22\x22\x22\x22\x22\x22",
12087 .klen = 32,
12088 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
12089 "\x00\x00\x00\x00\x00\x00\x00\x00",
12090 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
12091 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
12092 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
12093 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
12094 .ilen = 32,
12095 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12096 "\x44\x44\x44\x44\x44\x44\x44\x44"
12097 "\x44\x44\x44\x44\x44\x44\x44\x44"
12098 "\x44\x44\x44\x44\x44\x44\x44\x44",
12099 .rlen = 32,
12100 }, {
12101 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12102 "\x23\x53\x60\x28\x74\x71\x35\x26"
12103 "\x31\x41\x59\x26\x53\x58\x97\x93"
12104 "\x23\x84\x62\x64\x33\x83\x27\x95",
12105 .klen = 32,
12106 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12107 "\x00\x00\x00\x00\x00\x00\x00\x00",
12108 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12109 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12110 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12111 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12112 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12113 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12114 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12115 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12116 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12117 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12118 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12119 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12120 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12121 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12122 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12123 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12124 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12125 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12126 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12127 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12128 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12129 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12130 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12131 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12132 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12133 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12134 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12135 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12136 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12137 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12138 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12139 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12140 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12141 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12142 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12143 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12144 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12145 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12146 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12147 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12148 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12149 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12150 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12151 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12152 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12153 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12154 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12155 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12156 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12157 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12158 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12159 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12160 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12161 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12162 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12163 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12164 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12165 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12166 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12167 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12168 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12169 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12170 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12171 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12172 .ilen = 512,
12173 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12174 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12175 "\x10\x11\x12\x13\x14\x15\x16\x17"
12176 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12177 "\x20\x21\x22\x23\x24\x25\x26\x27"
12178 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12179 "\x30\x31\x32\x33\x34\x35\x36\x37"
12180 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12181 "\x40\x41\x42\x43\x44\x45\x46\x47"
12182 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12183 "\x50\x51\x52\x53\x54\x55\x56\x57"
12184 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12185 "\x60\x61\x62\x63\x64\x65\x66\x67"
12186 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12187 "\x70\x71\x72\x73\x74\x75\x76\x77"
12188 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12189 "\x80\x81\x82\x83\x84\x85\x86\x87"
12190 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12191 "\x90\x91\x92\x93\x94\x95\x96\x97"
12192 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12193 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12194 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12195 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12196 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12197 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12198 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12199 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12200 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12201 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12202 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12203 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12204 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12205 "\x00\x01\x02\x03\x04\x05\x06\x07"
12206 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12207 "\x10\x11\x12\x13\x14\x15\x16\x17"
12208 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12209 "\x20\x21\x22\x23\x24\x25\x26\x27"
12210 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12211 "\x30\x31\x32\x33\x34\x35\x36\x37"
12212 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12213 "\x40\x41\x42\x43\x44\x45\x46\x47"
12214 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12215 "\x50\x51\x52\x53\x54\x55\x56\x57"
12216 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12217 "\x60\x61\x62\x63\x64\x65\x66\x67"
12218 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12219 "\x70\x71\x72\x73\x74\x75\x76\x77"
12220 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12221 "\x80\x81\x82\x83\x84\x85\x86\x87"
12222 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12223 "\x90\x91\x92\x93\x94\x95\x96\x97"
12224 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12225 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12226 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12227 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12228 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12229 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12230 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12231 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12232 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12233 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12234 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12235 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12236 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12237 .rlen = 512,
12238 }, {
12239 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12240 "\x23\x53\x60\x28\x74\x71\x35\x26"
12241 "\x62\x49\x77\x57\x24\x70\x93\x69"
12242 "\x99\x59\x57\x49\x66\x96\x76\x27"
12243 "\x31\x41\x59\x26\x53\x58\x97\x93"
12244 "\x23\x84\x62\x64\x33\x83\x27\x95"
12245 "\x02\x88\x41\x97\x16\x93\x99\x37"
12246 "\x51\x05\x82\x09\x74\x94\x45\x92",
12247 .klen = 64,
12248 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12249 "\x00\x00\x00\x00\x00\x00\x00\x00",
12250 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12251 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12252 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12253 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12254 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12255 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12256 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12257 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12258 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12259 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12260 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12261 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12262 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12263 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12264 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12265 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12266 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12267 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12268 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12269 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12270 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12271 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12272 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12273 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12274 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12275 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12276 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12277 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12278 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12279 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12280 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12281 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12282 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12283 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12284 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12285 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12286 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12287 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12288 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12289 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12290 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12291 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12292 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12293 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12294 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12295 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12296 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12297 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12298 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12299 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12300 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12301 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12302 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12303 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12304 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12305 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12306 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12307 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12308 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12309 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12310 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12311 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12312 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12313 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12314 .ilen = 512,
12315 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12316 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12317 "\x10\x11\x12\x13\x14\x15\x16\x17"
12318 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12319 "\x20\x21\x22\x23\x24\x25\x26\x27"
12320 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12321 "\x30\x31\x32\x33\x34\x35\x36\x37"
12322 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12323 "\x40\x41\x42\x43\x44\x45\x46\x47"
12324 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12325 "\x50\x51\x52\x53\x54\x55\x56\x57"
12326 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12327 "\x60\x61\x62\x63\x64\x65\x66\x67"
12328 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12329 "\x70\x71\x72\x73\x74\x75\x76\x77"
12330 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12331 "\x80\x81\x82\x83\x84\x85\x86\x87"
12332 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12333 "\x90\x91\x92\x93\x94\x95\x96\x97"
12334 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12335 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12336 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12337 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12338 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12339 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12340 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12341 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12342 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12343 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12344 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12345 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12346 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12347 "\x00\x01\x02\x03\x04\x05\x06\x07"
12348 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12349 "\x10\x11\x12\x13\x14\x15\x16\x17"
12350 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12351 "\x20\x21\x22\x23\x24\x25\x26\x27"
12352 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12353 "\x30\x31\x32\x33\x34\x35\x36\x37"
12354 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12355 "\x40\x41\x42\x43\x44\x45\x46\x47"
12356 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12357 "\x50\x51\x52\x53\x54\x55\x56\x57"
12358 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12359 "\x60\x61\x62\x63\x64\x65\x66\x67"
12360 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12361 "\x70\x71\x72\x73\x74\x75\x76\x77"
12362 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12363 "\x80\x81\x82\x83\x84\x85\x86\x87"
12364 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12365 "\x90\x91\x92\x93\x94\x95\x96\x97"
12366 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12367 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12368 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12369 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12370 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12371 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12372 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12373 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12374 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12375 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12376 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12377 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12378 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12379 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012380 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012381 .np = 3,
12382 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna18be20b92011-10-18 13:33:17 +030012383 },
12384};
12385
Herbert Xuda7f0332008-07-31 17:08:25 +080012386/* Cast6 test vectors from RFC 2612 */
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012387#define CAST6_ENC_TEST_VECTORS 4
12388#define CAST6_DEC_TEST_VECTORS 4
12389#define CAST6_CBC_ENC_TEST_VECTORS 1
12390#define CAST6_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030012391#define CAST6_CTR_ENC_TEST_VECTORS 2
12392#define CAST6_CTR_DEC_TEST_VECTORS 2
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012393#define CAST6_LRW_ENC_TEST_VECTORS 1
12394#define CAST6_LRW_DEC_TEST_VECTORS 1
12395#define CAST6_XTS_ENC_TEST_VECTORS 1
12396#define CAST6_XTS_DEC_TEST_VECTORS 1
Herbert Xuda7f0332008-07-31 17:08:25 +080012397
12398static struct cipher_testvec cast6_enc_tv_template[] = {
12399 {
12400 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12401 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12402 .klen = 16,
12403 .input = zeroed_string,
12404 .ilen = 16,
12405 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12406 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12407 .rlen = 16,
12408 }, {
12409 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12410 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12411 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12412 .klen = 24,
12413 .input = zeroed_string,
12414 .ilen = 16,
12415 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12416 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12417 .rlen = 16,
12418 }, {
12419 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12420 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12421 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12422 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12423 .klen = 32,
12424 .input = zeroed_string,
12425 .ilen = 16,
12426 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12427 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12428 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012429 }, { /* Generated from TF test vectors */
12430 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12431 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12432 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12433 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12434 .klen = 32,
12435 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12436 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12437 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12438 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12439 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12440 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12441 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12442 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12443 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12444 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12445 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12446 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12447 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12448 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12449 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12450 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12451 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12452 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12453 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12454 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12455 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12456 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12457 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12458 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12459 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12460 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12461 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12462 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12463 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12464 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12465 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12466 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12467 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12468 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12469 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12470 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12471 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12472 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12473 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12474 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12475 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12476 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12477 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12478 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12479 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12480 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12481 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12482 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12483 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12484 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12485 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12486 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12487 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12488 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12489 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12490 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12491 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12492 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12493 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12494 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12495 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12496 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12497 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12498 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12499 .ilen = 496,
12500 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12501 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12502 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12503 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12504 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12505 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12506 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12507 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12508 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12509 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12510 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12511 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12512 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12513 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12514 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12515 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12516 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12517 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12518 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12519 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12520 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12521 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12522 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12523 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12524 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12525 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12526 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12527 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12528 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12529 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12530 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12531 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12532 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12533 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12534 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12535 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12536 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12537 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12538 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12539 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12540 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12541 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12542 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12543 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12544 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12545 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12546 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12547 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12548 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12549 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12550 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12551 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12552 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12553 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12554 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12555 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12556 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12557 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12558 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12559 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12560 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12561 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12562 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012563 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012564 .np = 3,
12565 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080012566 },
12567};
12568
12569static struct cipher_testvec cast6_dec_tv_template[] = {
12570 {
12571 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12572 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12573 .klen = 16,
12574 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12575 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12576 .ilen = 16,
12577 .result = zeroed_string,
12578 .rlen = 16,
12579 }, {
12580 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12581 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12582 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12583 .klen = 24,
12584 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12585 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12586 .ilen = 16,
12587 .result = zeroed_string,
12588 .rlen = 16,
12589 }, {
12590 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12591 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12592 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12593 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12594 .klen = 32,
12595 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12596 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12597 .ilen = 16,
12598 .result = zeroed_string,
12599 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012600 }, { /* Generated from TF test vectors */
12601 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12602 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12603 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12604 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12605 .klen = 32,
12606 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12607 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12608 .input = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12609 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12610 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12611 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12612 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12613 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12614 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12615 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12616 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12617 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12618 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12619 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12620 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12621 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12622 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12623 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12624 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12625 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12626 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12627 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12628 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12629 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12630 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12631 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12632 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12633 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12634 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12635 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12636 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12637 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12638 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12639 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12640 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12641 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12642 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12643 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12644 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12645 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12646 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12647 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12648 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12649 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12650 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12651 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12652 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12653 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12654 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12655 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12656 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12657 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12658 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12659 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12660 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12661 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12662 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12663 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12664 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12665 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12666 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12667 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12668 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12669 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12670 .ilen = 496,
12671 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12672 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12673 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12674 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12675 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12676 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12677 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12678 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12679 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12680 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12681 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12682 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12683 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12684 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12685 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12686 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12687 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12688 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12689 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12690 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12691 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12692 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12693 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12694 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12695 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12696 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12697 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12698 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12699 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12700 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12701 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12702 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12703 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12704 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12705 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12706 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12707 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12708 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12709 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12710 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12711 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12712 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12713 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12714 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12715 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12716 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12717 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12718 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12719 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12720 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12721 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12722 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12723 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12724 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12725 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12726 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12727 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12728 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12729 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12730 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12731 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12732 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12733 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012734 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012735 .np = 3,
12736 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012737 },
12738};
12739
12740static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
12741 { /* Generated from TF test vectors */
12742 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12743 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12744 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12745 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12746 .klen = 32,
12747 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12748 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12749 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12750 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12751 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12752 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12753 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12754 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12755 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12756 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12757 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12758 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12759 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12760 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12761 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12762 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12763 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12764 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12765 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12766 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12767 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12768 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12769 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12770 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12771 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12772 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12773 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12774 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12775 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12776 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12777 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12778 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12779 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12780 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12781 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12782 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12783 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12784 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12785 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12786 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12787 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12788 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12789 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12790 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12791 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12792 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12793 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12794 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12795 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12796 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12797 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12798 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12799 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12800 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12801 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12802 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12803 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12804 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12805 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12806 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12807 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12808 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12809 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12810 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12811 .ilen = 496,
12812 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
12813 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
12814 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
12815 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
12816 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
12817 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
12818 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
12819 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
12820 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
12821 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
12822 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
12823 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
12824 "\x23\x16\x47\x72\x81\x13\x3A\x72"
12825 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
12826 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
12827 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
12828 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
12829 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
12830 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
12831 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
12832 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
12833 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
12834 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
12835 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
12836 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
12837 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
12838 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
12839 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
12840 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
12841 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
12842 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
12843 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
12844 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
12845 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
12846 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
12847 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
12848 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
12849 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
12850 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
12851 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
12852 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
12853 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
12854 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
12855 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
12856 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
12857 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
12858 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
12859 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
12860 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
12861 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
12862 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
12863 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
12864 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
12865 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
12866 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
12867 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
12868 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
12869 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
12870 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
12871 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
12872 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
12873 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
12874 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012875 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020012876 .np = 3,
12877 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012878 },
12879};
12880
12881static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
12882 { /* Generated from TF test vectors */
12883 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12884 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12885 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12886 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12887 .klen = 32,
12888 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12889 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12890 .input = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
12891 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
12892 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
12893 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
12894 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
12895 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
12896 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
12897 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
12898 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
12899 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
12900 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
12901 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
12902 "\x23\x16\x47\x72\x81\x13\x3A\x72"
12903 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
12904 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
12905 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
12906 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
12907 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
12908 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
12909 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
12910 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
12911 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
12912 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
12913 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
12914 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
12915 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
12916 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
12917 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
12918 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
12919 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
12920 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
12921 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
12922 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
12923 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
12924 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
12925 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
12926 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
12927 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
12928 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
12929 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
12930 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
12931 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
12932 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
12933 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
12934 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
12935 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
12936 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
12937 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
12938 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
12939 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
12940 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
12941 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
12942 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
12943 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
12944 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
12945 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
12946 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
12947 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
12948 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
12949 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
12950 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
12951 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
12952 .ilen = 496,
12953 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12954 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12955 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12956 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12957 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12958 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12959 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12960 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12961 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12962 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12963 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12964 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12965 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12966 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12967 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12968 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12969 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12970 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12971 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12972 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12973 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12974 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12975 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12976 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12977 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12978 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12979 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12980 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12981 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12982 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12983 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12984 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12985 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12986 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12987 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12988 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12989 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12990 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12991 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12992 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12993 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12994 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12995 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12996 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12997 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12998 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12999 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13000 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13001 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13002 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13003 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13004 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13005 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13006 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13007 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13008 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13009 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13010 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13011 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13012 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13013 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13014 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13015 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013016 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013017 .np = 3,
13018 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013019 },
13020};
13021
13022static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
13023 { /* Generated from TF test vectors */
13024 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13025 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13026 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13027 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13028 .klen = 32,
13029 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13030 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13031 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13032 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013033 "\x3A",
13034 .ilen = 17,
13035 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13036 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13037 "\x57",
13038 .rlen = 17,
13039 }, { /* Generated from TF test vectors */
13040 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13041 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13042 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13043 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13044 .klen = 32,
13045 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13046 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13047 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13048 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013049 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13050 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13051 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13052 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13053 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13054 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13055 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13056 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13057 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13058 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13059 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13060 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13061 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13062 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13063 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13064 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13065 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13066 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13067 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13068 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13069 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13070 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13071 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13072 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13073 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13074 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13075 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13076 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13077 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13078 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13079 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13080 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13081 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13082 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13083 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13084 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13085 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13086 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13087 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13088 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13089 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13090 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13091 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13092 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13093 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13094 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13095 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13096 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13097 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13098 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13099 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13100 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13101 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13102 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13103 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13104 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13105 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13106 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13107 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13108 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13109 .ilen = 496,
13110 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13111 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13112 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13113 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13114 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13115 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13116 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13117 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13118 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13119 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13120 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13121 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13122 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13123 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13124 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13125 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13126 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13127 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13128 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13129 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13130 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13131 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13132 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13133 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13134 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13135 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13136 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13137 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13138 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13139 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13140 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13141 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13142 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13143 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13144 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13145 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13146 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13147 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13148 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13149 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13150 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13151 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13152 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13153 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13154 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13155 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13156 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13157 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13158 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13159 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13160 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13161 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13162 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13163 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13164 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13165 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13166 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13167 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13168 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13169 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13170 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13171 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13172 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013173 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013174 .np = 3,
13175 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013176 },
13177};
13178
13179static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
13180 { /* Generated from TF test vectors */
13181 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13182 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13183 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13184 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13185 .klen = 32,
13186 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13187 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13188 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13189 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030013190 "\x57",
13191 .ilen = 17,
13192 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13193 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13194 "\x3A",
13195 .rlen = 17,
13196 }, { /* Generated from TF test vectors */
13197 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13198 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13199 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13200 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13201 .klen = 32,
13202 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13203 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13204 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13205 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013206 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13207 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13208 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13209 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13210 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13211 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13212 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13213 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13214 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13215 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13216 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13217 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13218 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13219 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13220 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13221 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13222 "\x49\x61\x22\x52\x64\x8C\x46\x41"
13223 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13224 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13225 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13226 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13227 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13228 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13229 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13230 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13231 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13232 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13233 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13234 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13235 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13236 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13237 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13238 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13239 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13240 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13241 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13242 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13243 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13244 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13245 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13246 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13247 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13248 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13249 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13250 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13251 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13252 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13253 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13254 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13255 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13256 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13257 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13258 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13259 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13260 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13261 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13262 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13263 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13264 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13265 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13266 .ilen = 496,
13267 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13268 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13269 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13270 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13271 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13272 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13273 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13274 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13275 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13276 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13277 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13278 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13279 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13280 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13281 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13282 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13283 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13284 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13285 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13286 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13287 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13288 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13289 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13290 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13291 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13292 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13293 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13294 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13295 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13296 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13297 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13298 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13299 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13300 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13301 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13302 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13303 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13304 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13305 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13306 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13307 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13308 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13309 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13310 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13311 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13312 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13313 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13314 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13315 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13316 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13317 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13318 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13319 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13320 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13321 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13322 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13323 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13324 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13325 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13326 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13327 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13328 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13329 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013330 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013331 .np = 3,
13332 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013333 },
13334};
13335
13336static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
13337 { /* Generated from TF test vectors */
13338 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13339 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13340 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13341 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13342 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13343 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13344 .klen = 48,
13345 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13346 "\x00\x00\x00\x00\x00\x00\x00\x01",
13347 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13348 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13349 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13350 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13351 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13352 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13353 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13354 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13355 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13356 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13357 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13358 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13359 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13360 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13361 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13362 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13363 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13364 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13365 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13366 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13367 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13368 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13369 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13370 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13371 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13372 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13373 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13374 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13375 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13376 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13377 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13378 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13379 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13380 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13381 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13382 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13383 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13384 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13385 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13386 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13387 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13388 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13389 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13390 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13391 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13392 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13393 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13394 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13395 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13396 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13397 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13398 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13399 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13400 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13401 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13402 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13403 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13404 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13405 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13406 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13407 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13408 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13409 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13410 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13411 .ilen = 512,
13412 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13413 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13414 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13415 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13416 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13417 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13418 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13419 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13420 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13421 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13422 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13423 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13424 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13425 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13426 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13427 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13428 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13429 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13430 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13431 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13432 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13433 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13434 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13435 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13436 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13437 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13438 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13439 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13440 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13441 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13442 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13443 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13444 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13445 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13446 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13447 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13448 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13449 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13450 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13451 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13452 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13453 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13454 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13455 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13456 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13457 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13458 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13459 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13460 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13461 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13462 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13463 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13464 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13465 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13466 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13467 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13468 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13469 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13470 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13471 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13472 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13473 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13474 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13475 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13476 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013477 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013478 .np = 3,
13479 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013480 },
13481};
13482
13483static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
13484 { /* Generated from TF test vectors */
13485 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13486 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13487 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13488 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13489 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13490 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13491 .klen = 48,
13492 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
13493 "\x00\x00\x00\x00\x00\x00\x00\x01",
13494 .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13495 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13496 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13497 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13498 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13499 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13500 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13501 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13502 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13503 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13504 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13505 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13506 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13507 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13508 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13509 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13510 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13511 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13512 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13513 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13514 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13515 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13516 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13517 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13518 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13519 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13520 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13521 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13522 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13523 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13524 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13525 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13526 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13527 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13528 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13529 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13530 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13531 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13532 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13533 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13534 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13535 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13536 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13537 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13538 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13539 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13540 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13541 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13542 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13543 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13544 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13545 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13546 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13547 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13548 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13549 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13550 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13551 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13552 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13553 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13554 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13555 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13556 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13557 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13558 .ilen = 512,
13559 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13560 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13561 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13562 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13563 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13564 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13565 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13566 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13567 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13568 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13569 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13570 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13571 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13572 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13573 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13574 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13575 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13576 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13577 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13578 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13579 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13580 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13581 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13582 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13583 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13584 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13585 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13586 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13587 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13588 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13589 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13590 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13591 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13592 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13593 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13594 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13595 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13596 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13597 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13598 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13599 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13600 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13601 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13602 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13603 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13604 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13605 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13606 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13607 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13608 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13609 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13610 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13611 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13612 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13613 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13614 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13615 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13616 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13617 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13618 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13619 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13620 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13621 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13622 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13623 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013624 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013625 .np = 3,
13626 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013627 },
13628};
13629
13630static struct cipher_testvec cast6_xts_enc_tv_template[] = {
13631 { /* Generated from TF test vectors */
13632 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
13633 "\x23\x53\x60\x28\x74\x71\x35\x26"
13634 "\x62\x49\x77\x57\x24\x70\x93\x69"
13635 "\x99\x59\x57\x49\x66\x96\x76\x27"
13636 "\x31\x41\x59\x26\x53\x58\x97\x93"
13637 "\x23\x84\x62\x64\x33\x83\x27\x95"
13638 "\x02\x88\x41\x97\x16\x93\x99\x37"
13639 "\x51\x05\x82\x09\x74\x94\x45\x92",
13640 .klen = 64,
13641 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
13642 "\x00\x00\x00\x00\x00\x00\x00\x00",
13643 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
13644 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13645 "\x10\x11\x12\x13\x14\x15\x16\x17"
13646 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13647 "\x20\x21\x22\x23\x24\x25\x26\x27"
13648 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13649 "\x30\x31\x32\x33\x34\x35\x36\x37"
13650 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13651 "\x40\x41\x42\x43\x44\x45\x46\x47"
13652 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13653 "\x50\x51\x52\x53\x54\x55\x56\x57"
13654 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13655 "\x60\x61\x62\x63\x64\x65\x66\x67"
13656 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13657 "\x70\x71\x72\x73\x74\x75\x76\x77"
13658 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13659 "\x80\x81\x82\x83\x84\x85\x86\x87"
13660 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13661 "\x90\x91\x92\x93\x94\x95\x96\x97"
13662 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13663 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13664 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13665 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13666 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13667 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13668 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13669 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13670 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13671 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13672 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13673 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13674 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
13675 "\x00\x01\x02\x03\x04\x05\x06\x07"
13676 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13677 "\x10\x11\x12\x13\x14\x15\x16\x17"
13678 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13679 "\x20\x21\x22\x23\x24\x25\x26\x27"
13680 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13681 "\x30\x31\x32\x33\x34\x35\x36\x37"
13682 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13683 "\x40\x41\x42\x43\x44\x45\x46\x47"
13684 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13685 "\x50\x51\x52\x53\x54\x55\x56\x57"
13686 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13687 "\x60\x61\x62\x63\x64\x65\x66\x67"
13688 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13689 "\x70\x71\x72\x73\x74\x75\x76\x77"
13690 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13691 "\x80\x81\x82\x83\x84\x85\x86\x87"
13692 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13693 "\x90\x91\x92\x93\x94\x95\x96\x97"
13694 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13695 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13696 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13697 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13698 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13699 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13700 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13701 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13702 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13703 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13704 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13705 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13706 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
13707 .ilen = 512,
13708 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
13709 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
13710 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
13711 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
13712 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
13713 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
13714 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
13715 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
13716 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
13717 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
13718 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
13719 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
13720 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
13721 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
13722 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
13723 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
13724 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
13725 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
13726 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
13727 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
13728 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
13729 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
13730 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
13731 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
13732 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
13733 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
13734 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
13735 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
13736 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
13737 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
13738 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
13739 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
13740 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
13741 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
13742 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
13743 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
13744 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
13745 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
13746 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
13747 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
13748 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
13749 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
13750 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
13751 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
13752 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
13753 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
13754 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
13755 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
13756 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
13757 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
13758 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
13759 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
13760 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
13761 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
13762 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
13763 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
13764 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
13765 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
13766 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
13767 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
13768 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
13769 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
13770 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
13771 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
13772 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013773 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013774 .np = 3,
13775 .tap = { 512 - 20, 4, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020013776 },
13777};
13778
13779static struct cipher_testvec cast6_xts_dec_tv_template[] = {
13780 { /* Generated from TF test vectors */
13781 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
13782 "\x23\x53\x60\x28\x74\x71\x35\x26"
13783 "\x62\x49\x77\x57\x24\x70\x93\x69"
13784 "\x99\x59\x57\x49\x66\x96\x76\x27"
13785 "\x31\x41\x59\x26\x53\x58\x97\x93"
13786 "\x23\x84\x62\x64\x33\x83\x27\x95"
13787 "\x02\x88\x41\x97\x16\x93\x99\x37"
13788 "\x51\x05\x82\x09\x74\x94\x45\x92",
13789 .klen = 64,
13790 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
13791 "\x00\x00\x00\x00\x00\x00\x00\x00",
13792 .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
13793 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
13794 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
13795 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
13796 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
13797 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
13798 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
13799 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
13800 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
13801 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
13802 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
13803 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
13804 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
13805 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
13806 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
13807 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
13808 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
13809 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
13810 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
13811 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
13812 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
13813 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
13814 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
13815 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
13816 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
13817 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
13818 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
13819 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
13820 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
13821 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
13822 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
13823 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
13824 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
13825 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
13826 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
13827 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
13828 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
13829 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
13830 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
13831 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
13832 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
13833 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
13834 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
13835 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
13836 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
13837 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
13838 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
13839 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
13840 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
13841 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
13842 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
13843 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
13844 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
13845 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
13846 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
13847 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
13848 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
13849 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
13850 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
13851 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
13852 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
13853 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
13854 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
13855 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
13856 .ilen = 512,
13857 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
13858 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13859 "\x10\x11\x12\x13\x14\x15\x16\x17"
13860 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13861 "\x20\x21\x22\x23\x24\x25\x26\x27"
13862 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13863 "\x30\x31\x32\x33\x34\x35\x36\x37"
13864 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13865 "\x40\x41\x42\x43\x44\x45\x46\x47"
13866 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13867 "\x50\x51\x52\x53\x54\x55\x56\x57"
13868 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13869 "\x60\x61\x62\x63\x64\x65\x66\x67"
13870 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13871 "\x70\x71\x72\x73\x74\x75\x76\x77"
13872 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13873 "\x80\x81\x82\x83\x84\x85\x86\x87"
13874 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13875 "\x90\x91\x92\x93\x94\x95\x96\x97"
13876 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13877 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13878 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13879 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13880 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13881 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13882 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13883 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13884 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13885 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13886 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13887 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13888 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
13889 "\x00\x01\x02\x03\x04\x05\x06\x07"
13890 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13891 "\x10\x11\x12\x13\x14\x15\x16\x17"
13892 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13893 "\x20\x21\x22\x23\x24\x25\x26\x27"
13894 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13895 "\x30\x31\x32\x33\x34\x35\x36\x37"
13896 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13897 "\x40\x41\x42\x43\x44\x45\x46\x47"
13898 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13899 "\x50\x51\x52\x53\x54\x55\x56\x57"
13900 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13901 "\x60\x61\x62\x63\x64\x65\x66\x67"
13902 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13903 "\x70\x71\x72\x73\x74\x75\x76\x77"
13904 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13905 "\x80\x81\x82\x83\x84\x85\x86\x87"
13906 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13907 "\x90\x91\x92\x93\x94\x95\x96\x97"
13908 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13909 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13910 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13911 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13912 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13913 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13914 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13915 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13916 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13917 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13918 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13919 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13920 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
13921 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030013922 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020013923 .np = 3,
13924 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080013925 },
13926};
13927
13928
13929/*
13930 * AES test vectors.
13931 */
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013932#define AES_ENC_TEST_VECTORS 4
13933#define AES_DEC_TEST_VECTORS 4
13934#define AES_CBC_ENC_TEST_VECTORS 5
13935#define AES_CBC_DEC_TEST_VECTORS 5
Horia Geantabca4feb2014-03-14 17:46:51 +020013936#define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
13937#define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
Nitesh Lal5208ed22014-05-21 17:09:08 +053013938#define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2
13939#define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC 2
13940#define HMAC_SHA1_AES_CBC_ENC_TEST_VEC 7
13941#define HMAC_SHA256_AES_CBC_ENC_TEST_VEC 7
13942#define HMAC_SHA512_AES_CBC_ENC_TEST_VEC 7
Herbert Xuda7f0332008-07-31 17:08:25 +080013943#define AES_LRW_ENC_TEST_VECTORS 8
13944#define AES_LRW_DEC_TEST_VECTORS 8
Jarod Wilson5165e5b2011-05-31 15:23:57 +100013945#define AES_XTS_ENC_TEST_VECTORS 5
13946#define AES_XTS_DEC_TEST_VECTORS 5
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013947#define AES_CTR_ENC_TEST_VECTORS 5
13948#define AES_CTR_DEC_TEST_VECTORS 5
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100013949#define AES_OFB_ENC_TEST_VECTORS 1
13950#define AES_OFB_DEC_TEST_VECTORS 1
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080013951#define AES_CTR_3686_ENC_TEST_VECTORS 7
13952#define AES_CTR_3686_DEC_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +080013953#define AES_GCM_ENC_TEST_VECTORS 9
13954#define AES_GCM_DEC_TEST_VECTORS 8
Herbert Xu8f69b762015-06-16 13:54:26 +080013955#define AES_GCM_4106_ENC_TEST_VECTORS 23
13956#define AES_GCM_4106_DEC_TEST_VECTORS 23
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030013957#define AES_GCM_4543_ENC_TEST_VECTORS 1
13958#define AES_GCM_4543_DEC_TEST_VECTORS 2
Ard Biesheuvel45859882014-04-16 20:40:04 +080013959#define AES_CCM_ENC_TEST_VECTORS 8
Herbert Xuda7f0332008-07-31 17:08:25 +080013960#define AES_CCM_DEC_TEST_VECTORS 7
Jarod Wilson5d667322009-05-04 19:23:40 +080013961#define AES_CCM_4309_ENC_TEST_VECTORS 7
13962#define AES_CCM_4309_DEC_TEST_VECTORS 10
Herbert Xuda7f0332008-07-31 17:08:25 +080013963
13964static struct cipher_testvec aes_enc_tv_template[] = {
13965 { /* From FIPS-197 */
13966 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13967 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13968 .klen = 16,
13969 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
13970 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
13971 .ilen = 16,
13972 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
13973 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
13974 .rlen = 16,
13975 }, {
13976 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13977 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13978 "\x10\x11\x12\x13\x14\x15\x16\x17",
13979 .klen = 24,
13980 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
13981 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
13982 .ilen = 16,
13983 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
13984 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
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 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13991 .klen = 32,
13992 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
13993 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
13994 .ilen = 16,
13995 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
13996 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
13997 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013998 }, { /* Generated with Crypto++ */
13999 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14000 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14001 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14002 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14003 .klen = 32,
14004 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14005 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14006 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14007 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14008 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14009 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14010 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14011 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14012 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14013 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14014 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14015 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14016 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14017 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14018 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14019 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14020 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14021 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14022 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14023 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14024 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14025 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14026 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14027 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14028 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14029 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14030 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14031 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14032 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14033 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14034 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14035 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14036 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14037 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14038 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14039 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14040 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14041 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14042 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14043 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14044 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14045 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14046 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14047 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14048 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14049 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14050 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14051 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14052 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14053 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14054 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14055 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14056 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14057 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14058 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14059 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14060 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14061 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14062 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14063 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14064 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14065 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14066 .ilen = 496,
14067 .result = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14068 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14069 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14070 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14071 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14072 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14073 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14074 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14075 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14076 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14077 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14078 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14079 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14080 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14081 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14082 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14083 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14084 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14085 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14086 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14087 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14088 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14089 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14090 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14091 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14092 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14093 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14094 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14095 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14096 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14097 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14098 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14099 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14100 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14101 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14102 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14103 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14104 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14105 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14106 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14107 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14108 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14109 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14110 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14111 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14112 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14113 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14114 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14115 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14116 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14117 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14118 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14119 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14120 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14121 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14122 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14123 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14124 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14125 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14126 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14127 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14128 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14129 .rlen = 496,
14130 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014131 .np = 3,
14132 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014133 },
14134};
14135
14136static struct cipher_testvec aes_dec_tv_template[] = {
14137 { /* From FIPS-197 */
14138 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14139 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14140 .klen = 16,
14141 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14142 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14143 .ilen = 16,
14144 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14145 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14146 .rlen = 16,
14147 }, {
14148 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
14149 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14150 "\x10\x11\x12\x13\x14\x15\x16\x17",
14151 .klen = 24,
14152 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14153 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
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 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14163 .klen = 32,
14164 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14165 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14166 .ilen = 16,
14167 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14168 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14169 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014170 }, { /* Generated with Crypto++ */
14171 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14172 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14173 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14174 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14175 .klen = 32,
14176 .input = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14177 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14178 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14179 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14180 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14181 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14182 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14183 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14184 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14185 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14186 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14187 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14188 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14189 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14190 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14191 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14192 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14193 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14194 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14195 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14196 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14197 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14198 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14199 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14200 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14201 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14202 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14203 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14204 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14205 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14206 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14207 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14208 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14209 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14210 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14211 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14212 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14213 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14214 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14215 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14216 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14217 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14218 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14219 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14220 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14221 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14222 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14223 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14224 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14225 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14226 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14227 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14228 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14229 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14230 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14231 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14232 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14233 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14234 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14235 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14236 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14237 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14238 .ilen = 496,
14239 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14240 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14241 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14242 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14243 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14244 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14245 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14246 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14247 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14248 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14249 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14250 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14251 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14252 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14253 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14254 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14255 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14256 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14257 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14258 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14259 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14260 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14261 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14262 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14263 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14264 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14265 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14266 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14267 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14268 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14269 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14270 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14271 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14272 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14273 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14274 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14275 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14276 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14277 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14278 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14279 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14280 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14281 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14282 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14283 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14284 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14285 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14286 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14287 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14288 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14289 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14290 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14291 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14292 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14293 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14294 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14295 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14296 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14297 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14298 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14299 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14300 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14301 .rlen = 496,
14302 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014303 .np = 3,
14304 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014305 },
14306};
14307
14308static struct cipher_testvec aes_cbc_enc_tv_template[] = {
14309 { /* From RFC 3602 */
14310 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14311 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14312 .klen = 16,
14313 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14314 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14315 .input = "Single block msg",
14316 .ilen = 16,
14317 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14318 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14319 .rlen = 16,
14320 }, {
14321 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14322 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14323 .klen = 16,
14324 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14325 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14326 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14327 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14328 "\x10\x11\x12\x13\x14\x15\x16\x17"
14329 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14330 .ilen = 32,
14331 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14332 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14333 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14334 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14335 .rlen = 32,
14336 }, { /* From NIST SP800-38A */
14337 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14338 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14339 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14340 .klen = 24,
14341 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14342 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14343 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14344 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14345 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14346 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14347 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14348 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14349 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14350 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14351 .ilen = 64,
14352 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14353 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14354 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14355 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14356 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14357 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14358 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14359 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14360 .rlen = 64,
14361 }, {
14362 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14363 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14364 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14365 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14366 .klen = 32,
14367 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14368 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14369 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14370 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14371 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14372 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14373 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14374 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14375 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14376 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14377 .ilen = 64,
14378 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14379 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14380 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14381 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14382 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14383 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14384 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14385 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14386 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014387 }, { /* Generated with Crypto++ */
14388 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14389 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14390 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14391 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14392 .klen = 32,
14393 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14394 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14395 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14396 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14397 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14398 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14399 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14400 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14401 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14402 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14403 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14404 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14405 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14406 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14407 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14408 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14409 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14410 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14411 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14412 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14413 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14414 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14415 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14416 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14417 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14418 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14419 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14420 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14421 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14422 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14423 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14424 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14425 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14426 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14427 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14428 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14429 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14430 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14431 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14432 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14433 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14434 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14435 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14436 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14437 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14438 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14439 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14440 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14441 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14442 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14443 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14444 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14445 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14446 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14447 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14448 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14449 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14450 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14451 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14452 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14453 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14454 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14455 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14456 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14457 .ilen = 496,
14458 .result = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14459 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14460 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14461 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14462 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14463 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14464 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14465 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14466 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14467 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14468 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14469 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14470 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14471 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14472 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14473 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14474 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14475 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14476 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14477 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14478 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14479 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14480 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14481 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14482 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14483 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14484 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14485 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14486 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14487 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14488 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14489 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14490 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14491 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14492 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14493 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14494 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14495 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14496 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14497 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14498 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14499 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14500 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14501 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14502 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14503 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14504 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14505 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14506 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14507 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14508 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14509 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14510 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14511 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14512 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14513 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14514 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14515 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14516 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14517 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14518 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14519 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14520 .rlen = 496,
14521 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014522 .np = 3,
14523 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014524 },
14525};
14526
14527static struct cipher_testvec aes_cbc_dec_tv_template[] = {
14528 { /* From RFC 3602 */
14529 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14530 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14531 .klen = 16,
14532 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14533 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14534 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14535 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14536 .ilen = 16,
14537 .result = "Single block msg",
14538 .rlen = 16,
14539 }, {
14540 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14541 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14542 .klen = 16,
14543 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14544 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14545 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14546 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14547 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14548 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14549 .ilen = 32,
14550 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14551 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14552 "\x10\x11\x12\x13\x14\x15\x16\x17"
14553 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14554 .rlen = 32,
14555 }, { /* From NIST SP800-38A */
14556 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14557 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14558 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14559 .klen = 24,
14560 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14561 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14562 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14563 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14564 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14565 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14566 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14567 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14568 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14569 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14570 .ilen = 64,
14571 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14572 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14573 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14574 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14575 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14576 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14577 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14578 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14579 .rlen = 64,
14580 }, {
14581 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14582 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14583 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14584 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14585 .klen = 32,
14586 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14587 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14588 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14589 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14590 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14591 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14592 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14593 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14594 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14595 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14596 .ilen = 64,
14597 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14598 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14599 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14600 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14601 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14602 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14603 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14604 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14605 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030014606 }, { /* Generated with Crypto++ */
14607 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14608 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14609 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14610 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14611 .klen = 32,
14612 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14613 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14614 .input = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14615 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14616 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14617 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14618 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14619 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14620 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14621 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14622 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14623 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14624 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14625 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14626 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14627 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14628 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14629 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14630 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14631 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14632 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14633 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14634 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14635 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14636 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14637 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14638 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14639 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14640 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14641 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14642 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14643 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14644 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14645 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14646 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14647 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14648 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14649 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14650 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14651 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14652 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14653 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14654 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14655 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14656 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14657 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14658 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14659 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14660 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14661 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14662 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14663 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14664 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14665 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14666 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14667 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14668 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14669 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14670 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14671 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14672 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14673 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14674 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14675 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14676 .ilen = 496,
14677 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14678 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14679 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14680 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14681 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14682 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14683 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14684 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14685 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14686 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14687 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14688 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14689 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14690 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14691 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14692 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14693 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14694 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14695 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14696 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14697 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14698 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14699 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14700 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14701 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14702 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14703 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14704 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14705 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14706 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14707 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14708 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14709 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14710 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14711 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14712 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14713 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14714 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14715 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14716 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14717 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14718 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14719 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14720 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14721 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14722 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14723 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14724 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14725 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14726 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14727 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14728 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14729 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14730 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14731 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14732 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14733 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14734 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14735 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14736 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14737 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14738 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14739 .rlen = 496,
14740 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020014741 .np = 3,
14742 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014743 },
14744};
14745
Horia Geantabca4feb2014-03-14 17:46:51 +020014746static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = {
14747 { /* Input data from RFC 2410 Case 1 */
14748#ifdef __LITTLE_ENDIAN
14749 .key = "\x08\x00" /* rta length */
14750 "\x01\x00" /* rta type */
14751#else
14752 .key = "\x00\x08" /* rta length */
14753 "\x00\x01" /* rta type */
14754#endif
14755 "\x00\x00\x00\x00" /* enc key length */
14756 "\x00\x00\x00\x00\x00\x00\x00\x00"
14757 "\x00\x00\x00\x00\x00\x00\x00\x00",
14758 .klen = 8 + 16 + 0,
14759 .iv = "",
14760 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14761 .ilen = 8,
14762 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14763 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14764 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14765 .rlen = 8 + 16,
14766 }, { /* Input data from RFC 2410 Case 2 */
14767#ifdef __LITTLE_ENDIAN
14768 .key = "\x08\x00" /* rta length */
14769 "\x01\x00" /* rta type */
14770#else
14771 .key = "\x00\x08" /* rta length */
14772 "\x00\x01" /* rta type */
14773#endif
14774 "\x00\x00\x00\x00" /* enc key length */
14775 "\x00\x00\x00\x00\x00\x00\x00\x00"
14776 "\x00\x00\x00\x00\x00\x00\x00\x00",
14777 .klen = 8 + 16 + 0,
14778 .iv = "",
14779 .input = "Network Security People Have A Strange Sense Of Humor",
14780 .ilen = 53,
14781 .result = "Network Security People Have A Strange Sense Of Humor"
14782 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
14783 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
14784 .rlen = 53 + 16,
14785 },
14786};
14787
14788static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = {
14789 {
14790#ifdef __LITTLE_ENDIAN
14791 .key = "\x08\x00" /* rta length */
14792 "\x01\x00" /* rta type */
14793#else
14794 .key = "\x00\x08" /* rta length */
14795 "\x00\x01" /* rta type */
14796#endif
14797 "\x00\x00\x00\x00" /* enc key length */
14798 "\x00\x00\x00\x00\x00\x00\x00\x00"
14799 "\x00\x00\x00\x00\x00\x00\x00\x00",
14800 .klen = 8 + 16 + 0,
14801 .iv = "",
14802 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14803 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14804 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14805 .ilen = 8 + 16,
14806 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14807 .rlen = 8,
14808 }, {
14809#ifdef __LITTLE_ENDIAN
14810 .key = "\x08\x00" /* rta length */
14811 "\x01\x00" /* rta type */
14812#else
14813 .key = "\x00\x08" /* rta length */
14814 "\x00\x01" /* rta type */
14815#endif
14816 "\x00\x00\x00\x00" /* enc key length */
14817 "\x00\x00\x00\x00\x00\x00\x00\x00"
14818 "\x00\x00\x00\x00\x00\x00\x00\x00",
14819 .klen = 8 + 16 + 0,
14820 .iv = "",
14821 .input = "Network Security People Have A Strange Sense Of Humor"
14822 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
14823 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
14824 .ilen = 53 + 16,
14825 .result = "Network Security People Have A Strange Sense Of Humor",
14826 .rlen = 53,
14827 },
14828};
14829
Nitesh Lal5208ed22014-05-21 17:09:08 +053014830static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030014831 { /* RFC 3602 Case 1 */
14832#ifdef __LITTLE_ENDIAN
14833 .key = "\x08\x00" /* rta length */
14834 "\x01\x00" /* rta type */
14835#else
14836 .key = "\x00\x08" /* rta length */
14837 "\x00\x01" /* rta type */
14838#endif
14839 "\x00\x00\x00\x10" /* enc key length */
14840 "\x00\x00\x00\x00\x00\x00\x00\x00"
14841 "\x00\x00\x00\x00\x00\x00\x00\x00"
14842 "\x00\x00\x00\x00"
14843 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14844 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14845 .klen = 8 + 20 + 16,
14846 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14847 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14848 .input = "Single block msg",
14849 .ilen = 16,
14850 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14851 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
14852 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
14853 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
14854 "\x03\x71\xa2\x06",
14855 .rlen = 16 + 20,
14856 }, { /* RFC 3602 Case 2 */
14857#ifdef __LITTLE_ENDIAN
14858 .key = "\x08\x00" /* rta length */
14859 "\x01\x00" /* rta type */
14860#else
14861 .key = "\x00\x08" /* rta length */
14862 "\x00\x01" /* rta type */
14863#endif
14864 "\x00\x00\x00\x10" /* enc key length */
14865 "\x20\x21\x22\x23\x24\x25\x26\x27"
14866 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14867 "\x30\x31\x32\x33"
14868 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14869 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14870 .klen = 8 + 20 + 16,
14871 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14872 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14873 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14874 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14875 "\x10\x11\x12\x13\x14\x15\x16\x17"
14876 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14877 .ilen = 32,
14878 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14879 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14880 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14881 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
14882 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
14883 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
14884 "\x65\x39\xf8\xde",
14885 .rlen = 32 + 20,
14886 }, { /* RFC 3602 Case 3 */
14887#ifdef __LITTLE_ENDIAN
14888 .key = "\x08\x00" /* rta length */
14889 "\x01\x00" /* rta type */
14890#else
14891 .key = "\x00\x08" /* rta length */
14892 "\x00\x01" /* rta type */
14893#endif
14894 "\x00\x00\x00\x10" /* enc key length */
14895 "\x11\x22\x33\x44\x55\x66\x77\x88"
14896 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14897 "\x22\x33\x44\x55"
14898 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
14899 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
14900 .klen = 8 + 20 + 16,
14901 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
14902 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
14903 .input = "This is a 48-byte message (exactly 3 AES blocks)",
14904 .ilen = 48,
14905 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
14906 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
14907 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
14908 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
14909 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
14910 "\x85\x79\x69\x5d\x83\xba\x26\x84"
14911 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
14912 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
14913 "\x8d\x62\xf2\x1e",
14914 .rlen = 48 + 20,
14915 }, { /* RFC 3602 Case 4 */
14916#ifdef __LITTLE_ENDIAN
14917 .key = "\x08\x00" /* rta length */
14918 "\x01\x00" /* rta type */
14919#else
14920 .key = "\x00\x08" /* rta length */
14921 "\x00\x01" /* rta type */
14922#endif
14923 "\x00\x00\x00\x10" /* enc key length */
14924 "\x11\x22\x33\x44\x55\x66\x77\x88"
14925 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14926 "\x22\x33\x44\x55"
14927 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
14928 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
14929 .klen = 8 + 20 + 16,
14930 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
14931 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
14932 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14933 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14934 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14935 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14936 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14937 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14938 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14939 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
14940 .ilen = 64,
14941 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
14942 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
14943 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
14944 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
14945 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
14946 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
14947 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
14948 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
14949 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
14950 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
14951 "\x1d\xbe\xc6\xe9",
14952 .rlen = 64 + 20,
14953 }, { /* RFC 3602 Case 5 */
14954#ifdef __LITTLE_ENDIAN
14955 .key = "\x08\x00" /* rta length */
14956 "\x01\x00" /* rta type */
14957#else
14958 .key = "\x00\x08" /* rta length */
14959 "\x00\x01" /* rta type */
14960#endif
14961 "\x00\x00\x00\x10" /* enc key length */
14962 "\x11\x22\x33\x44\x55\x66\x77\x88"
14963 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14964 "\x22\x33\x44\x55"
14965 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
14966 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
14967 .klen = 8 + 20 + 16,
14968 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
14969 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
14970 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
14971 .alen = 8,
14972 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
14973 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
14974 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14975 "\x10\x11\x12\x13\x14\x15\x16\x17"
14976 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14977 "\x20\x21\x22\x23\x24\x25\x26\x27"
14978 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14979 "\x30\x31\x32\x33\x34\x35\x36\x37"
14980 "\x01\x02\x03\x04\x05\x06\x07\x08"
14981 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
14982 .ilen = 80,
14983 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
14984 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
14985 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
14986 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
14987 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
14988 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
14989 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
14990 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
14991 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
14992 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
14993 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
14994 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
14995 "\x85\xe1\x59\xf7",
14996 .rlen = 80 + 20,
14997 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
14998#ifdef __LITTLE_ENDIAN
14999 .key = "\x08\x00" /* rta length */
15000 "\x01\x00" /* rta type */
15001#else
15002 .key = "\x00\x08" /* rta length */
15003 "\x00\x01" /* rta type */
15004#endif
15005 "\x00\x00\x00\x18" /* enc key length */
15006 "\x11\x22\x33\x44\x55\x66\x77\x88"
15007 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15008 "\x22\x33\x44\x55"
15009 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15010 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15011 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15012 .klen = 8 + 20 + 24,
15013 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15014 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15015 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15016 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15017 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15018 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15019 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15020 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15021 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15022 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15023 .ilen = 64,
15024 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15025 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15026 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15027 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15028 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15029 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15030 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15031 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15032 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
15033 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
15034 "\x47\x4c\xfc\x36",
15035 .rlen = 64 + 20,
15036 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15037#ifdef __LITTLE_ENDIAN
15038 .key = "\x08\x00" /* rta length */
15039 "\x01\x00" /* rta type */
15040#else
15041 .key = "\x00\x08" /* rta length */
15042 "\x00\x01" /* rta type */
15043#endif
15044 "\x00\x00\x00\x20" /* enc key length */
15045 "\x11\x22\x33\x44\x55\x66\x77\x88"
15046 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15047 "\x22\x33\x44\x55"
15048 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15049 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15050 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15051 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15052 .klen = 8 + 20 + 32,
15053 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15054 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15055 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15056 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15057 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15058 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15059 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15060 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15061 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15062 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15063 .ilen = 64,
15064 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15065 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15066 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15067 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15068 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15069 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15070 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15071 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15072 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
15073 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
15074 "\x51\xee\xd6\x4e",
15075 .rlen = 64 + 20,
15076 },
15077};
15078
Nitesh Lal5208ed22014-05-21 17:09:08 +053015079static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015080 { /* Input data from RFC 2410 Case 1 */
15081#ifdef __LITTLE_ENDIAN
15082 .key = "\x08\x00" /* rta length */
15083 "\x01\x00" /* rta type */
15084#else
15085 .key = "\x00\x08" /* rta length */
15086 "\x00\x01" /* rta type */
15087#endif
15088 "\x00\x00\x00\x00" /* enc key length */
15089 "\x00\x00\x00\x00\x00\x00\x00\x00"
15090 "\x00\x00\x00\x00\x00\x00\x00\x00"
15091 "\x00\x00\x00\x00",
15092 .klen = 8 + 20 + 0,
15093 .iv = "",
15094 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15095 .ilen = 8,
15096 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15097 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15098 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15099 "\x8c\x5e\xe4\x08",
15100 .rlen = 8 + 20,
15101 }, { /* Input data from RFC 2410 Case 2 */
15102#ifdef __LITTLE_ENDIAN
15103 .key = "\x08\x00" /* rta length */
15104 "\x01\x00" /* rta type */
15105#else
15106 .key = "\x00\x08" /* rta length */
15107 "\x00\x01" /* rta type */
15108#endif
15109 "\x00\x00\x00\x00" /* enc key length */
15110 "\x00\x00\x00\x00\x00\x00\x00\x00"
15111 "\x00\x00\x00\x00\x00\x00\x00\x00"
15112 "\x00\x00\x00\x00",
15113 .klen = 8 + 20 + 0,
15114 .iv = "",
15115 .input = "Network Security People Have A Strange Sense Of Humor",
15116 .ilen = 53,
15117 .result = "Network Security People Have A Strange Sense Of Humor"
15118 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15119 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15120 "\x91\x56\xe4\xd6",
15121 .rlen = 53 + 20,
15122 },
15123};
15124
Nitesh Lal5208ed22014-05-21 17:09:08 +053015125static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = {
Horia Geantabca4feb2014-03-14 17:46:51 +020015126 {
15127#ifdef __LITTLE_ENDIAN
15128 .key = "\x08\x00" /* rta length */
15129 "\x01\x00" /* rta type */
15130#else
15131 .key = "\x00\x08" /* rta length */
15132 "\x00\x01" /* rta type */
15133#endif
15134 "\x00\x00\x00\x00" /* enc key length */
15135 "\x00\x00\x00\x00\x00\x00\x00\x00"
15136 "\x00\x00\x00\x00\x00\x00\x00\x00"
15137 "\x00\x00\x00\x00",
15138 .klen = 8 + 20 + 0,
15139 .iv = "",
15140 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15141 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15142 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15143 "\x8c\x5e\xe4\x08",
15144 .ilen = 8 + 20,
15145 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15146 .rlen = 8,
15147 }, {
15148#ifdef __LITTLE_ENDIAN
15149 .key = "\x08\x00" /* rta length */
15150 "\x01\x00" /* rta type */
15151#else
15152 .key = "\x00\x08" /* rta length */
15153 "\x00\x01" /* rta type */
15154#endif
15155 "\x00\x00\x00\x00" /* enc key length */
15156 "\x00\x00\x00\x00\x00\x00\x00\x00"
15157 "\x00\x00\x00\x00\x00\x00\x00\x00"
15158 "\x00\x00\x00\x00",
15159 .klen = 8 + 20 + 0,
15160 .iv = "",
15161 .input = "Network Security People Have A Strange Sense Of Humor"
15162 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15163 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15164 "\x91\x56\xe4\xd6",
15165 .ilen = 53 + 20,
15166 .result = "Network Security People Have A Strange Sense Of Humor",
15167 .rlen = 53,
15168 },
15169};
15170
Nitesh Lal5208ed22014-05-21 17:09:08 +053015171static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015172 { /* RFC 3602 Case 1 */
15173#ifdef __LITTLE_ENDIAN
15174 .key = "\x08\x00" /* rta length */
15175 "\x01\x00" /* rta type */
15176#else
15177 .key = "\x00\x08" /* rta length */
15178 "\x00\x01" /* rta type */
15179#endif
15180 "\x00\x00\x00\x10" /* enc key length */
15181 "\x00\x00\x00\x00\x00\x00\x00\x00"
15182 "\x00\x00\x00\x00\x00\x00\x00\x00"
15183 "\x00\x00\x00\x00\x00\x00\x00\x00"
15184 "\x00\x00\x00\x00\x00\x00\x00\x00"
15185 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15186 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15187 .klen = 8 + 32 + 16,
15188 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15189 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15190 .input = "Single block msg",
15191 .ilen = 16,
15192 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15193 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15194 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
15195 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
15196 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
15197 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
15198 .rlen = 16 + 32,
15199 }, { /* RFC 3602 Case 2 */
15200#ifdef __LITTLE_ENDIAN
15201 .key = "\x08\x00" /* rta length */
15202 "\x01\x00" /* rta type */
15203#else
15204 .key = "\x00\x08" /* rta length */
15205 "\x00\x01" /* rta type */
15206#endif
15207 "\x00\x00\x00\x10" /* enc key length */
15208 "\x20\x21\x22\x23\x24\x25\x26\x27"
15209 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15210 "\x30\x31\x32\x33\x34\x35\x36\x37"
15211 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15212 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15213 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15214 .klen = 8 + 32 + 16,
15215 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15216 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15217 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15218 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15219 "\x10\x11\x12\x13\x14\x15\x16\x17"
15220 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15221 .ilen = 32,
15222 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15223 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15224 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15225 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15226 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
15227 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
15228 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
15229 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
15230 .rlen = 32 + 32,
15231 }, { /* RFC 3602 Case 3 */
15232#ifdef __LITTLE_ENDIAN
15233 .key = "\x08\x00" /* rta length */
15234 "\x01\x00" /* rta type */
15235#else
15236 .key = "\x00\x08" /* rta length */
15237 "\x00\x01" /* rta type */
15238#endif
15239 "\x00\x00\x00\x10" /* enc key length */
15240 "\x11\x22\x33\x44\x55\x66\x77\x88"
15241 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15242 "\x22\x33\x44\x55\x66\x77\x88\x99"
15243 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15244 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15245 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15246 .klen = 8 + 32 + 16,
15247 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15248 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15249 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15250 .ilen = 48,
15251 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15252 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15253 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15254 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15255 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15256 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15257 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
15258 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
15259 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
15260 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
15261 .rlen = 48 + 32,
15262 }, { /* RFC 3602 Case 4 */
15263#ifdef __LITTLE_ENDIAN
15264 .key = "\x08\x00" /* rta length */
15265 "\x01\x00" /* rta type */
15266#else
15267 .key = "\x00\x08" /* rta length */
15268 "\x00\x01" /* rta type */
15269#endif
15270 "\x00\x00\x00\x10" /* enc key length */
15271 "\x11\x22\x33\x44\x55\x66\x77\x88"
15272 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15273 "\x22\x33\x44\x55\x66\x77\x88\x99"
15274 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15275 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15276 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15277 .klen = 8 + 32 + 16,
15278 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15279 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15280 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15281 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15282 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15283 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15284 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15285 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15286 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15287 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15288 .ilen = 64,
15289 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15290 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15291 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15292 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15293 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15294 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15295 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15296 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15297 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
15298 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
15299 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
15300 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
15301 .rlen = 64 + 32,
15302 }, { /* RFC 3602 Case 5 */
15303#ifdef __LITTLE_ENDIAN
15304 .key = "\x08\x00" /* rta length */
15305 "\x01\x00" /* rta type */
15306#else
15307 .key = "\x00\x08" /* rta length */
15308 "\x00\x01" /* rta type */
15309#endif
15310 "\x00\x00\x00\x10" /* enc key length */
15311 "\x11\x22\x33\x44\x55\x66\x77\x88"
15312 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15313 "\x22\x33\x44\x55\x66\x77\x88\x99"
15314 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15315 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15316 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15317 .klen = 8 + 32 + 16,
15318 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15319 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15320 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15321 .alen = 8,
15322 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15323 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15324 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15325 "\x10\x11\x12\x13\x14\x15\x16\x17"
15326 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15327 "\x20\x21\x22\x23\x24\x25\x26\x27"
15328 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15329 "\x30\x31\x32\x33\x34\x35\x36\x37"
15330 "\x01\x02\x03\x04\x05\x06\x07\x08"
15331 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15332 .ilen = 80,
15333 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15334 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15335 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15336 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15337 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15338 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15339 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15340 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15341 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15342 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15343 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
15344 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
15345 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
15346 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
15347 .rlen = 80 + 32,
15348 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15349#ifdef __LITTLE_ENDIAN
15350 .key = "\x08\x00" /* rta length */
15351 "\x01\x00" /* rta type */
15352#else
15353 .key = "\x00\x08" /* rta length */
15354 "\x00\x01" /* rta type */
15355#endif
15356 "\x00\x00\x00\x18" /* enc key length */
15357 "\x11\x22\x33\x44\x55\x66\x77\x88"
15358 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15359 "\x22\x33\x44\x55\x66\x77\x88\x99"
15360 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15361 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15362 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15363 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15364 .klen = 8 + 32 + 24,
15365 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15366 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15367 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15368 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15369 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15370 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15371 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15372 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15373 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15374 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15375 .ilen = 64,
15376 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15377 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15378 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15379 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15380 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15381 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15382 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15383 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15384 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
15385 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
15386 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
15387 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
15388 .rlen = 64 + 32,
15389 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15390#ifdef __LITTLE_ENDIAN
15391 .key = "\x08\x00" /* rta length */
15392 "\x01\x00" /* rta type */
15393#else
15394 .key = "\x00\x08" /* rta length */
15395 "\x00\x01" /* rta type */
15396#endif
15397 "\x00\x00\x00\x20" /* enc key length */
15398 "\x11\x22\x33\x44\x55\x66\x77\x88"
15399 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15400 "\x22\x33\x44\x55\x66\x77\x88\x99"
15401 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15402 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15403 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15404 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15405 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15406 .klen = 8 + 32 + 32,
15407 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15408 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15409 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15410 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15411 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15412 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15413 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15414 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15415 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15416 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15417 .ilen = 64,
15418 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15419 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15420 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15421 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15422 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15423 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15424 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15425 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15426 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
15427 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
15428 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
15429 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
15430 .rlen = 64 + 32,
15431 },
15432};
15433
Nitesh Lal5208ed22014-05-21 17:09:08 +053015434static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = {
Horia Geantae46e9a42012-07-03 19:16:54 +030015435 { /* RFC 3602 Case 1 */
15436#ifdef __LITTLE_ENDIAN
15437 .key = "\x08\x00" /* rta length */
15438 "\x01\x00" /* rta type */
15439#else
15440 .key = "\x00\x08" /* rta length */
15441 "\x00\x01" /* rta type */
15442#endif
15443 "\x00\x00\x00\x10" /* enc key length */
15444 "\x00\x00\x00\x00\x00\x00\x00\x00"
15445 "\x00\x00\x00\x00\x00\x00\x00\x00"
15446 "\x00\x00\x00\x00\x00\x00\x00\x00"
15447 "\x00\x00\x00\x00\x00\x00\x00\x00"
15448 "\x00\x00\x00\x00\x00\x00\x00\x00"
15449 "\x00\x00\x00\x00\x00\x00\x00\x00"
15450 "\x00\x00\x00\x00\x00\x00\x00\x00"
15451 "\x00\x00\x00\x00\x00\x00\x00\x00"
15452 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15453 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15454 .klen = 8 + 64 + 16,
15455 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15456 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15457 .input = "Single block msg",
15458 .ilen = 16,
15459 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15460 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15461 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
15462 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
15463 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
15464 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
15465 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
15466 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
15467 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
15468 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
15469 .rlen = 16 + 64,
15470 }, { /* RFC 3602 Case 2 */
15471#ifdef __LITTLE_ENDIAN
15472 .key = "\x08\x00" /* rta length */
15473 "\x01\x00" /* rta type */
15474#else
15475 .key = "\x00\x08" /* rta length */
15476 "\x00\x01" /* rta type */
15477#endif
15478 "\x00\x00\x00\x10" /* enc key length */
15479 "\x20\x21\x22\x23\x24\x25\x26\x27"
15480 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15481 "\x30\x31\x32\x33\x34\x35\x36\x37"
15482 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15483 "\x40\x41\x42\x43\x44\x45\x46\x47"
15484 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15485 "\x50\x51\x52\x53\x54\x55\x56\x57"
15486 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15487 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15488 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15489 .klen = 8 + 64 + 16,
15490 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15491 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15492 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15493 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15494 "\x10\x11\x12\x13\x14\x15\x16\x17"
15495 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15496 .ilen = 32,
15497 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15498 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15499 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15500 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15501 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
15502 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
15503 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
15504 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
15505 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
15506 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
15507 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
15508 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
15509 .rlen = 32 + 64,
15510 }, { /* RFC 3602 Case 3 */
15511#ifdef __LITTLE_ENDIAN
15512 .key = "\x08\x00" /* rta length */
15513 "\x01\x00" /* rta type */
15514#else
15515 .key = "\x00\x08" /* rta length */
15516 "\x00\x01" /* rta type */
15517#endif
15518 "\x00\x00\x00\x10" /* enc key length */
15519 "\x11\x22\x33\x44\x55\x66\x77\x88"
15520 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15521 "\x22\x33\x44\x55\x66\x77\x88\x99"
15522 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15523 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15524 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15525 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15526 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15527 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15528 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15529 .klen = 8 + 64 + 16,
15530 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15531 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15532 .input = "This is a 48-byte message (exactly 3 AES blocks)",
15533 .ilen = 48,
15534 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15535 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15536 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15537 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15538 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15539 "\x85\x79\x69\x5d\x83\xba\x26\x84"
15540 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
15541 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
15542 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
15543 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
15544 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
15545 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
15546 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
15547 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
15548 .rlen = 48 + 64,
15549 }, { /* RFC 3602 Case 4 */
15550#ifdef __LITTLE_ENDIAN
15551 .key = "\x08\x00" /* rta length */
15552 "\x01\x00" /* rta type */
15553#else
15554 .key = "\x00\x08" /* rta length */
15555 "\x00\x01" /* rta type */
15556#endif
15557 "\x00\x00\x00\x10" /* enc key length */
15558 "\x11\x22\x33\x44\x55\x66\x77\x88"
15559 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15560 "\x22\x33\x44\x55\x66\x77\x88\x99"
15561 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15562 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15563 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15564 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15565 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15566 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15567 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15568 .klen = 8 + 64 + 16,
15569 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15570 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15571 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15572 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15573 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15574 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15575 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15576 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15577 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15578 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15579 .ilen = 64,
15580 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15581 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15582 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15583 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15584 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15585 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15586 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15587 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15588 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
15589 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
15590 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
15591 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
15592 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
15593 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
15594 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
15595 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
15596 .rlen = 64 + 64,
15597 }, { /* RFC 3602 Case 5 */
15598#ifdef __LITTLE_ENDIAN
15599 .key = "\x08\x00" /* rta length */
15600 "\x01\x00" /* rta type */
15601#else
15602 .key = "\x00\x08" /* rta length */
15603 "\x00\x01" /* rta type */
15604#endif
15605 "\x00\x00\x00\x10" /* enc key length */
15606 "\x11\x22\x33\x44\x55\x66\x77\x88"
15607 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15608 "\x22\x33\x44\x55\x66\x77\x88\x99"
15609 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15610 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15611 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15612 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15613 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15614 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15615 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15616 .klen = 8 + 64 + 16,
15617 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15618 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15619 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15620 .alen = 8,
15621 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15622 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15623 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15624 "\x10\x11\x12\x13\x14\x15\x16\x17"
15625 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15626 "\x20\x21\x22\x23\x24\x25\x26\x27"
15627 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15628 "\x30\x31\x32\x33\x34\x35\x36\x37"
15629 "\x01\x02\x03\x04\x05\x06\x07\x08"
15630 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15631 .ilen = 80,
15632 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15633 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15634 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15635 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15636 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15637 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15638 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15639 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15640 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15641 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15642 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
15643 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
15644 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
15645 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
15646 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
15647 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
15648 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
15649 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
15650 .rlen = 80 + 64,
15651 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15652#ifdef __LITTLE_ENDIAN
15653 .key = "\x08\x00" /* rta length */
15654 "\x01\x00" /* rta type */
15655#else
15656 .key = "\x00\x08" /* rta length */
15657 "\x00\x01" /* rta type */
15658#endif
15659 "\x00\x00\x00\x18" /* enc key length */
15660 "\x11\x22\x33\x44\x55\x66\x77\x88"
15661 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15662 "\x22\x33\x44\x55\x66\x77\x88\x99"
15663 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15664 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15665 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15666 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15667 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15668 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15669 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15670 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15671 .klen = 8 + 64 + 24,
15672 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15673 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15674 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15675 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15676 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15677 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15678 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15679 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15680 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15681 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15682 .ilen = 64,
15683 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15684 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15685 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15686 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15687 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15688 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15689 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15690 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15691 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
15692 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
15693 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
15694 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
15695 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
15696 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
15697 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
15698 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
15699 .rlen = 64 + 64,
15700 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15701#ifdef __LITTLE_ENDIAN
15702 .key = "\x08\x00" /* rta length */
15703 "\x01\x00" /* rta type */
15704#else
15705 .key = "\x00\x08" /* rta length */
15706 "\x00\x01" /* rta type */
15707#endif
15708 "\x00\x00\x00\x20" /* enc key length */
15709 "\x11\x22\x33\x44\x55\x66\x77\x88"
15710 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15711 "\x22\x33\x44\x55\x66\x77\x88\x99"
15712 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15713 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15714 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15715 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15716 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15717 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15718 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15719 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15720 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15721 .klen = 8 + 64 + 32,
15722 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
15723 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15724 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15725 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15726 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15727 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15728 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15729 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15730 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15731 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15732 .ilen = 64,
15733 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15734 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15735 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15736 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15737 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15738 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15739 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15740 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15741 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
15742 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
15743 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
15744 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
15745 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
15746 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
15747 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
15748 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
15749 .rlen = 64 + 64,
15750 },
15751};
15752
Nitesh Lal5208ed22014-05-21 17:09:08 +053015753#define HMAC_SHA1_DES_CBC_ENC_TEST_VEC 1
15754
15755static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = {
15756 { /*Generated with cryptopp*/
15757#ifdef __LITTLE_ENDIAN
15758 .key = "\x08\x00" /* rta length */
15759 "\x01\x00" /* rta type */
15760#else
15761 .key = "\x00\x08" /* rta length */
15762 "\x00\x01" /* rta type */
15763#endif
15764 "\x00\x00\x00\x08" /* enc key length */
15765 "\x11\x22\x33\x44\x55\x66\x77\x88"
15766 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15767 "\x22\x33\x44\x55"
15768 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15769 .klen = 8 + 20 + 8,
15770 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15771 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15772 .alen = 8,
15773 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15774 "\x53\x20\x63\x65\x65\x72\x73\x74"
15775 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15776 "\x20\x79\x65\x53\x72\x63\x74\x65"
15777 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15778 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15779 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15780 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15781 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15782 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15783 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15784 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15785 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15786 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15787 "\x63\x65\x65\x72\x73\x74\x54\x20"
15788 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15789 .ilen = 128,
15790 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15791 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15792 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15793 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15794 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15795 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15796 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15797 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15798 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15799 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15800 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15801 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15802 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15803 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15804 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15805 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15806 "\x95\x16\x20\x09\xf5\x95\x19\xfd"
15807 "\x3c\xc7\xe0\x42\xc0\x14\x69\xfa"
15808 "\x5c\x44\xa9\x37",
15809 .rlen = 128 + 20,
15810 },
15811};
15812
15813#define HMAC_SHA224_DES_CBC_ENC_TEST_VEC 1
15814
15815static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = {
15816 { /*Generated with cryptopp*/
15817#ifdef __LITTLE_ENDIAN
15818 .key = "\x08\x00" /* rta length */
15819 "\x01\x00" /* rta type */
15820#else
15821 .key = "\x00\x08" /* rta length */
15822 "\x00\x01" /* rta type */
15823#endif
15824 "\x00\x00\x00\x08" /* enc key length */
15825 "\x11\x22\x33\x44\x55\x66\x77\x88"
15826 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15827 "\x22\x33\x44\x55\x66\x77\x88\x99"
15828 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15829 .klen = 8 + 24 + 8,
15830 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15831 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15832 .alen = 8,
15833 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15834 "\x53\x20\x63\x65\x65\x72\x73\x74"
15835 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15836 "\x20\x79\x65\x53\x72\x63\x74\x65"
15837 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15838 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15839 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15840 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15841 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15842 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15843 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15844 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15845 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15846 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15847 "\x63\x65\x65\x72\x73\x74\x54\x20"
15848 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15849 .ilen = 128,
15850 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15851 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15852 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15853 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15854 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15855 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15856 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15857 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15858 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15859 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15860 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15861 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15862 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15863 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15864 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15865 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15866 "\x9c\x2d\x7e\xee\x20\x34\x55\x0a"
15867 "\xce\xb5\x4e\x64\x53\xe7\xbf\x91"
15868 "\xab\xd4\xd9\xda\xc9\x12\xae\xf7",
15869 .rlen = 128 + 24,
15870 },
15871};
15872
15873#define HMAC_SHA256_DES_CBC_ENC_TEST_VEC 1
15874
15875static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = {
15876 { /*Generated with cryptopp*/
15877#ifdef __LITTLE_ENDIAN
15878 .key = "\x08\x00" /* rta length */
15879 "\x01\x00" /* rta type */
15880#else
15881 .key = "\x00\x08" /* rta length */
15882 "\x00\x01" /* rta type */
15883#endif
15884 "\x00\x00\x00\x08" /* enc key length */
15885 "\x11\x22\x33\x44\x55\x66\x77\x88"
15886 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15887 "\x22\x33\x44\x55\x66\x77\x88\x99"
15888 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15889 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15890 .klen = 8 + 32 + 8,
15891 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15892 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15893 .alen = 8,
15894 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15895 "\x53\x20\x63\x65\x65\x72\x73\x74"
15896 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15897 "\x20\x79\x65\x53\x72\x63\x74\x65"
15898 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15899 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15900 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15901 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15902 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15903 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15904 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15905 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15906 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15907 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15908 "\x63\x65\x65\x72\x73\x74\x54\x20"
15909 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15910 .ilen = 128,
15911 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15912 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15913 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15914 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15915 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15916 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15917 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15918 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15919 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15920 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15921 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15922 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15923 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15924 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15925 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15926 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15927 "\xc6\x58\xa1\x60\x70\x91\x39\x36"
15928 "\x50\xf6\x5d\xab\x4b\x51\x4e\x5e"
15929 "\xde\x63\xde\x76\x52\xde\x9f\xba"
15930 "\x90\xcf\x15\xf2\xbb\x6e\x84\x00",
15931 .rlen = 128 + 32,
15932 },
15933};
15934
15935#define HMAC_SHA384_DES_CBC_ENC_TEST_VEC 1
15936
15937static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = {
15938 { /*Generated with cryptopp*/
15939#ifdef __LITTLE_ENDIAN
15940 .key = "\x08\x00" /* rta length */
15941 "\x01\x00" /* rta type */
15942#else
15943 .key = "\x00\x08" /* rta length */
15944 "\x00\x01" /* rta type */
15945#endif
15946 "\x00\x00\x00\x08" /* enc key length */
15947 "\x11\x22\x33\x44\x55\x66\x77\x88"
15948 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15949 "\x22\x33\x44\x55\x66\x77\x88\x99"
15950 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15951 "\x33\x44\x55\x66\x77\x88\x99\xaa"
15952 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15953 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
15954 .klen = 8 + 48 + 8,
15955 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
15956 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
15957 .alen = 8,
15958 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
15959 "\x53\x20\x63\x65\x65\x72\x73\x74"
15960 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
15961 "\x20\x79\x65\x53\x72\x63\x74\x65"
15962 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
15963 "\x79\x6e\x53\x20\x63\x65\x65\x72"
15964 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
15965 "\x6e\x61\x20\x79\x65\x53\x72\x63"
15966 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
15967 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
15968 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
15969 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
15970 "\x72\x63\x74\x65\x20\x73\x6f\x54"
15971 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
15972 "\x63\x65\x65\x72\x73\x74\x54\x20"
15973 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
15974 .ilen = 128,
15975 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
15976 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
15977 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
15978 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
15979 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
15980 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
15981 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
15982 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
15983 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
15984 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
15985 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
15986 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
15987 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
15988 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
15989 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
15990 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
15991 "\xa8\x8e\x9c\x74\x8c\x2b\x99\xa0"
15992 "\xc8\x8c\xef\x25\x07\x83\x11\x3a"
15993 "\x31\x8d\xbe\x3b\x6a\xd7\x96\xfe"
15994 "\x5e\x67\xb5\x74\xe7\xe7\x85\x61"
15995 "\x6a\x95\x26\x75\xcc\x53\x89\xf3"
15996 "\x74\xc9\x2a\x76\x20\xa2\x64\x62",
15997 .rlen = 128 + 48,
15998 },
15999};
16000
16001#define HMAC_SHA512_DES_CBC_ENC_TEST_VEC 1
16002
16003static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = {
16004 { /*Generated with cryptopp*/
16005#ifdef __LITTLE_ENDIAN
16006 .key = "\x08\x00" /* rta length */
16007 "\x01\x00" /* rta type */
16008#else
16009 .key = "\x00\x08" /* rta length */
16010 "\x00\x01" /* rta type */
16011#endif
16012 "\x00\x00\x00\x08" /* enc key length */
16013 "\x11\x22\x33\x44\x55\x66\x77\x88"
16014 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16015 "\x22\x33\x44\x55\x66\x77\x88\x99"
16016 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16017 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16018 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16019 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16020 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16021 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16022 .klen = 8 + 64 + 8,
16023 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16024 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16025 .alen = 8,
16026 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16027 "\x53\x20\x63\x65\x65\x72\x73\x74"
16028 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16029 "\x20\x79\x65\x53\x72\x63\x74\x65"
16030 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16031 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16032 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16033 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16034 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16035 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16036 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16037 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16038 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16039 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16040 "\x63\x65\x65\x72\x73\x74\x54\x20"
16041 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16042 .ilen = 128,
16043 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16044 "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16045 "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16046 "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16047 "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16048 "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16049 "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16050 "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16051 "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16052 "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16053 "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16054 "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16055 "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16056 "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16057 "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16058 "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16059 "\xc6\x2c\x73\x88\xb0\x9d\x5f\x3e"
16060 "\x5b\x78\xca\x0e\xab\x8a\xa3\xbb"
16061 "\xd9\x1d\xc3\xe3\x05\xac\x76\xfb"
16062 "\x58\x83\xda\x67\xfb\x21\x24\xa2"
16063 "\xb1\xa7\xd7\x66\xa6\x8d\xa6\x93"
16064 "\x97\xe2\xe3\xb8\xaa\x48\x85\xee"
16065 "\x8c\xf6\x07\x95\x1f\xa6\x6c\x96"
16066 "\x99\xc7\x5c\x8d\xd8\xb5\x68\x7b",
16067 .rlen = 128 + 64,
16068 },
16069};
16070
16071#define HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC 1
16072
16073static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = {
16074 { /*Generated with cryptopp*/
16075#ifdef __LITTLE_ENDIAN
16076 .key = "\x08\x00" /* rta length */
16077 "\x01\x00" /* rta type */
16078#else
16079 .key = "\x00\x08" /* rta length */
16080 "\x00\x01" /* rta type */
16081#endif
16082 "\x00\x00\x00\x18" /* enc key length */
16083 "\x11\x22\x33\x44\x55\x66\x77\x88"
16084 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16085 "\x22\x33\x44\x55"
16086 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16087 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16088 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16089 .klen = 8 + 20 + 24,
16090 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16091 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16092 .alen = 8,
16093 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16094 "\x53\x20\x63\x65\x65\x72\x73\x74"
16095 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16096 "\x20\x79\x65\x53\x72\x63\x74\x65"
16097 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16098 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16099 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16100 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16101 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16102 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16103 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16104 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16105 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16106 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16107 "\x63\x65\x65\x72\x73\x74\x54\x20"
16108 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16109 .ilen = 128,
16110 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16111 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16112 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16113 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16114 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16115 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16116 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16117 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16118 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16119 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16120 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16121 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16122 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16123 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16124 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16125 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16126 "\x67\x6d\xb1\xf5\xb8\x10\xdc\xc6"
16127 "\x75\x86\x96\x6b\xb1\xc5\xe4\xcf"
16128 "\xd1\x60\x91\xb3",
16129 .rlen = 128 + 20,
16130 },
16131};
16132
16133#define HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC 1
16134
16135static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = {
16136 { /*Generated with cryptopp*/
16137#ifdef __LITTLE_ENDIAN
16138 .key = "\x08\x00" /* rta length */
16139 "\x01\x00" /* rta type */
16140#else
16141 .key = "\x00\x08" /* rta length */
16142 "\x00\x01" /* rta type */
16143#endif
16144 "\x00\x00\x00\x18" /* enc key length */
16145 "\x11\x22\x33\x44\x55\x66\x77\x88"
16146 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16147 "\x22\x33\x44\x55\x66\x77\x88\x99"
16148 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16149 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16150 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16151 .klen = 8 + 24 + 24,
16152 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16153 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16154 .alen = 8,
16155 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16156 "\x53\x20\x63\x65\x65\x72\x73\x74"
16157 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16158 "\x20\x79\x65\x53\x72\x63\x74\x65"
16159 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16160 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16161 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16162 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16163 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16164 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16165 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16166 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16167 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16168 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16169 "\x63\x65\x65\x72\x73\x74\x54\x20"
16170 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16171 .ilen = 128,
16172 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16173 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16174 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16175 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16176 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16177 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16178 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16179 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16180 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16181 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16182 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16183 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16184 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16185 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16186 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16187 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16188 "\x15\x24\x7f\x5a\x45\x4a\x66\xce"
16189 "\x2b\x0b\x93\x99\x2f\x9d\x0c\x6c"
16190 "\x56\x1f\xe1\xa6\x41\xb2\x4c\xd0",
16191 .rlen = 128 + 24,
16192 },
16193};
16194
16195#define HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC 1
16196
16197static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = {
16198 { /*Generated with cryptopp*/
16199#ifdef __LITTLE_ENDIAN
16200 .key = "\x08\x00" /* rta length */
16201 "\x01\x00" /* rta type */
16202#else
16203 .key = "\x00\x08" /* rta length */
16204 "\x00\x01" /* rta type */
16205#endif
16206 "\x00\x00\x00\x18" /* enc key length */
16207 "\x11\x22\x33\x44\x55\x66\x77\x88"
16208 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16209 "\x22\x33\x44\x55\x66\x77\x88\x99"
16210 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16211 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16212 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16213 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16214 .klen = 8 + 32 + 24,
16215 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16216 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16217 .alen = 8,
16218 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16219 "\x53\x20\x63\x65\x65\x72\x73\x74"
16220 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16221 "\x20\x79\x65\x53\x72\x63\x74\x65"
16222 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16223 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16224 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16225 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16226 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16227 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16228 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16229 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16230 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16231 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16232 "\x63\x65\x65\x72\x73\x74\x54\x20"
16233 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16234 .ilen = 128,
16235 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16236 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16237 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16238 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16239 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16240 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16241 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16242 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16243 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16244 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16245 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16246 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16247 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16248 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16249 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16250 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16251 "\x73\xb0\xea\x9f\xe8\x18\x80\xd6"
16252 "\x56\x38\x44\xc0\xdb\xe3\x4f\x71"
16253 "\xf7\xce\xd1\xd3\xf8\xbd\x3e\x4f"
16254 "\xca\x43\x95\xdf\x80\x61\x81\xa9",
16255 .rlen = 128 + 32,
16256 },
16257};
16258
16259#define HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC 1
16260
16261static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = {
16262 { /*Generated with cryptopp*/
16263#ifdef __LITTLE_ENDIAN
16264 .key = "\x08\x00" /* rta length */
16265 "\x01\x00" /* rta type */
16266#else
16267 .key = "\x00\x08" /* rta length */
16268 "\x00\x01" /* rta type */
16269#endif
16270 "\x00\x00\x00\x18" /* enc key length */
16271 "\x11\x22\x33\x44\x55\x66\x77\x88"
16272 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16273 "\x22\x33\x44\x55\x66\x77\x88\x99"
16274 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16275 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16276 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16277 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16278 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16279 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16280 .klen = 8 + 48 + 24,
16281 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16282 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16283 .alen = 8,
16284 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16285 "\x53\x20\x63\x65\x65\x72\x73\x74"
16286 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16287 "\x20\x79\x65\x53\x72\x63\x74\x65"
16288 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16289 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16290 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16291 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16292 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16293 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16294 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16295 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16296 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16297 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16298 "\x63\x65\x65\x72\x73\x74\x54\x20"
16299 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16300 .ilen = 128,
16301 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16302 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16303 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16304 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16305 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16306 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16307 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16308 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16309 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16310 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16311 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16312 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16313 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16314 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16315 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16316 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16317 "\x6d\x77\xfc\x80\x9d\x8a\x9c\xb7"
16318 "\x70\xe7\x93\xbf\x73\xe6\x9f\x83"
16319 "\x99\x62\x23\xe6\x5b\xd0\xda\x18"
16320 "\xa4\x32\x8a\x0b\x46\xd7\xf0\x39"
16321 "\x36\x5d\x13\x2f\x86\x10\x78\xd6"
16322 "\xd6\xbe\x5c\xb9\x15\x89\xf9\x1b",
16323 .rlen = 128 + 48,
16324 },
16325};
16326
16327#define HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC 1
16328
16329static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = {
16330 { /*Generated with cryptopp*/
16331#ifdef __LITTLE_ENDIAN
16332 .key = "\x08\x00" /* rta length */
16333 "\x01\x00" /* rta type */
16334#else
16335 .key = "\x00\x08" /* rta length */
16336 "\x00\x01" /* rta type */
16337#endif
16338 "\x00\x00\x00\x18" /* enc key length */
16339 "\x11\x22\x33\x44\x55\x66\x77\x88"
16340 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16341 "\x22\x33\x44\x55\x66\x77\x88\x99"
16342 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16343 "\x33\x44\x55\x66\x77\x88\x99\xaa"
16344 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16345 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16346 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16347 "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16348 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16349 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16350 .klen = 8 + 64 + 24,
16351 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16352 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
16353 .alen = 8,
16354 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16355 "\x53\x20\x63\x65\x65\x72\x73\x74"
16356 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16357 "\x20\x79\x65\x53\x72\x63\x74\x65"
16358 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16359 "\x79\x6e\x53\x20\x63\x65\x65\x72"
16360 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16361 "\x6e\x61\x20\x79\x65\x53\x72\x63"
16362 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16363 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16364 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16365 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16366 "\x72\x63\x74\x65\x20\x73\x6f\x54"
16367 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16368 "\x63\x65\x65\x72\x73\x74\x54\x20"
16369 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16370 .ilen = 128,
16371 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16372 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16373 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16374 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16375 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16376 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16377 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16378 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16379 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16380 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16381 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16382 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16383 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16384 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16385 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16386 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16387 "\x41\xb5\x1f\xbb\xbd\x4e\xb8\x32"
16388 "\x22\x86\x4e\x57\x1b\x2a\xd8\x6e"
16389 "\xa9\xfb\xc8\xf3\xbf\x2d\xae\x2b"
16390 "\x3b\xbc\x41\xe8\x38\xbb\xf1\x60"
16391 "\x4c\x68\xa9\x4e\x8c\x73\xa7\xc0"
16392 "\x2a\x74\xd4\x65\x12\xcb\x55\xf2"
16393 "\xd5\x02\x6d\xe6\xaf\xc9\x2f\xf2"
16394 "\x57\xaa\x85\xf7\xf3\x6a\xcb\xdb",
16395 .rlen = 128 + 64,
16396 },
16397};
16398
Herbert Xuda7f0332008-07-31 17:08:25 +080016399static struct cipher_testvec aes_lrw_enc_tv_template[] = {
16400 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16401 { /* LRW-32-AES 1 */
16402 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16403 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16404 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16405 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16406 .klen = 32,
16407 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16408 "\x00\x00\x00\x00\x00\x00\x00\x01",
16409 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16410 "\x38\x39\x41\x42\x43\x44\x45\x46",
16411 .ilen = 16,
16412 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16413 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16414 .rlen = 16,
16415 }, { /* LRW-32-AES 2 */
16416 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16417 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16418 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16419 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16420 .klen = 32,
16421 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16422 "\x00\x00\x00\x00\x00\x00\x00\x02",
16423 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16424 "\x38\x39\x41\x42\x43\x44\x45\x46",
16425 .ilen = 16,
16426 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16427 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16428 .rlen = 16,
16429 }, { /* LRW-32-AES 3 */
16430 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16431 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16432 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16433 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16434 .klen = 32,
16435 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16436 "\x00\x00\x00\x02\x00\x00\x00\x00",
16437 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16438 "\x38\x39\x41\x42\x43\x44\x45\x46",
16439 .ilen = 16,
16440 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16441 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16442 .rlen = 16,
16443 }, { /* LRW-32-AES 4 */
16444 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16445 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16446 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16447 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16448 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16449 .klen = 40,
16450 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16451 "\x00\x00\x00\x00\x00\x00\x00\x01",
16452 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16453 "\x38\x39\x41\x42\x43\x44\x45\x46",
16454 .ilen = 16,
16455 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16456 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16457 .rlen = 16,
16458 }, { /* LRW-32-AES 5 */
16459 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16460 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16461 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16462 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16463 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16464 .klen = 40,
16465 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16466 "\x00\x00\x00\x02\x00\x00\x00\x00",
16467 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16468 "\x38\x39\x41\x42\x43\x44\x45\x46",
16469 .ilen = 16,
16470 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16471 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16472 .rlen = 16,
16473 }, { /* LRW-32-AES 6 */
16474 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16475 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16476 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16477 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16478 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16479 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16480 .klen = 48,
16481 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16482 "\x00\x00\x00\x00\x00\x00\x00\x01",
16483 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16484 "\x38\x39\x41\x42\x43\x44\x45\x46",
16485 .ilen = 16,
16486 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16487 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16488 .rlen = 16,
16489 }, { /* LRW-32-AES 7 */
16490 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16491 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16492 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16493 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16494 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16495 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16496 .klen = 48,
16497 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16498 "\x00\x00\x00\x02\x00\x00\x00\x00",
16499 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
16500 "\x38\x39\x41\x42\x43\x44\x45\x46",
16501 .ilen = 16,
16502 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16503 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16504 .rlen = 16,
16505 }, {
16506/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16507 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16508 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16509 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16510 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16511 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16512 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16513 .klen = 48,
16514 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16515 "\x00\x00\x00\x00\x00\x00\x00\x01",
16516 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16517 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16518 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16519 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16520 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16521 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16522 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16523 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16524 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16525 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16526 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16527 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
16528 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
16529 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
16530 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
16531 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
16532 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
16533 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
16534 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
16535 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
16536 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
16537 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
16538 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
16539 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
16540 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
16541 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
16542 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
16543 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
16544 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
16545 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
16546 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
16547 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
16548 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
16549 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
16550 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
16551 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
16552 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
16553 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
16554 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
16555 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
16556 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
16557 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
16558 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
16559 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
16560 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
16561 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
16562 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
16563 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
16564 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
16565 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
16566 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
16567 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
16568 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
16569 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
16570 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
16571 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
16572 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
16573 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
16574 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
16575 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
16576 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
16577 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
16578 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16579 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16580 .ilen = 512,
16581 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16582 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16583 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16584 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16585 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16586 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16587 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16588 "\xe8\x58\x46\x97\x39\x51\x07\xde"
16589 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16590 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16591 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16592 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16593 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16594 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16595 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
16596 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
16597 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
16598 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
16599 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
16600 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
16601 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
16602 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
16603 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
16604 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
16605 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
16606 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
16607 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
16608 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
16609 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
16610 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
16611 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
16612 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
16613 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
16614 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
16615 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
16616 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
16617 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
16618 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
16619 "\xb8\x79\x78\x97\x94\xff\x72\x13"
16620 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
16621 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
16622 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
16623 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
16624 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
16625 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
16626 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
16627 "\x1e\x86\x53\x11\x53\x94\x00\xee"
16628 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
16629 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
16630 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
16631 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
16632 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
16633 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
16634 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
16635 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
16636 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
16637 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
16638 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
16639 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
16640 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
16641 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
16642 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
16643 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
16644 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
16645 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016646 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020016647 .np = 3,
16648 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016649 }
16650};
16651
16652static struct cipher_testvec aes_lrw_dec_tv_template[] = {
16653 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16654 /* same as enc vectors with input and result reversed */
16655 { /* LRW-32-AES 1 */
16656 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16657 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16658 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16659 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16660 .klen = 32,
16661 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16662 "\x00\x00\x00\x00\x00\x00\x00\x01",
16663 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16664 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16665 .ilen = 16,
16666 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16667 "\x38\x39\x41\x42\x43\x44\x45\x46",
16668 .rlen = 16,
16669 }, { /* LRW-32-AES 2 */
16670 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16671 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16672 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16673 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16674 .klen = 32,
16675 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16676 "\x00\x00\x00\x00\x00\x00\x00\x02",
16677 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16678 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16679 .ilen = 16,
16680 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16681 "\x38\x39\x41\x42\x43\x44\x45\x46",
16682 .rlen = 16,
16683 }, { /* LRW-32-AES 3 */
16684 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16685 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16686 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16687 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16688 .klen = 32,
16689 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16690 "\x00\x00\x00\x02\x00\x00\x00\x00",
16691 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16692 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16693 .ilen = 16,
16694 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16695 "\x38\x39\x41\x42\x43\x44\x45\x46",
16696 .rlen = 16,
16697 }, { /* LRW-32-AES 4 */
16698 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16699 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16700 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16701 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16702 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16703 .klen = 40,
16704 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16705 "\x00\x00\x00\x00\x00\x00\x00\x01",
16706 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16707 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16708 .ilen = 16,
16709 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16710 "\x38\x39\x41\x42\x43\x44\x45\x46",
16711 .rlen = 16,
16712 }, { /* LRW-32-AES 5 */
16713 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16714 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16715 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16716 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16717 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16718 .klen = 40,
16719 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16720 "\x00\x00\x00\x02\x00\x00\x00\x00",
16721 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16722 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16723 .ilen = 16,
16724 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16725 "\x38\x39\x41\x42\x43\x44\x45\x46",
16726 .rlen = 16,
16727 }, { /* LRW-32-AES 6 */
16728 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16729 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16730 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16731 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16732 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16733 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16734 .klen = 48,
16735 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16736 "\x00\x00\x00\x00\x00\x00\x00\x01",
16737 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16738 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16739 .ilen = 16,
16740 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16741 "\x38\x39\x41\x42\x43\x44\x45\x46",
16742 .rlen = 16,
16743 }, { /* LRW-32-AES 7 */
16744 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16745 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16746 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16747 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16748 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16749 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16750 .klen = 48,
16751 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16752 "\x00\x00\x00\x02\x00\x00\x00\x00",
16753 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16754 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16755 .ilen = 16,
16756 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16757 "\x38\x39\x41\x42\x43\x44\x45\x46",
16758 .rlen = 16,
16759 }, {
16760/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16761 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16762 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16763 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16764 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16765 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16766 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16767 .klen = 48,
16768 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16769 "\x00\x00\x00\x00\x00\x00\x00\x01",
16770 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16771 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16772 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16773 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16774 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16775 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16776 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16777 "\xe8\x58\x46\x97\x39\x51\x07\xde"
16778 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16779 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16780 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16781 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16782 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16783 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16784 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
16785 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
16786 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
16787 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
16788 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
16789 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
16790 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
16791 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
16792 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
16793 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
16794 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
16795 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
16796 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
16797 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
16798 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
16799 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
16800 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
16801 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
16802 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
16803 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
16804 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
16805 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
16806 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
16807 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
16808 "\xb8\x79\x78\x97\x94\xff\x72\x13"
16809 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
16810 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
16811 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
16812 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
16813 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
16814 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
16815 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
16816 "\x1e\x86\x53\x11\x53\x94\x00\xee"
16817 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
16818 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
16819 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
16820 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
16821 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
16822 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
16823 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
16824 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
16825 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
16826 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
16827 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
16828 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
16829 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
16830 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
16831 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
16832 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
16833 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
16834 .ilen = 512,
16835 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16836 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16837 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16838 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16839 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16840 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16841 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16842 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16843 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16844 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16845 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16846 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
16847 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
16848 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
16849 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
16850 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
16851 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
16852 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
16853 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
16854 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
16855 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
16856 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
16857 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
16858 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
16859 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
16860 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
16861 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
16862 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
16863 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
16864 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
16865 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
16866 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
16867 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
16868 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
16869 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
16870 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
16871 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
16872 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
16873 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
16874 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
16875 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
16876 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
16877 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
16878 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
16879 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
16880 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
16881 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
16882 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
16883 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
16884 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
16885 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
16886 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
16887 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
16888 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
16889 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
16890 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
16891 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
16892 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
16893 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
16894 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
16895 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
16896 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
16897 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16898 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16899 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030016900 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020016901 .np = 3,
16902 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080016903 }
16904};
16905
16906static struct cipher_testvec aes_xts_enc_tv_template[] = {
16907 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
16908 { /* XTS-AES 1 */
16909 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
16910 "\x00\x00\x00\x00\x00\x00\x00\x00"
16911 "\x00\x00\x00\x00\x00\x00\x00\x00"
16912 "\x00\x00\x00\x00\x00\x00\x00\x00",
16913 .klen = 32,
16914 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16915 "\x00\x00\x00\x00\x00\x00\x00\x00",
16916 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
16917 "\x00\x00\x00\x00\x00\x00\x00\x00"
16918 "\x00\x00\x00\x00\x00\x00\x00\x00"
16919 "\x00\x00\x00\x00\x00\x00\x00\x00",
16920 .ilen = 32,
16921 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
16922 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
16923 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
16924 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
16925 .rlen = 32,
16926 }, { /* XTS-AES 2 */
16927 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
16928 "\x11\x11\x11\x11\x11\x11\x11\x11"
16929 "\x22\x22\x22\x22\x22\x22\x22\x22"
16930 "\x22\x22\x22\x22\x22\x22\x22\x22",
16931 .klen = 32,
16932 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
16933 "\x00\x00\x00\x00\x00\x00\x00\x00",
16934 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
16935 "\x44\x44\x44\x44\x44\x44\x44\x44"
16936 "\x44\x44\x44\x44\x44\x44\x44\x44"
16937 "\x44\x44\x44\x44\x44\x44\x44\x44",
16938 .ilen = 32,
16939 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
16940 "\x39\x33\x40\x38\xac\xef\x83\x8b"
16941 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
16942 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
16943 .rlen = 32,
16944 }, { /* XTS-AES 3 */
16945 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
16946 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
16947 "\x22\x22\x22\x22\x22\x22\x22\x22"
16948 "\x22\x22\x22\x22\x22\x22\x22\x22",
16949 .klen = 32,
16950 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
16951 "\x00\x00\x00\x00\x00\x00\x00\x00",
16952 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
16953 "\x44\x44\x44\x44\x44\x44\x44\x44"
16954 "\x44\x44\x44\x44\x44\x44\x44\x44"
16955 "\x44\x44\x44\x44\x44\x44\x44\x44",
16956 .ilen = 32,
16957 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
16958 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
16959 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
16960 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
16961 .rlen = 32,
16962 }, { /* XTS-AES 4 */
16963 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
16964 "\x23\x53\x60\x28\x74\x71\x35\x26"
16965 "\x31\x41\x59\x26\x53\x58\x97\x93"
16966 "\x23\x84\x62\x64\x33\x83\x27\x95",
16967 .klen = 32,
16968 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
16969 "\x00\x00\x00\x00\x00\x00\x00\x00",
16970 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16971 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16972 "\x10\x11\x12\x13\x14\x15\x16\x17"
16973 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16974 "\x20\x21\x22\x23\x24\x25\x26\x27"
16975 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16976 "\x30\x31\x32\x33\x34\x35\x36\x37"
16977 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16978 "\x40\x41\x42\x43\x44\x45\x46\x47"
16979 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16980 "\x50\x51\x52\x53\x54\x55\x56\x57"
16981 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16982 "\x60\x61\x62\x63\x64\x65\x66\x67"
16983 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16984 "\x70\x71\x72\x73\x74\x75\x76\x77"
16985 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16986 "\x80\x81\x82\x83\x84\x85\x86\x87"
16987 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16988 "\x90\x91\x92\x93\x94\x95\x96\x97"
16989 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
16990 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16991 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16992 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16993 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16994 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16995 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16996 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16997 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
16998 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
16999 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17000 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17001 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17002 "\x00\x01\x02\x03\x04\x05\x06\x07"
17003 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17004 "\x10\x11\x12\x13\x14\x15\x16\x17"
17005 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17006 "\x20\x21\x22\x23\x24\x25\x26\x27"
17007 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17008 "\x30\x31\x32\x33\x34\x35\x36\x37"
17009 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17010 "\x40\x41\x42\x43\x44\x45\x46\x47"
17011 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17012 "\x50\x51\x52\x53\x54\x55\x56\x57"
17013 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17014 "\x60\x61\x62\x63\x64\x65\x66\x67"
17015 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17016 "\x70\x71\x72\x73\x74\x75\x76\x77"
17017 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17018 "\x80\x81\x82\x83\x84\x85\x86\x87"
17019 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17020 "\x90\x91\x92\x93\x94\x95\x96\x97"
17021 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17022 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17023 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17024 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17025 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17026 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17027 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17028 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17029 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17030 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17031 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17032 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17033 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17034 .ilen = 512,
17035 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17036 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17037 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17038 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17039 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17040 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17041 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17042 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17043 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17044 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17045 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17046 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17047 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17048 "\x22\x97\x61\x46\xae\x20\xce\x84"
17049 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17050 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17051 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17052 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17053 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17054 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17055 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17056 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17057 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17058 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17059 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17060 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17061 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17062 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17063 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17064 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17065 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17066 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17067 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17068 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17069 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17070 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17071 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17072 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17073 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17074 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17075 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17076 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17077 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17078 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17079 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17080 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17081 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17082 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17083 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17084 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17085 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17086 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17087 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17088 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17089 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17090 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17091 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17092 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17093 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17094 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17095 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17096 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17097 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17098 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17099 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017100 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17101 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17102 "\x23\x53\x60\x28\x74\x71\x35\x26"
17103 "\x62\x49\x77\x57\x24\x70\x93\x69"
17104 "\x99\x59\x57\x49\x66\x96\x76\x27"
17105 "\x31\x41\x59\x26\x53\x58\x97\x93"
17106 "\x23\x84\x62\x64\x33\x83\x27\x95"
17107 "\x02\x88\x41\x97\x16\x93\x99\x37"
17108 "\x51\x05\x82\x09\x74\x94\x45\x92",
17109 .klen = 64,
17110 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17111 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017112 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
17113 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17114 "\x10\x11\x12\x13\x14\x15\x16\x17"
17115 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17116 "\x20\x21\x22\x23\x24\x25\x26\x27"
17117 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17118 "\x30\x31\x32\x33\x34\x35\x36\x37"
17119 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17120 "\x40\x41\x42\x43\x44\x45\x46\x47"
17121 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17122 "\x50\x51\x52\x53\x54\x55\x56\x57"
17123 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17124 "\x60\x61\x62\x63\x64\x65\x66\x67"
17125 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17126 "\x70\x71\x72\x73\x74\x75\x76\x77"
17127 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17128 "\x80\x81\x82\x83\x84\x85\x86\x87"
17129 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17130 "\x90\x91\x92\x93\x94\x95\x96\x97"
17131 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17132 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17133 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17134 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17135 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17136 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17137 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17138 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17139 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17140 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17141 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17142 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17143 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17144 "\x00\x01\x02\x03\x04\x05\x06\x07"
17145 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17146 "\x10\x11\x12\x13\x14\x15\x16\x17"
17147 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17148 "\x20\x21\x22\x23\x24\x25\x26\x27"
17149 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17150 "\x30\x31\x32\x33\x34\x35\x36\x37"
17151 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17152 "\x40\x41\x42\x43\x44\x45\x46\x47"
17153 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17154 "\x50\x51\x52\x53\x54\x55\x56\x57"
17155 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17156 "\x60\x61\x62\x63\x64\x65\x66\x67"
17157 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17158 "\x70\x71\x72\x73\x74\x75\x76\x77"
17159 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17160 "\x80\x81\x82\x83\x84\x85\x86\x87"
17161 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17162 "\x90\x91\x92\x93\x94\x95\x96\x97"
17163 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17164 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17165 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17166 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17167 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17168 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17169 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17170 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17171 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17172 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17173 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17174 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17175 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17176 .ilen = 512,
17177 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17178 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17179 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17180 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17181 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17182 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17183 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17184 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17185 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17186 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17187 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17188 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17189 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17190 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17191 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17192 "\x00\x02\x08\x87\x89\x14\x29\xca"
17193 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17194 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17195 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17196 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17197 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17198 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17199 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17200 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17201 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17202 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17203 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17204 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17205 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17206 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17207 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17208 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17209 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17210 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17211 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17212 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17213 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17214 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17215 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17216 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17217 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17218 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17219 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17220 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17221 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17222 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17223 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17224 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17225 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17226 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17227 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17228 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17229 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17230 "\x94\x30\x54\xff\x84\x01\x14\x93"
17231 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17232 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17233 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17234 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17235 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17236 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17237 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17238 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17239 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17240 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17241 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017242 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017243 .np = 3,
17244 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017245 }
17246};
17247
17248static struct cipher_testvec aes_xts_dec_tv_template[] = {
17249 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17250 { /* XTS-AES 1 */
17251 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
17252 "\x00\x00\x00\x00\x00\x00\x00\x00"
17253 "\x00\x00\x00\x00\x00\x00\x00\x00"
17254 "\x00\x00\x00\x00\x00\x00\x00\x00",
17255 .klen = 32,
17256 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17257 "\x00\x00\x00\x00\x00\x00\x00\x00",
17258 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17259 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17260 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17261 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17262 .ilen = 32,
17263 .result = "\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 "\x00\x00\x00\x00\x00\x00\x00\x00",
17267 .rlen = 32,
17268 }, { /* XTS-AES 2 */
17269 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
17270 "\x11\x11\x11\x11\x11\x11\x11\x11"
17271 "\x22\x22\x22\x22\x22\x22\x22\x22"
17272 "\x22\x22\x22\x22\x22\x22\x22\x22",
17273 .klen = 32,
17274 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17275 "\x00\x00\x00\x00\x00\x00\x00\x00",
17276 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17277 "\x39\x33\x40\x38\xac\xef\x83\x8b"
17278 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17279 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17280 .ilen = 32,
17281 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17282 "\x44\x44\x44\x44\x44\x44\x44\x44"
17283 "\x44\x44\x44\x44\x44\x44\x44\x44"
17284 "\x44\x44\x44\x44\x44\x44\x44\x44",
17285 .rlen = 32,
17286 }, { /* XTS-AES 3 */
17287 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17288 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17289 "\x22\x22\x22\x22\x22\x22\x22\x22"
17290 "\x22\x22\x22\x22\x22\x22\x22\x22",
17291 .klen = 32,
17292 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
17293 "\x00\x00\x00\x00\x00\x00\x00\x00",
17294 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17295 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17296 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17297 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17298 .ilen = 32,
17299 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17300 "\x44\x44\x44\x44\x44\x44\x44\x44"
17301 "\x44\x44\x44\x44\x44\x44\x44\x44"
17302 "\x44\x44\x44\x44\x44\x44\x44\x44",
17303 .rlen = 32,
17304 }, { /* XTS-AES 4 */
17305 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17306 "\x23\x53\x60\x28\x74\x71\x35\x26"
17307 "\x31\x41\x59\x26\x53\x58\x97\x93"
17308 "\x23\x84\x62\x64\x33\x83\x27\x95",
17309 .klen = 32,
17310 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
17311 "\x00\x00\x00\x00\x00\x00\x00\x00",
17312 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17313 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17314 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17315 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17316 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17317 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17318 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17319 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17320 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17321 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17322 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17323 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17324 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17325 "\x22\x97\x61\x46\xae\x20\xce\x84"
17326 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17327 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17328 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17329 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17330 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17331 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17332 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17333 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17334 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17335 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17336 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17337 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17338 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17339 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17340 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17341 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17342 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17343 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17344 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17345 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17346 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17347 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17348 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17349 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17350 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17351 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17352 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17353 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17354 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17355 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17356 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17357 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17358 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17359 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17360 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17361 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17362 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17363 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17364 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17365 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17366 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17367 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17368 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17369 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17370 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17371 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17372 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17373 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17374 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17375 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17376 .ilen = 512,
17377 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17378 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17379 "\x10\x11\x12\x13\x14\x15\x16\x17"
17380 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17381 "\x20\x21\x22\x23\x24\x25\x26\x27"
17382 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17383 "\x30\x31\x32\x33\x34\x35\x36\x37"
17384 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17385 "\x40\x41\x42\x43\x44\x45\x46\x47"
17386 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17387 "\x50\x51\x52\x53\x54\x55\x56\x57"
17388 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17389 "\x60\x61\x62\x63\x64\x65\x66\x67"
17390 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17391 "\x70\x71\x72\x73\x74\x75\x76\x77"
17392 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17393 "\x80\x81\x82\x83\x84\x85\x86\x87"
17394 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17395 "\x90\x91\x92\x93\x94\x95\x96\x97"
17396 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17397 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17398 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17399 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17400 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17401 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17402 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17403 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17404 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17405 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17406 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17407 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17408 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17409 "\x00\x01\x02\x03\x04\x05\x06\x07"
17410 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17411 "\x10\x11\x12\x13\x14\x15\x16\x17"
17412 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17413 "\x20\x21\x22\x23\x24\x25\x26\x27"
17414 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17415 "\x30\x31\x32\x33\x34\x35\x36\x37"
17416 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17417 "\x40\x41\x42\x43\x44\x45\x46\x47"
17418 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17419 "\x50\x51\x52\x53\x54\x55\x56\x57"
17420 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17421 "\x60\x61\x62\x63\x64\x65\x66\x67"
17422 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17423 "\x70\x71\x72\x73\x74\x75\x76\x77"
17424 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17425 "\x80\x81\x82\x83\x84\x85\x86\x87"
17426 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17427 "\x90\x91\x92\x93\x94\x95\x96\x97"
17428 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17429 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17430 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17431 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17432 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17433 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17434 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17435 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17436 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17437 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17438 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17439 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17440 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17441 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017442 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17443 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
17444 "\x23\x53\x60\x28\x74\x71\x35\x26"
17445 "\x62\x49\x77\x57\x24\x70\x93\x69"
17446 "\x99\x59\x57\x49\x66\x96\x76\x27"
17447 "\x31\x41\x59\x26\x53\x58\x97\x93"
17448 "\x23\x84\x62\x64\x33\x83\x27\x95"
17449 "\x02\x88\x41\x97\x16\x93\x99\x37"
17450 "\x51\x05\x82\x09\x74\x94\x45\x92",
17451 .klen = 64,
17452 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
17453 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100017454 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17455 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17456 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17457 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17458 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17459 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17460 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17461 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17462 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17463 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17464 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17465 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17466 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17467 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17468 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17469 "\x00\x02\x08\x87\x89\x14\x29\xca"
17470 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17471 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17472 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17473 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17474 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17475 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17476 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17477 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17478 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17479 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17480 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17481 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17482 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17483 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17484 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17485 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17486 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17487 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17488 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17489 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17490 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17491 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17492 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17493 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17494 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17495 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17496 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17497 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17498 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17499 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17500 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17501 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17502 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17503 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17504 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17505 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17506 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17507 "\x94\x30\x54\xff\x84\x01\x14\x93"
17508 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17509 "\x53\x76\x44\x1a\x77\xed\x43\x85"
17510 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17511 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17512 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17513 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17514 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17515 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17516 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17517 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17518 .ilen = 512,
17519 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17520 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17521 "\x10\x11\x12\x13\x14\x15\x16\x17"
17522 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17523 "\x20\x21\x22\x23\x24\x25\x26\x27"
17524 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17525 "\x30\x31\x32\x33\x34\x35\x36\x37"
17526 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17527 "\x40\x41\x42\x43\x44\x45\x46\x47"
17528 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17529 "\x50\x51\x52\x53\x54\x55\x56\x57"
17530 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17531 "\x60\x61\x62\x63\x64\x65\x66\x67"
17532 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17533 "\x70\x71\x72\x73\x74\x75\x76\x77"
17534 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17535 "\x80\x81\x82\x83\x84\x85\x86\x87"
17536 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17537 "\x90\x91\x92\x93\x94\x95\x96\x97"
17538 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17539 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17540 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17541 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17542 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17543 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17544 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17545 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17546 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17547 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17548 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17549 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17550 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17551 "\x00\x01\x02\x03\x04\x05\x06\x07"
17552 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17553 "\x10\x11\x12\x13\x14\x15\x16\x17"
17554 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17555 "\x20\x21\x22\x23\x24\x25\x26\x27"
17556 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17557 "\x30\x31\x32\x33\x34\x35\x36\x37"
17558 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17559 "\x40\x41\x42\x43\x44\x45\x46\x47"
17560 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17561 "\x50\x51\x52\x53\x54\x55\x56\x57"
17562 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17563 "\x60\x61\x62\x63\x64\x65\x66\x67"
17564 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17565 "\x70\x71\x72\x73\x74\x75\x76\x77"
17566 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17567 "\x80\x81\x82\x83\x84\x85\x86\x87"
17568 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17569 "\x90\x91\x92\x93\x94\x95\x96\x97"
17570 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17571 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17572 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17573 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17574 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17575 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17576 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17577 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17578 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17579 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17580 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17581 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17582 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17583 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030017584 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017585 .np = 3,
17586 .tap = { 512 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080017587 }
17588};
17589
17590
17591static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080017592 { /* From NIST Special Publication 800-38A, Appendix F.5 */
17593 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17594 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17595 .klen = 16,
17596 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17597 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17598 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17599 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17600 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17601 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17602 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17603 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17604 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17605 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17606 .ilen = 64,
17607 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
17608 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
17609 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
17610 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
17611 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
17612 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
17613 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
17614 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
17615 .rlen = 64,
17616 }, {
17617 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
17618 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
17619 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
17620 .klen = 24,
17621 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17622 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17623 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17624 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17625 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17626 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17627 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17628 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17629 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17630 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17631 .ilen = 64,
17632 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
17633 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
17634 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
17635 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
17636 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
17637 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
17638 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
17639 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
17640 .rlen = 64,
17641 }, {
17642 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
17643 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
17644 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
17645 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
17646 .klen = 32,
17647 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17648 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17649 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17650 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17651 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17652 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17653 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17654 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17655 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17656 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17657 .ilen = 64,
17658 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
17659 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
17660 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
17661 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
17662 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
17663 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
17664 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
17665 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
17666 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030017667 }, { /* Generated with Crypto++ */
17668 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
17669 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
17670 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
17671 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
17672 .klen = 32,
17673 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
17674 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
17675 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
17676 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
17677 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
17678 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
17679 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
17680 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
17681 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
17682 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
17683 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
17684 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
17685 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
17686 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
17687 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
17688 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
17689 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
17690 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
17691 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
17692 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
17693 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
17694 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
17695 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
17696 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
17697 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
17698 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
17699 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
17700 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
17701 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
17702 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
17703 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
17704 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
17705 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
17706 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
17707 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
17708 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
17709 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
17710 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
17711 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
17712 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
17713 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
17714 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
17715 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
17716 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
17717 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
17718 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
17719 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
17720 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
17721 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
17722 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
17723 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
17724 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
17725 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
17726 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
17727 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
17728 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
17729 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
17730 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
17731 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
17732 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
17733 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
17734 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
17735 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
17736 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
17737 .ilen = 496,
17738 .result = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
17739 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
17740 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
17741 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
17742 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
17743 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
17744 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
17745 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
17746 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
17747 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
17748 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
17749 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
17750 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
17751 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
17752 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
17753 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
17754 "\x34\x4B\x31\x69\x84\x66\x96\x44"
17755 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
17756 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
17757 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
17758 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
17759 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
17760 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
17761 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
17762 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
17763 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
17764 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
17765 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
17766 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
17767 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
17768 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
17769 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
17770 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
17771 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
17772 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
17773 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
17774 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
17775 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
17776 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
17777 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
17778 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
17779 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
17780 "\x85\x99\x22\xE8\x91\x38\x70\x83"
17781 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
17782 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
17783 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
17784 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
17785 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
17786 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
17787 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
17788 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
17789 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
17790 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
17791 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
17792 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
17793 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
17794 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
17795 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
17796 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
17797 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
17798 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
17799 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
17800 .rlen = 496,
17801 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020017802 .np = 3,
17803 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030017804 }, { /* Generated with Crypto++ */
17805 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
17806 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
17807 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
17808 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
17809 .klen = 32,
17810 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
17811 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
17812 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
17813 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
17814 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
17815 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
17816 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
17817 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
17818 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
17819 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
17820 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
17821 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
17822 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
17823 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
17824 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
17825 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
17826 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
17827 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
17828 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
17829 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
17830 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
17831 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
17832 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
17833 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
17834 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
17835 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
17836 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
17837 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
17838 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
17839 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
17840 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
17841 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
17842 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
17843 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
17844 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
17845 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
17846 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
17847 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
17848 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
17849 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
17850 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
17851 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
17852 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
17853 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
17854 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
17855 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
17856 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
17857 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
17858 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
17859 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
17860 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
17861 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
17862 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
17863 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
17864 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
17865 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
17866 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
17867 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
17868 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
17869 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
17870 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
17871 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
17872 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
17873 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
17874 "\x7B\xE4\x4D",
17875 .ilen = 499,
17876 .result = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
17877 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
17878 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
17879 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
17880 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
17881 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
17882 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
17883 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
17884 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
17885 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
17886 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
17887 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
17888 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
17889 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
17890 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
17891 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
17892 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
17893 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
17894 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
17895 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
17896 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
17897 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
17898 "\x45\x18\x18\x74\x19\xAD\x71\x01"
17899 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
17900 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
17901 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
17902 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
17903 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
17904 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
17905 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
17906 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
17907 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
17908 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
17909 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
17910 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
17911 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
17912 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
17913 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
17914 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
17915 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
17916 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
17917 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
17918 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
17919 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
17920 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
17921 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
17922 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
17923 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
17924 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
17925 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
17926 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
17927 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
17928 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
17929 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
17930 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
17931 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
17932 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
17933 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
17934 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
17935 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
17936 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
17937 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
17938 "\xFB\xF2\x3F",
17939 .rlen = 499,
17940 .also_non_np = 1,
17941 .np = 2,
17942 .tap = { 499 - 16, 16 },
17943 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080017944};
17945
17946static struct cipher_testvec aes_ctr_dec_tv_template[] = {
17947 { /* From NIST Special Publication 800-38A, Appendix F.5 */
17948 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17949 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17950 .klen = 16,
17951 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17952 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17953 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
17954 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
17955 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
17956 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
17957 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
17958 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
17959 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
17960 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
17961 .ilen = 64,
17962 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17963 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17964 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17965 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17966 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17967 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17968 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17969 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17970 .rlen = 64,
17971 }, {
17972 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
17973 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
17974 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
17975 .klen = 24,
17976 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17977 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17978 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
17979 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
17980 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
17981 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
17982 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
17983 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
17984 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
17985 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
17986 .ilen = 64,
17987 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17988 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17989 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17990 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17991 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17992 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17993 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17994 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17995 .rlen = 64,
17996 }, {
17997 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
17998 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
17999 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
18000 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
18001 .klen = 32,
18002 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18003 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18004 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
18005 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
18006 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
18007 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
18008 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
18009 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
18010 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
18011 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
18012 .ilen = 64,
18013 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18014 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18015 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18016 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18017 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18018 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18019 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18020 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18021 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018022 }, { /* Generated with Crypto++ */
18023 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18024 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18025 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18026 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18027 .klen = 32,
18028 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18029 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18030 .input = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18031 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18032 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18033 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18034 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18035 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18036 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18037 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18038 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18039 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18040 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18041 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18042 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18043 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18044 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18045 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18046 "\x34\x4B\x31\x69\x84\x66\x96\x44"
18047 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18048 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18049 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18050 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18051 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18052 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18053 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18054 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18055 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18056 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18057 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18058 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18059 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18060 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18061 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18062 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18063 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18064 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18065 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18066 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18067 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18068 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18069 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18070 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18071 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18072 "\x85\x99\x22\xE8\x91\x38\x70\x83"
18073 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18074 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18075 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18076 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18077 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18078 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18079 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18080 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18081 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18082 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18083 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18084 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18085 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18086 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18087 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18088 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18089 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18090 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18091 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18092 .ilen = 496,
18093 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18094 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18095 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18096 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18097 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18098 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18099 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18100 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18101 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18102 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18103 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18104 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18105 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18106 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18107 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18108 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18109 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18110 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18111 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18112 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18113 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18114 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18115 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18116 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18117 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18118 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18119 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18120 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18121 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18122 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18123 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18124 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18125 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18126 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18127 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18128 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18129 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18130 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18131 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18132 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18133 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18134 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18135 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18136 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18137 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18138 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18139 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18140 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18141 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18142 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18143 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18144 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18145 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18146 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18147 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18148 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18149 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18150 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18151 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18152 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18153 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18154 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18155 .rlen = 496,
18156 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020018157 .np = 3,
18158 .tap = { 496 - 20, 4, 16 },
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030018159 }, { /* Generated with Crypto++ */
18160 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18161 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18162 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18163 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18164 .klen = 32,
18165 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18166 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18167 .input = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18168 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18169 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18170 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18171 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18172 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18173 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18174 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18175 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18176 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18177 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18178 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18179 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18180 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18181 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18182 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18183 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18184 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18185 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18186 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18187 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18188 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18189 "\x45\x18\x18\x74\x19\xAD\x71\x01"
18190 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18191 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18192 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18193 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18194 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18195 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18196 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18197 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18198 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18199 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18200 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18201 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18202 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18203 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18204 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18205 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18206 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18207 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18208 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18209 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18210 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18211 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18212 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18213 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18214 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18215 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18216 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18217 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18218 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18219 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18220 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18221 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18222 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18223 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18224 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18225 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18226 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18227 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18228 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18229 "\xFB\xF2\x3F",
18230 .ilen = 499,
18231 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18232 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18233 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18234 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18235 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18236 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18237 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18238 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18239 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18240 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18241 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18242 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18243 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18244 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18245 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18246 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18247 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18248 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18249 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18250 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18251 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18252 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18253 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18254 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18255 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18256 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18257 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18258 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18259 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18260 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18261 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18262 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18263 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18264 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18265 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18266 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18267 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18268 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18269 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18270 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18271 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18272 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18273 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18274 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18275 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18276 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18277 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18278 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18279 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18280 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18281 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18282 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18283 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18284 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18285 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18286 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18287 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18288 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18289 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18290 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18291 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18292 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18293 "\x7B\xE4\x4D",
18294 .rlen = 499,
18295 .also_non_np = 1,
18296 .np = 2,
18297 .tap = { 499 - 16, 16 },
18298 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080018299};
18300
18301static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080018302 { /* From RFC 3686 */
18303 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
18304 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
18305 "\x00\x00\x00\x30",
18306 .klen = 20,
18307 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18308 .input = "Single block msg",
18309 .ilen = 16,
18310 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
18311 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
18312 .rlen = 16,
18313 }, {
18314 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
18315 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
18316 "\x00\x6c\xb6\xdb",
18317 .klen = 20,
18318 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
18319 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18320 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18321 "\x10\x11\x12\x13\x14\x15\x16\x17"
18322 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18323 .ilen = 32,
18324 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
18325 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
18326 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
18327 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
18328 .rlen = 32,
18329 }, {
18330 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
18331 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
18332 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
18333 "\x00\x00\x00\x48",
18334 .klen = 28,
18335 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
18336 .input = "Single block msg",
18337 .ilen = 16,
18338 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
18339 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
18340 .rlen = 16,
18341 }, {
18342 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
18343 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
18344 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
18345 "\x00\x96\xb0\x3b",
18346 .klen = 28,
18347 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
18348 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18349 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18350 "\x10\x11\x12\x13\x14\x15\x16\x17"
18351 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18352 .ilen = 32,
18353 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
18354 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
18355 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
18356 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
18357 .rlen = 32,
18358 }, {
18359 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
18360 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
18361 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
18362 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
18363 "\x00\x00\x00\x60",
18364 .klen = 36,
18365 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
18366 .input = "Single block msg",
18367 .ilen = 16,
18368 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
18369 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
18370 .rlen = 16,
18371 }, {
18372 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
18373 "\x07\x96\x36\x58\x79\xef\xf8\x86"
18374 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
18375 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
18376 "\x00\xfa\xac\x24",
18377 .klen = 36,
18378 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
18379 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
18380 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18381 "\x10\x11\x12\x13\x14\x15\x16\x17"
18382 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18383 .ilen = 32,
18384 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
18385 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
18386 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
18387 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
18388 .rlen = 32,
18389 }, {
18390 // generated using Crypto++
18391 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
18392 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18393 "\x10\x11\x12\x13\x14\x15\x16\x17"
18394 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18395 "\x00\x00\x00\x00",
18396 .klen = 32 + 4,
18397 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18398 .input =
18399 "\x00\x01\x02\x03\x04\x05\x06\x07"
18400 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18401 "\x10\x11\x12\x13\x14\x15\x16\x17"
18402 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18403 "\x20\x21\x22\x23\x24\x25\x26\x27"
18404 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18405 "\x30\x31\x32\x33\x34\x35\x36\x37"
18406 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18407 "\x40\x41\x42\x43\x44\x45\x46\x47"
18408 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18409 "\x50\x51\x52\x53\x54\x55\x56\x57"
18410 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18411 "\x60\x61\x62\x63\x64\x65\x66\x67"
18412 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18413 "\x70\x71\x72\x73\x74\x75\x76\x77"
18414 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18415 "\x80\x81\x82\x83\x84\x85\x86\x87"
18416 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18417 "\x90\x91\x92\x93\x94\x95\x96\x97"
18418 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18419 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18420 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18421 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18422 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18423 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18424 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18425 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18426 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18427 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18428 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18429 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18430 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18431 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
18432 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
18433 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
18434 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
18435 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
18436 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
18437 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
18438 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
18439 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
18440 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
18441 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
18442 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
18443 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
18444 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
18445 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
18446 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
18447 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
18448 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
18449 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
18450 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
18451 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
18452 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
18453 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
18454 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
18455 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
18456 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
18457 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
18458 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
18459 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
18460 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
18461 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
18462 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
18463 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
18464 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
18465 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
18466 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
18467 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
18468 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
18469 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
18470 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
18471 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
18472 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
18473 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
18474 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
18475 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
18476 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
18477 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
18478 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
18479 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
18480 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
18481 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
18482 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
18483 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
18484 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
18485 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
18486 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
18487 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
18488 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
18489 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
18490 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
18491 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
18492 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
18493 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
18494 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
18495 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
18496 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
18497 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
18498 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
18499 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
18500 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
18501 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
18502 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
18503 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
18504 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
18505 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
18506 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
18507 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
18508 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
18509 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
18510 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
18511 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
18512 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
18513 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
18514 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
18515 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
18516 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
18517 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
18518 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
18519 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
18520 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
18521 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
18522 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
18523 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
18524 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
18525 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
18526 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
18527 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
18528 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
18529 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
18530 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
18531 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
18532 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
18533 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
18534 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
18535 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
18536 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
18537 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
18538 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
18539 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
18540 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
18541 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
18542 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
18543 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
18544 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
18545 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
18546 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
18547 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
18548 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
18549 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
18550 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
18551 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
18552 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
18553 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
18554 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
18555 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
18556 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
18557 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
18558 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
18559 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
18560 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
18561 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
18562 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
18563 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
18564 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
18565 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
18566 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
18567 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
18568 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
18569 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
18570 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
18571 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
18572 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
18573 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
18574 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
18575 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
18576 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
18577 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
18578 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
18579 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
18580 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
18581 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
18582 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
18583 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
18584 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
18585 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
18586 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
18587 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
18588 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
18589 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
18590 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
18591 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
18592 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
18593 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
18594 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
18595 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
18596 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
18597 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
18598 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
18599 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
18600 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
18601 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
18602 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
18603 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
18604 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
18605 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
18606 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
18607 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
18608 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
18609 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
18610 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
18611 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
18612 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
18613 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
18614 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
18615 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
18616 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
18617 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
18618 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
18619 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
18620 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
18621 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
18622 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
18623 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
18624 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
18625 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
18626 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
18627 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
18628 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
18629 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
18630 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
18631 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
18632 "\x38\x47\x56\x65\x74\x83\x92\xa1"
18633 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
18634 "\x28\x37\x46\x55\x64\x73\x82\x91"
18635 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
18636 "\x18\x27\x36\x45\x54\x63\x72\x81"
18637 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
18638 "\x08\x17\x26\x35\x44\x53\x62\x71"
18639 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
18640 "\xf8\x07\x16\x25\x34\x43\x52\x61"
18641 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
18642 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
18643 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
18644 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
18645 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
18646 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
18647 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
18648 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
18649 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
18650 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
18651 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
18652 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
18653 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
18654 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
18655 "\x00\x11\x22\x33\x44\x55\x66\x77"
18656 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
18657 "\x10\x21\x32\x43\x54\x65\x76\x87"
18658 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
18659 "\x20\x31\x42\x53\x64\x75\x86\x97"
18660 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
18661 "\x30\x41\x52\x63\x74\x85\x96\xa7"
18662 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
18663 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
18664 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
18665 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
18666 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
18667 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
18668 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
18669 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
18670 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
18671 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
18672 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
18673 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
18674 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
18675 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
18676 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
18677 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
18678 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
18679 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
18680 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
18681 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
18682 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
18683 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
18684 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
18685 "\xf0\x01\x12\x23\x34\x45\x56\x67"
18686 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
18687 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
18688 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
18689 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
18690 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
18691 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
18692 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
18693 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
18694 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
18695 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
18696 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
18697 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
18698 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
18699 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
18700 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
18701 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
18702 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
18703 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
18704 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
18705 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
18706 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
18707 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
18708 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
18709 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
18710 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
18711 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
18712 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
18713 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
18714 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
18715 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
18716 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
18717 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
18718 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
18719 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
18720 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
18721 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
18722 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
18723 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
18724 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
18725 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
18726 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
18727 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
18728 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
18729 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
18730 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
18731 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
18732 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
18733 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
18734 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
18735 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
18736 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
18737 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
18738 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
18739 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
18740 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
18741 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
18742 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
18743 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
18744 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
18745 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
18746 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
18747 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
18748 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
18749 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
18750 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
18751 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
18752 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
18753 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
18754 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
18755 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
18756 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
18757 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
18758 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
18759 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
18760 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
18761 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
18762 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
18763 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
18764 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
18765 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
18766 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
18767 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
18768 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
18769 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
18770 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
18771 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
18772 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
18773 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
18774 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
18775 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
18776 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
18777 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
18778 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
18779 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
18780 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
18781 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
18782 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
18783 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
18784 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
18785 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
18786 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
18787 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
18788 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
18789 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
18790 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
18791 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
18792 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
18793 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
18794 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
18795 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
18796 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
18797 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
18798 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
18799 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
18800 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
18801 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
18802 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
18803 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
18804 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
18805 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
18806 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
18807 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
18808 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
18809 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
18810 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
18811 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
18812 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
18813 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
18814 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
18815 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
18816 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
18817 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
18818 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
18819 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
18820 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
18821 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
18822 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
18823 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
18824 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
18825 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
18826 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
18827 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
18828 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
18829 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
18830 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
18831 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
18832 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
18833 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
18834 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
18835 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
18836 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
18837 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
18838 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
18839 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
18840 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
18841 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
18842 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
18843 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
18844 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
18845 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
18846 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
18847 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
18848 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
18849 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
18850 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
18851 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
18852 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
18853 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
18854 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
18855 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
18856 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
18857 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
18858 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
18859 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
18860 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
18861 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
18862 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
18863 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
18864 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
18865 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
18866 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
18867 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
18868 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
18869 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
18870 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
18871 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
18872 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
18873 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
18874 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
18875 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
18876 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
18877 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
18878 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
18879 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
18880 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
18881 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
18882 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
18883 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
18884 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
18885 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
18886 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
18887 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
18888 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
18889 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
18890 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
18891 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
18892 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
18893 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
18894 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
18895 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
18896 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
18897 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
18898 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
18899 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
18900 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
18901 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
18902 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
18903 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
18904 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
18905 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
18906 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
18907 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
18908 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
18909 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
18910 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
18911 "\x00\x21\x42\x63",
18912 .ilen = 4100,
18913 .result =
18914 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
18915 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
18916 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
18917 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
18918 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
18919 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
18920 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
18921 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
18922 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
18923 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
18924 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
18925 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
18926 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
18927 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
18928 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
18929 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
18930 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
18931 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
18932 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
18933 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
18934 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
18935 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
18936 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
18937 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
18938 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
18939 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
18940 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
18941 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
18942 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
18943 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
18944 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
18945 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
18946 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
18947 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
18948 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
18949 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
18950 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
18951 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
18952 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
18953 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
18954 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
18955 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
18956 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
18957 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
18958 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
18959 "\x04\x02\xef\xd3\x44\xde\x76\x31"
18960 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
18961 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
18962 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
18963 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
18964 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
18965 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
18966 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
18967 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
18968 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
18969 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
18970 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
18971 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
18972 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
18973 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
18974 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
18975 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
18976 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
18977 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
18978 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
18979 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
18980 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
18981 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
18982 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
18983 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
18984 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
18985 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
18986 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
18987 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
18988 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
18989 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
18990 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
18991 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
18992 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
18993 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
18994 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
18995 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
18996 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
18997 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
18998 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
18999 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
19000 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
19001 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
19002 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
19003 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
19004 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
19005 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
19006 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
19007 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
19008 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
19009 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
19010 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
19011 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
19012 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
19013 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
19014 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
19015 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
19016 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
19017 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
19018 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
19019 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
19020 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
19021 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
19022 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
19023 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
19024 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
19025 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
19026 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
19027 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
19028 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
19029 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
19030 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
19031 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
19032 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
19033 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
19034 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
19035 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
19036 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
19037 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
19038 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
19039 "\x26\x39\x83\x94\xef\x27\xd8\x53"
19040 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
19041 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
19042 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
19043 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
19044 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
19045 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
19046 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
19047 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
19048 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
19049 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
19050 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
19051 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
19052 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
19053 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
19054 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
19055 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
19056 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
19057 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
19058 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
19059 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
19060 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
19061 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
19062 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
19063 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
19064 "\x35\x12\xe3\x36\x28\x27\x36\x58"
19065 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
19066 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
19067 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
19068 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
19069 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
19070 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
19071 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
19072 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
19073 "\x89\xf3\x78\x35\x44\x62\x78\x72"
19074 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
19075 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
19076 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
19077 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
19078 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
19079 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
19080 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
19081 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
19082 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
19083 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
19084 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
19085 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
19086 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
19087 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
19088 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
19089 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
19090 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
19091 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
19092 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
19093 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
19094 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
19095 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
19096 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
19097 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
19098 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
19099 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
19100 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
19101 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
19102 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
19103 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
19104 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
19105 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
19106 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
19107 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
19108 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
19109 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
19110 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
19111 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
19112 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
19113 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
19114 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
19115 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
19116 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
19117 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
19118 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
19119 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
19120 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
19121 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
19122 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
19123 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
19124 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
19125 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
19126 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
19127 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
19128 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
19129 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
19130 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
19131 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
19132 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
19133 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
19134 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
19135 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
19136 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
19137 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
19138 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
19139 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
19140 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
19141 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
19142 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
19143 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
19144 "\x29\x90\x46\x30\x92\x69\x7d\x13"
19145 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
19146 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
19147 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
19148 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
19149 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
19150 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
19151 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
19152 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
19153 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
19154 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
19155 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
19156 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
19157 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
19158 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
19159 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
19160 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
19161 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
19162 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
19163 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
19164 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
19165 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
19166 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
19167 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
19168 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
19169 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
19170 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
19171 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
19172 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
19173 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
19174 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
19175 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
19176 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
19177 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
19178 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
19179 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
19180 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
19181 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
19182 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
19183 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
19184 "\x73\x02\x3b\x78\x21\x72\x43\x00"
19185 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
19186 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
19187 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
19188 "\x11\x94\x13\x69\x51\x09\x28\xde"
19189 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
19190 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
19191 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
19192 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
19193 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
19194 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
19195 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
19196 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
19197 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
19198 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
19199 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
19200 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
19201 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
19202 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
19203 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
19204 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
19205 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
19206 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
19207 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
19208 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
19209 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
19210 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
19211 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
19212 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
19213 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
19214 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
19215 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
19216 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
19217 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
19218 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
19219 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
19220 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
19221 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
19222 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
19223 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
19224 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
19225 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
19226 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
19227 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
19228 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
19229 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
19230 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
19231 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
19232 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
19233 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
19234 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
19235 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
19236 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
19237 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
19238 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
19239 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
19240 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
19241 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
19242 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
19243 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
19244 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
19245 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
19246 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
19247 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
19248 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
19249 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
19250 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
19251 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
19252 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
19253 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
19254 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
19255 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
19256 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
19257 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
19258 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
19259 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
19260 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
19261 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
19262 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
19263 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
19264 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
19265 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
19266 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
19267 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
19268 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
19269 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
19270 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
19271 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
19272 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
19273 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
19274 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
19275 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
19276 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
19277 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
19278 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
19279 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
19280 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
19281 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
19282 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
19283 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
19284 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
19285 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
19286 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
19287 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
19288 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
19289 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
19290 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
19291 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
19292 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
19293 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
19294 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
19295 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
19296 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
19297 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
19298 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
19299 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
19300 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
19301 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
19302 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
19303 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
19304 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
19305 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
19306 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
19307 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
19308 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
19309 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
19310 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
19311 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
19312 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
19313 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
19314 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
19315 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
19316 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
19317 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
19318 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
19319 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
19320 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
19321 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
19322 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
19323 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
19324 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
19325 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
19326 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
19327 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
19328 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
19329 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
19330 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
19331 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
19332 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
19333 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
19334 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
19335 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
19336 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
19337 "\xae\xed\x39\x88\x42\x11\x3c\xed"
19338 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
19339 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
19340 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
19341 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
19342 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
19343 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
19344 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
19345 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
19346 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
19347 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
19348 "\x34\x17\xde\xba\x47\xf1\x06\x18"
19349 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
19350 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
19351 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
19352 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
19353 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
19354 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
19355 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
19356 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
19357 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
19358 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
19359 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
19360 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
19361 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
19362 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
19363 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
19364 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
19365 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
19366 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
19367 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
19368 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
19369 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
19370 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
19371 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
19372 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
19373 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
19374 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
19375 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
19376 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
19377 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
19378 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
19379 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
19380 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
19381 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
19382 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
19383 "\x74\x56\x58\x40\x02\x37\x52\x2c"
19384 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
19385 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
19386 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
19387 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
19388 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
19389 "\xed\x38\x80\x36\x72\x43\x27\x49"
19390 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
19391 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
19392 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
19393 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
19394 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
19395 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
19396 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
19397 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
19398 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
19399 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
19400 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
19401 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
19402 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
19403 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
19404 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
19405 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
19406 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
19407 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
19408 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
19409 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
19410 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
19411 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
19412 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
19413 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
19414 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
19415 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
19416 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
19417 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
19418 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
19419 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
19420 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
19421 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
19422 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
19423 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
19424 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
19425 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
19426 "\x21\xed\xda\x86",
19427 .rlen = 4100,
19428 .np = 2,
19429 .tap = { 4064, 36 },
19430 },
19431};
19432
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080019433static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080019434 { /* From RFC 3686 */
19435 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
19436 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
19437 "\x00\x00\x00\x30",
19438 .klen = 20,
19439 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
19440 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
19441 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
19442 .ilen = 16,
19443 .result = "Single block msg",
19444 .rlen = 16,
19445 }, {
19446 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
19447 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
19448 "\x00\x6c\xb6\xdb",
19449 .klen = 20,
19450 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
19451 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
19452 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
19453 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
19454 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
19455 .ilen = 32,
19456 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19457 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19458 "\x10\x11\x12\x13\x14\x15\x16\x17"
19459 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19460 .rlen = 32,
19461 }, {
19462 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
19463 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
19464 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
19465 "\x00\x00\x00\x48",
19466 .klen = 28,
19467 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
19468 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
19469 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
19470 .ilen = 16,
19471 .result = "Single block msg",
19472 .rlen = 16,
19473 }, {
19474 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
19475 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
19476 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
19477 "\x00\x96\xb0\x3b",
19478 .klen = 28,
19479 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
19480 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
19481 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
19482 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
19483 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
19484 .ilen = 32,
19485 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19486 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19487 "\x10\x11\x12\x13\x14\x15\x16\x17"
19488 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19489 .rlen = 32,
19490 }, {
19491 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
19492 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
19493 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
19494 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
19495 "\x00\x00\x00\x60",
19496 .klen = 36,
19497 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
19498 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
19499 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
19500 .ilen = 16,
19501 .result = "Single block msg",
19502 .rlen = 16,
19503 }, {
19504 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
19505 "\x07\x96\x36\x58\x79\xef\xf8\x86"
19506 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
19507 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
19508 "\x00\xfa\xac\x24",
19509 .klen = 36,
19510 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
19511 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
19512 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
19513 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
19514 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
19515 .ilen = 32,
19516 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19517 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19518 "\x10\x11\x12\x13\x14\x15\x16\x17"
19519 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19520 .rlen = 32,
19521 },
19522};
19523
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100019524static struct cipher_testvec aes_ofb_enc_tv_template[] = {
19525 /* From NIST Special Publication 800-38A, Appendix F.5 */
19526 {
19527 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19528 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19529 .klen = 16,
19530 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19531 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19532 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19533 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19534 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19535 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19536 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19537 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19538 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19539 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19540 .ilen = 64,
19541 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19542 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19543 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19544 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19545 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19546 "\x44\xf7\xa8\x22\x60\xed\xcc"
19547 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19548 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19549 .rlen = 64,
19550 }
19551};
19552
19553static struct cipher_testvec aes_ofb_dec_tv_template[] = {
19554 /* From NIST Special Publication 800-38A, Appendix F.5 */
19555 {
19556 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19557 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19558 .klen = 16,
19559 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19560 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19561 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19562 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19563 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19564 "\x3c\x52\xda\xc5\x4e\xd8\x25"
19565 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19566 "\x44\xf7\xa8\x22\x60\xed\xcc"
19567 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19568 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19569 .ilen = 64,
19570 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19571 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19572 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19573 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19574 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19575 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19576 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19577 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19578 .rlen = 64,
19579 }
19580};
19581
Herbert Xuda7f0332008-07-31 17:08:25 +080019582static struct aead_testvec aes_gcm_enc_tv_template[] = {
19583 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19584 .key = zeroed_string,
19585 .klen = 16,
19586 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
19587 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
19588 .rlen = 16,
19589 }, {
19590 .key = zeroed_string,
19591 .klen = 16,
19592 .input = zeroed_string,
19593 .ilen = 16,
19594 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
19595 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
19596 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
19597 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
19598 .rlen = 32,
19599 }, {
19600 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19601 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19602 .klen = 16,
19603 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19604 "\xde\xca\xf8\x88",
19605 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19606 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19607 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19608 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19609 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19610 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19611 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19612 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19613 .ilen = 64,
19614 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19615 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19616 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19617 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19618 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19619 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19620 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19621 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
19622 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
19623 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
19624 .rlen = 80,
19625 }, {
19626 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19627 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19628 .klen = 16,
19629 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19630 "\xde\xca\xf8\x88",
19631 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19632 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19633 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19634 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19635 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19636 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19637 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19638 "\xba\x63\x7b\x39",
19639 .ilen = 60,
19640 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19641 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19642 "\xab\xad\xda\xd2",
19643 .alen = 20,
19644 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19645 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19646 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19647 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19648 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19649 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19650 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19651 "\x3d\x58\xe0\x91"
19652 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
19653 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
19654 .rlen = 76,
19655 }, {
19656 .key = zeroed_string,
19657 .klen = 24,
19658 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
19659 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
19660 .rlen = 16,
19661 }, {
19662 .key = zeroed_string,
19663 .klen = 24,
19664 .input = zeroed_string,
19665 .ilen = 16,
19666 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
19667 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
19668 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
19669 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
19670 .rlen = 32,
19671 }, {
19672 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19673 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19674 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19675 .klen = 24,
19676 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19677 "\xde\xca\xf8\x88",
19678 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19679 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19680 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19681 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19682 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19683 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19684 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19685 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19686 .ilen = 64,
19687 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19688 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19689 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19690 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19691 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19692 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19693 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19694 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
19695 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
19696 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
19697 .rlen = 80,
19698 }, {
19699 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19700 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19701 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19702 .klen = 24,
19703 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19704 "\xde\xca\xf8\x88",
19705 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19706 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19707 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19708 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19709 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19710 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19711 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19712 "\xba\x63\x7b\x39",
19713 .ilen = 60,
19714 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19715 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19716 "\xab\xad\xda\xd2",
19717 .alen = 20,
19718 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19719 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19720 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19721 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19722 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19723 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19724 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19725 "\xcc\xda\x27\x10"
19726 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
19727 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
19728 .rlen = 76,
19729 .np = 2,
19730 .tap = { 32, 28 },
19731 .anp = 2,
19732 .atap = { 8, 12 }
19733 }, {
19734 .key = zeroed_string,
19735 .klen = 32,
19736 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
19737 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
19738 .rlen = 16,
19739 }
19740};
19741
19742static struct aead_testvec aes_gcm_dec_tv_template[] = {
19743 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19744 .key = zeroed_string,
19745 .klen = 32,
19746 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
19747 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
19748 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
19749 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
19750 .ilen = 32,
19751 .result = zeroed_string,
19752 .rlen = 16,
19753 }, {
19754 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19755 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19756 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19757 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19758 .klen = 32,
19759 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19760 "\xde\xca\xf8\x88",
19761 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
19762 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
19763 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
19764 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
19765 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
19766 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
19767 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
19768 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
19769 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
19770 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
19771 .ilen = 80,
19772 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19773 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19774 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19775 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19776 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19777 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19778 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19779 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19780 .rlen = 64,
19781 }, {
19782 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19783 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19784 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19785 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19786 .klen = 32,
19787 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19788 "\xde\xca\xf8\x88",
19789 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
19790 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
19791 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
19792 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
19793 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
19794 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
19795 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
19796 "\xbc\xc9\xf6\x62"
19797 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
19798 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
19799 .ilen = 76,
19800 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19801 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19802 "\xab\xad\xda\xd2",
19803 .alen = 20,
19804 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19805 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19806 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19807 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19808 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19809 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19810 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19811 "\xba\x63\x7b\x39",
19812 .rlen = 60,
19813 .np = 2,
19814 .tap = { 48, 28 },
19815 .anp = 3,
19816 .atap = { 8, 8, 4 }
19817 }, {
19818 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19819 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19820 .klen = 16,
19821 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19822 "\xde\xca\xf8\x88",
19823 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19824 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19825 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19826 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19827 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19828 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19829 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19830 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
19831 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
19832 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
19833 .ilen = 80,
19834 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19835 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19836 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19837 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19838 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19839 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19840 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19841 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19842 .rlen = 64,
19843 }, {
19844 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19845 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19846 .klen = 16,
19847 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19848 "\xde\xca\xf8\x88",
19849 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19850 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19851 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19852 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19853 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19854 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19855 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19856 "\x3d\x58\xe0\x91"
19857 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
19858 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
19859 .ilen = 76,
19860 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19861 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19862 "\xab\xad\xda\xd2",
19863 .alen = 20,
19864 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19865 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19866 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19867 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19868 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19869 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19870 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19871 "\xba\x63\x7b\x39",
19872 .rlen = 60,
19873 }, {
19874 .key = zeroed_string,
19875 .klen = 24,
19876 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
19877 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
19878 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
19879 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
19880 .ilen = 32,
19881 .result = zeroed_string,
19882 .rlen = 16,
19883 }, {
19884 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19885 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19886 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19887 .klen = 24,
19888 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19889 "\xde\xca\xf8\x88",
19890 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19891 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19892 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19893 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19894 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19895 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19896 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19897 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
19898 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
19899 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
19900 .ilen = 80,
19901 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19902 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19903 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19904 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19905 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19906 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19907 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19908 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19909 .rlen = 64,
19910 }, {
19911 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19912 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19913 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19914 .klen = 24,
19915 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19916 "\xde\xca\xf8\x88",
19917 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19918 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19919 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19920 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19921 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19922 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19923 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19924 "\xcc\xda\x27\x10"
19925 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
19926 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
19927 .ilen = 76,
19928 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19929 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19930 "\xab\xad\xda\xd2",
19931 .alen = 20,
19932 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19933 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19934 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19935 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19936 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19937 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19938 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19939 "\xba\x63\x7b\x39",
19940 .rlen = 60,
19941 }
19942};
19943
Adrian Hoban69435b92010-11-04 15:02:04 -040019944static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
19945 { /* Generated using Crypto++ */
19946 .key = zeroed_string,
19947 .klen = 20,
19948 .iv = zeroed_string,
19949 .input = zeroed_string,
19950 .ilen = 16,
19951 .assoc = zeroed_string,
19952 .alen = 8,
19953 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
19954 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
19955 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
19956 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
19957 .rlen = 32,
19958 },{
19959 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19960 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19961 "\x00\x00\x00\x00",
19962 .klen = 20,
19963 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
19964 "\x00\x00\x00\x00",
19965 .input = zeroed_string,
19966 .ilen = 16,
19967 .assoc = zeroed_string,
19968 .alen = 8,
19969 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
19970 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
19971 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
19972 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
19973 .rlen = 32,
19974
19975 }, {
19976 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19977 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19978 "\x00\x00\x00\x00",
19979 .klen = 20,
19980 .iv = zeroed_string,
19981 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
19982 "\x01\x01\x01\x01\x01\x01\x01\x01",
19983 .ilen = 16,
19984 .assoc = zeroed_string,
19985 .alen = 8,
19986 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
19987 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
19988 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
19989 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
19990 .rlen = 32,
19991 }, {
19992 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19993 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19994 "\x00\x00\x00\x00",
19995 .klen = 20,
19996 .iv = zeroed_string,
19997 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
19998 "\x01\x01\x01\x01\x01\x01\x01\x01",
19999 .ilen = 16,
20000 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20001 .alen = 8,
20002 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20003 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20004 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20005 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
20006 .rlen = 32,
20007 }, {
20008 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20009 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20010 "\x00\x00\x00\x00",
20011 .klen = 20,
20012 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20013 "\x00\x00\x00\x00",
20014 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20015 "\x01\x01\x01\x01\x01\x01\x01\x01",
20016 .ilen = 16,
20017 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20018 .alen = 8,
20019 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20020 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20021 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20022 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
20023 .rlen = 32,
20024 }, {
20025 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20026 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20027 "\x00\x00\x00\x00",
20028 .klen = 20,
20029 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20030 "\x00\x00\x00\x00",
20031 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
20032 "\x01\x01\x01\x01\x01\x01\x01\x01"
20033 "\x01\x01\x01\x01\x01\x01\x01\x01"
20034 "\x01\x01\x01\x01\x01\x01\x01\x01"
20035 "\x01\x01\x01\x01\x01\x01\x01\x01"
20036 "\x01\x01\x01\x01\x01\x01\x01\x01"
20037 "\x01\x01\x01\x01\x01\x01\x01\x01"
20038 "\x01\x01\x01\x01\x01\x01\x01\x01",
20039 .ilen = 64,
20040 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20041 .alen = 8,
20042 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20043 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20044 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20045 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20046 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20047 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20048 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20049 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20050 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20051 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
20052 .rlen = 80,
20053 }, {
20054 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20055 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20056 "\x00\x00\x00\x00",
20057 .klen = 20,
20058 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
20059 "\x00\x00\x00\x00",
20060 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
20061 "\xff\xff\xff\xff\xff\xff\xff\xff"
20062 "\xff\xff\xff\xff\xff\xff\xff\xff"
20063 "\xff\xff\xff\xff\xff\xff\xff\xff"
20064 "\xff\xff\xff\xff\xff\xff\xff\xff"
20065 "\xff\xff\xff\xff\xff\xff\xff\xff"
20066 "\xff\xff\xff\xff\xff\xff\xff\xff"
20067 "\xff\xff\xff\xff\xff\xff\xff\xff"
20068 "\xff\xff\xff\xff\xff\xff\xff\xff"
20069 "\xff\xff\xff\xff\xff\xff\xff\xff"
20070 "\xff\xff\xff\xff\xff\xff\xff\xff"
20071 "\xff\xff\xff\xff\xff\xff\xff\xff"
20072 "\xff\xff\xff\xff\xff\xff\xff\xff"
20073 "\xff\xff\xff\xff\xff\xff\xff\xff"
20074 "\xff\xff\xff\xff\xff\xff\xff\xff"
20075 "\xff\xff\xff\xff\xff\xff\xff\xff"
20076 "\xff\xff\xff\xff\xff\xff\xff\xff"
20077 "\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 .ilen = 192,
20085 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20086 "\xaa\xaa\xaa\xaa",
20087 .alen = 12,
20088 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20089 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20090 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20091 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20092 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20093 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20094 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20095 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20096 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20097 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20098 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20099 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20100 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20101 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20102 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20103 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20104 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20105 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20106 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20107 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20108 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20109 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20110 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20111 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20112 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20113 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20114 .rlen = 208,
Herbert Xu8f69b762015-06-16 13:54:26 +080020115 }, { /* From draft-mcgrew-gcm-test-01 */
20116 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20117 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20118 "\x2E\x44\x3B\x68",
20119 .klen = 20,
20120 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
20121 .input = "\x45\x00\x00\x48\x69\x9A\x00\x00"
20122 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
20123 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
20124 "\x38\xD3\x01\x00\x00\x01\x00\x00"
20125 "\x00\x00\x00\x00\x04\x5F\x73\x69"
20126 "\x70\x04\x5F\x75\x64\x70\x03\x73"
20127 "\x69\x70\x09\x63\x79\x62\x65\x72"
20128 "\x63\x69\x74\x79\x02\x64\x6B\x00"
20129 "\x00\x21\x00\x01\x01\x02\x02\x01",
20130 .ilen = 72,
20131 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
20132 "\x00\x00\x00\x00",
20133 .alen = 12,
20134 .result = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
20135 "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
20136 "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
20137 "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
20138 "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
20139 "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
20140 "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
20141 "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
20142 "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
20143 "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
20144 "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
20145 .rlen = 88,
20146 }, {
20147 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20148 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20149 "\xCA\xFE\xBA\xBE",
20150 .klen = 20,
20151 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20152 .input = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
20153 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
20154 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
20155 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
20156 "\x00\x01\x00\x00\x00\x00\x00\x00"
20157 "\x03\x73\x69\x70\x09\x63\x79\x62"
20158 "\x65\x72\x63\x69\x74\x79\x02\x64"
20159 "\x6B\x00\x00\x01\x00\x01\x00\x01",
20160 .ilen = 64,
20161 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A",
20162 .alen = 8,
20163 .result = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
20164 "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
20165 "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
20166 "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
20167 "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
20168 "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
20169 "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
20170 "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
20171 "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
20172 "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
20173 .rlen = 80,
20174 }, {
20175 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20176 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20177 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20178 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20179 "\x11\x22\x33\x44",
20180 .klen = 36,
20181 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
20182 .input = "\x45\x00\x00\x30\x69\xA6\x40\x00"
20183 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
20184 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
20185 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
20186 "\x70\x02\x40\x00\x20\xBF\x00\x00"
20187 "\x02\x04\x05\xB4\x01\x01\x04\x02"
20188 "\x01\x02\x02\x01",
20189 .ilen = 52,
20190 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02",
20191 .alen = 8,
20192 .result = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
20193 "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
20194 "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
20195 "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
20196 "\x74\x8A\x63\x79\x85\x77\x1D\x34"
20197 "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
20198 "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
20199 "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
20200 "\x15\x95\x6C\x96",
20201 .rlen = 68,
20202 }, {
20203 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
20204 "\x00\x00\x00\x00\x00\x00\x00\x00"
20205 "\x00\x00\x00\x00",
20206 .klen = 20,
20207 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20208 .input = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
20209 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
20210 "\x01\x01\x01\x01\x08\x00\x07\x5C"
20211 "\x02\x00\x44\x00\x61\x62\x63\x64"
20212 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20213 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20214 "\x75\x76\x77\x61\x62\x63\x64\x65"
20215 "\x66\x67\x68\x69\x01\x02\x02\x01",
20216 .ilen = 64,
20217 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01",
20218 .alen = 8,
20219 .result = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
20220 "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
20221 "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
20222 "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
20223 "\x45\x64\x76\x49\x27\x19\xFF\xB6"
20224 "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
20225 "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
20226 "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
20227 "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
20228 "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
20229 .rlen = 80,
20230 }, {
20231 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20232 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20233 "\x57\x69\x0E\x43",
20234 .klen = 20,
20235 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20236 .input = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
20237 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
20238 "\x01\x01\x01\x01\x08\x00\x08\x5C"
20239 "\x02\x00\x43\x00\x61\x62\x63\x64"
20240 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20241 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20242 "\x75\x76\x77\x61\x62\x63\x64\x65"
20243 "\x66\x67\x68\x69\x01\x02\x02\x01",
20244 .ilen = 64,
20245 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
20246 "\x10\x10\x10\x10",
20247 .alen = 12,
20248 .result = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
20249 "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
20250 "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
20251 "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
20252 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20253 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20254 "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
20255 "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
20256 "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
20257 "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
20258 .rlen = 80,
20259 }, {
20260 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20261 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20262 "\x57\x69\x0E\x43",
20263 .klen = 20,
20264 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20265 .input = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
20266 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
20267 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
20268 "\x01\x02\x02\x01",
20269 .ilen = 28,
20270 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
20271 "\x10\x10\x10\x10",
20272 .alen = 12,
20273 .result = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
20274 "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
20275 "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
20276 "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
20277 "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
20278 "\xE7\xD0\x5D\x35",
20279 .rlen = 44,
20280 }, {
20281 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20282 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20283 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20284 "\xCA\xFE\xBA\xBE",
20285 .klen = 28,
20286 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20287 .input = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
20288 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
20289 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
20290 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
20291 "\x50\x10\x16\xD0\x75\x68\x00\x01",
20292 .ilen = 40,
20293 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A",
20294 .alen = 8,
20295 .result = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
20296 "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
20297 "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
20298 "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
20299 "\x31\x5B\x27\x45\x21\x44\xCC\x77"
20300 "\x95\x45\x7B\x96\x52\x03\x7F\x53"
20301 "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
20302 .rlen = 56,
20303 }, {
20304 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20305 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20306 "\xDE\xCA\xF8\x88",
20307 .klen = 20,
20308 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20309 .input = "\x45\x00\x00\x49\x33\xBA\x00\x00"
20310 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
20311 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20312 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
20313 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
20314 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
20315 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
20316 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
20317 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
20318 "\x23\x01\x01\x01",
20319 .ilen = 76,
20320 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
20321 "\x00\x00\x00\x01",
20322 .alen = 12,
20323 .result = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
20324 "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
20325 "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
20326 "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
20327 "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
20328 "\x84\xE6\x58\x63\x96\x5D\x74\x72"
20329 "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
20330 "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
20331 "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
20332 "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
20333 "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
20334 "\x69\x62\x34\x36",
20335 .rlen = 92,
20336 }, {
20337 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20338 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20339 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20340 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20341 "\x73\x61\x6C\x74",
20342 .klen = 36,
20343 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20344 .input = "\x45\x08\x00\x28\x73\x2C\x00\x00"
20345 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
20346 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
20347 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
20348 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
20349 .ilen = 40,
20350 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
20351 "\xDD\x0D\xB9\x9B",
20352 .alen = 12,
20353 .result = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
20354 "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
20355 "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
20356 "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
20357 "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
20358 "\x45\x16\x26\xC2\x41\x57\x71\xE3"
20359 "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
20360 .rlen = 56,
20361 }, {
20362 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20363 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20364 "\x57\x69\x0E\x43",
20365 .klen = 20,
20366 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20367 .input = "\x45\x00\x00\x49\x33\x3E\x00\x00"
20368 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
20369 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20370 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
20371 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
20372 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
20373 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
20374 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
20375 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
20376 "\x15\x01\x01\x01",
20377 .ilen = 76,
20378 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
20379 "\x10\x10\x10\x10",
20380 .alen = 12,
20381 .result = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
20382 "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
20383 "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
20384 "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
20385 "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
20386 "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
20387 "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
20388 "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
20389 "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
20390 "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
20391 "\x76\x91\x89\x60\x97\x63\xB8\xE1"
20392 "\x8C\xAA\x81\xE2",
20393 .rlen = 92,
20394 }, {
20395 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20396 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20397 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20398 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20399 "\x73\x61\x6C\x74",
20400 .klen = 36,
20401 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20402 .input = "\x63\x69\x73\x63\x6F\x01\x72\x75"
20403 "\x6C\x65\x73\x01\x74\x68\x65\x01"
20404 "\x6E\x65\x74\x77\x65\x01\x64\x65"
20405 "\x66\x69\x6E\x65\x01\x74\x68\x65"
20406 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
20407 "\x67\x69\x65\x73\x01\x74\x68\x61"
20408 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
20409 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
20410 "\x72\x72\x6F\x77\x01\x02\x02\x01",
20411 .ilen = 72,
20412 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
20413 "\xDD\x0D\xB9\x9B",
20414 .alen = 12,
20415 .result = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
20416 "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
20417 "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
20418 "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
20419 "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
20420 "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
20421 "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
20422 "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
20423 "\x12\xA4\x93\x63\x41\x23\x64\xF8"
20424 "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
20425 "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
20426 .rlen = 88,
20427 }, {
20428 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
20429 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
20430 "\xD9\x66\x42\x67",
20431 .klen = 20,
20432 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
20433 .input = "\x01\x02\x02\x01",
20434 .ilen = 4,
20435 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF",
20436 .alen = 8,
20437 .result = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
20438 "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
20439 "\x04\xBE\xF2\x70",
20440 .rlen = 20,
20441 }, {
20442 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20443 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20444 "\xDE\xCA\xF8\x88",
20445 .klen = 20,
20446 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20447 .input = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
20448 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
20449 "\x62\x65\x00\x01",
20450 .ilen = 20,
20451 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
20452 "\x00\x00\x00\x01",
20453 .alen = 12,
20454 .result = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
20455 "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
20456 "\x43\x33\x21\x64\x41\x25\x03\x52"
20457 "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
20458 "\x43\xAF\x8C\x3E",
20459 .rlen = 36,
20460 }, {
20461 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
20462 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
20463 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
20464 "\x62\x65\x66\x6F\x72\x65\x69\x61"
20465 "\x74\x75\x72\x6E",
20466 .klen = 36,
20467 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
20468 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
20469 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
20470 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
20471 "\x02\x00\x07\x00\x61\x62\x63\x64"
20472 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20473 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20474 "\x01\x02\x02\x01",
20475 .ilen = 52,
20476 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
20477 "\xFF\xFF\xFF\xFF",
20478 .alen = 12,
20479 .result = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
20480 "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
20481 "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
20482 "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
20483 "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
20484 "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
20485 "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
20486 "\x94\x5F\x66\x93\x68\x66\x1A\x32"
20487 "\x9F\xB4\xC0\x53",
20488 .rlen = 68,
20489 }, {
20490 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20491 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20492 "\x57\x69\x0E\x43",
20493 .klen = 20,
20494 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20495 .input = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
20496 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
20497 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
20498 "\x02\x00\x07\x00\x61\x62\x63\x64"
20499 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20500 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20501 "\x01\x02\x02\x01",
20502 .ilen = 52,
20503 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
20504 "\x10\x10\x10\x10",
20505 .alen = 12,
20506 .result = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
20507 "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
20508 "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
20509 "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
20510 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20511 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20512 "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
20513 "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
20514 "\x40\xD7\xCB\x05",
20515 .rlen = 68,
20516 }, {
20517 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20518 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20519 "\x22\x43\x3C\x64",
20520 .klen = 20,
20521 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
20522 .input = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
20523 "\x61\x62\x63\x64\x65\x66\x67\x68"
20524 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
20525 "\x71\x72\x73\x74\x01\x02\x02\x01",
20526 .ilen = 32,
20527 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
20528 "\x00\x00\x00\x07",
20529 .alen = 12,
20530 .result = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
20531 "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
20532 "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
20533 "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
20534 "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
20535 "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
20536 .rlen = 48,
Adrian Hoban69435b92010-11-04 15:02:04 -040020537 }
20538};
20539
20540static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
20541 { /* Generated using Crypto++ */
20542 .key = zeroed_string,
20543 .klen = 20,
20544 .iv = zeroed_string,
20545 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
20546 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20547 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20548 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
20549 .ilen = 32,
20550 .assoc = zeroed_string,
20551 .alen = 8,
20552 .result = zeroed_string,
20553 .rlen = 16,
20554
20555 },{
20556 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20557 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20558 "\x00\x00\x00\x00",
20559 .klen = 20,
20560 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20561 "\x00\x00\x00\x00",
20562 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
20563 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20564 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20565 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
20566 .ilen = 32,
20567 .assoc = zeroed_string,
20568 .alen = 8,
20569 .result = zeroed_string,
20570 .rlen = 16,
20571 }, {
20572 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20573 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20574 "\x00\x00\x00\x00",
20575 .klen = 20,
20576 .iv = zeroed_string,
20577 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20578 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20579 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20580 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
20581 .ilen = 32,
20582 .assoc = zeroed_string,
20583 .alen = 8,
20584 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20585 "\x01\x01\x01\x01\x01\x01\x01\x01",
20586 .rlen = 16,
20587 }, {
20588 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20589 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20590 "\x00\x00\x00\x00",
20591 .klen = 20,
20592 .iv = zeroed_string,
20593 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20594 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20595 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20596 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
20597 .ilen = 32,
20598 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20599 .alen = 8,
20600 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20601 "\x01\x01\x01\x01\x01\x01\x01\x01",
20602 .rlen = 16,
20603
20604 }, {
20605 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20606 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20607 "\x00\x00\x00\x00",
20608 .klen = 20,
20609 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20610 "\x00\x00\x00\x00",
20611 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20612 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20613 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20614 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
20615 .ilen = 32,
20616 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20617 .alen = 8,
20618 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20619 "\x01\x01\x01\x01\x01\x01\x01\x01",
20620 .rlen = 16,
20621 }, {
20622 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20623 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20624 "\x00\x00\x00\x00",
20625 .klen = 20,
20626 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
20627 "\x00\x00\x00\x00",
20628 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20629 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20630 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20631 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20632 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20633 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20634 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20635 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20636 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20637 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
20638 .ilen = 80,
20639 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
20640 .alen = 8,
20641 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20642 "\x01\x01\x01\x01\x01\x01\x01\x01"
20643 "\x01\x01\x01\x01\x01\x01\x01\x01"
20644 "\x01\x01\x01\x01\x01\x01\x01\x01"
20645 "\x01\x01\x01\x01\x01\x01\x01\x01"
20646 "\x01\x01\x01\x01\x01\x01\x01\x01"
20647 "\x01\x01\x01\x01\x01\x01\x01\x01"
20648 "\x01\x01\x01\x01\x01\x01\x01\x01",
20649 .rlen = 64,
20650 }, {
20651 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
20652 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20653 "\x00\x00\x00\x00",
20654 .klen = 20,
20655 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
20656 "\x00\x00\x00\x00",
20657 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20658 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20659 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20660 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20661 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20662 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20663 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20664 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20665 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20666 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20667 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20668 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20669 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20670 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20671 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20672 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20673 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20674 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20675 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20676 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20677 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20678 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20679 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20680 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20681 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20682 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20683 .ilen = 208,
20684 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20685 "\xaa\xaa\xaa\xaa",
20686 .alen = 12,
20687 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
20688 "\xff\xff\xff\xff\xff\xff\xff\xff"
20689 "\xff\xff\xff\xff\xff\xff\xff\xff"
20690 "\xff\xff\xff\xff\xff\xff\xff\xff"
20691 "\xff\xff\xff\xff\xff\xff\xff\xff"
20692 "\xff\xff\xff\xff\xff\xff\xff\xff"
20693 "\xff\xff\xff\xff\xff\xff\xff\xff"
20694 "\xff\xff\xff\xff\xff\xff\xff\xff"
20695 "\xff\xff\xff\xff\xff\xff\xff\xff"
20696 "\xff\xff\xff\xff\xff\xff\xff\xff"
20697 "\xff\xff\xff\xff\xff\xff\xff\xff"
20698 "\xff\xff\xff\xff\xff\xff\xff\xff"
20699 "\xff\xff\xff\xff\xff\xff\xff\xff"
20700 "\xff\xff\xff\xff\xff\xff\xff\xff"
20701 "\xff\xff\xff\xff\xff\xff\xff\xff"
20702 "\xff\xff\xff\xff\xff\xff\xff\xff"
20703 "\xff\xff\xff\xff\xff\xff\xff\xff"
20704 "\xff\xff\xff\xff\xff\xff\xff\xff"
20705 "\xff\xff\xff\xff\xff\xff\xff\xff"
20706 "\xff\xff\xff\xff\xff\xff\xff\xff"
20707 "\xff\xff\xff\xff\xff\xff\xff\xff"
20708 "\xff\xff\xff\xff\xff\xff\xff\xff"
20709 "\xff\xff\xff\xff\xff\xff\xff\xff"
20710 "\xff\xff\xff\xff\xff\xff\xff\xff",
20711 .rlen = 192,
Herbert Xu8f69b762015-06-16 13:54:26 +080020712 }, {
20713 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20714 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20715 "\x2E\x44\x3B\x68",
20716 .klen = 20,
20717 .iv = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
20718 .result = "\x45\x00\x00\x48\x69\x9A\x00\x00"
20719 "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
20720 "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
20721 "\x38\xD3\x01\x00\x00\x01\x00\x00"
20722 "\x00\x00\x00\x00\x04\x5F\x73\x69"
20723 "\x70\x04\x5F\x75\x64\x70\x03\x73"
20724 "\x69\x70\x09\x63\x79\x62\x65\x72"
20725 "\x63\x69\x74\x79\x02\x64\x6B\x00"
20726 "\x00\x21\x00\x01\x01\x02\x02\x01",
20727 .rlen = 72,
20728 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
20729 "\x00\x00\x00\x00",
20730 .alen = 12,
20731 .input = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
20732 "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
20733 "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
20734 "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
20735 "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
20736 "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
20737 "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
20738 "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
20739 "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
20740 "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
20741 "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
20742 .ilen = 88,
20743 }, {
20744 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20745 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20746 "\xCA\xFE\xBA\xBE",
20747 .klen = 20,
20748 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20749 .result = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
20750 "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
20751 "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
20752 "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
20753 "\x00\x01\x00\x00\x00\x00\x00\x00"
20754 "\x03\x73\x69\x70\x09\x63\x79\x62"
20755 "\x65\x72\x63\x69\x74\x79\x02\x64"
20756 "\x6B\x00\x00\x01\x00\x01\x00\x01",
20757 .rlen = 64,
20758 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A",
20759 .alen = 8,
20760 .input = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
20761 "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
20762 "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
20763 "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
20764 "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
20765 "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
20766 "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
20767 "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
20768 "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
20769 "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
20770 .ilen = 80,
20771 }, {
20772 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20773 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20774 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20775 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20776 "\x11\x22\x33\x44",
20777 .klen = 36,
20778 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
20779 .result = "\x45\x00\x00\x30\x69\xA6\x40\x00"
20780 "\x80\x06\x26\x90\xC0\xA8\x01\x02"
20781 "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
20782 "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
20783 "\x70\x02\x40\x00\x20\xBF\x00\x00"
20784 "\x02\x04\x05\xB4\x01\x01\x04\x02"
20785 "\x01\x02\x02\x01",
20786 .rlen = 52,
20787 .assoc = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02",
20788 .alen = 8,
20789 .input = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
20790 "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
20791 "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
20792 "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
20793 "\x74\x8A\x63\x79\x85\x77\x1D\x34"
20794 "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
20795 "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
20796 "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
20797 "\x15\x95\x6C\x96",
20798 .ilen = 68,
20799 }, {
20800 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
20801 "\x00\x00\x00\x00\x00\x00\x00\x00"
20802 "\x00\x00\x00\x00",
20803 .klen = 20,
20804 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20805 .result = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
20806 "\x80\x01\xCB\x7A\x40\x67\x93\x18"
20807 "\x01\x01\x01\x01\x08\x00\x07\x5C"
20808 "\x02\x00\x44\x00\x61\x62\x63\x64"
20809 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20810 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20811 "\x75\x76\x77\x61\x62\x63\x64\x65"
20812 "\x66\x67\x68\x69\x01\x02\x02\x01",
20813 .rlen = 64,
20814 .assoc = "\x00\x00\x00\x00\x00\x00\x00\x01",
20815 .alen = 8,
20816 .input = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
20817 "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
20818 "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
20819 "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
20820 "\x45\x64\x76\x49\x27\x19\xFF\xB6"
20821 "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
20822 "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
20823 "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
20824 "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
20825 "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
20826 .ilen = 80,
20827 }, {
20828 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20829 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20830 "\x57\x69\x0E\x43",
20831 .klen = 20,
20832 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20833 .result = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
20834 "\x80\x01\xCB\x7C\x40\x67\x93\x18"
20835 "\x01\x01\x01\x01\x08\x00\x08\x5C"
20836 "\x02\x00\x43\x00\x61\x62\x63\x64"
20837 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20838 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20839 "\x75\x76\x77\x61\x62\x63\x64\x65"
20840 "\x66\x67\x68\x69\x01\x02\x02\x01",
20841 .rlen = 64,
20842 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
20843 "\x10\x10\x10\x10",
20844 .alen = 12,
20845 .input = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
20846 "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
20847 "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
20848 "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
20849 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20850 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20851 "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
20852 "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
20853 "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
20854 "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
20855 .ilen = 80,
20856 }, {
20857 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20858 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20859 "\x57\x69\x0E\x43",
20860 .klen = 20,
20861 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20862 .result = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
20863 "\x80\x01\x44\x1F\x40\x67\x93\xB6"
20864 "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
20865 "\x01\x02\x02\x01",
20866 .rlen = 28,
20867 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
20868 "\x10\x10\x10\x10",
20869 .alen = 12,
20870 .input = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
20871 "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
20872 "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
20873 "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
20874 "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
20875 "\xE7\xD0\x5D\x35",
20876 .ilen = 44,
20877 }, {
20878 .key = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20879 "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20880 "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20881 "\xCA\xFE\xBA\xBE",
20882 .klen = 28,
20883 .iv = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20884 .result = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
20885 "\x40\x06\x78\x80\x0A\x01\x03\x8F"
20886 "\x0A\x01\x06\x12\x80\x23\x06\xB8"
20887 "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
20888 "\x50\x10\x16\xD0\x75\x68\x00\x01",
20889 .rlen = 40,
20890 .assoc = "\x00\x00\xA5\xF8\x00\x00\x00\x0A",
20891 .alen = 8,
20892 .input = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
20893 "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
20894 "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
20895 "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
20896 "\x31\x5B\x27\x45\x21\x44\xCC\x77"
20897 "\x95\x45\x7B\x96\x52\x03\x7F\x53"
20898 "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
20899 .ilen = 56,
20900 }, {
20901 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20902 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20903 "\xDE\xCA\xF8\x88",
20904 .klen = 20,
20905 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20906 .result = "\x45\x00\x00\x49\x33\xBA\x00\x00"
20907 "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
20908 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20909 "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
20910 "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
20911 "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
20912 "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
20913 "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
20914 "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
20915 "\x23\x01\x01\x01",
20916 .rlen = 76,
20917 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
20918 "\x00\x00\x00\x01",
20919 .alen = 12,
20920 .input = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
20921 "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
20922 "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
20923 "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
20924 "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
20925 "\x84\xE6\x58\x63\x96\x5D\x74\x72"
20926 "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
20927 "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
20928 "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
20929 "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
20930 "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
20931 "\x69\x62\x34\x36",
20932 .ilen = 92,
20933 }, {
20934 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20935 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20936 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20937 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20938 "\x73\x61\x6C\x74",
20939 .klen = 36,
20940 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20941 .result = "\x45\x08\x00\x28\x73\x2C\x00\x00"
20942 "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
20943 "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
20944 "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
20945 "\x50\x10\x1F\x64\x6D\x54\x00\x01",
20946 .rlen = 40,
20947 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
20948 "\xDD\x0D\xB9\x9B",
20949 .alen = 12,
20950 .input = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
20951 "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
20952 "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
20953 "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
20954 "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
20955 "\x45\x16\x26\xC2\x41\x57\x71\xE3"
20956 "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
20957 .ilen = 56,
20958 }, {
20959 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20960 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20961 "\x57\x69\x0E\x43",
20962 .klen = 20,
20963 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20964 .result = "\x45\x00\x00\x49\x33\x3E\x00\x00"
20965 "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
20966 "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20967 "\x00\x35\xCB\x45\x80\x03\x02\x5B"
20968 "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
20969 "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
20970 "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
20971 "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
20972 "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
20973 "\x15\x01\x01\x01",
20974 .rlen = 76,
20975 .assoc = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
20976 "\x10\x10\x10\x10",
20977 .alen = 12,
20978 .input = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
20979 "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
20980 "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
20981 "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
20982 "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
20983 "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
20984 "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
20985 "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
20986 "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
20987 "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
20988 "\x76\x91\x89\x60\x97\x63\xB8\xE1"
20989 "\x8C\xAA\x81\xE2",
20990 .ilen = 92,
20991 }, {
20992 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20993 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20994 "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20995 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20996 "\x73\x61\x6C\x74",
20997 .klen = 36,
20998 .iv = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20999 .result = "\x63\x69\x73\x63\x6F\x01\x72\x75"
21000 "\x6C\x65\x73\x01\x74\x68\x65\x01"
21001 "\x6E\x65\x74\x77\x65\x01\x64\x65"
21002 "\x66\x69\x6E\x65\x01\x74\x68\x65"
21003 "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
21004 "\x67\x69\x65\x73\x01\x74\x68\x61"
21005 "\x74\x77\x69\x6C\x6C\x01\x64\x65"
21006 "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
21007 "\x72\x72\x6F\x77\x01\x02\x02\x01",
21008 .rlen = 72,
21009 .assoc = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
21010 "\xDD\x0D\xB9\x9B",
21011 .alen = 12,
21012 .input = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
21013 "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
21014 "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
21015 "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
21016 "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
21017 "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
21018 "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
21019 "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
21020 "\x12\xA4\x93\x63\x41\x23\x64\xF8"
21021 "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
21022 "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
21023 .ilen = 88,
21024 }, {
21025 .key = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
21026 "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
21027 "\xD9\x66\x42\x67",
21028 .klen = 20,
21029 .iv = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21030 .result = "\x01\x02\x02\x01",
21031 .rlen = 4,
21032 .assoc = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF",
21033 .alen = 8,
21034 .input = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
21035 "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
21036 "\x04\xBE\xF2\x70",
21037 .ilen = 20,
21038 }, {
21039 .key = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21040 "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21041 "\xDE\xCA\xF8\x88",
21042 .klen = 20,
21043 .iv = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21044 .result = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
21045 "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
21046 "\x62\x65\x00\x01",
21047 .rlen = 20,
21048 .assoc = "\x00\x00\x01\x00\x00\x00\x00\x00"
21049 "\x00\x00\x00\x01",
21050 .alen = 12,
21051 .input = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
21052 "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
21053 "\x43\x33\x21\x64\x41\x25\x03\x52"
21054 "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
21055 "\x43\xAF\x8C\x3E",
21056 .ilen = 36,
21057 }, {
21058 .key = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
21059 "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
21060 "\x61\x61\x6E\x64\x64\x6F\x69\x74"
21061 "\x62\x65\x66\x6F\x72\x65\x69\x61"
21062 "\x74\x75\x72\x6E",
21063 .klen = 36,
21064 .iv = "\x33\x30\x21\x69\x67\x65\x74\x6D",
21065 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21066 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21067 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21068 "\x02\x00\x07\x00\x61\x62\x63\x64"
21069 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21070 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21071 "\x01\x02\x02\x01",
21072 .rlen = 52,
21073 .assoc = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
21074 "\xFF\xFF\xFF\xFF",
21075 .alen = 12,
21076 .input = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
21077 "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
21078 "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
21079 "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
21080 "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
21081 "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
21082 "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
21083 "\x94\x5F\x66\x93\x68\x66\x1A\x32"
21084 "\x9F\xB4\xC0\x53",
21085 .ilen = 68,
21086 }, {
21087 .key = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21088 "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21089 "\x57\x69\x0E\x43",
21090 .klen = 20,
21091 .iv = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21092 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21093 "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21094 "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21095 "\x02\x00\x07\x00\x61\x62\x63\x64"
21096 "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21097 "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21098 "\x01\x02\x02\x01",
21099 .rlen = 52,
21100 .assoc = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
21101 "\x10\x10\x10\x10",
21102 .alen = 12,
21103 .input = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
21104 "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
21105 "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
21106 "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
21107 "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21108 "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21109 "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
21110 "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
21111 "\x40\xD7\xCB\x05",
21112 .ilen = 68,
21113 }, {
21114 .key = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
21115 "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
21116 "\x22\x43\x3C\x64",
21117 .klen = 20,
21118 .iv = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
21119 .result = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
21120 "\x61\x62\x63\x64\x65\x66\x67\x68"
21121 "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
21122 "\x71\x72\x73\x74\x01\x02\x02\x01",
21123 .rlen = 32,
21124 .assoc = "\x00\x00\x43\x21\x87\x65\x43\x21"
21125 "\x00\x00\x00\x07",
21126 .alen = 12,
21127 .input = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
21128 "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
21129 "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
21130 "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
21131 "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
21132 "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
21133 .ilen = 48,
Adrian Hoban69435b92010-11-04 15:02:04 -040021134 }
21135};
21136
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021137static struct aead_testvec aes_gcm_rfc4543_enc_tv_template[] = {
21138 { /* From draft-mcgrew-gcm-test-01 */
21139 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21140 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21141 "\x22\x43\x3c\x64",
21142 .klen = 20,
21143 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021144 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21145 "\x00\x00\x00\x00\x00\x00\x00\x00",
21146 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021147 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21148 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21149 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21150 "\x02\x00\x07\x00\x61\x62\x63\x64"
21151 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21152 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21153 "\x01\x02\x02\x01",
21154 .ilen = 52,
21155 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21156 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21157 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21158 "\x02\x00\x07\x00\x61\x62\x63\x64"
21159 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21160 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21161 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21162 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21163 "\xe4\x09\x9a\xaa",
21164 .rlen = 68,
21165 }
21166};
21167
21168static struct aead_testvec aes_gcm_rfc4543_dec_tv_template[] = {
21169 { /* From draft-mcgrew-gcm-test-01 */
21170 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21171 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21172 "\x22\x43\x3c\x64",
21173 .klen = 20,
21174 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021175 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21176 "\x00\x00\x00\x00\x00\x00\x00\x00",
21177 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021178 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21179 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21180 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21181 "\x02\x00\x07\x00\x61\x62\x63\x64"
21182 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21183 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21184 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21185 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21186 "\xe4\x09\x9a\xaa",
21187 .ilen = 68,
21188 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21189 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21190 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21191 "\x02\x00\x07\x00\x61\x62\x63\x64"
21192 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21193 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21194 "\x01\x02\x02\x01",
21195 .rlen = 52,
21196 }, { /* nearly same as previous, but should fail */
21197 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21198 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21199 "\x22\x43\x3c\x64",
21200 .klen = 20,
21201 .iv = zeroed_string,
Herbert Xu0af8fbc2015-06-16 13:54:19 +080021202 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07"
21203 "\x00\x00\x00\x00\x00\x00\x00\x00",
21204 .alen = 16,
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030021205 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21206 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21207 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21208 "\x02\x00\x07\x00\x61\x62\x63\x64"
21209 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21210 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21211 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21212 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21213 "\x00\x00\x00\x00",
21214 .ilen = 68,
21215 .novrfy = 1,
21216 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21217 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21218 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21219 "\x02\x00\x07\x00\x61\x62\x63\x64"
21220 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21221 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21222 "\x01\x02\x02\x01",
21223 .rlen = 52,
21224 },
21225};
21226
Herbert Xuda7f0332008-07-31 17:08:25 +080021227static struct aead_testvec aes_ccm_enc_tv_template[] = {
21228 { /* From RFC 3610 */
21229 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21230 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21231 .klen = 16,
21232 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
21233 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21234 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21235 .alen = 8,
21236 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21237 "\x10\x11\x12\x13\x14\x15\x16\x17"
21238 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
21239 .ilen = 23,
21240 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
21241 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
21242 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
21243 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
21244 .rlen = 31,
21245 }, {
21246 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21247 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21248 .klen = 16,
21249 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
21250 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21251 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21252 "\x08\x09\x0a\x0b",
21253 .alen = 12,
21254 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21255 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21256 "\x1c\x1d\x1e\x1f",
21257 .ilen = 20,
21258 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
21259 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
21260 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
21261 "\x7d\x9c\x2d\x93",
21262 .rlen = 28,
21263 }, {
21264 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21265 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21266 .klen = 16,
21267 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
21268 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21269 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21270 .alen = 8,
21271 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21272 "\x10\x11\x12\x13\x14\x15\x16\x17"
21273 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
21274 "\x20",
21275 .ilen = 25,
21276 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
21277 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
21278 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
21279 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
21280 "\x7e\x5f\x4e",
21281 .rlen = 35,
21282 }, {
21283 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21284 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21285 .klen = 16,
21286 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
21287 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21288 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21289 "\x08\x09\x0a\x0b",
21290 .alen = 12,
21291 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21292 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21293 "\x1c\x1d\x1e",
21294 .ilen = 19,
21295 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
21296 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
21297 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
21298 "\x4d\x99\x99\x88\xdd",
21299 .rlen = 29,
21300 }, {
21301 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21302 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21303 .klen = 16,
21304 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
21305 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21306 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
21307 .alen = 8,
21308 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
21309 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
21310 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
21311 .ilen = 24,
21312 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
21313 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
21314 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
21315 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
21316 .rlen = 32,
21317 }, {
21318 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21319 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21320 .klen = 16,
21321 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
21322 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21323 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
21324 "\x20\xea\x60\xc0",
21325 .alen = 12,
21326 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
21327 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
21328 "\x3a\x80\x3b\xa8\x7f",
21329 .ilen = 21,
21330 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
21331 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
21332 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
21333 "\x5a\xe0\x70\x45\x51",
21334 .rlen = 29,
21335 }, {
21336 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21337 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21338 .klen = 16,
21339 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
21340 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21341 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
21342 .alen = 8,
21343 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
21344 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
21345 "\x98\x09\xd6\x7d\xbe\xdd\x18",
21346 .ilen = 23,
21347 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
21348 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
21349 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
21350 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
21351 "\xba",
21352 .rlen = 33,
Ard Biesheuvel45859882014-04-16 20:40:04 +080021353 }, {
21354 /*
21355 * This is the same vector as aes_ccm_rfc4309_enc_tv_template[0]
21356 * below but rewritten to use the ccm algorithm directly.
21357 */
21358 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
21359 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e",
21360 .klen = 16,
21361 .iv = "\x03\x96\xac\x59\x30\x07\xa1\xe2\xa2\xc7\x55\x24\0\0\0\0",
21362 .alen = 0,
21363 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
21364 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
21365 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
21366 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
21367 .ilen = 32,
21368 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
21369 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
21370 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
21371 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
21372 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
21373 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
21374 .rlen = 48,
21375 }
Herbert Xuda7f0332008-07-31 17:08:25 +080021376};
21377
21378static struct aead_testvec aes_ccm_dec_tv_template[] = {
21379 { /* From RFC 3610 */
21380 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21381 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21382 .klen = 16,
21383 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
21384 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21385 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21386 .alen = 8,
21387 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
21388 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
21389 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
21390 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
21391 .ilen = 31,
21392 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21393 "\x10\x11\x12\x13\x14\x15\x16\x17"
21394 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
21395 .rlen = 23,
21396 }, {
21397 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21398 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21399 .klen = 16,
21400 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
21401 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21402 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21403 "\x08\x09\x0a\x0b",
21404 .alen = 12,
21405 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
21406 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
21407 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
21408 "\x7d\x9c\x2d\x93",
21409 .ilen = 28,
21410 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21411 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21412 "\x1c\x1d\x1e\x1f",
21413 .rlen = 20,
21414 }, {
21415 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21416 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21417 .klen = 16,
21418 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
21419 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21420 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
21421 .alen = 8,
21422 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
21423 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
21424 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
21425 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
21426 "\x7e\x5f\x4e",
21427 .ilen = 35,
21428 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21429 "\x10\x11\x12\x13\x14\x15\x16\x17"
21430 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
21431 "\x20",
21432 .rlen = 25,
21433 }, {
21434 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21435 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21436 .klen = 16,
21437 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
21438 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21439 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
21440 "\x08\x09\x0a\x0b",
21441 .alen = 12,
21442 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
21443 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
21444 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
21445 "\x4d\x99\x99\x88\xdd",
21446 .ilen = 29,
21447 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21448 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21449 "\x1c\x1d\x1e",
21450 .rlen = 19,
21451 }, {
21452 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21453 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21454 .klen = 16,
21455 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
21456 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21457 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
21458 .alen = 8,
21459 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
21460 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
21461 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
21462 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
21463 .ilen = 32,
21464 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
21465 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
21466 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
21467 .rlen = 24,
21468 }, {
21469 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21470 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21471 .klen = 16,
21472 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
21473 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21474 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
21475 "\x20\xea\x60\xc0",
21476 .alen = 12,
21477 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
21478 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
21479 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
21480 "\x5a\xe0\x70\x45\x51",
21481 .ilen = 29,
21482 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
21483 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
21484 "\x3a\x80\x3b\xa8\x7f",
21485 .rlen = 21,
21486 }, {
21487 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21488 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21489 .klen = 16,
21490 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
21491 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21492 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
21493 .alen = 8,
21494 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
21495 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
21496 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
21497 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
21498 "\xba",
21499 .ilen = 33,
21500 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
21501 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
21502 "\x98\x09\xd6\x7d\xbe\xdd\x18",
21503 .rlen = 23,
21504 },
21505};
21506
Jarod Wilson5d667322009-05-04 19:23:40 +080021507/*
21508 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
21509 * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
21510 * Special Publication 800-38C's test vectors also use nonce lengths our
21511 * implementation doesn't support. The following are taken from fips cavs
21512 * fax files on hand at Red Hat.
21513 *
21514 * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
21515 * part of the nonce which combine w/the iv, but need to be input this way.
21516 */
21517static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
21518 {
21519 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
21520 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
21521 "\x96\xac\x59",
21522 .klen = 19,
21523 .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
21524 .alen = 0,
21525 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
21526 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
21527 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
21528 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
21529 .ilen = 32,
21530 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
21531 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
21532 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
21533 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
21534 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
21535 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
21536 .rlen = 48,
21537 }, {
21538 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
21539 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
21540 "\x4f\xa3\x19",
21541 .klen = 19,
21542 .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
21543 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
21544 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
21545 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
21546 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
21547 .alen = 32,
21548 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
21549 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
21550 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
21551 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
21552 .ilen = 32,
21553 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
21554 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
21555 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
21556 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
21557 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
21558 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
21559 .rlen = 48,
21560 }, {
21561 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
21562 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
21563 "\x53\x14\x73\x66\x8d\x88\xf6\x80"
21564 "\xa0\x20\x35",
21565 .klen = 27,
21566 .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
21567 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
21568 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
21569 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
21570 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
21571 .alen = 32,
21572 .ilen = 0,
21573 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
21574 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
21575 .rlen = 16,
21576 }, {
21577 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
21578 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
21579 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
21580 "\xd6\x3c\x8c",
21581 .klen = 27,
21582 .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
21583 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
21584 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
21585 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
21586 "\xe3\x00\x73\x69\x84\x69\x87\x79",
21587 .alen = 32,
21588 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
21589 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
21590 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
21591 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
21592 .ilen = 32,
21593 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
21594 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
21595 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
21596 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
21597 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
21598 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
21599 .rlen = 48,
21600 }, {
21601 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
21602 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
21603 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
21604 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
21605 "\x1e\x29\x91",
21606 .klen = 35,
21607 .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
21608 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
21609 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
21610 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
21611 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
21612 .alen = 32,
21613 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
21614 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
21615 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
21616 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
21617 .ilen = 32,
21618 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
21619 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
21620 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
21621 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
21622 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
21623 .rlen = 40,
21624 }, {
21625 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
21626 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
21627 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
21628 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
21629 "\xf9\xd9\x4e",
21630 .klen = 35,
21631 .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
21632 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
21633 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
21634 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
21635 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
21636 .alen = 32,
21637 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
21638 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
21639 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
21640 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
21641 .ilen = 32,
21642 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
21643 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
21644 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
21645 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
21646 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
21647 "\x7b\x72\x8a\xf7",
21648 .rlen = 44,
21649 }, {
21650 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
21651 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
21652 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
21653 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
21654 "\x24\xa7\x8b",
21655 .klen = 35,
21656 .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
21657 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
21658 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
21659 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
21660 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
21661 .alen = 32,
21662 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
21663 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
21664 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
21665 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
21666 .ilen = 32,
21667 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
21668 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
21669 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
21670 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
21671 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
21672 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
21673 .rlen = 48,
21674 },
21675};
21676
21677static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
21678 {
21679 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
21680 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
21681 "\xc6\xfb\x7d",
21682 .klen = 19,
21683 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
21684 .alen = 0,
21685 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
21686 .ilen = 8,
21687 .result = "\x00",
21688 .rlen = 0,
21689 .novrfy = 1,
21690 }, {
21691 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
21692 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
21693 "\xaf\x94\x87",
21694 .klen = 19,
21695 .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
21696 .alen = 0,
21697 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
21698 .ilen = 8,
21699 .result = "\x00",
21700 .rlen = 0,
21701 }, {
21702 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
21703 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
21704 "\xc6\xfb\x7d",
21705 .klen = 19,
21706 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
21707 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
21708 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
21709 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
21710 "\xd8\x94\x99\x91\x81\x54\x62\x57",
21711 .alen = 32,
21712 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
21713 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
21714 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
21715 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
21716 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
21717 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
21718 .ilen = 48,
21719 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
21720 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
21721 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
21722 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
21723 .rlen = 32,
21724 .novrfy = 1,
21725 }, {
21726 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
21727 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
21728 "\x05\xe0\xc9",
21729 .klen = 19,
21730 .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
21731 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
21732 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
21733 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
21734 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
21735 .alen = 32,
21736 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
21737 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
21738 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
21739 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
21740 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
21741 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
21742 .ilen = 48,
21743 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
21744 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
21745 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
21746 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
21747 .rlen = 32,
21748 }, {
21749 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
21750 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
21751 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
21752 "\xee\x49\x83",
21753 .klen = 27,
21754 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
21755 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
21756 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
21757 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
21758 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
21759 .alen = 32,
21760 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
21761 .ilen = 8,
21762 .result = "\x00",
21763 .rlen = 0,
21764 }, {
21765 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
21766 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
21767 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
21768 "\xee\x49\x83",
21769 .klen = 27,
21770 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
21771 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
21772 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
21773 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
21774 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
21775 .alen = 32,
21776 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
21777 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
21778 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
21779 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
21780 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
21781 .ilen = 40,
21782 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
21783 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
21784 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
21785 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
21786 .rlen = 32,
21787 }, {
21788 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
21789 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
21790 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
21791 "\xd1\xfc\x57",
21792 .klen = 27,
21793 .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
21794 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
21795 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
21796 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
21797 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
21798 .alen = 32,
21799 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
21800 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
21801 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
21802 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
21803 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
21804 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
21805 .ilen = 48,
21806 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
21807 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
21808 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
21809 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
21810 .rlen = 32,
21811 .novrfy = 1,
21812 }, {
21813 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
21814 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
21815 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
21816 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
21817 "\xee\x49\x83",
21818 .klen = 35,
21819 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
21820 .alen = 0,
21821 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
21822 .ilen = 8,
21823 .result = "\x00",
21824 .rlen = 0,
21825 }, {
21826 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
21827 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
21828 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
21829 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
21830 "\x85\x34\x66",
21831 .klen = 35,
21832 .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
21833 .alen = 0,
21834 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
21835 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
21836 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
21837 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
21838 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
21839 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
21840 .ilen = 48,
21841 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
21842 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
21843 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
21844 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
21845 .rlen = 32,
21846 .novrfy = 1,
21847 }, {
21848 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
21849 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
21850 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
21851 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
21852 "\xcf\x76\x3f",
21853 .klen = 35,
21854 .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
21855 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
21856 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
21857 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
21858 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
21859 .alen = 32,
21860 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
21861 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
21862 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
21863 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
21864 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
21865 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
21866 .ilen = 48,
21867 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
21868 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
21869 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
21870 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
21871 .rlen = 32,
21872 },
21873};
21874
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080021875/*
Martin Williaf2b76b2015-06-01 13:44:01 +020021876 * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5.
21877 */
21878#define RFC7539_ENC_TEST_VECTORS 2
21879#define RFC7539_DEC_TEST_VECTORS 2
21880static struct aead_testvec rfc7539_enc_tv_template[] = {
21881 {
21882 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
21883 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
21884 "\x90\x91\x92\x93\x94\x95\x96\x97"
21885 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
21886 .klen = 32,
21887 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
21888 "\x44\x45\x46\x47",
21889 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
21890 "\xc4\xc5\xc6\xc7",
21891 .alen = 12,
21892 .input = "\x4c\x61\x64\x69\x65\x73\x20\x61"
21893 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
21894 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
21895 "\x74\x68\x65\x20\x63\x6c\x61\x73"
21896 "\x73\x20\x6f\x66\x20\x27\x39\x39"
21897 "\x3a\x20\x49\x66\x20\x49\x20\x63"
21898 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
21899 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
21900 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
21901 "\x74\x69\x70\x20\x66\x6f\x72\x20"
21902 "\x74\x68\x65\x20\x66\x75\x74\x75"
21903 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
21904 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
21905 "\x75\x6c\x64\x20\x62\x65\x20\x69"
21906 "\x74\x2e",
21907 .ilen = 114,
21908 .result = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
21909 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
21910 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
21911 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
21912 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
21913 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
21914 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
21915 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
21916 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
21917 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
21918 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
21919 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
21920 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
21921 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
21922 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
21923 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
21924 "\x06\x91",
21925 .rlen = 130,
21926 }, {
21927 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
21928 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
21929 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
21930 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
21931 .klen = 32,
21932 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
21933 "\x05\x06\x07\x08",
21934 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
21935 "\x00\x00\x4e\x91",
21936 .alen = 12,
21937 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
21938 "\x2d\x44\x72\x61\x66\x74\x73\x20"
21939 "\x61\x72\x65\x20\x64\x72\x61\x66"
21940 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
21941 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
21942 "\x64\x20\x66\x6f\x72\x20\x61\x20"
21943 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
21944 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
21945 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
21946 "\x64\x20\x6d\x61\x79\x20\x62\x65"
21947 "\x20\x75\x70\x64\x61\x74\x65\x64"
21948 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
21949 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
21950 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
21951 "\x20\x62\x79\x20\x6f\x74\x68\x65"
21952 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
21953 "\x6e\x74\x73\x20\x61\x74\x20\x61"
21954 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
21955 "\x20\x49\x74\x20\x69\x73\x20\x69"
21956 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
21957 "\x69\x61\x74\x65\x20\x74\x6f\x20"
21958 "\x75\x73\x65\x20\x49\x6e\x74\x65"
21959 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
21960 "\x66\x74\x73\x20\x61\x73\x20\x72"
21961 "\x65\x66\x65\x72\x65\x6e\x63\x65"
21962 "\x20\x6d\x61\x74\x65\x72\x69\x61"
21963 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
21964 "\x63\x69\x74\x65\x20\x74\x68\x65"
21965 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
21966 "\x74\x68\x61\x6e\x20\x61\x73\x20"
21967 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
21968 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
21969 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
21970 "\x9d",
21971 .ilen = 265,
21972 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
21973 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
21974 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
21975 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
21976 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
21977 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
21978 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
21979 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
21980 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
21981 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
21982 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
21983 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
21984 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
21985 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
21986 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
21987 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
21988 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
21989 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
21990 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
21991 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
21992 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
21993 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
21994 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
21995 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
21996 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
21997 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
21998 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
21999 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
22000 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
22001 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
22002 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
22003 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
22004 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
22005 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
22006 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
22007 "\x38",
22008 .rlen = 281,
22009 },
22010};
22011
22012static struct aead_testvec rfc7539_dec_tv_template[] = {
22013 {
22014 .key = "\x80\x81\x82\x83\x84\x85\x86\x87"
22015 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
22016 "\x90\x91\x92\x93\x94\x95\x96\x97"
22017 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
22018 .klen = 32,
22019 .iv = "\x07\x00\x00\x00\x40\x41\x42\x43"
22020 "\x44\x45\x46\x47",
22021 .assoc = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
22022 "\xc4\xc5\xc6\xc7",
22023 .alen = 12,
22024 .input = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
22025 "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
22026 "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
22027 "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
22028 "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
22029 "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
22030 "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
22031 "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
22032 "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
22033 "\x98\x03\xae\xe3\x28\x09\x1b\x58"
22034 "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
22035 "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
22036 "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
22037 "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
22038 "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
22039 "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
22040 "\x06\x91",
22041 .ilen = 130,
22042 .result = "\x4c\x61\x64\x69\x65\x73\x20\x61"
22043 "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
22044 "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
22045 "\x74\x68\x65\x20\x63\x6c\x61\x73"
22046 "\x73\x20\x6f\x66\x20\x27\x39\x39"
22047 "\x3a\x20\x49\x66\x20\x49\x20\x63"
22048 "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
22049 "\x65\x72\x20\x79\x6f\x75\x20\x6f"
22050 "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
22051 "\x74\x69\x70\x20\x66\x6f\x72\x20"
22052 "\x74\x68\x65\x20\x66\x75\x74\x75"
22053 "\x72\x65\x2c\x20\x73\x75\x6e\x73"
22054 "\x63\x72\x65\x65\x6e\x20\x77\x6f"
22055 "\x75\x6c\x64\x20\x62\x65\x20\x69"
22056 "\x74\x2e",
22057 .rlen = 114,
22058 }, {
22059 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
22060 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
22061 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
22062 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
22063 .klen = 32,
22064 .iv = "\x00\x00\x00\x00\x01\x02\x03\x04"
22065 "\x05\x06\x07\x08",
22066 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
22067 "\x00\x00\x4e\x91",
22068 .alen = 12,
22069 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
22070 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
22071 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
22072 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
22073 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
22074 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
22075 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
22076 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
22077 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
22078 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
22079 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
22080 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
22081 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
22082 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
22083 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
22084 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
22085 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
22086 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
22087 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
22088 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
22089 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
22090 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
22091 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
22092 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
22093 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
22094 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
22095 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
22096 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
22097 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
22098 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
22099 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
22100 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
22101 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
22102 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
22103 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
22104 "\x38",
22105 .ilen = 281,
22106 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
22107 "\x2d\x44\x72\x61\x66\x74\x73\x20"
22108 "\x61\x72\x65\x20\x64\x72\x61\x66"
22109 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
22110 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
22111 "\x64\x20\x66\x6f\x72\x20\x61\x20"
22112 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
22113 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
22114 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
22115 "\x64\x20\x6d\x61\x79\x20\x62\x65"
22116 "\x20\x75\x70\x64\x61\x74\x65\x64"
22117 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
22118 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
22119 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
22120 "\x20\x62\x79\x20\x6f\x74\x68\x65"
22121 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
22122 "\x6e\x74\x73\x20\x61\x74\x20\x61"
22123 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
22124 "\x20\x49\x74\x20\x69\x73\x20\x69"
22125 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
22126 "\x69\x61\x74\x65\x20\x74\x6f\x20"
22127 "\x75\x73\x65\x20\x49\x6e\x74\x65"
22128 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
22129 "\x66\x74\x73\x20\x61\x73\x20\x72"
22130 "\x65\x66\x65\x72\x65\x6e\x63\x65"
22131 "\x20\x6d\x61\x74\x65\x72\x69\x61"
22132 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
22133 "\x63\x69\x74\x65\x20\x74\x68\x65"
22134 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
22135 "\x74\x68\x61\x6e\x20\x61\x73\x20"
22136 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
22137 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
22138 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
22139 "\x9d",
22140 .rlen = 265,
22141 },
22142};
22143
22144/*
Martin Willi59007582015-06-01 13:44:03 +020022145 * draft-irtf-cfrg-chacha20-poly1305
22146 */
22147#define RFC7539ESP_DEC_TEST_VECTORS 1
22148#define RFC7539ESP_ENC_TEST_VECTORS 1
22149static struct aead_testvec rfc7539esp_enc_tv_template[] = {
22150 {
22151 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
22152 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
22153 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
22154 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
22155 "\x00\x00\x00\x00",
22156 .klen = 36,
22157 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
22158 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
22159 "\x00\x00\x4e\x91",
22160 .alen = 12,
22161 .input = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
22162 "\x2d\x44\x72\x61\x66\x74\x73\x20"
22163 "\x61\x72\x65\x20\x64\x72\x61\x66"
22164 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
22165 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
22166 "\x64\x20\x66\x6f\x72\x20\x61\x20"
22167 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
22168 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
22169 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
22170 "\x64\x20\x6d\x61\x79\x20\x62\x65"
22171 "\x20\x75\x70\x64\x61\x74\x65\x64"
22172 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
22173 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
22174 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
22175 "\x20\x62\x79\x20\x6f\x74\x68\x65"
22176 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
22177 "\x6e\x74\x73\x20\x61\x74\x20\x61"
22178 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
22179 "\x20\x49\x74\x20\x69\x73\x20\x69"
22180 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
22181 "\x69\x61\x74\x65\x20\x74\x6f\x20"
22182 "\x75\x73\x65\x20\x49\x6e\x74\x65"
22183 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
22184 "\x66\x74\x73\x20\x61\x73\x20\x72"
22185 "\x65\x66\x65\x72\x65\x6e\x63\x65"
22186 "\x20\x6d\x61\x74\x65\x72\x69\x61"
22187 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
22188 "\x63\x69\x74\x65\x20\x74\x68\x65"
22189 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
22190 "\x74\x68\x61\x6e\x20\x61\x73\x20"
22191 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
22192 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
22193 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
22194 "\x9d",
22195 .ilen = 265,
22196 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
22197 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
22198 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
22199 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
22200 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
22201 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
22202 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
22203 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
22204 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
22205 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
22206 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
22207 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
22208 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
22209 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
22210 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
22211 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
22212 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
22213 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
22214 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
22215 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
22216 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
22217 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
22218 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
22219 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
22220 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
22221 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
22222 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
22223 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
22224 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
22225 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
22226 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
22227 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
22228 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
22229 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
22230 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
22231 "\x38",
22232 .rlen = 281,
22233 },
22234};
22235
22236static struct aead_testvec rfc7539esp_dec_tv_template[] = {
22237 {
22238 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
22239 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
22240 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
22241 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
22242 "\x00\x00\x00\x00",
22243 .klen = 36,
22244 .iv = "\x01\x02\x03\x04\x05\x06\x07\x08",
22245 .assoc = "\xf3\x33\x88\x86\x00\x00\x00\x00"
22246 "\x00\x00\x4e\x91",
22247 .alen = 12,
22248 .input = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
22249 "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
22250 "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
22251 "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
22252 "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
22253 "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
22254 "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
22255 "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
22256 "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
22257 "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
22258 "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
22259 "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
22260 "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
22261 "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
22262 "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
22263 "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
22264 "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
22265 "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
22266 "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
22267 "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
22268 "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
22269 "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
22270 "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
22271 "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
22272 "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
22273 "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
22274 "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
22275 "\x73\xa6\x72\x76\x27\x09\x7a\x10"
22276 "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
22277 "\xfa\x68\xf0\xff\x77\x98\x71\x30"
22278 "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
22279 "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
22280 "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
22281 "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
22282 "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
22283 "\x38",
22284 .ilen = 281,
22285 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
22286 "\x2d\x44\x72\x61\x66\x74\x73\x20"
22287 "\x61\x72\x65\x20\x64\x72\x61\x66"
22288 "\x74\x20\x64\x6f\x63\x75\x6d\x65"
22289 "\x6e\x74\x73\x20\x76\x61\x6c\x69"
22290 "\x64\x20\x66\x6f\x72\x20\x61\x20"
22291 "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
22292 "\x6f\x66\x20\x73\x69\x78\x20\x6d"
22293 "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
22294 "\x64\x20\x6d\x61\x79\x20\x62\x65"
22295 "\x20\x75\x70\x64\x61\x74\x65\x64"
22296 "\x2c\x20\x72\x65\x70\x6c\x61\x63"
22297 "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
22298 "\x62\x73\x6f\x6c\x65\x74\x65\x64"
22299 "\x20\x62\x79\x20\x6f\x74\x68\x65"
22300 "\x72\x20\x64\x6f\x63\x75\x6d\x65"
22301 "\x6e\x74\x73\x20\x61\x74\x20\x61"
22302 "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
22303 "\x20\x49\x74\x20\x69\x73\x20\x69"
22304 "\x6e\x61\x70\x70\x72\x6f\x70\x72"
22305 "\x69\x61\x74\x65\x20\x74\x6f\x20"
22306 "\x75\x73\x65\x20\x49\x6e\x74\x65"
22307 "\x72\x6e\x65\x74\x2d\x44\x72\x61"
22308 "\x66\x74\x73\x20\x61\x73\x20\x72"
22309 "\x65\x66\x65\x72\x65\x6e\x63\x65"
22310 "\x20\x6d\x61\x74\x65\x72\x69\x61"
22311 "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
22312 "\x63\x69\x74\x65\x20\x74\x68\x65"
22313 "\x6d\x20\x6f\x74\x68\x65\x72\x20"
22314 "\x74\x68\x61\x6e\x20\x61\x73\x20"
22315 "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
22316 "\x20\x69\x6e\x20\x70\x72\x6f\x67"
22317 "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
22318 "\x9d",
22319 .rlen = 265,
22320 },
22321};
22322
22323/*
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080022324 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
22325 * test vectors, taken from Appendix B.2.9 and B.2.10:
22326 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
22327 * Only AES-128 is supported at this time.
22328 */
22329#define ANSI_CPRNG_AES_TEST_VECTORS 6
22330
22331static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
22332 {
22333 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22334 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22335 .klen = 16,
22336 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22337 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
22338 .dtlen = 16,
22339 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
22340 "\x00\x00\x00\x00\x00\x00\x00\x00",
22341 .vlen = 16,
22342 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
22343 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
22344 .rlen = 16,
22345 .loops = 1,
22346 }, {
22347 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22348 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22349 .klen = 16,
22350 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22351 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
22352 .dtlen = 16,
22353 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
22354 "\x00\x00\x00\x00\x00\x00\x00\x00",
22355 .vlen = 16,
22356 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
22357 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
22358 .rlen = 16,
22359 .loops = 1,
22360 }, {
22361 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22362 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22363 .klen = 16,
22364 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22365 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
22366 .dtlen = 16,
22367 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
22368 "\x00\x00\x00\x00\x00\x00\x00\x00",
22369 .vlen = 16,
22370 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
22371 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
22372 .rlen = 16,
22373 .loops = 1,
22374 }, {
22375 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22376 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22377 .klen = 16,
22378 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22379 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
22380 .dtlen = 16,
22381 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
22382 "\x00\x00\x00\x00\x00\x00\x00\x00",
22383 .vlen = 16,
22384 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
22385 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
22386 .rlen = 16,
22387 .loops = 1,
22388 }, {
22389 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
22390 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
22391 .klen = 16,
22392 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
22393 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
22394 .dtlen = 16,
22395 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
22396 "\x00\x00\x00\x00\x00\x00\x00\x00",
22397 .vlen = 16,
22398 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
22399 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
22400 .rlen = 16,
22401 .loops = 1,
22402 }, { /* Monte Carlo Test */
22403 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
22404 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
22405 .klen = 16,
22406 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
22407 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
22408 .dtlen = 16,
22409 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
22410 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
22411 .vlen = 16,
22412 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
22413 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
22414 .rlen = 16,
22415 .loops = 10000,
22416 },
22417};
22418
Stephan Mueller3332ee22014-05-31 17:24:38 +020022419/*
22420 * SP800-90A DRBG Test vectors from
22421 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
22422 *
22423 * Test vectors for DRBG with prediction resistance. All types of DRBGs
22424 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
22425 * w/o personalization string, w/ and w/o additional input string).
22426 */
22427static struct drbg_testvec drbg_pr_sha256_tv_template[] = {
22428 {
22429 .entropy = (unsigned char *)
22430 "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86"
22431 "\xc1\xeb\xd2\x4e\x36\x14\xab\x18\xc4\x9c\xc9\xcf"
22432 "\x1a\xe8\xf7\x7b\x02\x49\x73\xd7\xf1\x42\x7d\xc6"
22433 "\x3f\x29\x2d\xec\xd3\x66\x51\x3f\x1d\x8d\x5b\x4e",
22434 .entropylen = 48,
22435 .entpra = (unsigned char *)
22436 "\x38\x9c\x91\xfa\xc2\xa3\x46\x89\x56\x08\x3f\x62"
22437 "\x73\xd5\x22\xa9\x29\x63\x3a\x1d\xe5\x5d\x5e\x4f"
22438 "\x67\xb0\x67\x7a\x5e\x9e\x0c\x62",
22439 .entprb = (unsigned char *)
22440 "\xb2\x8f\x36\xb2\xf6\x8d\x39\x13\xfa\x6c\x66\xcf"
22441 "\x62\x8a\x7e\x8c\x12\x33\x71\x9c\x69\xe4\xa5\xf0"
22442 "\x8c\xee\xeb\x9c\xf5\x31\x98\x31",
22443 .entprlen = 32,
22444 .expected = (unsigned char *)
22445 "\x52\x7b\xa3\xad\x71\x77\xa4\x49\x42\x04\x61\xc7"
22446 "\xf0\xaf\xa5\xfd\xd3\xb3\x0d\x6a\x61\xba\x35\x49"
22447 "\xbb\xaa\xaf\xe4\x25\x7d\xb5\x48\xaf\x5c\x18\x3d"
22448 "\x33\x8d\x9d\x45\xdf\x98\xd5\x94\xa8\xda\x92\xfe"
22449 "\xc4\x3c\x94\x2a\xcf\x7f\x7b\xf2\xeb\x28\xa9\xf1"
22450 "\xe0\x86\x30\xa8\xfe\xf2\x48\x90\x91\x0c\x75\xb5"
22451 "\x3c\x00\xf0\x4d\x09\x4f\x40\xa7\xa2\x8c\x52\xdf"
22452 "\x52\xef\x17\xbf\x3d\xd1\xa2\x31\xb4\xb8\xdc\xe6"
22453 "\x5b\x0d\x1f\x78\x36\xb4\xe6\x4b\xa7\x11\x25\xd5"
22454 "\x94\xc6\x97\x36\xab\xf0\xe5\x31\x28\x6a\xbb\xce"
22455 "\x30\x81\xa6\x8f\x27\x14\xf8\x1c",
22456 .expectedlen = 128,
22457 .addtla = NULL,
22458 .addtlb = NULL,
22459 .addtllen = 0,
22460 .pers = NULL,
22461 .perslen = 0,
22462 }, {
22463 .entropy = (unsigned char *)
22464 "\x5d\xf2\x14\xbc\xf6\xb5\x4e\x0b\xf0\x0d\x6f\x2d"
22465 "\xe2\x01\x66\x7b\xd0\xa4\x73\xa4\x21\xdd\xb0\xc0"
22466 "\x51\x79\x09\xf4\xea\xa9\x08\xfa\xa6\x67\xe0\xe1"
22467 "\xd1\x88\xa8\xad\xee\x69\x74\xb3\x55\x06\x9b\xf6",
22468 .entropylen = 48,
22469 .entpra = (unsigned char *)
22470 "\xef\x48\x06\xa2\xc2\x45\xf1\x44\xfa\x34\x2c\xeb"
22471 "\x8d\x78\x3c\x09\x8f\x34\x72\x20\xf2\xe7\xfd\x13"
22472 "\x76\x0a\xf6\xdc\x3c\xf5\xc0\x15",
22473 .entprb = (unsigned char *)
22474 "\x4b\xbe\xe5\x24\xed\x6a\x2d\x0c\xdb\x73\x5e\x09"
22475 "\xf9\xad\x67\x7c\x51\x47\x8b\x6b\x30\x2a\xc6\xde"
22476 "\x76\xaa\x55\x04\x8b\x0a\x72\x95",
22477 .entprlen = 32,
22478 .expected = (unsigned char *)
22479 "\x3b\x14\x71\x99\xa1\xda\xa0\x42\xe6\xc8\x85\x32"
22480 "\x70\x20\x32\x53\x9a\xbe\xd1\x1e\x15\xef\xfb\x4c"
22481 "\x25\x6e\x19\x3a\xf0\xb9\xcb\xde\xf0\x3b\xc6\x18"
22482 "\x4d\x85\x5a\x9b\xf1\xe3\xc2\x23\x03\x93\x08\xdb"
22483 "\xa7\x07\x4b\x33\x78\x40\x4d\xeb\x24\xf5\x6e\x81"
22484 "\x4a\x1b\x6e\xa3\x94\x52\x43\xb0\xaf\x2e\x21\xf4"
22485 "\x42\x46\x8e\x90\xed\x34\x21\x75\xea\xda\x67\xb6"
22486 "\xe4\xf6\xff\xc6\x31\x6c\x9a\x5a\xdb\xb3\x97\x13"
22487 "\x09\xd3\x20\x98\x33\x2d\x6d\xd7\xb5\x6a\xa8\xa9"
22488 "\x9a\x5b\xd6\x87\x52\xa1\x89\x2b\x4b\x9c\x64\x60"
22489 "\x50\x47\xa3\x63\x81\x16\xaf\x19",
22490 .expectedlen = 128,
22491 .addtla = (unsigned char *)
22492 "\xbe\x13\xdb\x2a\xe9\xa8\xfe\x09\x97\xe1\xce\x5d"
22493 "\xe8\xbb\xc0\x7c\x4f\xcb\x62\x19\x3f\x0f\xd2\xad"
22494 "\xa9\xd0\x1d\x59\x02\xc4\xff\x70",
22495 .addtlb = (unsigned char *)
22496 "\x6f\x96\x13\xe2\xa7\xf5\x6c\xfe\xdf\x66\xe3\x31"
22497 "\x63\x76\xbf\x20\x27\x06\x49\xf1\xf3\x01\x77\x41"
22498 "\x9f\xeb\xe4\x38\xfe\x67\x00\xcd",
22499 .addtllen = 32,
22500 .pers = NULL,
22501 .perslen = 0,
22502 }, {
22503 .entropy = (unsigned char *)
22504 "\xc6\x1c\xaf\x83\xa2\x56\x38\xf9\xb0\xbc\xd9\x85"
22505 "\xf5\x2e\xc4\x46\x9c\xe1\xb9\x40\x98\x70\x10\x72"
22506 "\xd7\x7d\x15\x85\xa1\x83\x5a\x97\xdf\xc8\xa8\xe8"
22507 "\x03\x4c\xcb\x70\x35\x8b\x90\x94\x46\x8a\x6e\xa1",
22508 .entropylen = 48,
22509 .entpra = (unsigned char *)
22510 "\xc9\x05\xa4\xcf\x28\x80\x4b\x93\x0f\x8b\xc6\xf9"
22511 "\x09\x41\x58\x74\xe9\xec\x28\xc7\x53\x0a\x73\x60"
22512 "\xba\x0a\xde\x57\x5b\x4b\x9f\x29",
22513 .entprb = (unsigned char *)
22514 "\x4f\x31\xd2\xeb\xac\xfa\xa8\xe2\x01\x7d\xf3\xbd"
22515 "\x42\xbd\x20\xa0\x30\x65\x74\xd5\x5d\xd2\xad\xa4"
22516 "\xa9\xeb\x1f\x4d\xf6\xfd\xb8\x26",
22517 .entprlen = 32,
22518 .expected = (unsigned char *)
22519 "\xf6\x13\x05\xcb\x83\x60\x16\x42\x49\x1d\xc6\x25"
22520 "\x3b\x8c\x31\xa3\xbe\x8b\xbd\x1c\xe2\xec\x1d\xde"
22521 "\xbb\xbf\xa1\xac\xa8\x9f\x50\xce\x69\xce\xef\xd5"
22522 "\xd6\xf2\xef\x6a\xf7\x81\x38\xdf\xbc\xa7\x5a\xb9"
22523 "\xb2\x42\x65\xab\xe4\x86\x8d\x2d\x9d\x59\x99\x2c"
22524 "\x5a\x0d\x71\x55\x98\xa4\x45\xc2\x8d\xdb\x05\x5e"
22525 "\x50\x21\xf7\xcd\xe8\x98\x43\xce\x57\x74\x63\x4c"
22526 "\xf3\xb1\xa5\x14\x1e\x9e\x01\xeb\x54\xd9\x56\xae"
22527 "\xbd\xb6\x6f\x1a\x47\x6b\x3b\x44\xe4\xa2\xe9\x3c"
22528 "\x6c\x83\x12\x30\xb8\x78\x7f\x8e\x54\x82\xd4\xfe"
22529 "\x90\x35\x0d\x4c\x4d\x85\xe7\x13",
22530 .expectedlen = 128,
22531 .addtla = NULL,
22532 .addtlb = NULL,
22533 .addtllen = 0,
22534 .pers = (unsigned char *)
22535 "\xa5\xbf\xac\x4f\x71\xa1\xbb\x67\x94\xc6\x50\xc7"
22536 "\x2a\x45\x9e\x10\xa8\xed\xf7\x52\x4f\xfe\x21\x90"
22537 "\xa4\x1b\xe1\xe2\x53\xcc\x61\x47",
22538 .perslen = 32,
22539 }, {
22540 .entropy = (unsigned char *)
22541 "\xb6\xc1\x8d\xdf\x99\x54\xbe\x95\x10\x48\xd9\xf6"
22542 "\xd7\x48\xa8\x73\x2d\x74\xde\x1e\xde\x57\x7e\xf4"
22543 "\x7b\x7b\x64\xef\x88\x7a\xa8\x10\x4b\xe1\xc1\x87"
22544 "\xbb\x0b\xe1\x39\x39\x50\xaf\x68\x9c\xa2\xbf\x5e",
22545 .entropylen = 48,
22546 .entpra = (unsigned char *)
22547 "\xdc\x81\x0a\x01\x58\xa7\x2e\xce\xee\x48\x8c\x7c"
22548 "\x77\x9e\x3c\xf1\x17\x24\x7a\xbb\xab\x9f\xca\x12"
22549 "\x19\xaf\x97\x2d\x5f\xf9\xff\xfc",
22550 .entprb = (unsigned char *)
22551 "\xaf\xfc\x4f\x98\x8b\x93\x95\xc1\xb5\x8b\x7f\x73"
22552 "\x6d\xa6\xbe\x6d\x33\xeb\x2c\x82\xb1\xaf\xc1\xb6"
22553 "\xb6\x05\xe2\x44\xaa\xfd\xe7\xdb",
22554 .entprlen = 32,
22555 .expected = (unsigned char *)
22556 "\x51\x79\xde\x1c\x0f\x58\xf3\xf4\xc9\x57\x2e\x31"
22557 "\xa7\x09\xa1\x53\x64\x63\xa2\xc5\x1d\x84\x88\x65"
22558 "\x01\x1b\xc6\x16\x3c\x49\x5b\x42\x8e\x53\xf5\x18"
22559 "\xad\x94\x12\x0d\x4f\x55\xcc\x45\x5c\x98\x0f\x42"
22560 "\x28\x2f\x47\x11\xf9\xc4\x01\x97\x6b\xa0\x94\x50"
22561 "\xa9\xd1\x5e\x06\x54\x3f\xdf\xbb\xc4\x98\xee\x8b"
22562 "\xba\xa9\xfa\x49\xee\x1d\xdc\xfb\x50\xf6\x51\x9f"
22563 "\x6c\x4a\x9a\x6f\x63\xa2\x7d\xad\xaf\x3a\x24\xa0"
22564 "\xd9\x9f\x07\xeb\x15\xee\x26\xe0\xd5\x63\x39\xda"
22565 "\x3c\x59\xd6\x33\x6c\x02\xe8\x05\x71\x46\x68\x44"
22566 "\x63\x4a\x68\x72\xe9\xf5\x55\xfe",
22567 .expectedlen = 128,
22568 .addtla = (unsigned char *)
22569 "\x15\x20\x2f\xf6\x98\x28\x63\xa2\xc4\x4e\xbb\x6c"
22570 "\xb2\x25\x92\x61\x79\xc9\x22\xc4\x61\x54\x96\xff"
22571 "\x4a\x85\xca\x80\xfe\x0d\x1c\xd0",
22572 .addtlb = (unsigned char *)
22573 "\xde\x29\x8e\x03\x42\x61\xa3\x28\x5e\xc8\x80\xc2"
22574 "\x6d\xbf\xad\x13\xe1\x8d\x2a\xc7\xe8\xc7\x18\x89"
22575 "\x42\x58\x9e\xd6\xcc\xad\x7b\x1e",
22576 .addtllen = 32,
22577 .pers = (unsigned char *)
22578 "\x84\xc3\x73\x9e\xce\xb3\xbc\x89\xf7\x62\xb3\xe1"
22579 "\xd7\x48\x45\x8a\xa9\xcc\xe9\xed\xd5\x81\x84\x52"
22580 "\x82\x4c\xdc\x19\xb8\xf8\x92\x5c",
22581 .perslen = 32,
22582 },
22583};
22584
22585static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = {
22586 {
22587 .entropy = (unsigned char *)
22588 "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a"
22589 "\x7e\x5c\x0e\xae\x0d\x3e\x30\x95\x59\xe9\xfe\x96"
22590 "\xb0\x67\x6d\x49\xd5\x91\xea\x4d\x07\xd2\x0d\x46"
22591 "\xd0\x64\x75\x7d\x30\x23\xca\xc2\x37\x61\x27\xab",
22592 .entropylen = 48,
22593 .entpra = (unsigned char *)
22594 "\xc6\x0f\x29\x99\x10\x0f\x73\x8c\x10\xf7\x47\x92"
22595 "\x67\x6a\x3f\xc4\xa2\x62\xd1\x37\x21\x79\x80\x46"
22596 "\xe2\x9a\x29\x51\x81\x56\x9f\x54",
22597 .entprb = (unsigned char *)
22598 "\xc1\x1d\x45\x24\xc9\x07\x1b\xd3\x09\x60\x15\xfc"
22599 "\xf7\xbc\x24\xa6\x07\xf2\x2f\xa0\x65\xc9\x37\x65"
22600 "\x8a\x2a\x77\xa8\x69\x90\x89\xf4",
22601 .entprlen = 32,
22602 .expected = (unsigned char *)
22603 "\xab\xc0\x15\x85\x60\x94\x80\x3a\x93\x8d\xff\xd2"
22604 "\x0d\xa9\x48\x43\x87\x0e\xf9\x35\xb8\x2c\xfe\xc1"
22605 "\x77\x06\xb8\xf5\x51\xb8\x38\x50\x44\x23\x5d\xd4"
22606 "\x4b\x59\x9f\x94\xb3\x9b\xe7\x8d\xd4\x76\xe0\xcf"
22607 "\x11\x30\x9c\x99\x5a\x73\x34\xe0\xa7\x8b\x37\xbc"
22608 "\x95\x86\x23\x50\x86\xfa\x3b\x63\x7b\xa9\x1c\xf8"
22609 "\xfb\x65\xef\xa2\x2a\x58\x9c\x13\x75\x31\xaa\x7b"
22610 "\x2d\x4e\x26\x07\xaa\xc2\x72\x92\xb0\x1c\x69\x8e"
22611 "\x6e\x01\xae\x67\x9e\xb8\x7c\x01\xa8\x9c\x74\x22"
22612 "\xd4\x37\x2d\x6d\x75\x4a\xba\xbb\x4b\xf8\x96\xfc"
22613 "\xb1\xcd\x09\xd6\x92\xd0\x28\x3f",
22614 .expectedlen = 128,
22615 .addtla = NULL,
22616 .addtlb = NULL,
22617 .addtllen = 0,
22618 .pers = NULL,
22619 .perslen = 0,
22620 }, {
22621 .entropy = (unsigned char *)
22622 "\xb9\x1f\xe9\xef\xdd\x9b\x7d\x20\xb6\xec\xe0\x2f"
22623 "\xdb\x76\x24\xce\x41\xc8\x3a\x4a\x12\x7f\x3e\x2f"
22624 "\xae\x05\x99\xea\xb5\x06\x71\x0d\x0c\x4c\xb4\x05"
22625 "\x26\xc6\xbd\xf5\x7f\x2a\x3d\xf2\xb5\x49\x7b\xda",
22626 .entropylen = 48,
22627 .entpra = (unsigned char *)
22628 "\xef\x67\x50\x9c\xa7\x7d\xdf\xb7\x2d\x81\x01\xa4"
22629 "\x62\x81\x6a\x69\x5b\xb3\x37\x45\xa7\x34\x8e\x26"
22630 "\x46\xd9\x26\xa2\x19\xd4\x94\x43",
22631 .entprb = (unsigned char *)
22632 "\x97\x75\x53\x53\xba\xb4\xa6\xb2\x91\x60\x71\x79"
22633 "\xd1\x6b\x4a\x24\x9a\x34\x66\xcc\x33\xab\x07\x98"
22634 "\x51\x78\x72\xb2\x79\xfd\x2c\xff",
22635 .entprlen = 32,
22636 .expected = (unsigned char *)
22637 "\x9c\xdc\x63\x8a\x19\x23\x22\x66\x0c\xc5\xb9\xd7"
22638 "\xfb\x2a\xb0\x31\xe3\x8a\x36\xa8\x5a\xa8\x14\xda"
22639 "\x1e\xa9\xcc\xfe\xb8\x26\x44\x83\x9f\xf6\xff\xaa"
22640 "\xc8\x98\xb8\x30\x35\x3b\x3d\x36\xd2\x49\xd4\x40"
22641 "\x62\x0a\x65\x10\x76\x55\xef\xc0\x95\x9c\xa7\xda"
22642 "\x3f\xcf\xb7\x7b\xc6\xe1\x28\x52\xfc\x0c\xe2\x37"
22643 "\x0d\x83\xa7\x51\x4b\x31\x47\x3c\xe1\x3c\xae\x70"
22644 "\x01\xc8\xa3\xd3\xc2\xac\x77\x9c\xd1\x68\x77\x9b"
22645 "\x58\x27\x3b\xa5\x0f\xc2\x7a\x8b\x04\x65\x62\xd5"
22646 "\xe8\xd6\xfe\x2a\xaf\xd3\xd3\xfe\xbd\x18\xfb\xcd"
22647 "\xcd\x66\xb5\x01\x69\x66\xa0\x3c",
22648 .expectedlen = 128,
22649 .addtla = (unsigned char *)
22650 "\x17\xc1\x56\xcb\xcc\x50\xd6\x03\x7d\x45\x76\xa3"
22651 "\x75\x76\xc1\x4a\x66\x1b\x2e\xdf\xb0\x2e\x7d\x56"
22652 "\x6d\x99\x3b\xc6\x58\xda\x03\xf6",
22653 .addtlb = (unsigned char *)
22654 "\x7c\x7b\x4a\x4b\x32\x5e\x6f\x67\x34\xf5\x21\x4c"
22655 "\xf9\x96\xf9\xbf\x1c\x8c\x81\xd3\x9b\x60\x6a\x44"
22656 "\xc6\x03\xa2\xfb\x13\x20\x19\xb7",
22657 .addtllen = 32,
22658 .pers = NULL,
22659 .perslen = 0,
22660 }, {
22661 .entropy = (unsigned char *)
22662 "\x13\x54\x96\xfc\x1b\x7d\x28\xf3\x18\xc9\xa7\x89"
22663 "\xb6\xb3\xc8\x72\xac\x00\xd4\x59\x36\x25\x05\xaf"
22664 "\xa5\xdb\x96\xcb\x3c\x58\x46\x87\xa5\xaa\xbf\x20"
22665 "\x3b\xfe\x23\x0e\xd1\xc7\x41\x0f\x3f\xc9\xb3\x67",
22666 .entropylen = 48,
22667 .entpra = (unsigned char *)
22668 "\xe2\xbd\xb7\x48\x08\x06\xf3\xe1\x93\x3c\xac\x79"
22669 "\xa7\x2b\x11\xda\xe3\x2e\xe1\x91\xa5\x02\x19\x57"
22670 "\x20\x28\xad\xf2\x60\xd7\xcd\x45",
22671 .entprb = (unsigned char *)
22672 "\x8b\xd4\x69\xfc\xff\x59\x95\x95\xc6\x51\xde\x71"
22673 "\x68\x5f\xfc\xf9\x4a\xab\xec\x5a\xcb\xbe\xd3\x66"
22674 "\x1f\xfa\x74\xd3\xac\xa6\x74\x60",
22675 .entprlen = 32,
22676 .expected = (unsigned char *)
22677 "\x1f\x9e\xaf\xe4\xd2\x46\xb7\x47\x41\x4c\x65\x99"
22678 "\x01\xe9\x3b\xbb\x83\x0c\x0a\xb0\xc1\x3a\xe2\xb3"
22679 "\x31\x4e\xeb\x93\x73\xee\x0b\x26\xc2\x63\xa5\x75"
22680 "\x45\x99\xd4\x5c\x9f\xa1\xd4\x45\x87\x6b\x20\x61"
22681 "\x40\xea\x78\xa5\x32\xdf\x9e\x66\x17\xaf\xb1\x88"
22682 "\x9e\x2e\x23\xdd\xc1\xda\x13\x97\x88\xa5\xb6\x5e"
22683 "\x90\x14\x4e\xef\x13\xab\x5c\xd9\x2c\x97\x9e\x7c"
22684 "\xd7\xf8\xce\xea\x81\xf5\xcd\x71\x15\x49\x44\xce"
22685 "\x83\xb6\x05\xfb\x7d\x30\xb5\x57\x2c\x31\x4f\xfc"
22686 "\xfe\x80\xb6\xc0\x13\x0c\x5b\x9b\x2e\x8f\x3d\xfc"
22687 "\xc2\xa3\x0c\x11\x1b\x80\x5f\xf3",
22688 .expectedlen = 128,
22689 .addtla = NULL,
22690 .addtlb = NULL,
22691 .addtllen = 0,
22692 .pers = (unsigned char *)
22693 "\x64\xb6\xfc\x60\xbc\x61\x76\x23\x6d\x3f\x4a\x0f"
22694 "\xe1\xb4\xd5\x20\x9e\x70\xdd\x03\x53\x6d\xbf\xce"
22695 "\xcd\x56\x80\xbc\xb8\x15\xc8\xaa",
22696 .perslen = 32,
22697 }, {
22698 .entropy = (unsigned char *)
22699 "\xc7\xcc\xbc\x67\x7e\x21\x66\x1e\x27\x2b\x63\xdd"
22700 "\x3a\x78\xdc\xdf\x66\x6d\x3f\x24\xae\xcf\x37\x01"
22701 "\xa9\x0d\x89\x8a\xa7\xdc\x81\x58\xae\xb2\x10\x15"
22702 "\x7e\x18\x44\x6d\x13\xea\xdf\x37\x85\xfe\x81\xfb",
22703 .entropylen = 48,
22704 .entpra = (unsigned char *)
22705 "\x7b\xa1\x91\x5b\x3c\x04\xc4\x1b\x1d\x19\x2f\x1a"
22706 "\x18\x81\x60\x3c\x6c\x62\x91\xb7\xe9\xf5\xcb\x96"
22707 "\xbb\x81\x6a\xcc\xb5\xae\x55\xb6",
22708 .entprb = (unsigned char *)
22709 "\x99\x2c\xc7\x78\x7e\x3b\x88\x12\xef\xbe\xd3\xd2"
22710 "\x7d\x2a\xa5\x86\xda\x8d\x58\x73\x4a\x0a\xb2\x2e"
22711 "\xbb\x4c\x7e\xe3\x9a\xb6\x81\xc1",
22712 .entprlen = 32,
22713 .expected = (unsigned char *)
22714 "\x95\x6f\x95\xfc\x3b\xb7\xfe\x3e\xd0\x4e\x1a\x14"
22715 "\x6c\x34\x7f\x7b\x1d\x0d\x63\x5e\x48\x9c\x69\xe6"
22716 "\x46\x07\xd2\x87\xf3\x86\x52\x3d\x98\x27\x5e\xd7"
22717 "\x54\xe7\x75\x50\x4f\xfb\x4d\xfd\xac\x2f\x4b\x77"
22718 "\xcf\x9e\x8e\xcc\x16\xa2\x24\xcd\x53\xde\x3e\xc5"
22719 "\x55\x5d\xd5\x26\x3f\x89\xdf\xca\x8b\x4e\x1e\xb6"
22720 "\x88\x78\x63\x5c\xa2\x63\x98\x4e\x6f\x25\x59\xb1"
22721 "\x5f\x2b\x23\xb0\x4b\xa5\x18\x5d\xc2\x15\x74\x40"
22722 "\x59\x4c\xb4\x1e\xcf\x9a\x36\xfd\x43\xe2\x03\xb8"
22723 "\x59\x91\x30\x89\x2a\xc8\x5a\x43\x23\x7c\x73\x72"
22724 "\xda\x3f\xad\x2b\xba\x00\x6b\xd1",
22725 .expectedlen = 128,
22726 .addtla = (unsigned char *)
22727 "\x18\xe8\x17\xff\xef\x39\xc7\x41\x5c\x73\x03\x03"
22728 "\xf6\x3d\xe8\x5f\xc8\xab\xe4\xab\x0f\xad\xe8\xd6"
22729 "\x86\x88\x55\x28\xc1\x69\xdd\x76",
22730 .addtlb = (unsigned char *)
22731 "\xac\x07\xfc\xbe\x87\x0e\xd3\xea\x1f\x7e\xb8\xe7"
22732 "\x9d\xec\xe8\xe7\xbc\xf3\x18\x25\x77\x35\x4a\xaa"
22733 "\x00\x99\x2a\xdd\x0a\x00\x50\x82",
22734 .addtllen = 32,
22735 .pers = (unsigned char *)
22736 "\xbc\x55\xab\x3c\xf6\x52\xb0\x11\x3d\x7b\x90\xb8"
22737 "\x24\xc9\x26\x4e\x5a\x1e\x77\x0d\x3d\x58\x4a\xda"
22738 "\xd1\x81\xe9\xf8\xeb\x30\x8f\x6f",
22739 .perslen = 32,
22740 },
22741};
22742
22743static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = {
22744 {
22745 .entropy = (unsigned char *)
22746 "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42"
22747 "\x94\xd7\x28\x9c\x43\x77\x19\x29\x1a\x6d\xc3\xa2",
22748 .entropylen = 24,
22749 .entpra = (unsigned char *)
22750 "\x96\xd8\x9e\x45\x32\xc9\xd2\x08\x7a\x6d\x97\x15"
22751 "\xb4\xec\x80\xb1",
22752 .entprb = (unsigned char *)
22753 "\x8b\xb6\x72\xb5\x24\x0b\x98\x65\x95\x95\xe9\xc9"
22754 "\x28\x07\xeb\xc2",
22755 .entprlen = 16,
22756 .expected = (unsigned char *)
22757 "\x70\x19\xd0\x4c\x45\x78\xd6\x68\xa9\x9a\xaa\xfe"
22758 "\xc1\xdf\x27\x9a\x1c\x0d\x0d\xf7\x24\x75\x46\xcc"
22759 "\x77\x6b\xdf\x89\xc6\x94\xdc\x74\x50\x10\x70\x18"
22760 "\x9b\xdc\x96\xb4\x89\x23\x40\x1a\xce\x09\x87\xce"
22761 "\xd2\xf3\xd5\xe4\x51\x67\x74\x11\x5a\xcc\x8b\x3b"
22762 "\x8a\xf1\x23\xa8",
22763 .expectedlen = 64,
22764 .addtla = NULL,
22765 .addtlb = NULL,
22766 .addtllen = 0,
22767 .pers = NULL,
22768 .perslen = 0,
22769 }, {
22770 .entropy = (unsigned char *)
22771 "\x8e\x83\xe0\xeb\x37\xea\x3e\x53\x5e\x17\x6e\x77"
22772 "\xbd\xb1\x53\x90\xfc\xdc\xc1\x3c\x9a\x88\x22\x94",
22773 .entropylen = 24,
22774 .entpra = (unsigned char *)
22775 "\x6a\x85\xe7\x37\xc8\xf1\x04\x31\x98\x4f\xc8\x73"
22776 "\x67\xd1\x08\xf8",
22777 .entprb = (unsigned char *)
22778 "\xd7\xa4\x68\xe2\x12\x74\xc3\xd9\xf1\xb7\x05\xbc"
22779 "\xd4\xba\x04\x58",
22780 .entprlen = 16,
22781 .expected = (unsigned char *)
22782 "\x78\xd6\xa6\x70\xff\xd1\x82\xf5\xa2\x88\x7f\x6d"
22783 "\x3d\x8c\x39\xb1\xa8\xcb\x2c\x91\xab\x14\x7e\xbc"
22784 "\x95\x45\x9f\x24\xb8\x20\xac\x21\x23\xdb\x72\xd7"
22785 "\x12\x8d\x48\x95\xf3\x19\x0c\x43\xc6\x19\x45\xfc"
22786 "\x8b\xac\x40\x29\x73\x00\x03\x45\x5e\x12\xff\x0c"
22787 "\xc1\x02\x41\x82",
22788 .expectedlen = 64,
22789 .addtla = (unsigned char *)
22790 "\xa2\xd9\x38\xcf\x8b\x29\x67\x5b\x65\x62\x6f\xe8"
22791 "\xeb\xb3\x01\x76",
22792 .addtlb = (unsigned char *)
22793 "\x59\x63\x1e\x81\x8a\x14\xa8\xbb\xa1\xb8\x41\x25"
22794 "\xd0\x7f\xcc\x43",
22795 .addtllen = 16,
22796 .pers = NULL,
22797 .perslen = 0,
22798 }, {
22799 .entropy = (unsigned char *)
22800 "\x04\xd9\x49\xa6\xdc\xe8\x6e\xbb\xf1\x08\x77\x2b"
22801 "\x9e\x08\xca\x92\x65\x16\xda\x99\xa2\x59\xf3\xe8",
22802 .entropylen = 24,
22803 .entpra = (unsigned char *)
22804 "\x38\x7e\x3f\x6b\x51\x70\x7b\x20\xec\x53\xd0\x66"
22805 "\xc3\x0f\xe3\xb0",
22806 .entprb = (unsigned char *)
22807 "\xe0\x86\xa6\xaa\x5f\x72\x2f\xad\xf7\xef\x06\xb8"
22808 "\xd6\x9c\x9d\xe8",
22809 .entprlen = 16,
22810 .expected = (unsigned char *)
22811 "\xc9\x0a\xaf\x85\x89\x71\x44\x66\x4f\x25\x0b\x2b"
22812 "\xde\xd8\xfa\xff\x52\x5a\x1b\x32\x5e\x41\x7a\x10"
22813 "\x1f\xef\x1e\x62\x23\xe9\x20\x30\xc9\x0d\xad\x69"
22814 "\xb4\x9c\x5b\xf4\x87\x42\xd5\xae\x5e\x5e\x43\xcc"
22815 "\xd9\xfd\x0b\x93\x4a\xe3\xd4\x06\x37\x36\x0f\x3f"
22816 "\x72\x82\x0c\xcf",
22817 .expectedlen = 64,
22818 .addtla = NULL,
22819 .addtlb = NULL,
22820 .addtllen = 0,
22821 .pers = (unsigned char *)
22822 "\xbf\xa4\x9a\x8f\x7b\xd8\xb1\x7a\x9d\xfa\x45\xed"
22823 "\x21\x52\xb3\xad",
22824 .perslen = 16,
22825 }, {
22826 .entropy = (unsigned char *)
22827 "\x92\x89\x8f\x31\xfa\x1c\xff\x6d\x18\x2f\x26\x06"
22828 "\x43\xdf\xf8\x18\xc2\xa4\xd9\x72\xc3\xb9\xb6\x97",
22829 .entropylen = 24,
22830 .entpra = (unsigned char *)
22831 "\x20\x72\x8a\x06\xf8\x6f\x8d\xd4\x41\xe2\x72\xb7"
22832 "\xc4\x2c\xe8\x10",
22833 .entprb = (unsigned char *)
22834 "\x3d\xb0\xf0\x94\xf3\x05\x50\x33\x17\x86\x3e\x22"
22835 "\x08\xf7\xa5\x01",
22836 .entprlen = 16,
22837 .expected = (unsigned char *)
22838 "\x5a\x35\x39\x87\x0f\x4d\x22\xa4\x09\x24\xee\x71"
22839 "\xc9\x6f\xac\x72\x0a\xd6\xf0\x88\x82\xd0\x83\x28"
22840 "\x73\xec\x3f\x93\xd8\xab\x45\x23\xf0\x7e\xac\x45"
22841 "\x14\x5e\x93\x9f\xb1\xd6\x76\x43\x3d\xb6\xe8\x08"
22842 "\x88\xf6\xda\x89\x08\x77\x42\xfe\x1a\xf4\x3f\xc4"
22843 "\x23\xc5\x1f\x68",
22844 .expectedlen = 64,
22845 .addtla = (unsigned char *)
22846 "\x1a\x40\xfa\xe3\xcc\x6c\x7c\xa0\xf8\xda\xba\x59"
22847 "\x23\x6d\xad\x1d",
22848 .addtlb = (unsigned char *)
22849 "\x9f\x72\x76\x6c\xc7\x46\xe5\xed\x2e\x53\x20\x12"
22850 "\xbc\x59\x31\x8c",
22851 .addtllen = 16,
22852 .pers = (unsigned char *)
22853 "\xea\x65\xee\x60\x26\x4e\x7e\xb6\x0e\x82\x68\xc4"
22854 "\x37\x3c\x5c\x0b",
22855 .perslen = 16,
22856 },
22857};
22858
22859/*
22860 * SP800-90A DRBG Test vectors from
22861 * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
22862 *
22863 * Test vectors for DRBG without prediction resistance. All types of DRBGs
22864 * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
22865 * w/o personalization string, w/ and w/o additional input string).
22866 */
22867static struct drbg_testvec drbg_nopr_sha256_tv_template[] = {
22868 {
22869 .entropy = (unsigned char *)
22870 "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3"
22871 "\xa2\xe7\x1f\x42\xc7\x12\x9d\x62\x0f\xf5\xc1\x19"
22872 "\xa9\xef\x55\xf0\x51\x85\xe0\xfb\x85\x81\xf9\x31"
22873 "\x75\x17\x27\x6e\x06\xe9\x60\x7d\xdb\xcb\xcc\x2e",
22874 .entropylen = 48,
22875 .expected = (unsigned char *)
22876 "\xd3\xe1\x60\xc3\x5b\x99\xf3\x40\xb2\x62\x82\x64"
22877 "\xd1\x75\x10\x60\xe0\x04\x5d\xa3\x83\xff\x57\xa5"
22878 "\x7d\x73\xa6\x73\xd2\xb8\xd8\x0d\xaa\xf6\xa6\xc3"
22879 "\x5a\x91\xbb\x45\x79\xd7\x3f\xd0\xc8\xfe\xd1\x11"
22880 "\xb0\x39\x13\x06\x82\x8a\xdf\xed\x52\x8f\x01\x81"
22881 "\x21\xb3\xfe\xbd\xc3\x43\xe7\x97\xb8\x7d\xbb\x63"
22882 "\xdb\x13\x33\xde\xd9\xd1\xec\xe1\x77\xcf\xa6\xb7"
22883 "\x1f\xe8\xab\x1d\xa4\x66\x24\xed\x64\x15\xe5\x1c"
22884 "\xcd\xe2\xc7\xca\x86\xe2\x83\x99\x0e\xea\xeb\x91"
22885 "\x12\x04\x15\x52\x8b\x22\x95\x91\x02\x81\xb0\x2d"
22886 "\xd4\x31\xf4\xc9\xf7\x04\x27\xdf",
22887 .expectedlen = 128,
22888 .addtla = NULL,
22889 .addtlb = NULL,
22890 .addtllen = 0,
22891 .pers = NULL,
22892 .perslen = 0,
22893 }, {
22894 .entropy = (unsigned char *)
22895 "\x73\xd3\xfb\xa3\x94\x5f\x2b\x5f\xb9\x8f\xf6\x9c"
22896 "\x8a\x93\x17\xae\x19\xc3\x4c\xc3\xd6\xca\xa3\x2d"
22897 "\x16\xfc\x42\xd2\x2d\xd5\x6f\x56\xcc\x1d\x30\xff"
22898 "\x9e\x06\x3e\x09\xce\x58\xe6\x9a\x35\xb3\xa6\x56",
22899 .entropylen = 48,
22900 .expected = (unsigned char *)
22901 "\x71\x7b\x93\x46\x1a\x40\xaa\x35\xa4\xaa\xc5\xe7"
22902 "\x6d\x5b\x5b\x8a\xa0\xdf\x39\x7d\xae\x71\x58\x5b"
22903 "\x3c\x7c\xb4\xf0\x89\xfa\x4a\x8c\xa9\x5c\x54\xc0"
22904 "\x40\xdf\xbc\xce\x26\x81\x34\xf8\xba\x7d\x1c\xe8"
22905 "\xad\x21\xe0\x74\xcf\x48\x84\x30\x1f\xa1\xd5\x4f"
22906 "\x81\x42\x2f\xf4\xdb\x0b\x23\xf8\x73\x27\xb8\x1d"
22907 "\x42\xf8\x44\x58\xd8\x5b\x29\x27\x0a\xf8\x69\x59"
22908 "\xb5\x78\x44\xeb\x9e\xe0\x68\x6f\x42\x9a\xb0\x5b"
22909 "\xe0\x4e\xcb\x6a\xaa\xe2\xd2\xd5\x33\x25\x3e\xe0"
22910 "\x6c\xc7\x6a\x07\xa5\x03\x83\x9f\xe2\x8b\xd1\x1c"
22911 "\x70\xa8\x07\x59\x97\xeb\xf6\xbe",
22912 .expectedlen = 128,
22913 .addtla = (unsigned char *)
22914 "\xf4\xd5\x98\x3d\xa8\xfc\xfa\x37\xb7\x54\x67\x73"
22915 "\xc7\xc3\xdd\x47\x34\x71\x02\x5d\xc1\xa0\xd3\x10"
22916 "\xc1\x8b\xbd\xf5\x66\x34\x6f\xdd",
22917 .addtlb = (unsigned char *)
22918 "\xf7\x9e\x6a\x56\x0e\x73\xe9\xd9\x7a\xd1\x69\xe0"
22919 "\x6f\x8c\x55\x1c\x44\xd1\xce\x6f\x28\xcc\xa4\x4d"
22920 "\xa8\xc0\x85\xd1\x5a\x0c\x59\x40",
22921 .addtllen = 32,
22922 .pers = NULL,
22923 .perslen = 0,
22924 }, {
22925 .entropy = (unsigned char *)
22926 "\x2a\x85\xa9\x8b\xd0\xda\x83\xd6\xad\xab\x9f\xbb"
22927 "\x54\x31\x15\x95\x1c\x4d\x49\x9f\x6a\x15\xf6\xe4"
22928 "\x15\x50\x88\x06\x29\x0d\xed\x8d\xb9\x6f\x96\xe1"
22929 "\x83\x9f\xf7\x88\xda\x84\xbf\x44\x28\xd9\x1d\xaa",
22930 .entropylen = 48,
22931 .expected = (unsigned char *)
22932 "\x2d\x55\xde\xc9\xed\x05\x47\x07\x3d\x04\xfc\x28"
22933 "\x0f\x92\xf0\x4d\xd8\x00\x32\x47\x0a\x1b\x1c\x4b"
22934 "\xef\xd9\x97\xa1\x17\x67\xda\x26\x6c\xfe\x76\x46"
22935 "\x6f\xbc\x6d\x82\x4e\x83\x8a\x98\x66\x6c\x01\xb6"
22936 "\xe6\x64\xe0\x08\x10\x6f\xd3\x5d\x90\xe7\x0d\x72"
22937 "\xa6\xa7\xe3\xbb\x98\x11\x12\x56\x23\xc2\x6d\xd1"
22938 "\xc8\xa8\x7a\x39\xf3\x34\xe3\xb8\xf8\x66\x00\x77"
22939 "\x7d\xcf\x3c\x3e\xfa\xc9\x0f\xaf\xe0\x24\xfa\xe9"
22940 "\x84\xf9\x6a\x01\xf6\x35\xdb\x5c\xab\x2a\xef\x4e"
22941 "\xac\xab\x55\xb8\x9b\xef\x98\x68\xaf\x51\xd8\x16"
22942 "\xa5\x5e\xae\xf9\x1e\xd2\xdb\xe6",
22943 .expectedlen = 128,
22944 .addtla = NULL,
22945 .addtlb = NULL,
22946 .addtllen = 0,
22947 .pers = (unsigned char *)
22948 "\xa8\x80\xec\x98\x30\x98\x15\xd2\xc6\xc4\x68\xf1"
22949 "\x3a\x1c\xbf\xce\x6a\x40\x14\xeb\x36\x99\x53\xda"
22950 "\x57\x6b\xce\xa4\x1c\x66\x3d\xbc",
22951 .perslen = 32,
22952 }, {
22953 .entropy = (unsigned char *)
22954 "\x69\xed\x82\xa9\xc5\x7b\xbf\xe5\x1d\x2f\xcb\x7a"
22955 "\xd3\x50\x7d\x96\xb4\xb9\x2b\x50\x77\x51\x27\x74"
22956 "\x33\x74\xba\xf1\x30\xdf\x8e\xdf\x87\x1d\x87\xbc"
22957 "\x96\xb2\xc3\xa7\xed\x60\x5e\x61\x4e\x51\x29\x1a",
22958 .entropylen = 48,
22959 .expected = (unsigned char *)
22960 "\xa5\x71\x24\x31\x11\xfe\x13\xe1\xa8\x24\x12\xfb"
22961 "\x37\xa1\x27\xa5\xab\x77\xa1\x9f\xae\x8f\xaf\x13"
22962 "\x93\xf7\x53\x85\x91\xb6\x1b\xab\xd4\x6b\xea\xb6"
22963 "\xef\xda\x4c\x90\x6e\xef\x5f\xde\xe1\xc7\x10\x36"
22964 "\xd5\x67\xbd\x14\xb6\x89\x21\x0c\xc9\x92\x65\x64"
22965 "\xd0\xf3\x23\xe0\x7f\xd1\xe8\x75\xc2\x85\x06\xea"
22966 "\xca\xc0\xcb\x79\x2d\x29\x82\xfc\xaa\x9a\xc6\x95"
22967 "\x7e\xdc\x88\x65\xba\xec\x0e\x16\x87\xec\xa3\x9e"
22968 "\xd8\x8c\x80\xab\x3a\x64\xe0\xcb\x0e\x45\x98\xdd"
22969 "\x7c\x6c\x6c\x26\x11\x13\xc8\xce\xa9\x47\xa6\x06"
22970 "\x57\xa2\x66\xbb\x2d\x7f\xf3\xc1",
22971 .expectedlen = 128,
22972 .addtla = (unsigned char *)
22973 "\x74\xd3\x6d\xda\xe8\xd6\x86\x5f\x63\x01\xfd\xf2"
22974 "\x7d\x06\x29\x6d\x94\xd1\x66\xf0\xd2\x72\x67\x4e"
22975 "\x77\xc5\x3d\x9e\x03\xe3\xa5\x78",
22976 .addtlb = (unsigned char *)
22977 "\xf6\xb6\x3d\xf0\x7c\x26\x04\xc5\x8b\xcd\x3e\x6a"
22978 "\x9f\x9c\x3a\x2e\xdb\x47\x87\xe5\x8e\x00\x5e\x2b"
22979 "\x74\x7f\xa6\xf6\x80\xcd\x9b\x21",
22980 .addtllen = 32,
22981 .pers = (unsigned char *)
22982 "\x74\xa6\xe0\x08\xf9\x27\xee\x1d\x6e\x3c\x28\x20"
22983 "\x87\xdd\xd7\x54\x31\x47\x78\x4b\xe5\x6d\xa3\x73"
22984 "\xa9\x65\xb1\x10\xc1\xdc\x77\x7c",
22985 .perslen = 32,
22986 },
22987};
22988
22989static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = {
22990 {
22991 .entropy = (unsigned char *)
22992 "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c"
22993 "\xbd\xc4\x6e\x68\x31\xe4\x4d\x34\xa4\xfb\x93\x5e"
22994 "\xe2\x85\xdd\x14\xb7\x1a\x74\x88\x65\x9b\xa9\x6c"
22995 "\x60\x1d\xc6\x9f\xc9\x02\x94\x08\x05\xec\x0c\xa8",
22996 .entropylen = 48,
22997 .expected = (unsigned char *)
22998 "\xe5\x28\xe9\xab\xf2\xde\xce\x54\xd4\x7c\x7e\x75"
22999 "\xe5\xfe\x30\x21\x49\xf8\x17\xea\x9f\xb4\xbe\xe6"
23000 "\xf4\x19\x96\x97\xd0\x4d\x5b\x89\xd5\x4f\xbb\x97"
23001 "\x8a\x15\xb5\xc4\x43\xc9\xec\x21\x03\x6d\x24\x60"
23002 "\xb6\xf7\x3e\xba\xd0\xdc\x2a\xba\x6e\x62\x4a\xbf"
23003 "\x07\x74\x5b\xc1\x07\x69\x4b\xb7\x54\x7b\xb0\x99"
23004 "\x5f\x70\xde\x25\xd6\xb2\x9e\x2d\x30\x11\xbb\x19"
23005 "\xd2\x76\x76\xc0\x71\x62\xc8\xb5\xcc\xde\x06\x68"
23006 "\x96\x1d\xf8\x68\x03\x48\x2c\xb3\x7e\xd6\xd5\xc0"
23007 "\xbb\x8d\x50\xcf\x1f\x50\xd4\x76\xaa\x04\x58\xbd"
23008 "\xab\xa8\x06\xf4\x8b\xe9\xdc\xb8",
23009 .expectedlen = 128,
23010 .addtla = NULL,
23011 .addtlb = NULL,
23012 .addtllen = 0,
23013 .pers = NULL,
23014 .perslen = 0,
23015 }, {
23016 .entropy = (unsigned char *)
23017 "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94"
23018 "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15"
23019 "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4"
23020 "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed",
23021 .entropylen = 48,
23022 .expected = (unsigned char *)
23023 "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5"
23024 "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf"
23025 "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d"
23026 "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6"
23027 "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16"
23028 "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62"
23029 "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d"
23030 "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4"
23031 "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec"
23032 "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f"
23033 "\x50\x9a\x8c\x85\x90\x87\x03\x9c",
23034 .expectedlen = 128,
23035 .addtla = (unsigned char *)
23036 "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d"
23037 "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf"
23038 "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b",
23039 .addtlb = (unsigned char *)
23040 "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9"
23041 "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14"
23042 "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0",
23043 .addtllen = 32,
23044 .pers = NULL,
23045 .perslen = 0,
23046 }, {
23047 .entropy = (unsigned char *)
23048 "\x8d\xf0\x13\xb4\xd1\x03\x52\x30\x73\x91\x7d\xdf"
23049 "\x6a\x86\x97\x93\x05\x9e\x99\x43\xfc\x86\x54\x54"
23050 "\x9e\x7a\xb2\x2f\x7c\x29\xf1\x22\xda\x26\x25\xaf"
23051 "\x2d\xdd\x4a\xbc\xce\x3c\xf4\xfa\x46\x59\xd8\x4e",
23052 .entropylen = 48,
23053 .expected = (unsigned char *)
23054 "\xb9\x1c\xba\x4c\xc8\x4f\xa2\x5d\xf8\x61\x0b\x81"
23055 "\xb6\x41\x40\x27\x68\xa2\x09\x72\x34\x93\x2e\x37"
23056 "\xd5\x90\xb1\x15\x4c\xbd\x23\xf9\x74\x52\xe3\x10"
23057 "\xe2\x91\xc4\x51\x46\x14\x7f\x0d\xa2\xd8\x17\x61"
23058 "\xfe\x90\xfb\xa6\x4f\x94\x41\x9c\x0f\x66\x2b\x28"
23059 "\xc1\xed\x94\xda\x48\x7b\xb7\xe7\x3e\xec\x79\x8f"
23060 "\xbc\xf9\x81\xb7\x91\xd1\xbe\x4f\x17\x7a\x89\x07"
23061 "\xaa\x3c\x40\x16\x43\xa5\xb6\x2b\x87\xb8\x9d\x66"
23062 "\xb3\xa6\x0e\x40\xd4\xa8\xe4\xe9\xd8\x2a\xf6\xd2"
23063 "\x70\x0e\x6f\x53\x5c\xdb\x51\xf7\x5c\x32\x17\x29"
23064 "\x10\x37\x41\x03\x0c\xcc\x3a\x56",
23065 .expectedlen = 128,
23066 .addtla = NULL,
23067 .addtlb = NULL,
23068 .addtllen = 0,
23069 .pers = (unsigned char *)
23070 "\xb5\x71\xe6\x6d\x7c\x33\x8b\xc0\x7b\x76\xad\x37"
23071 "\x57\xbb\x2f\x94\x52\xbf\x7e\x07\x43\x7a\xe8\x58"
23072 "\x1c\xe7\xbc\x7c\x3a\xc6\x51\xa9",
23073 .perslen = 32,
23074 }, {
23075 .entropy = (unsigned char *)
23076 "\xc2\xa5\x66\xa9\xa1\x81\x7b\x15\xc5\xc3\xb7\x78"
23077 "\x17\x7a\xc8\x7c\x24\xe7\x97\xbe\x0a\x84\x5f\x11"
23078 "\xc2\xfe\x39\x9d\xd3\x77\x32\xf2\xcb\x18\x94\xeb"
23079 "\x2b\x97\xb3\xc5\x6e\x62\x83\x29\x51\x6f\x86\xec",
23080 .entropylen = 48,
23081 .expected = (unsigned char *)
23082 "\xb3\xa3\x69\x8d\x77\x76\x99\xa0\xdd\x9f\xa3\xf0"
23083 "\xa9\xfa\x57\x83\x2d\x3c\xef\xac\x5d\xf2\x44\x37"
23084 "\xc6\xd7\x3a\x0f\xe4\x10\x40\xf1\x72\x90\x38\xae"
23085 "\xf1\xe9\x26\x35\x2e\xa5\x9d\xe1\x20\xbf\xb7\xb0"
23086 "\x73\x18\x3a\x34\x10\x6e\xfe\xd6\x27\x8f\xf8\xad"
23087 "\x84\x4b\xa0\x44\x81\x15\xdf\xdd\xf3\x31\x9a\x82"
23088 "\xde\x6b\xb1\x1d\x80\xbd\x87\x1a\x9a\xcd\x35\xc7"
23089 "\x36\x45\xe1\x27\x0f\xb9\xfe\x4f\xa8\x8e\xc0\xe4"
23090 "\x65\x40\x9e\xa0\xcb\xa8\x09\xfe\x2f\x45\xe0\x49"
23091 "\x43\xa2\xe3\x96\xbb\xb7\xdd\x2f\x4e\x07\x95\x30"
23092 "\x35\x24\xcc\x9c\xc5\xea\x54\xa1",
23093 .expectedlen = 128,
23094 .addtla = (unsigned char *)
23095 "\x41\x3d\xd8\x3f\xe5\x68\x35\xab\xd4\x78\xcb\x96"
23096 "\x93\xd6\x76\x35\x90\x1c\x40\x23\x9a\x26\x64\x62"
23097 "\xd3\x13\x3b\x83\xe4\x9c\x82\x0b",
23098 .addtlb = (unsigned char *)
23099 "\xd5\xc4\xa7\x1f\x9d\x6d\x95\xa1\xbe\xdf\x0b\xd2"
23100 "\x24\x7c\x27\x7d\x1f\x84\xa4\xe5\x7a\x4a\x88\x25"
23101 "\xb8\x2a\x2d\x09\x7d\xe6\x3e\xf1",
23102 .addtllen = 32,
23103 .pers = (unsigned char *)
23104 "\x13\xce\x4d\x8d\xd2\xdb\x97\x96\xf9\x41\x56\xc8"
23105 "\xe8\xf0\x76\x9b\x0a\xa1\xc8\x2c\x13\x23\xb6\x15"
23106 "\x36\x60\x3b\xca\x37\xc9\xee\x29",
23107 .perslen = 32,
23108 },
23109};
23110
23111static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = {
23112 {
23113 .entropy = (unsigned char *)
23114 "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9"
23115 "\x6c\x95\xb8\xf1\xc9\xa8\xf9\xcb\x24\x5a\x8b\x40"
23116 "\xf3\xa6\xe5\xa7\xfb\xd9\xd3\xc6\x8e\x27\x7b\xa9"
23117 "\xac\x9b\xbb\x00",
23118 .entropylen = 40,
23119 .expected = (unsigned char *)
23120 "\x8c\x2e\x72\xab\xfd\x9b\xb8\x28\x4d\xb7\x9e\x17"
23121 "\xa4\x3a\x31\x46\xcd\x76\x94\xe3\x52\x49\xfc\x33"
23122 "\x83\x91\x4a\x71\x17\xf4\x13\x68\xe6\xd4\xf1\x48"
23123 "\xff\x49\xbf\x29\x07\x6b\x50\x15\xc5\x9f\x45\x79"
23124 "\x45\x66\x2e\x3d\x35\x03\x84\x3f\x4a\xa5\xa3\xdf"
23125 "\x9a\x9d\xf1\x0d",
23126 .expectedlen = 64,
23127 .addtla = NULL,
23128 .addtlb = NULL,
23129 .addtllen = 0,
23130 .pers = NULL,
23131 .perslen = 0,
23132 },
23133};
23134
23135static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = {
23136 {
23137 .entropy = (unsigned char *)
23138 "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f"
23139 "\x21\x1d\x78\xa0\xb9\x38\x9a\x74\xe5\xbc\xcf\xec"
23140 "\xe8\xd7\x66\xaf\x1a\x6d\x3b\x14\x49\x6f\x25\xb0"
23141 "\xf1\x30\x1b\x4f\x50\x1b\xe3\x03\x80\xa1\x37\xeb",
23142 .entropylen = 48,
23143 .expected = (unsigned char *)
23144 "\x58\x62\xeb\x38\xbd\x55\x8d\xd9\x78\xa6\x96\xe6"
23145 "\xdf\x16\x47\x82\xdd\xd8\x87\xe7\xe9\xa6\xc9\xf3"
23146 "\xf1\xfb\xaf\xb7\x89\x41\xb5\x35\xa6\x49\x12\xdf"
23147 "\xd2\x24\xc6\xdc\x74\x54\xe5\x25\x0b\x3d\x97\x16"
23148 "\x5e\x16\x26\x0c\x2f\xaf\x1c\xc7\x73\x5c\xb7\x5f"
23149 "\xb4\xf0\x7e\x1d",
23150 .expectedlen = 64,
23151 .addtla = NULL,
23152 .addtlb = NULL,
23153 .addtllen = 0,
23154 .pers = NULL,
23155 .perslen = 0,
23156 },
23157};
23158
23159static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = {
23160 {
23161 .entropy = (unsigned char *)
23162 "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8"
23163 "\x64\xbf\xf2\x64\xa3\x9e\x98\xdb\x6c\x10\x78\x7f",
23164 .entropylen = 24,
23165 .expected = (unsigned char *)
23166 "\x2c\x14\x7e\x24\x11\x9a\xd8\xd4\xb2\xed\x61\xc1"
23167 "\x53\xd0\x50\xc9\x24\xff\x59\x75\x15\xf1\x17\x3a"
23168 "\x3d\xf4\x4b\x2c\x84\x28\xef\x89\x0e\xb9\xde\xf3"
23169 "\xe4\x78\x04\xb2\xfd\x9b\x35\x7f\xe1\x3f\x8a\x3e"
23170 "\x10\xc8\x67\x0a\xf9\xdf\x2d\x6c\x96\xfb\xb2\xb8"
23171 "\xcb\x2d\xd6\xb0",
23172 .expectedlen = 64,
23173 .addtla = NULL,
23174 .addtlb = NULL,
23175 .addtllen = 0,
23176 .pers = NULL,
23177 .perslen = 0,
23178 }, {
23179 .entropy = (unsigned char *)
23180 "\x71\xbd\xce\x35\x42\x7d\x20\xbf\x58\xcf\x17\x74"
23181 "\xce\x72\xd8\x33\x34\x50\x2d\x8f\x5b\x14\xc4\xdd",
23182 .entropylen = 24,
23183 .expected = (unsigned char *)
23184 "\x97\x33\xe8\x20\x12\xe2\x7b\xa1\x46\x8f\xf2\x34"
23185 "\xb3\xc9\xb6\x6b\x20\xb2\x4f\xee\x27\xd8\x0b\x21"
23186 "\x8c\xff\x63\x73\x69\x29\xfb\xf3\x85\xcd\x88\x8e"
23187 "\x43\x2c\x71\x8b\xa2\x55\xd2\x0f\x1d\x7f\xe3\xe1"
23188 "\x2a\xa3\xe9\x2c\x25\x89\xc7\x14\x52\x99\x56\xcc"
23189 "\xc3\xdf\xb3\x81",
23190 .expectedlen = 64,
23191 .addtla = (unsigned char *)
23192 "\x66\xef\x42\xd6\x9a\x8c\x3d\x6d\x4a\x9e\x95\xa6"
23193 "\x91\x4d\x81\x56",
23194 .addtlb = (unsigned char *)
23195 "\xe3\x18\x83\xd9\x4b\x5e\xc4\xcc\xaa\x61\x2f\xbb"
23196 "\x4a\x55\xd1\xc6",
23197 .addtllen = 16,
23198 .pers = NULL,
23199 .perslen = 0,
23200 }, {
23201 .entropy = (unsigned char *)
23202 "\xca\x4b\x1e\xfa\x75\xbd\x69\x36\x38\x73\xb8\xf9"
23203 "\xdb\x4d\x35\x0e\x47\xbf\x6c\x37\x72\xfd\xf7\xa9",
23204 .entropylen = 24,
23205 .expected = (unsigned char *)
23206 "\x59\xc3\x19\x79\x1b\xb1\xf3\x0e\xe9\x34\xae\x6e"
23207 "\x8b\x1f\xad\x1f\x74\xca\x25\x45\x68\xb8\x7f\x75"
23208 "\x12\xf8\xf2\xab\x4c\x23\x01\x03\x05\xe1\x70\xee"
23209 "\x75\xd8\xcb\xeb\x23\x4c\x7a\x23\x6e\x12\x27\xdb"
23210 "\x6f\x7a\xac\x3c\x44\xb7\x87\x4b\x65\x56\x74\x45"
23211 "\x34\x30\x0c\x3d",
23212 .expectedlen = 64,
23213 .addtla = NULL,
23214 .addtlb = NULL,
23215 .addtllen = 0,
23216 .pers = (unsigned char *)
23217 "\xeb\xaa\x60\x2c\x4d\xbe\x33\xff\x1b\xef\xbf\x0a"
23218 "\x0b\xc6\x97\x54",
23219 .perslen = 16,
23220 }, {
23221 .entropy = (unsigned char *)
23222 "\xc0\x70\x1f\x92\x50\x75\x8f\xcd\xf2\xbe\x73\x98"
23223 "\x80\xdb\x66\xeb\x14\x68\xb4\xa5\x87\x9c\x2d\xa6",
23224 .entropylen = 24,
23225 .expected = (unsigned char *)
23226 "\x97\xc0\xc0\xe5\xa0\xcc\xf2\x4f\x33\x63\x48\x8a"
23227 "\xdb\x13\x0a\x35\x89\xbf\x80\x65\x62\xee\x13\x95"
23228 "\x7c\x33\xd3\x7d\xf4\x07\x77\x7a\x2b\x65\x0b\x5f"
23229 "\x45\x5c\x13\xf1\x90\x77\x7f\xc5\x04\x3f\xcc\x1a"
23230 "\x38\xf8\xcd\x1b\xbb\xd5\x57\xd1\x4a\x4c\x2e\x8a"
23231 "\x2b\x49\x1e\x5c",
23232 .expectedlen = 64,
23233 .addtla = (unsigned char *)
23234 "\xf9\x01\xf8\x16\x7a\x1d\xff\xde\x8e\x3c\x83\xe2"
23235 "\x44\x85\xe7\xfe",
23236 .addtlb = (unsigned char *)
23237 "\x17\x1c\x09\x38\xc2\x38\x9f\x97\x87\x60\x55\xb4"
23238 "\x82\x16\x62\x7f",
23239 .addtllen = 16,
23240 .pers = (unsigned char *)
23241 "\x80\x08\xae\xe8\xe9\x69\x40\xc5\x08\x73\xc7\x9f"
23242 "\x8e\xcf\xe0\x02",
23243 .perslen = 16,
23244 },
23245};
23246
Herbert Xuda7f0332008-07-31 17:08:25 +080023247/* Cast5 test vectors from RFC 2144 */
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023248#define CAST5_ENC_TEST_VECTORS 4
23249#define CAST5_DEC_TEST_VECTORS 4
23250#define CAST5_CBC_ENC_TEST_VECTORS 1
23251#define CAST5_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030023252#define CAST5_CTR_ENC_TEST_VECTORS 2
23253#define CAST5_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080023254
23255static struct cipher_testvec cast5_enc_tv_template[] = {
23256 {
23257 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
23258 "\x23\x45\x67\x89\x34\x56\x78\x9a",
23259 .klen = 16,
23260 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23261 .ilen = 8,
23262 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
23263 .rlen = 8,
23264 }, {
23265 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
23266 "\x23\x45",
23267 .klen = 10,
23268 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23269 .ilen = 8,
23270 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
23271 .rlen = 8,
23272 }, {
23273 .key = "\x01\x23\x45\x67\x12",
23274 .klen = 5,
23275 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23276 .ilen = 8,
23277 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
23278 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023279 }, { /* Generated from TF test vectors */
23280 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23281 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23282 .klen = 16,
23283 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23284 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23285 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23286 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23287 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23288 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23289 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23290 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23291 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23292 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23293 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23294 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23295 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23296 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23297 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23298 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23299 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23300 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23301 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23302 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23303 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23304 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23305 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23306 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23307 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23308 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23309 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23310 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23311 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23312 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23313 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23314 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23315 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23316 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23317 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23318 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23319 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23320 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23321 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23322 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23323 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23324 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23325 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23326 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23327 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23328 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23329 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23330 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23331 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23332 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23333 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23334 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23335 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23336 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23337 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23338 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23339 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23340 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23341 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23342 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23343 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23344 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23345 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23346 .ilen = 496,
23347 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
23348 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
23349 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
23350 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
23351 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
23352 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
23353 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
23354 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
23355 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
23356 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
23357 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
23358 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
23359 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
23360 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
23361 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
23362 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
23363 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
23364 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
23365 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
23366 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
23367 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
23368 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
23369 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
23370 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
23371 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
23372 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
23373 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
23374 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
23375 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
23376 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
23377 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
23378 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
23379 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
23380 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
23381 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
23382 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
23383 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
23384 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
23385 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
23386 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
23387 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
23388 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
23389 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
23390 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
23391 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
23392 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
23393 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
23394 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
23395 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
23396 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
23397 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
23398 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
23399 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
23400 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
23401 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
23402 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
23403 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
23404 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
23405 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
23406 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
23407 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
23408 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
23409 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023410 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023411 .np = 3,
23412 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080023413 },
23414};
23415
23416static struct cipher_testvec cast5_dec_tv_template[] = {
23417 {
23418 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
23419 "\x23\x45\x67\x89\x34\x56\x78\x9a",
23420 .klen = 16,
23421 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
23422 .ilen = 8,
23423 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23424 .rlen = 8,
23425 }, {
23426 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
23427 "\x23\x45",
23428 .klen = 10,
23429 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
23430 .ilen = 8,
23431 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23432 .rlen = 8,
23433 }, {
23434 .key = "\x01\x23\x45\x67\x12",
23435 .klen = 5,
23436 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
23437 .ilen = 8,
23438 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
23439 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023440 }, { /* Generated from TF test vectors */
23441 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23442 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23443 .klen = 16,
23444 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23445 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
23446 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
23447 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
23448 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
23449 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
23450 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
23451 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
23452 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
23453 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
23454 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
23455 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
23456 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
23457 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
23458 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
23459 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
23460 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
23461 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
23462 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
23463 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
23464 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
23465 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
23466 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
23467 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
23468 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
23469 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
23470 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
23471 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
23472 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
23473 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
23474 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
23475 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
23476 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
23477 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
23478 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
23479 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
23480 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
23481 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
23482 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
23483 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
23484 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
23485 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
23486 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
23487 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
23488 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
23489 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
23490 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
23491 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
23492 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
23493 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
23494 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
23495 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
23496 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
23497 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
23498 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
23499 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
23500 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
23501 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
23502 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
23503 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
23504 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
23505 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
23506 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
23507 .ilen = 496,
23508 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23509 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23510 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23511 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23512 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23513 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23514 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23515 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23516 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23517 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23518 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23519 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23520 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23521 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23522 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23523 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23524 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23525 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23526 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23527 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23528 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23529 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23530 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23531 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23532 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23533 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23534 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23535 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23536 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23537 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23538 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23539 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23540 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23541 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23542 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23543 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23544 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23545 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23546 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23547 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23548 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23549 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23550 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23551 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23552 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23553 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23554 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23555 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23556 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23557 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23558 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23559 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23560 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23561 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23562 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23563 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23564 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23565 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23566 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23567 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23568 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23569 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23570 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023571 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023572 .np = 3,
23573 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023574 },
23575};
23576
23577static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
23578 { /* Generated from TF test vectors */
23579 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23580 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23581 .klen = 16,
23582 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23583 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23584 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23585 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23586 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23587 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23588 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23589 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23590 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23591 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23592 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23593 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23594 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23595 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23596 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23597 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23598 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23599 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23600 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23601 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23602 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23603 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23604 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23605 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23606 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23607 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23608 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23609 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23610 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23611 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23612 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23613 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23614 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23615 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23616 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23617 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23618 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23619 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23620 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23621 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23622 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23623 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23624 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23625 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23626 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23627 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23628 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23629 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23630 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23631 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23632 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23633 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23634 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23635 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23636 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23637 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23638 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23639 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23640 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23641 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23642 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23643 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23644 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23645 .ilen = 496,
23646 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
23647 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
23648 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
23649 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
23650 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
23651 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
23652 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
23653 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
23654 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
23655 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
23656 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
23657 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
23658 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
23659 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
23660 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
23661 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
23662 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
23663 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
23664 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
23665 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
23666 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
23667 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
23668 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
23669 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
23670 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
23671 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
23672 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
23673 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
23674 "\x90\x12\x37\x49\x27\x98\x69\x18"
23675 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
23676 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
23677 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
23678 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
23679 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
23680 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
23681 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
23682 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
23683 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
23684 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
23685 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
23686 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
23687 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
23688 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
23689 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
23690 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
23691 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
23692 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
23693 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
23694 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
23695 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
23696 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
23697 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
23698 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
23699 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
23700 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
23701 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
23702 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
23703 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
23704 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
23705 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
23706 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
23707 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
23708 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023709 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023710 .np = 3,
23711 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023712 },
23713};
23714
23715static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
23716 { /* Generated from TF test vectors */
23717 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23718 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23719 .klen = 16,
23720 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23721 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
23722 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
23723 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
23724 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
23725 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
23726 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
23727 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
23728 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
23729 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
23730 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
23731 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
23732 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
23733 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
23734 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
23735 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
23736 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
23737 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
23738 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
23739 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
23740 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
23741 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
23742 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
23743 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
23744 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
23745 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
23746 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
23747 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
23748 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
23749 "\x90\x12\x37\x49\x27\x98\x69\x18"
23750 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
23751 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
23752 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
23753 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
23754 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
23755 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
23756 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
23757 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
23758 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
23759 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
23760 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
23761 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
23762 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
23763 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
23764 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
23765 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
23766 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
23767 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
23768 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
23769 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
23770 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
23771 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
23772 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
23773 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
23774 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
23775 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
23776 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
23777 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
23778 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
23779 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
23780 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
23781 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
23782 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
23783 .ilen = 496,
23784 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23785 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23786 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23787 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23788 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23789 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23790 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23791 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23792 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23793 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23794 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23795 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23796 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23797 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23798 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23799 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23800 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23801 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23802 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23803 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23804 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23805 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23806 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23807 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23808 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23809 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23810 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23811 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23812 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23813 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23814 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23815 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23816 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23817 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23818 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23819 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23820 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23821 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23822 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23823 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23824 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23825 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23826 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23827 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23828 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23829 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23830 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23831 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23832 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23833 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23834 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23835 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23836 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23837 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23838 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23839 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23840 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23841 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23842 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23843 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23844 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23845 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23846 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023847 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023848 .np = 3,
23849 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023850 },
23851};
23852
23853static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
23854 { /* Generated from TF test vectors */
23855 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23856 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23857 .klen = 16,
23858 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23859 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23860 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030023861 "\x3A",
23862 .ilen = 17,
23863 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
23864 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
23865 "\x0C",
23866 .rlen = 17,
23867 }, { /* Generated from TF test vectors */
23868 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23869 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
23870 .klen = 16,
23871 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
23872 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23873 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020023874 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23875 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23876 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23877 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23878 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23879 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23880 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23881 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23882 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23883 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23884 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23885 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23886 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23887 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23888 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23889 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23890 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23891 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23892 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23893 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23894 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23895 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23896 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23897 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23898 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23899 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23900 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23901 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23902 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23903 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23904 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23905 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23906 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23907 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23908 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23909 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23910 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23911 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23912 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23913 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23914 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23915 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23916 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23917 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23918 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23919 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23920 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23921 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23922 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23923 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23924 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23925 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23926 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23927 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23928 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23929 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23930 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23931 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23932 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23933 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23934 .ilen = 496,
23935 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
23936 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
23937 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
23938 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
23939 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
23940 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
23941 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
23942 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
23943 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
23944 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
23945 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
23946 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
23947 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
23948 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
23949 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
23950 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
23951 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
23952 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
23953 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
23954 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
23955 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
23956 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
23957 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
23958 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
23959 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
23960 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
23961 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
23962 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
23963 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
23964 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
23965 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
23966 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
23967 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
23968 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
23969 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
23970 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
23971 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
23972 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
23973 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
23974 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
23975 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
23976 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
23977 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
23978 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
23979 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
23980 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
23981 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
23982 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
23983 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
23984 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
23985 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
23986 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
23987 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
23988 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
23989 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
23990 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
23991 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
23992 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
23993 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
23994 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
23995 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
23996 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
23997 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023998 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020023999 .np = 3,
24000 .tap = { 496 - 20, 4, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024001 },
24002};
24003
24004static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
24005 { /* Generated from TF test vectors */
24006 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24007 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24008 .klen = 16,
24009 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24010 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
24011 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030024012 "\x0C",
24013 .ilen = 17,
24014 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24015 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24016 "\x3A",
24017 .rlen = 17,
24018 }, { /* Generated from TF test vectors */
24019 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24020 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24021 .klen = 16,
24022 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24023 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
24024 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020024025 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
24026 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
24027 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
24028 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
24029 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
24030 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
24031 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
24032 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
24033 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
24034 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
24035 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
24036 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
24037 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
24038 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
24039 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
24040 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
24041 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
24042 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
24043 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
24044 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
24045 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
24046 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
24047 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
24048 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
24049 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
24050 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
24051 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
24052 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
24053 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
24054 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
24055 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
24056 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
24057 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
24058 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
24059 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
24060 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
24061 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
24062 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
24063 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
24064 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
24065 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
24066 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
24067 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
24068 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
24069 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
24070 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
24071 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
24072 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
24073 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
24074 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
24075 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
24076 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
24077 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
24078 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
24079 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
24080 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
24081 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
24082 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
24083 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
24084 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
24085 .ilen = 496,
24086 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24087 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24088 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24089 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24090 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
24091 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24092 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24093 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24094 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24095 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24096 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24097 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24098 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24099 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24100 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24101 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24102 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24103 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24104 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24105 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24106 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24107 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24108 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24109 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24110 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24111 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24112 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24113 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24114 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24115 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24116 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24117 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24118 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24119 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24120 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24121 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24122 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24123 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24124 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24125 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24126 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24127 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24128 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24129 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24130 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24131 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24132 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24133 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24134 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24135 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24136 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24137 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24138 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24139 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24140 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24141 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24142 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24143 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24144 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24145 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24146 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
24147 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
24148 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024149 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020024150 .np = 3,
24151 .tap = { 496 - 20, 4, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080024152 },
24153};
24154
24155/*
24156 * ARC4 test vectors from OpenSSL
24157 */
24158#define ARC4_ENC_TEST_VECTORS 7
24159#define ARC4_DEC_TEST_VECTORS 7
24160
24161static struct cipher_testvec arc4_enc_tv_template[] = {
24162 {
24163 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24164 .klen = 8,
24165 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24166 .ilen = 8,
24167 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
24168 .rlen = 8,
24169 }, {
24170 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24171 .klen = 8,
24172 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
24173 .ilen = 8,
24174 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
24175 .rlen = 8,
24176 }, {
24177 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
24178 .klen = 8,
24179 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
24180 .ilen = 8,
24181 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
24182 .rlen = 8,
24183 }, {
24184 .key = "\xef\x01\x23\x45",
24185 .klen = 4,
24186 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
24187 "\x00\x00\x00\x00\x00\x00\x00\x00"
24188 "\x00\x00\x00\x00",
24189 .ilen = 20,
24190 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
24191 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
24192 "\x36\xb6\x78\x58",
24193 .rlen = 20,
24194 }, {
24195 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24196 .klen = 8,
24197 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24198 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24199 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24200 "\x12\x34\x56\x78",
24201 .ilen = 28,
24202 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
24203 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
24204 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
24205 "\x40\x01\x1e\xcf",
24206 .rlen = 28,
24207 }, {
24208 .key = "\xef\x01\x23\x45",
24209 .klen = 4,
24210 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
24211 "\x00\x00",
24212 .ilen = 10,
24213 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
24214 "\xbd\x61",
24215 .rlen = 10,
24216 }, {
24217 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
24218 "\x00\x00\x00\x00\x00\x00\x00\x00",
24219 .klen = 16,
24220 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
24221 .ilen = 8,
24222 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
24223 .rlen = 8,
24224 },
24225};
24226
24227static struct cipher_testvec arc4_dec_tv_template[] = {
24228 {
24229 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24230 .klen = 8,
24231 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
24232 .ilen = 8,
24233 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24234 .rlen = 8,
24235 }, {
24236 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24237 .klen = 8,
24238 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
24239 .ilen = 8,
24240 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
24241 .rlen = 8,
24242 }, {
24243 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
24244 .klen = 8,
24245 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
24246 .ilen = 8,
24247 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
24248 .rlen = 8,
24249 }, {
24250 .key = "\xef\x01\x23\x45",
24251 .klen = 4,
24252 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
24253 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
24254 "\x36\xb6\x78\x58",
24255 .ilen = 20,
24256 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
24257 "\x00\x00\x00\x00\x00\x00\x00\x00"
24258 "\x00\x00\x00\x00",
24259 .rlen = 20,
24260 }, {
24261 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24262 .klen = 8,
24263 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
24264 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
24265 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
24266 "\x40\x01\x1e\xcf",
24267 .ilen = 28,
24268 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24269 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24270 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
24271 "\x12\x34\x56\x78",
24272 .rlen = 28,
24273 }, {
24274 .key = "\xef\x01\x23\x45",
24275 .klen = 4,
24276 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
24277 "\xbd\x61",
24278 .ilen = 10,
24279 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
24280 "\x00\x00",
24281 .rlen = 10,
24282 }, {
24283 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
24284 "\x00\x00\x00\x00\x00\x00\x00\x00",
24285 .klen = 16,
24286 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
24287 .ilen = 8,
24288 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
24289 .rlen = 8,
24290 },
24291};
24292
24293/*
24294 * TEA test vectors
24295 */
24296#define TEA_ENC_TEST_VECTORS 4
24297#define TEA_DEC_TEST_VECTORS 4
24298
24299static struct cipher_testvec tea_enc_tv_template[] = {
24300 {
24301 .key = zeroed_string,
24302 .klen = 16,
24303 .input = zeroed_string,
24304 .ilen = 8,
24305 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
24306 .rlen = 8,
24307 }, {
24308 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24309 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24310 .klen = 16,
24311 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24312 .ilen = 8,
24313 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
24314 .rlen = 8,
24315 }, {
24316 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24317 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24318 .klen = 16,
24319 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24320 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24321 .ilen = 16,
24322 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
24323 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
24324 .rlen = 16,
24325 }, {
24326 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24327 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24328 .klen = 16,
24329 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
24330 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24331 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24332 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24333 .ilen = 32,
24334 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
24335 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
24336 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
24337 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
24338 .rlen = 32,
24339 }
24340};
24341
24342static struct cipher_testvec tea_dec_tv_template[] = {
24343 {
24344 .key = zeroed_string,
24345 .klen = 16,
24346 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
24347 .ilen = 8,
24348 .result = zeroed_string,
24349 .rlen = 8,
24350 }, {
24351 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24352 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24353 .klen = 16,
24354 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
24355 .ilen = 8,
24356 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24357 .rlen = 8,
24358 }, {
24359 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24360 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24361 .klen = 16,
24362 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
24363 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
24364 .ilen = 16,
24365 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24366 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24367 .rlen = 16,
24368 }, {
24369 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24370 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24371 .klen = 16,
24372 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
24373 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
24374 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
24375 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
24376 .ilen = 32,
24377 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
24378 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24379 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24380 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24381 .rlen = 32,
24382 }
24383};
24384
24385/*
24386 * XTEA test vectors
24387 */
24388#define XTEA_ENC_TEST_VECTORS 4
24389#define XTEA_DEC_TEST_VECTORS 4
24390
24391static struct cipher_testvec xtea_enc_tv_template[] = {
24392 {
24393 .key = zeroed_string,
24394 .klen = 16,
24395 .input = zeroed_string,
24396 .ilen = 8,
24397 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
24398 .rlen = 8,
24399 }, {
24400 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24401 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24402 .klen = 16,
24403 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24404 .ilen = 8,
24405 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
24406 .rlen = 8,
24407 }, {
24408 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24409 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24410 .klen = 16,
24411 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24412 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24413 .ilen = 16,
24414 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
24415 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
24416 .rlen = 16,
24417 }, {
24418 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24419 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24420 .klen = 16,
24421 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
24422 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24423 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24424 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24425 .ilen = 32,
24426 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
24427 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
24428 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
24429 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
24430 .rlen = 32,
24431 }
24432};
24433
24434static struct cipher_testvec xtea_dec_tv_template[] = {
24435 {
24436 .key = zeroed_string,
24437 .klen = 16,
24438 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
24439 .ilen = 8,
24440 .result = zeroed_string,
24441 .rlen = 8,
24442 }, {
24443 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24444 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24445 .klen = 16,
24446 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
24447 .ilen = 8,
24448 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24449 .rlen = 8,
24450 }, {
24451 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24452 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24453 .klen = 16,
24454 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
24455 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
24456 .ilen = 16,
24457 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24458 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24459 .rlen = 16,
24460 }, {
24461 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24462 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24463 .klen = 16,
24464 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
24465 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
24466 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
24467 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
24468 .ilen = 32,
24469 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
24470 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24471 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24472 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24473 .rlen = 32,
24474 }
24475};
24476
24477/*
24478 * KHAZAD test vectors.
24479 */
24480#define KHAZAD_ENC_TEST_VECTORS 5
24481#define KHAZAD_DEC_TEST_VECTORS 5
24482
24483static struct cipher_testvec khazad_enc_tv_template[] = {
24484 {
24485 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
24486 "\x00\x00\x00\x00\x00\x00\x00\x00",
24487 .klen = 16,
24488 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
24489 .ilen = 8,
24490 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
24491 .rlen = 8,
24492 }, {
24493 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
24494 "\x38\x38\x38\x38\x38\x38\x38\x38",
24495 .klen = 16,
24496 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
24497 .ilen = 8,
24498 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
24499 .rlen = 8,
24500 }, {
24501 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
24502 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
24503 .klen = 16,
24504 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
24505 .ilen = 8,
24506 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
24507 .rlen = 8,
24508 }, {
24509 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24510 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24511 .klen = 16,
24512 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24513 .ilen = 8,
24514 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
24515 .rlen = 8,
24516 }, {
24517 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24518 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24519 .klen = 16,
24520 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24521 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24522 .ilen = 16,
24523 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
24524 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
24525 .rlen = 16,
24526 },
24527};
24528
24529static struct cipher_testvec khazad_dec_tv_template[] = {
24530 {
24531 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
24532 "\x00\x00\x00\x00\x00\x00\x00\x00",
24533 .klen = 16,
24534 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
24535 .ilen = 8,
24536 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
24537 .rlen = 8,
24538 }, {
24539 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
24540 "\x38\x38\x38\x38\x38\x38\x38\x38",
24541 .klen = 16,
24542 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
24543 .ilen = 8,
24544 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
24545 .rlen = 8,
24546 }, {
24547 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
24548 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
24549 .klen = 16,
24550 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
24551 .ilen = 8,
24552 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
24553 .rlen = 8,
24554 }, {
24555 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24556 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24557 .klen = 16,
24558 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
24559 .ilen = 8,
24560 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24561 .rlen = 8,
24562 }, {
24563 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24564 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24565 .klen = 16,
24566 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
24567 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
24568 .ilen = 16,
24569 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
24570 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
24571 .rlen = 16,
24572 },
24573};
24574
24575/*
24576 * Anubis test vectors.
24577 */
24578
24579#define ANUBIS_ENC_TEST_VECTORS 5
24580#define ANUBIS_DEC_TEST_VECTORS 5
24581#define ANUBIS_CBC_ENC_TEST_VECTORS 2
24582#define ANUBIS_CBC_DEC_TEST_VECTORS 2
24583
24584static struct cipher_testvec anubis_enc_tv_template[] = {
24585 {
24586 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24587 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24588 .klen = 16,
24589 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24590 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24591 .ilen = 16,
24592 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
24593 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
24594 .rlen = 16,
24595 }, {
24596
24597 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
24598 "\x03\x03\x03\x03\x03\x03\x03\x03"
24599 "\x03\x03\x03\x03",
24600 .klen = 20,
24601 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
24602 "\x03\x03\x03\x03\x03\x03\x03\x03",
24603 .ilen = 16,
24604 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
24605 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
24606 .rlen = 16,
24607 }, {
24608 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
24609 "\x24\x24\x24\x24\x24\x24\x24\x24"
24610 "\x24\x24\x24\x24\x24\x24\x24\x24"
24611 "\x24\x24\x24\x24",
24612 .klen = 28,
24613 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
24614 "\x24\x24\x24\x24\x24\x24\x24\x24",
24615 .ilen = 16,
24616 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
24617 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
24618 .rlen = 16,
24619 }, {
24620 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
24621 "\x25\x25\x25\x25\x25\x25\x25\x25"
24622 "\x25\x25\x25\x25\x25\x25\x25\x25"
24623 "\x25\x25\x25\x25\x25\x25\x25\x25",
24624 .klen = 32,
24625 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
24626 "\x25\x25\x25\x25\x25\x25\x25\x25",
24627 .ilen = 16,
24628 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
24629 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
24630 .rlen = 16,
24631 }, {
24632 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
24633 "\x35\x35\x35\x35\x35\x35\x35\x35"
24634 "\x35\x35\x35\x35\x35\x35\x35\x35"
24635 "\x35\x35\x35\x35\x35\x35\x35\x35"
24636 "\x35\x35\x35\x35\x35\x35\x35\x35",
24637 .klen = 40,
24638 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
24639 "\x35\x35\x35\x35\x35\x35\x35\x35",
24640 .ilen = 16,
24641 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
24642 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
24643 .rlen = 16,
24644 },
24645};
24646
24647static struct cipher_testvec anubis_dec_tv_template[] = {
24648 {
24649 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24650 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24651 .klen = 16,
24652 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
24653 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
24654 .ilen = 16,
24655 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24656 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24657 .rlen = 16,
24658 }, {
24659
24660 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
24661 "\x03\x03\x03\x03\x03\x03\x03\x03"
24662 "\x03\x03\x03\x03",
24663 .klen = 20,
24664 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
24665 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
24666 .ilen = 16,
24667 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
24668 "\x03\x03\x03\x03\x03\x03\x03\x03",
24669 .rlen = 16,
24670 }, {
24671 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
24672 "\x24\x24\x24\x24\x24\x24\x24\x24"
24673 "\x24\x24\x24\x24\x24\x24\x24\x24"
24674 "\x24\x24\x24\x24",
24675 .klen = 28,
24676 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
24677 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
24678 .ilen = 16,
24679 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
24680 "\x24\x24\x24\x24\x24\x24\x24\x24",
24681 .rlen = 16,
24682 }, {
24683 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
24684 "\x25\x25\x25\x25\x25\x25\x25\x25"
24685 "\x25\x25\x25\x25\x25\x25\x25\x25"
24686 "\x25\x25\x25\x25\x25\x25\x25\x25",
24687 .klen = 32,
24688 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
24689 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
24690 .ilen = 16,
24691 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
24692 "\x25\x25\x25\x25\x25\x25\x25\x25",
24693 .rlen = 16,
24694 }, {
24695 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
24696 "\x35\x35\x35\x35\x35\x35\x35\x35"
24697 "\x35\x35\x35\x35\x35\x35\x35\x35"
24698 "\x35\x35\x35\x35\x35\x35\x35\x35"
24699 "\x35\x35\x35\x35\x35\x35\x35\x35",
24700 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
24701 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
24702 .klen = 40,
24703 .ilen = 16,
24704 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
24705 "\x35\x35\x35\x35\x35\x35\x35\x35",
24706 .rlen = 16,
24707 },
24708};
24709
24710static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
24711 {
24712 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24713 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24714 .klen = 16,
24715 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24716 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24717 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24718 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24719 .ilen = 32,
24720 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
24721 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
24722 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
24723 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
24724 .rlen = 32,
24725 }, {
24726 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
24727 "\x35\x35\x35\x35\x35\x35\x35\x35"
24728 "\x35\x35\x35\x35\x35\x35\x35\x35"
24729 "\x35\x35\x35\x35\x35\x35\x35\x35"
24730 "\x35\x35\x35\x35\x35\x35\x35\x35",
24731 .klen = 40,
24732 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
24733 "\x35\x35\x35\x35\x35\x35\x35\x35"
24734 "\x35\x35\x35\x35\x35\x35\x35\x35"
24735 "\x35\x35\x35\x35\x35\x35\x35\x35",
24736 .ilen = 32,
24737 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
24738 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
24739 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
24740 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
24741 .rlen = 32,
24742 },
24743};
24744
24745static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
24746 {
24747 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24748 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24749 .klen = 16,
24750 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
24751 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
24752 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
24753 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
24754 .ilen = 32,
24755 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24756 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24757 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
24758 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
24759 .rlen = 32,
24760 }, {
24761 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
24762 "\x35\x35\x35\x35\x35\x35\x35\x35"
24763 "\x35\x35\x35\x35\x35\x35\x35\x35"
24764 "\x35\x35\x35\x35\x35\x35\x35\x35"
24765 "\x35\x35\x35\x35\x35\x35\x35\x35",
24766 .klen = 40,
24767 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
24768 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
24769 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
24770 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
24771 .ilen = 32,
24772 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
24773 "\x35\x35\x35\x35\x35\x35\x35\x35"
24774 "\x35\x35\x35\x35\x35\x35\x35\x35"
24775 "\x35\x35\x35\x35\x35\x35\x35\x35",
24776 .rlen = 32,
24777 },
24778};
24779
24780/*
24781 * XETA test vectors
24782 */
24783#define XETA_ENC_TEST_VECTORS 4
24784#define XETA_DEC_TEST_VECTORS 4
24785
24786static struct cipher_testvec xeta_enc_tv_template[] = {
24787 {
24788 .key = zeroed_string,
24789 .klen = 16,
24790 .input = zeroed_string,
24791 .ilen = 8,
24792 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
24793 .rlen = 8,
24794 }, {
24795 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24796 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24797 .klen = 16,
24798 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24799 .ilen = 8,
24800 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
24801 .rlen = 8,
24802 }, {
24803 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24804 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24805 .klen = 16,
24806 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24807 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24808 .ilen = 16,
24809 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
24810 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
24811 .rlen = 16,
24812 }, {
24813 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24814 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24815 .klen = 16,
24816 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
24817 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24818 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24819 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24820 .ilen = 32,
24821 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
24822 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
24823 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
24824 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
24825 .rlen = 32,
24826 }
24827};
24828
24829static struct cipher_testvec xeta_dec_tv_template[] = {
24830 {
24831 .key = zeroed_string,
24832 .klen = 16,
24833 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
24834 .ilen = 8,
24835 .result = zeroed_string,
24836 .rlen = 8,
24837 }, {
24838 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
24839 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
24840 .klen = 16,
24841 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
24842 .ilen = 8,
24843 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
24844 .rlen = 8,
24845 }, {
24846 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
24847 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
24848 .klen = 16,
24849 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
24850 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
24851 .ilen = 16,
24852 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
24853 "\x65\x73\x74\x5f\x76\x65\x63\x74",
24854 .rlen = 16,
24855 }, {
24856 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
24857 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
24858 .klen = 16,
24859 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
24860 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
24861 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
24862 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
24863 .ilen = 32,
24864 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
24865 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
24866 "\x79\x6f\x75\x21\x21\x21\x20\x72"
24867 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
24868 .rlen = 32,
24869 }
24870};
24871
24872/*
24873 * FCrypt test vectors
24874 */
24875#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
24876#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
24877
24878static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
24879 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
24880 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
24881 .klen = 8,
24882 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24883 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
24884 .ilen = 8,
24885 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
24886 .rlen = 8,
24887 }, {
24888 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
24889 .klen = 8,
24890 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24891 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
24892 .ilen = 8,
24893 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
24894 .rlen = 8,
24895 }, { /* From Arla */
24896 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24897 .klen = 8,
24898 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24899 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
24900 .ilen = 48,
24901 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
24902 "\xee\xac\x98\x62\x44\x51\xe4\x84"
24903 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
24904 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
24905 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
24906 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
24907 .rlen = 48,
24908 }, {
24909 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24910 .klen = 8,
24911 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24912 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
24913 .ilen = 48,
24914 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
24915 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
24916 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
24917 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
24918 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
24919 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
24920 .rlen = 48,
24921 }, { /* split-page version */
24922 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24923 .klen = 8,
24924 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24925 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
24926 .ilen = 48,
24927 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
24928 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
24929 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
24930 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
24931 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
24932 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
24933 .rlen = 48,
24934 .np = 2,
24935 .tap = { 20, 28 },
24936 }
24937};
24938
24939static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
24940 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
24941 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
24942 .klen = 8,
24943 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24944 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
24945 .ilen = 8,
24946 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
24947 .rlen = 8,
24948 }, {
24949 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
24950 .klen = 8,
24951 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24952 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
24953 .ilen = 8,
24954 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
24955 .rlen = 8,
24956 }, { /* From Arla */
24957 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24958 .klen = 8,
24959 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24960 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
24961 "\xee\xac\x98\x62\x44\x51\xe4\x84"
24962 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
24963 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
24964 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
24965 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
24966 .ilen = 48,
24967 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
24968 .rlen = 48,
24969 }, {
24970 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24971 .klen = 8,
24972 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24973 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
24974 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
24975 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
24976 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
24977 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
24978 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
24979 .ilen = 48,
24980 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
24981 .rlen = 48,
24982 }, { /* split-page version */
24983 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
24984 .klen = 8,
24985 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
24986 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
24987 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
24988 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
24989 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
24990 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
24991 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
24992 .ilen = 48,
24993 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
24994 .rlen = 48,
24995 .np = 2,
24996 .tap = { 20, 28 },
24997 }
24998};
24999
25000/*
25001 * CAMELLIA test vectors.
25002 */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025003#define CAMELLIA_ENC_TEST_VECTORS 4
25004#define CAMELLIA_DEC_TEST_VECTORS 4
25005#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
25006#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
25007#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
25008#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
25009#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
25010#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
25011#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
25012#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080025013
25014static struct cipher_testvec camellia_enc_tv_template[] = {
25015 {
25016 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25017 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25018 .klen = 16,
25019 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25020 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25021 .ilen = 16,
25022 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
25023 "\x08\x57\x06\x56\x48\xea\xbe\x43",
25024 .rlen = 16,
25025 }, {
25026 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25027 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
25028 "\x00\x11\x22\x33\x44\x55\x66\x77",
25029 .klen = 24,
25030 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25031 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25032 .ilen = 16,
25033 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
25034 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
25035 .rlen = 16,
25036 }, {
25037 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25038 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
25039 "\x00\x11\x22\x33\x44\x55\x66\x77"
25040 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
25041 .klen = 32,
25042 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25043 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25044 .ilen = 16,
25045 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
25046 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
25047 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025048 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025049 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
25050 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
25051 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
25052 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
25053 .klen = 32,
25054 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25055 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25056 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25057 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25058 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025059 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25060 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25061 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25062 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25063 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25064 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25065 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25066 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25067 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25068 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25069 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25070 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25071 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25072 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25073 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25074 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25075 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25076 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25077 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25078 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25079 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25080 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25081 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25082 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25083 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25084 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25085 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25086 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25087 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25088 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25089 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25090 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25091 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25092 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25093 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25094 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25095 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25096 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25097 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25098 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25099 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25100 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25101 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25102 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25103 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25104 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25105 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25106 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25107 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25108 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25109 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25110 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25111 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25112 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25113 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25114 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025115 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25116 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25117 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25118 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25119 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25120 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25121 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25122 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25123 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25124 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25125 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25126 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25127 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25128 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25129 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25130 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25131 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25132 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25133 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25134 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25135 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25136 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25137 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25138 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25139 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25140 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25141 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25142 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25143 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25144 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25145 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25146 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25147 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25148 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25149 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25150 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25151 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25152 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25153 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25154 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25155 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25156 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25157 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25158 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25159 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25160 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25161 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25162 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25163 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25164 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25165 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25166 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25167 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25168 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25169 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25170 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25171 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25172 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25173 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25174 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25175 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25176 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25177 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25178 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25179 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
25180 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025181 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
25182 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
25183 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
25184 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
25185 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025186 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
25187 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
25188 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
25189 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
25190 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
25191 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
25192 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
25193 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
25194 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
25195 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
25196 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
25197 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
25198 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
25199 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
25200 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
25201 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
25202 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
25203 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
25204 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
25205 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
25206 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
25207 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
25208 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
25209 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
25210 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
25211 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
25212 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
25213 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
25214 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
25215 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
25216 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
25217 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
25218 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
25219 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
25220 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
25221 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
25222 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
25223 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
25224 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
25225 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
25226 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
25227 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
25228 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
25229 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
25230 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
25231 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
25232 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
25233 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
25234 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
25235 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
25236 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
25237 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
25238 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
25239 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
25240 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
25241 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025242 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
25243 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
25244 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
25245 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
25246 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
25247 "\xED\x28\x39\xE9\x63\xED\x41\x70"
25248 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
25249 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
25250 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
25251 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
25252 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
25253 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
25254 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
25255 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
25256 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
25257 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
25258 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
25259 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
25260 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
25261 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
25262 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
25263 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
25264 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
25265 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
25266 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
25267 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
25268 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
25269 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
25270 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
25271 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
25272 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
25273 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
25274 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
25275 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
25276 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
25277 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
25278 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
25279 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
25280 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
25281 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
25282 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
25283 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
25284 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
25285 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
25286 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
25287 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
25288 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
25289 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
25290 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
25291 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
25292 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
25293 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
25294 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
25295 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
25296 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
25297 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
25298 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
25299 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
25300 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
25301 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
25302 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
25303 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
25304 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
25305 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
25306 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
25307 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025308 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025309 .np = 3,
25310 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020025311 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025312};
25313
25314static struct cipher_testvec camellia_dec_tv_template[] = {
25315 {
25316 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25317 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25318 .klen = 16,
25319 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
25320 "\x08\x57\x06\x56\x48\xea\xbe\x43",
25321 .ilen = 16,
25322 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25323 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25324 .rlen = 16,
25325 }, {
25326 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25327 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
25328 "\x00\x11\x22\x33\x44\x55\x66\x77",
25329 .klen = 24,
25330 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
25331 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
25332 .ilen = 16,
25333 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25334 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25335 .rlen = 16,
25336 }, {
25337 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25338 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
25339 "\x00\x11\x22\x33\x44\x55\x66\x77"
25340 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
25341 .klen = 32,
25342 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
25343 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
25344 .ilen = 16,
25345 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
25346 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
25347 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025348 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025349 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
25350 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
25351 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
25352 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
25353 .klen = 32,
25354 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
25355 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
25356 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
25357 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
25358 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025359 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
25360 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
25361 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
25362 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
25363 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
25364 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
25365 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
25366 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
25367 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
25368 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
25369 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
25370 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
25371 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
25372 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
25373 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
25374 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
25375 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
25376 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
25377 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
25378 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
25379 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
25380 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
25381 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
25382 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
25383 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
25384 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
25385 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
25386 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
25387 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
25388 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
25389 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
25390 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
25391 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
25392 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
25393 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
25394 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
25395 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
25396 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
25397 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
25398 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
25399 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
25400 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
25401 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
25402 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
25403 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
25404 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
25405 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
25406 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
25407 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
25408 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
25409 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
25410 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
25411 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
25412 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
25413 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
25414 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025415 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
25416 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
25417 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
25418 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
25419 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
25420 "\xED\x28\x39\xE9\x63\xED\x41\x70"
25421 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
25422 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
25423 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
25424 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
25425 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
25426 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
25427 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
25428 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
25429 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
25430 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
25431 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
25432 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
25433 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
25434 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
25435 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
25436 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
25437 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
25438 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
25439 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
25440 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
25441 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
25442 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
25443 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
25444 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
25445 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
25446 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
25447 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
25448 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
25449 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
25450 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
25451 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
25452 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
25453 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
25454 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
25455 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
25456 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
25457 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
25458 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
25459 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
25460 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
25461 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
25462 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
25463 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
25464 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
25465 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
25466 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
25467 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
25468 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
25469 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
25470 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
25471 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
25472 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
25473 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
25474 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
25475 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
25476 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
25477 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
25478 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
25479 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
25480 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025481 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25482 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25483 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25484 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25485 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025486 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25487 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25488 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25489 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25490 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25491 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25492 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25493 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25494 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25495 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25496 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25497 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25498 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25499 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25500 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25501 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25502 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25503 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25504 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25505 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25506 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25507 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25508 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25509 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25510 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25511 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25512 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25513 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25514 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25515 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25516 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25517 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25518 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25519 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25520 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25521 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25522 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25523 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25524 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25525 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25526 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25527 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25528 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25529 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25530 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25531 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25532 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25533 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25534 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25535 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25536 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25537 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25538 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25539 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25540 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25541 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025542 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25543 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25544 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25545 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25546 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25547 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25548 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25549 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25550 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25551 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25552 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25553 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25554 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25555 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25556 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25557 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25558 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25559 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25560 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25561 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25562 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25563 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25564 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25565 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25566 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25567 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25568 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25569 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25570 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25571 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25572 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25573 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25574 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25575 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25576 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25577 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25578 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25579 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25580 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25581 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25582 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25583 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25584 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25585 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25586 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25587 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25588 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25589 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25590 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25591 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25592 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25593 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25594 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25595 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25596 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25597 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25598 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25599 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25600 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25601 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25602 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25603 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25604 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25605 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25606 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
25607 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025608 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025609 .np = 3,
25610 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020025611 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025612};
25613
25614static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
25615 {
25616 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
25617 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
25618 .klen = 16,
25619 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
25620 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
25621 .input = "Single block msg",
25622 .ilen = 16,
25623 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
25624 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
25625 .rlen = 16,
25626 }, {
25627 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
25628 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
25629 .klen = 16,
25630 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
25631 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
25632 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
25633 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
25634 "\x10\x11\x12\x13\x14\x15\x16\x17"
25635 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
25636 .ilen = 32,
25637 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
25638 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
25639 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
25640 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
25641 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025642 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025643 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25644 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
25645 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
25646 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
25647 .klen = 32,
25648 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
25649 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
25650 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25651 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25652 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25653 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25654 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025655 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25656 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25657 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25658 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25659 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25660 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25661 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25662 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25663 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25664 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25665 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25666 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25667 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25668 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25669 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25670 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25671 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25672 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25673 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25674 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25675 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25676 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25677 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25678 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25679 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25680 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25681 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25682 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25683 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25684 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25685 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25686 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25687 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25688 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25689 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25690 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25691 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25692 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25693 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25694 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25695 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25696 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25697 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25698 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25699 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25700 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25701 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25702 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25703 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25704 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25705 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25706 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25707 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25708 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25709 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25710 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025711 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
25712 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
25713 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
25714 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
25715 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
25716 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
25717 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
25718 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
25719 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
25720 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
25721 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
25722 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
25723 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
25724 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
25725 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
25726 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
25727 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
25728 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
25729 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
25730 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
25731 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
25732 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
25733 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
25734 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
25735 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
25736 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
25737 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
25738 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
25739 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
25740 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
25741 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
25742 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
25743 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
25744 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
25745 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
25746 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
25747 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
25748 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
25749 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
25750 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
25751 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
25752 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
25753 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
25754 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
25755 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
25756 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
25757 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
25758 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
25759 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
25760 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
25761 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
25762 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
25763 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
25764 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
25765 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
25766 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
25767 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
25768 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
25769 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
25770 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
25771 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
25772 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
25773 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
25774 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
25775 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
25776 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020025777 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
25778 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
25779 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
25780 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
25781 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025782 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
25783 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
25784 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
25785 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
25786 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
25787 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
25788 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
25789 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
25790 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
25791 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
25792 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
25793 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
25794 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
25795 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
25796 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
25797 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
25798 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
25799 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
25800 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
25801 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
25802 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
25803 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
25804 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
25805 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
25806 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
25807 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
25808 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
25809 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
25810 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
25811 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
25812 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
25813 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
25814 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
25815 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
25816 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
25817 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
25818 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
25819 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
25820 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
25821 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
25822 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
25823 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
25824 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
25825 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
25826 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
25827 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
25828 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
25829 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
25830 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
25831 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
25832 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
25833 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
25834 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
25835 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
25836 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
25837 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030025838 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
25839 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
25840 "\x21\x41\x56\x72\x13\xE1\x86\x07"
25841 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
25842 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
25843 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
25844 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
25845 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
25846 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
25847 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
25848 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
25849 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
25850 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
25851 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
25852 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
25853 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
25854 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
25855 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
25856 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
25857 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
25858 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
25859 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
25860 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
25861 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
25862 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
25863 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
25864 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
25865 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
25866 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
25867 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
25868 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
25869 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
25870 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
25871 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
25872 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
25873 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
25874 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
25875 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
25876 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
25877 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
25878 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
25879 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
25880 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
25881 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
25882 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
25883 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
25884 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
25885 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
25886 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
25887 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
25888 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
25889 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
25890 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
25891 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
25892 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
25893 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
25894 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
25895 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
25896 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
25897 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
25898 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
25899 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
25900 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
25901 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
25902 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
25903 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030025904 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020025905 .np = 3,
25906 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020025907 },
Herbert Xuda7f0332008-07-31 17:08:25 +080025908};
25909
25910static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
25911 {
25912 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
25913 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
25914 .klen = 16,
25915 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
25916 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
25917 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
25918 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
25919 .ilen = 16,
25920 .result = "Single block msg",
25921 .rlen = 16,
25922 }, {
25923 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
25924 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
25925 .klen = 16,
25926 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
25927 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
25928 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
25929 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
25930 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
25931 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
25932 .ilen = 32,
25933 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
25934 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
25935 "\x10\x11\x12\x13\x14\x15\x16\x17"
25936 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
25937 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025938 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020025939 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25940 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
25941 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
25942 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
25943 .klen = 32,
25944 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
25945 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
25946 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
25947 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
25948 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
25949 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
25950 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030025951 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
25952 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
25953 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
25954 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
25955 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
25956 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
25957 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
25958 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
25959 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
25960 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
25961 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
25962 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
25963 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
25964 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
25965 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
25966 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
25967 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
25968 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
25969 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
25970 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
25971 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
25972 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
25973 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
25974 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
25975 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
25976 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
25977 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
25978 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
25979 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
25980 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
25981 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
25982 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
25983 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
25984 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
25985 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
25986 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
25987 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
25988 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
25989 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
25990 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
25991 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
25992 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
25993 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
25994 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
25995 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
25996 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
25997 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
25998 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
25999 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
26000 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
26001 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
26002 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
26003 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
26004 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
26005 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
26006 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026007 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
26008 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
26009 "\x21\x41\x56\x72\x13\xE1\x86\x07"
26010 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
26011 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
26012 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
26013 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
26014 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
26015 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
26016 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
26017 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
26018 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
26019 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
26020 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
26021 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
26022 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
26023 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
26024 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
26025 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
26026 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
26027 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
26028 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
26029 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
26030 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
26031 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
26032 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
26033 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
26034 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
26035 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
26036 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
26037 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
26038 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
26039 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
26040 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
26041 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
26042 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
26043 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
26044 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
26045 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
26046 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
26047 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
26048 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
26049 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
26050 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
26051 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
26052 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
26053 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
26054 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
26055 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
26056 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
26057 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
26058 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
26059 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
26060 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
26061 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
26062 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
26063 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
26064 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
26065 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
26066 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
26067 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
26068 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
26069 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
26070 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
26071 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
26072 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026073 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26074 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26075 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26076 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26077 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026078 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26079 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26080 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26081 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26082 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26083 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26084 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26085 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26086 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26087 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26088 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26089 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26090 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26091 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26092 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26093 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26094 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26095 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26096 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26097 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26098 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26099 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26100 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26101 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26102 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26103 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26104 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26105 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26106 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26107 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26108 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26109 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26110 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26111 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26112 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26113 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26114 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26115 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26116 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26117 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26118 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26119 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26120 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26121 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26122 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26123 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26124 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26125 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26126 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26127 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26128 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26129 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26130 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26131 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26132 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26133 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026134 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
26135 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26136 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26137 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26138 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26139 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26140 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26141 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26142 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26143 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26144 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26145 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26146 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26147 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26148 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26149 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26150 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26151 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26152 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26153 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26154 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26155 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26156 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26157 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26158 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26159 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26160 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26161 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26162 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26163 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26164 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26165 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26166 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26167 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26168 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26169 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26170 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26171 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26172 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26173 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26174 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26175 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26176 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26177 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26178 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26179 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26180 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26181 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26182 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26183 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26184 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26185 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26186 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26187 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26188 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26189 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26190 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26191 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26192 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26193 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26194 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26195 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26196 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26197 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26198 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
26199 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026200 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020026201 .np = 3,
26202 .tap = { 1008 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020026203 },
26204};
26205
26206static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
26207 { /* Generated with Crypto++ */
26208 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26209 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26210 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26211 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26212 .klen = 32,
26213 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26214 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26215 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26216 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26217 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26218 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26219 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026220 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26221 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26222 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26223 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26224 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26225 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26226 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26227 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26228 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26229 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26230 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26231 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26232 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26233 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26234 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26235 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26236 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26237 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26238 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26239 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26240 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26241 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26242 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26243 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26244 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26245 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26246 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26247 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26248 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26249 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26250 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26251 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26252 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26253 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26254 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26255 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26256 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26257 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26258 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26259 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26260 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26261 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26262 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26263 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26264 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26265 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26266 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26267 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26268 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26269 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26270 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26271 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26272 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26273 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26274 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26275 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
26276 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
26277 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026278 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
26279 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
26280 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
26281 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
26282 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026283 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
26284 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
26285 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
26286 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
26287 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
26288 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
26289 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
26290 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
26291 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
26292 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
26293 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
26294 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
26295 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
26296 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
26297 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
26298 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
26299 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
26300 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
26301 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
26302 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
26303 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
26304 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
26305 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
26306 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
26307 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
26308 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
26309 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
26310 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
26311 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
26312 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
26313 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
26314 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
26315 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
26316 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
26317 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
26318 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
26319 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
26320 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
26321 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
26322 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
26323 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
26324 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
26325 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
26326 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
26327 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
26328 "\x76\x44\x45\xF3\x24\x11\x57\x98"
26329 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
26330 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
26331 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
26332 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
26333 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
26334 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
26335 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
26336 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
26337 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
26338 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
26339 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
26340 .rlen = 496,
26341 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020026342 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26343 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26344 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26345 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26346 .klen = 32,
26347 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26348 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26349 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26350 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26351 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26352 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26353 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26354 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026355 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26356 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26357 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26358 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26359 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26360 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26361 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26362 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26363 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26364 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26365 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26366 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26367 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26368 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26369 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26370 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26371 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26372 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26373 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26374 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26375 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26376 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26377 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26378 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26379 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26380 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26381 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26382 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26383 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26384 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26385 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26386 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26387 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26388 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26389 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26390 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26391 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26392 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26393 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26394 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26395 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26396 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26397 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26398 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26399 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26400 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26401 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26402 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26403 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26404 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26405 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26406 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26407 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26408 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26409 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
26410 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026411 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26412 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26413 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26414 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26415 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26416 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26417 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26418 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26419 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26420 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26421 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26422 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26423 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26424 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26425 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26426 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26427 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26428 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26429 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26430 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26431 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26432 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26433 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26434 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26435 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26436 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26437 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26438 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26439 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26440 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26441 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26442 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26443 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26444 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26445 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26446 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26447 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26448 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26449 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26450 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26451 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26452 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26453 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26454 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26455 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26456 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26457 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26458 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26459 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26460 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26461 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26462 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26463 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26464 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26465 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26466 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26467 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26468 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26469 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26470 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26471 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26472 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26473 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26474 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
26475 "\xE4\x7B\x12",
26476 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026477 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
26478 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
26479 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
26480 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
26481 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
26482 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026483 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
26484 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
26485 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
26486 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
26487 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
26488 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
26489 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
26490 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
26491 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
26492 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
26493 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
26494 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
26495 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
26496 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
26497 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
26498 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
26499 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
26500 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
26501 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
26502 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
26503 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
26504 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
26505 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
26506 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
26507 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
26508 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
26509 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
26510 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
26511 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
26512 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
26513 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
26514 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
26515 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
26516 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
26517 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
26518 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
26519 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
26520 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
26521 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
26522 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
26523 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
26524 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
26525 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
26526 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
26527 "\x76\x44\x45\xF3\x24\x11\x57\x98"
26528 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
26529 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
26530 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
26531 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
26532 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
26533 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
26534 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
26535 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
26536 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
26537 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
26538 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026539 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
26540 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
26541 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
26542 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
26543 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
26544 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
26545 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
26546 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
26547 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
26548 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
26549 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
26550 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
26551 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
26552 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
26553 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
26554 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
26555 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
26556 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
26557 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
26558 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
26559 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
26560 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
26561 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
26562 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
26563 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
26564 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
26565 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
26566 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
26567 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
26568 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
26569 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
26570 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
26571 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
26572 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
26573 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
26574 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
26575 "\x00\x70\x12\x56\x56\x50\xAD\x14"
26576 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
26577 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
26578 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
26579 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
26580 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
26581 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
26582 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
26583 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
26584 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
26585 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
26586 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
26587 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
26588 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
26589 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
26590 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
26591 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
26592 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
26593 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
26594 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
26595 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
26596 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
26597 "\x74\x28\x9D\x05\x30\x20\x62\x41"
26598 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
26599 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
26600 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
26601 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
26602 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
26603 "\xF1\x6B\xD9",
26604 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030026605 .also_non_np = 1,
26606 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026607 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030026608 }, { /* Generated with Crypto++ */
26609 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26610 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26611 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26612 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26613 .klen = 32,
26614 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
26615 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
26616 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26617 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26618 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26619 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26620 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26621 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26622 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26623 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26624 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26625 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26626 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26627 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26628 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26629 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26630 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26631 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26632 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26633 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26634 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26635 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26636 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26637 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26638 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26639 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26640 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26641 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26642 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26643 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26644 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26645 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26646 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26647 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26648 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26649 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26650 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26651 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26652 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26653 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26654 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26655 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26656 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26657 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26658 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26659 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26660 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26661 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26662 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26663 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26664 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26665 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26666 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26667 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26668 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26669 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26670 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26671 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26672 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26673 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26674 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26675 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26676 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026677 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
26678 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26679 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26680 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26681 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26682 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26683 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26684 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26685 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26686 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26687 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26688 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26689 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26690 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26691 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26692 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26693 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26694 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26695 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26696 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26697 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26698 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26699 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26700 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26701 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26702 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26703 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26704 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26705 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26706 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26707 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26708 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26709 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26710 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26711 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26712 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26713 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26714 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26715 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26716 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26717 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26718 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26719 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26720 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26721 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26722 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26723 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26724 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26725 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26726 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26727 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26728 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26729 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26730 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26731 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26732 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26733 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26734 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26735 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26736 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26737 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26738 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26739 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26740 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26741 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
26742 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030026743 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
26744 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
26745 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
26746 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
26747 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
26748 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
26749 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
26750 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
26751 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
26752 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
26753 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
26754 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
26755 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
26756 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
26757 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
26758 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
26759 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
26760 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
26761 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
26762 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
26763 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
26764 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
26765 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
26766 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
26767 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
26768 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
26769 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
26770 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
26771 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
26772 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
26773 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
26774 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
26775 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
26776 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
26777 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
26778 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
26779 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
26780 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
26781 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
26782 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
26783 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
26784 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
26785 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
26786 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
26787 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
26788 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
26789 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
26790 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
26791 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
26792 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
26793 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
26794 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
26795 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
26796 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
26797 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
26798 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
26799 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
26800 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
26801 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
26802 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
26803 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030026804 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
26805 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
26806 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
26807 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
26808 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
26809 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
26810 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
26811 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
26812 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
26813 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
26814 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
26815 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
26816 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
26817 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
26818 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
26819 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
26820 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
26821 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
26822 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
26823 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
26824 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
26825 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
26826 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
26827 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
26828 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
26829 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
26830 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
26831 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
26832 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
26833 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
26834 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
26835 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
26836 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
26837 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
26838 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
26839 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
26840 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
26841 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
26842 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
26843 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
26844 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
26845 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
26846 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
26847 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
26848 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
26849 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
26850 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
26851 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
26852 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
26853 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
26854 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
26855 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
26856 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
26857 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
26858 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
26859 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
26860 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
26861 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
26862 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
26863 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
26864 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
26865 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
26866 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
26867 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
26868 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
26869 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026870 },
26871};
26872
26873static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
26874 { /* Generated with Crypto++ */
26875 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
26876 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
26877 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
26878 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
26879 .klen = 32,
26880 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
26881 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
26882 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
26883 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
26884 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
26885 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
26886 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026887 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
26888 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
26889 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
26890 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
26891 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
26892 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
26893 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
26894 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
26895 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
26896 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
26897 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
26898 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
26899 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
26900 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
26901 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
26902 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
26903 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
26904 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
26905 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
26906 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
26907 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
26908 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
26909 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
26910 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
26911 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
26912 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
26913 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
26914 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
26915 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
26916 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
26917 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
26918 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
26919 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
26920 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
26921 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
26922 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
26923 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
26924 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
26925 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
26926 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
26927 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
26928 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
26929 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
26930 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
26931 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
26932 "\x76\x44\x45\xF3\x24\x11\x57\x98"
26933 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
26934 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
26935 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
26936 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
26937 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
26938 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
26939 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
26940 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
26941 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
26942 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
26943 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
26944 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020026945 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26946 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26947 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26948 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26949 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030026950 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26951 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26952 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26953 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26954 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26955 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26956 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26957 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26958 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26959 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26960 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26961 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26962 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26963 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26964 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26965 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26966 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26967 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26968 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26969 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26970 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26971 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26972 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26973 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26974 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26975 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26976 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26977 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26978 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26979 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26980 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26981 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26982 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26983 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26984 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26985 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26986 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26987 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26988 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26989 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26990 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26991 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26992 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26993 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26994 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26995 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26996 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26997 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26998 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26999 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27000 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27001 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27002 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27003 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27004 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27005 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27006 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
27007 .rlen = 496,
27008 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020027009 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27010 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27011 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27012 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27013 .klen = 32,
27014 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27015 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27016 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
27017 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
27018 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
27019 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
27020 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
27021 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027022 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
27023 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
27024 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
27025 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
27026 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
27027 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
27028 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
27029 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
27030 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
27031 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
27032 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
27033 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
27034 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
27035 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
27036 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
27037 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
27038 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
27039 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
27040 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
27041 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
27042 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
27043 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
27044 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
27045 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
27046 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
27047 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
27048 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
27049 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
27050 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
27051 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
27052 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
27053 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
27054 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
27055 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
27056 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
27057 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
27058 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
27059 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
27060 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
27061 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
27062 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
27063 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
27064 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
27065 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
27066 "\x76\x44\x45\xF3\x24\x11\x57\x98"
27067 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
27068 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
27069 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
27070 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
27071 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
27072 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
27073 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
27074 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
27075 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
27076 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
27077 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027078 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
27079 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
27080 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
27081 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
27082 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
27083 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
27084 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
27085 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
27086 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
27087 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
27088 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
27089 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
27090 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
27091 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
27092 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
27093 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
27094 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
27095 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
27096 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
27097 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
27098 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
27099 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
27100 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
27101 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
27102 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
27103 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
27104 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
27105 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
27106 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
27107 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
27108 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
27109 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
27110 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
27111 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
27112 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
27113 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
27114 "\x00\x70\x12\x56\x56\x50\xAD\x14"
27115 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
27116 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
27117 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
27118 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
27119 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
27120 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
27121 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
27122 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
27123 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
27124 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
27125 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
27126 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
27127 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
27128 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
27129 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
27130 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
27131 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
27132 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
27133 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
27134 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
27135 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
27136 "\x74\x28\x9D\x05\x30\x20\x62\x41"
27137 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
27138 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
27139 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
27140 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
27141 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
27142 "\xF1\x6B\xD9",
27143 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027144 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27145 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27146 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27147 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27148 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
27149 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030027150 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27151 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27152 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27153 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27154 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27155 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27156 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27157 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27158 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27159 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27160 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27161 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27162 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27163 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27164 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27165 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27166 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27167 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27168 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27169 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27170 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27171 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27172 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27173 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27174 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27175 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27176 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27177 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27178 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27179 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27180 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27181 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27182 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27183 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27184 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27185 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27186 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27187 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27188 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27189 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27190 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27191 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27192 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27193 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27194 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27195 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27196 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27197 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27198 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27199 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27200 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27201 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27202 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27203 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27204 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27205 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027206 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27207 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27208 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27209 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27210 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27211 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27212 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27213 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27214 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27215 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27216 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27217 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27218 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27219 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27220 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27221 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27222 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27223 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27224 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27225 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27226 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27227 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27228 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27229 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27230 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27231 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27232 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27233 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27234 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27235 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27236 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27237 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27238 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27239 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27240 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27241 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27242 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27243 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27244 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27245 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27246 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27247 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27248 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27249 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27250 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27251 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27252 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27253 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27254 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27255 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27256 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27257 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27258 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27259 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27260 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27261 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27262 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27263 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27264 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27265 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27266 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27267 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27268 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27269 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
27270 "\xE4\x7B\x12",
27271 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027272 .also_non_np = 1,
27273 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027274 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030027275 }, { /* Generated with Crypto++ */
27276 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27277 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27278 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27279 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27280 .klen = 32,
27281 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
27282 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
27283 .input = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
27284 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
27285 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
27286 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
27287 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
27288 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
27289 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
27290 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
27291 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
27292 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
27293 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
27294 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
27295 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
27296 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
27297 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
27298 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
27299 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
27300 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
27301 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
27302 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
27303 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
27304 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
27305 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
27306 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
27307 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
27308 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
27309 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
27310 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
27311 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
27312 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
27313 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
27314 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
27315 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
27316 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
27317 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
27318 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
27319 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
27320 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
27321 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
27322 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
27323 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
27324 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
27325 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
27326 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
27327 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
27328 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
27329 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
27330 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
27331 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
27332 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
27333 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
27334 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
27335 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
27336 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
27337 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
27338 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
27339 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
27340 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
27341 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
27342 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
27343 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027344 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
27345 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
27346 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
27347 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
27348 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
27349 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
27350 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
27351 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
27352 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
27353 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
27354 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
27355 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
27356 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
27357 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
27358 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
27359 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
27360 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
27361 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
27362 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
27363 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
27364 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
27365 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
27366 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
27367 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
27368 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
27369 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
27370 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
27371 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
27372 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
27373 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
27374 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
27375 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
27376 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
27377 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
27378 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
27379 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
27380 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
27381 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
27382 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
27383 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
27384 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
27385 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
27386 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
27387 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
27388 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
27389 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
27390 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
27391 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
27392 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
27393 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
27394 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
27395 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
27396 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
27397 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
27398 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
27399 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
27400 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
27401 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
27402 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
27403 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
27404 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
27405 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
27406 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
27407 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
27408 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
27409 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030027410 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27411 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27412 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27413 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27414 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
27415 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27416 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27417 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27418 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27419 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27420 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27421 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27422 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27423 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27424 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27425 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27426 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27427 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27428 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27429 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27430 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27431 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27432 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27433 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27434 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27435 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27436 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27437 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27438 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27439 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27440 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27441 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27442 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27443 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27444 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27445 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27446 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27447 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27448 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27449 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27450 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27451 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27452 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27453 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27454 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27455 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27456 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27457 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27458 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27459 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27460 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27461 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27462 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27463 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27464 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27465 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27466 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27467 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27468 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27469 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27470 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030027471 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27472 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27473 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27474 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27475 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27476 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27477 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27478 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27479 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27480 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27481 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27482 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27483 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27484 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27485 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27486 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27487 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27488 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27489 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27490 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27491 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27492 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27493 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27494 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27495 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27496 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27497 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27498 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27499 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27500 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27501 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27502 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27503 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27504 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27505 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27506 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27507 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27508 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27509 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27510 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27511 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27512 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27513 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27514 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27515 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27516 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27517 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27518 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27519 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27520 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27521 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27522 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27523 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27524 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27525 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27526 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27527 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27528 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27529 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27530 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27531 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27532 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27533 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27534 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27535 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27536 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020027537 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027538};
27539
27540static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
27541 /* Generated from AES-LRW test vectors */
27542 {
27543 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
27544 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
27545 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
27546 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
27547 .klen = 32,
27548 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27549 "\x00\x00\x00\x00\x00\x00\x00\x01",
27550 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27551 "\x38\x39\x41\x42\x43\x44\x45\x46",
27552 .ilen = 16,
27553 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
27554 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
27555 .rlen = 16,
27556 }, {
27557 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
27558 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
27559 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
27560 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
27561 .klen = 32,
27562 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27563 "\x00\x00\x00\x00\x00\x00\x00\x02",
27564 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27565 "\x38\x39\x41\x42\x43\x44\x45\x46",
27566 .ilen = 16,
27567 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
27568 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
27569 .rlen = 16,
27570 }, {
27571 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
27572 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
27573 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
27574 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
27575 .klen = 32,
27576 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27577 "\x00\x00\x00\x02\x00\x00\x00\x00",
27578 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27579 "\x38\x39\x41\x42\x43\x44\x45\x46",
27580 .ilen = 16,
27581 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
27582 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
27583 .rlen = 16,
27584 }, {
27585 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
27586 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
27587 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
27588 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
27589 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
27590 .klen = 40,
27591 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27592 "\x00\x00\x00\x00\x00\x00\x00\x01",
27593 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27594 "\x38\x39\x41\x42\x43\x44\x45\x46",
27595 .ilen = 16,
27596 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
27597 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
27598 .rlen = 16,
27599 }, {
27600 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
27601 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
27602 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
27603 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
27604 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
27605 .klen = 40,
27606 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27607 "\x00\x00\x00\x02\x00\x00\x00\x00",
27608 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27609 "\x38\x39\x41\x42\x43\x44\x45\x46",
27610 .ilen = 16,
27611 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
27612 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
27613 .rlen = 16,
27614 }, {
27615 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
27616 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
27617 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
27618 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
27619 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
27620 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
27621 .klen = 48,
27622 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27623 "\x00\x00\x00\x00\x00\x00\x00\x01",
27624 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27625 "\x38\x39\x41\x42\x43\x44\x45\x46",
27626 .ilen = 16,
27627 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
27628 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
27629 .rlen = 16,
27630 }, {
27631 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
27632 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
27633 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
27634 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
27635 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
27636 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
27637 .klen = 48,
27638 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27639 "\x00\x00\x00\x02\x00\x00\x00\x00",
27640 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
27641 "\x38\x39\x41\x42\x43\x44\x45\x46",
27642 .ilen = 16,
27643 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
27644 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
27645 .rlen = 16,
27646 }, {
27647 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
27648 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
27649 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
27650 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
27651 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
27652 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
27653 .klen = 48,
27654 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27655 "\x00\x00\x00\x00\x00\x00\x00\x01",
27656 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
27657 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
27658 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
27659 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
27660 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
27661 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
27662 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
27663 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
27664 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
27665 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
27666 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
27667 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
27668 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
27669 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
27670 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
27671 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
27672 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
27673 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
27674 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
27675 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
27676 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
27677 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
27678 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
27679 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
27680 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
27681 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
27682 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
27683 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
27684 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
27685 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
27686 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
27687 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
27688 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
27689 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
27690 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
27691 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
27692 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
27693 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
27694 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
27695 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
27696 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
27697 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
27698 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
27699 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
27700 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
27701 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
27702 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
27703 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
27704 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
27705 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
27706 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
27707 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
27708 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
27709 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
27710 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
27711 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
27712 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
27713 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
27714 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
27715 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
27716 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
27717 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
27718 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
27719 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
27720 .ilen = 512,
27721 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
27722 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
27723 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
27724 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
27725 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
27726 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
27727 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
27728 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
27729 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
27730 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
27731 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
27732 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
27733 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
27734 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
27735 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
27736 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
27737 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
27738 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
27739 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
27740 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
27741 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
27742 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
27743 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
27744 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
27745 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
27746 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
27747 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
27748 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
27749 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
27750 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
27751 "\xed\x14\xa9\x57\x19\x63\x40\x04"
27752 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
27753 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
27754 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
27755 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
27756 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
27757 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
27758 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
27759 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
27760 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
27761 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
27762 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
27763 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
27764 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
27765 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
27766 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
27767 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
27768 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
27769 "\x35\xa5\x83\x04\x84\x01\x99\x56"
27770 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
27771 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
27772 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
27773 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
27774 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
27775 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
27776 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
27777 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
27778 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
27779 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
27780 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
27781 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
27782 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
27783 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
27784 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
27785 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030027786 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020027787 .np = 3,
27788 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020027789 },
27790};
27791
27792static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
27793 /* Generated from AES-LRW test vectors */
27794 /* same as enc vectors with input and result reversed */
27795 {
27796 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
27797 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
27798 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
27799 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
27800 .klen = 32,
27801 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27802 "\x00\x00\x00\x00\x00\x00\x00\x01",
27803 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
27804 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
27805 .ilen = 16,
27806 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27807 "\x38\x39\x41\x42\x43\x44\x45\x46",
27808 .rlen = 16,
27809 }, {
27810 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
27811 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
27812 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
27813 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
27814 .klen = 32,
27815 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27816 "\x00\x00\x00\x00\x00\x00\x00\x02",
27817 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
27818 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
27819 .ilen = 16,
27820 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27821 "\x38\x39\x41\x42\x43\x44\x45\x46",
27822 .rlen = 16,
27823 }, {
27824 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
27825 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
27826 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
27827 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
27828 .klen = 32,
27829 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27830 "\x00\x00\x00\x02\x00\x00\x00\x00",
27831 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
27832 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
27833 .ilen = 16,
27834 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27835 "\x38\x39\x41\x42\x43\x44\x45\x46",
27836 .rlen = 16,
27837 }, {
27838 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
27839 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
27840 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
27841 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
27842 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
27843 .klen = 40,
27844 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27845 "\x00\x00\x00\x00\x00\x00\x00\x01",
27846 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
27847 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
27848 .ilen = 16,
27849 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27850 "\x38\x39\x41\x42\x43\x44\x45\x46",
27851 .rlen = 16,
27852 }, {
27853 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
27854 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
27855 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
27856 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
27857 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
27858 .klen = 40,
27859 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27860 "\x00\x00\x00\x02\x00\x00\x00\x00",
27861 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
27862 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
27863 .ilen = 16,
27864 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27865 "\x38\x39\x41\x42\x43\x44\x45\x46",
27866 .rlen = 16,
27867 }, {
27868 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
27869 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
27870 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
27871 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
27872 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
27873 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
27874 .klen = 48,
27875 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27876 "\x00\x00\x00\x00\x00\x00\x00\x01",
27877 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
27878 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
27879 .ilen = 16,
27880 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27881 "\x38\x39\x41\x42\x43\x44\x45\x46",
27882 .rlen = 16,
27883 }, {
27884 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
27885 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
27886 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
27887 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
27888 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
27889 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
27890 .klen = 48,
27891 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27892 "\x00\x00\x00\x02\x00\x00\x00\x00",
27893 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
27894 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
27895 .ilen = 16,
27896 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
27897 "\x38\x39\x41\x42\x43\x44\x45\x46",
27898 .rlen = 16,
27899 }, {
27900 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
27901 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
27902 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
27903 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
27904 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
27905 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
27906 .klen = 48,
27907 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
27908 "\x00\x00\x00\x00\x00\x00\x00\x01",
27909 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
27910 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
27911 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
27912 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
27913 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
27914 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
27915 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
27916 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
27917 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
27918 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
27919 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
27920 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
27921 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
27922 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
27923 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
27924 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
27925 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
27926 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
27927 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
27928 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
27929 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
27930 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
27931 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
27932 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
27933 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
27934 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
27935 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
27936 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
27937 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
27938 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
27939 "\xed\x14\xa9\x57\x19\x63\x40\x04"
27940 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
27941 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
27942 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
27943 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
27944 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
27945 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
27946 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
27947 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
27948 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
27949 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
27950 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
27951 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
27952 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
27953 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
27954 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
27955 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
27956 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
27957 "\x35\xa5\x83\x04\x84\x01\x99\x56"
27958 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
27959 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
27960 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
27961 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
27962 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
27963 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
27964 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
27965 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
27966 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
27967 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
27968 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
27969 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
27970 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
27971 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
27972 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
27973 .ilen = 512,
27974 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
27975 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
27976 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
27977 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
27978 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
27979 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
27980 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
27981 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
27982 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
27983 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
27984 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
27985 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
27986 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
27987 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
27988 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
27989 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
27990 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
27991 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
27992 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
27993 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
27994 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
27995 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
27996 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
27997 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
27998 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
27999 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
28000 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
28001 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
28002 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
28003 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
28004 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
28005 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
28006 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
28007 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
28008 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
28009 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
28010 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
28011 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
28012 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
28013 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
28014 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
28015 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
28016 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
28017 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
28018 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
28019 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
28020 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
28021 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
28022 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
28023 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
28024 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
28025 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
28026 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
28027 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
28028 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
28029 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
28030 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
28031 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
28032 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
28033 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
28034 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
28035 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
28036 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
28037 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
28038 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028039 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020028040 .np = 3,
28041 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020028042 },
28043};
28044
28045static struct cipher_testvec camellia_xts_enc_tv_template[] = {
28046 /* Generated from AES-XTS test vectors */
28047 {
28048 .key = "\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 .klen = 32,
28053 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28054 "\x00\x00\x00\x00\x00\x00\x00\x00",
28055 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
28056 "\x00\x00\x00\x00\x00\x00\x00\x00"
28057 "\x00\x00\x00\x00\x00\x00\x00\x00"
28058 "\x00\x00\x00\x00\x00\x00\x00\x00",
28059 .ilen = 32,
28060 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
28061 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
28062 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
28063 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
28064 .rlen = 32,
28065 }, {
28066 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
28067 "\x11\x11\x11\x11\x11\x11\x11\x11"
28068 "\x22\x22\x22\x22\x22\x22\x22\x22"
28069 "\x22\x22\x22\x22\x22\x22\x22\x22",
28070 .klen = 32,
28071 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
28072 "\x00\x00\x00\x00\x00\x00\x00\x00",
28073 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
28074 "\x44\x44\x44\x44\x44\x44\x44\x44"
28075 "\x44\x44\x44\x44\x44\x44\x44\x44"
28076 "\x44\x44\x44\x44\x44\x44\x44\x44",
28077 .ilen = 32,
28078 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
28079 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
28080 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
28081 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
28082 .rlen = 32,
28083 }, {
28084 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
28085 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
28086 "\x22\x22\x22\x22\x22\x22\x22\x22"
28087 "\x22\x22\x22\x22\x22\x22\x22\x22",
28088 .klen = 32,
28089 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
28090 "\x00\x00\x00\x00\x00\x00\x00\x00",
28091 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
28092 "\x44\x44\x44\x44\x44\x44\x44\x44"
28093 "\x44\x44\x44\x44\x44\x44\x44\x44"
28094 "\x44\x44\x44\x44\x44\x44\x44\x44",
28095 .ilen = 32,
28096 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
28097 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
28098 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
28099 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
28100 .rlen = 32,
28101 }, {
28102 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
28103 "\x23\x53\x60\x28\x74\x71\x35\x26"
28104 "\x31\x41\x59\x26\x53\x58\x97\x93"
28105 "\x23\x84\x62\x64\x33\x83\x27\x95",
28106 .klen = 32,
28107 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28108 "\x00\x00\x00\x00\x00\x00\x00\x00",
28109 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
28110 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28111 "\x10\x11\x12\x13\x14\x15\x16\x17"
28112 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28113 "\x20\x21\x22\x23\x24\x25\x26\x27"
28114 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28115 "\x30\x31\x32\x33\x34\x35\x36\x37"
28116 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28117 "\x40\x41\x42\x43\x44\x45\x46\x47"
28118 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28119 "\x50\x51\x52\x53\x54\x55\x56\x57"
28120 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28121 "\x60\x61\x62\x63\x64\x65\x66\x67"
28122 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28123 "\x70\x71\x72\x73\x74\x75\x76\x77"
28124 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28125 "\x80\x81\x82\x83\x84\x85\x86\x87"
28126 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28127 "\x90\x91\x92\x93\x94\x95\x96\x97"
28128 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28129 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28130 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28131 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28132 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28133 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28134 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28135 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28136 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28137 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28138 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28139 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28140 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28141 "\x00\x01\x02\x03\x04\x05\x06\x07"
28142 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28143 "\x10\x11\x12\x13\x14\x15\x16\x17"
28144 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28145 "\x20\x21\x22\x23\x24\x25\x26\x27"
28146 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28147 "\x30\x31\x32\x33\x34\x35\x36\x37"
28148 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28149 "\x40\x41\x42\x43\x44\x45\x46\x47"
28150 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28151 "\x50\x51\x52\x53\x54\x55\x56\x57"
28152 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28153 "\x60\x61\x62\x63\x64\x65\x66\x67"
28154 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28155 "\x70\x71\x72\x73\x74\x75\x76\x77"
28156 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28157 "\x80\x81\x82\x83\x84\x85\x86\x87"
28158 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28159 "\x90\x91\x92\x93\x94\x95\x96\x97"
28160 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28161 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28162 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28163 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28164 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28165 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28166 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28167 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28168 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28169 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28170 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28171 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28172 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
28173 .ilen = 512,
28174 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
28175 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
28176 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
28177 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
28178 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
28179 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
28180 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
28181 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
28182 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
28183 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
28184 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
28185 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
28186 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
28187 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
28188 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
28189 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
28190 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
28191 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
28192 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
28193 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
28194 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
28195 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
28196 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
28197 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
28198 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
28199 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
28200 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
28201 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
28202 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
28203 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
28204 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
28205 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
28206 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
28207 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
28208 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
28209 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
28210 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
28211 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
28212 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
28213 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
28214 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
28215 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
28216 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
28217 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
28218 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
28219 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
28220 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
28221 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
28222 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
28223 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
28224 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
28225 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
28226 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
28227 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
28228 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
28229 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
28230 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
28231 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
28232 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
28233 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
28234 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
28235 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
28236 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
28237 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
28238 .rlen = 512,
28239 }, {
28240 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
28241 "\x23\x53\x60\x28\x74\x71\x35\x26"
28242 "\x62\x49\x77\x57\x24\x70\x93\x69"
28243 "\x99\x59\x57\x49\x66\x96\x76\x27"
28244 "\x31\x41\x59\x26\x53\x58\x97\x93"
28245 "\x23\x84\x62\x64\x33\x83\x27\x95"
28246 "\x02\x88\x41\x97\x16\x93\x99\x37"
28247 "\x51\x05\x82\x09\x74\x94\x45\x92",
28248 .klen = 64,
28249 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
28250 "\x00\x00\x00\x00\x00\x00\x00\x00",
28251 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
28252 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28253 "\x10\x11\x12\x13\x14\x15\x16\x17"
28254 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28255 "\x20\x21\x22\x23\x24\x25\x26\x27"
28256 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28257 "\x30\x31\x32\x33\x34\x35\x36\x37"
28258 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28259 "\x40\x41\x42\x43\x44\x45\x46\x47"
28260 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28261 "\x50\x51\x52\x53\x54\x55\x56\x57"
28262 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28263 "\x60\x61\x62\x63\x64\x65\x66\x67"
28264 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28265 "\x70\x71\x72\x73\x74\x75\x76\x77"
28266 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28267 "\x80\x81\x82\x83\x84\x85\x86\x87"
28268 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28269 "\x90\x91\x92\x93\x94\x95\x96\x97"
28270 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28271 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28272 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28273 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28274 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28275 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28276 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28277 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28278 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28279 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28280 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28281 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28282 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28283 "\x00\x01\x02\x03\x04\x05\x06\x07"
28284 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28285 "\x10\x11\x12\x13\x14\x15\x16\x17"
28286 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28287 "\x20\x21\x22\x23\x24\x25\x26\x27"
28288 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28289 "\x30\x31\x32\x33\x34\x35\x36\x37"
28290 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28291 "\x40\x41\x42\x43\x44\x45\x46\x47"
28292 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28293 "\x50\x51\x52\x53\x54\x55\x56\x57"
28294 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28295 "\x60\x61\x62\x63\x64\x65\x66\x67"
28296 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28297 "\x70\x71\x72\x73\x74\x75\x76\x77"
28298 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28299 "\x80\x81\x82\x83\x84\x85\x86\x87"
28300 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28301 "\x90\x91\x92\x93\x94\x95\x96\x97"
28302 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28303 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28304 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28305 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28306 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28307 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28308 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28309 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28310 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28311 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28312 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28313 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28314 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
28315 .ilen = 512,
28316 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
28317 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
28318 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
28319 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
28320 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
28321 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
28322 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
28323 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
28324 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
28325 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
28326 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
28327 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
28328 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
28329 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
28330 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
28331 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
28332 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
28333 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
28334 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
28335 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
28336 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
28337 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
28338 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
28339 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
28340 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
28341 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
28342 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
28343 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
28344 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
28345 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
28346 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
28347 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
28348 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
28349 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
28350 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
28351 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
28352 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
28353 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
28354 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
28355 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
28356 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
28357 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
28358 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
28359 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
28360 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
28361 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
28362 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
28363 "\x21\x17\xf8\x59\x15\x24\x64\x22"
28364 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
28365 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
28366 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
28367 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
28368 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
28369 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
28370 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
28371 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
28372 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
28373 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
28374 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
28375 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
28376 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
28377 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
28378 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
28379 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
28380 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028381 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020028382 .np = 3,
28383 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020028384 },
28385};
28386
28387static struct cipher_testvec camellia_xts_dec_tv_template[] = {
28388 /* Generated from AES-XTS test vectors */
28389 /* same as enc vectors with input and result reversed */
28390 {
28391 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
28392 "\x00\x00\x00\x00\x00\x00\x00\x00"
28393 "\x00\x00\x00\x00\x00\x00\x00\x00"
28394 "\x00\x00\x00\x00\x00\x00\x00\x00",
28395 .klen = 32,
28396 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28397 "\x00\x00\x00\x00\x00\x00\x00\x00",
28398 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
28399 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
28400 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
28401 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
28402 .ilen = 32,
28403 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
28404 "\x00\x00\x00\x00\x00\x00\x00\x00"
28405 "\x00\x00\x00\x00\x00\x00\x00\x00"
28406 "\x00\x00\x00\x00\x00\x00\x00\x00",
28407 .rlen = 32,
28408 }, {
28409 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
28410 "\x11\x11\x11\x11\x11\x11\x11\x11"
28411 "\x22\x22\x22\x22\x22\x22\x22\x22"
28412 "\x22\x22\x22\x22\x22\x22\x22\x22",
28413 .klen = 32,
28414 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
28415 "\x00\x00\x00\x00\x00\x00\x00\x00",
28416 .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
28417 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
28418 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
28419 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
28420 .ilen = 32,
28421 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
28422 "\x44\x44\x44\x44\x44\x44\x44\x44"
28423 "\x44\x44\x44\x44\x44\x44\x44\x44"
28424 "\x44\x44\x44\x44\x44\x44\x44\x44",
28425 .rlen = 32,
28426 }, {
28427 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
28428 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
28429 "\x22\x22\x22\x22\x22\x22\x22\x22"
28430 "\x22\x22\x22\x22\x22\x22\x22\x22",
28431 .klen = 32,
28432 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
28433 "\x00\x00\x00\x00\x00\x00\x00\x00",
28434 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
28435 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
28436 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
28437 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
28438 .ilen = 32,
28439 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
28440 "\x44\x44\x44\x44\x44\x44\x44\x44"
28441 "\x44\x44\x44\x44\x44\x44\x44\x44"
28442 "\x44\x44\x44\x44\x44\x44\x44\x44",
28443 .rlen = 32,
28444 }, {
28445 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
28446 "\x23\x53\x60\x28\x74\x71\x35\x26"
28447 "\x31\x41\x59\x26\x53\x58\x97\x93"
28448 "\x23\x84\x62\x64\x33\x83\x27\x95",
28449 .klen = 32,
28450 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28451 "\x00\x00\x00\x00\x00\x00\x00\x00",
28452 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
28453 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
28454 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
28455 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
28456 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
28457 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
28458 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
28459 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
28460 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
28461 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
28462 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
28463 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
28464 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
28465 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
28466 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
28467 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
28468 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
28469 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
28470 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
28471 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
28472 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
28473 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
28474 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
28475 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
28476 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
28477 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
28478 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
28479 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
28480 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
28481 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
28482 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
28483 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
28484 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
28485 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
28486 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
28487 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
28488 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
28489 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
28490 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
28491 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
28492 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
28493 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
28494 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
28495 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
28496 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
28497 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
28498 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
28499 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
28500 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
28501 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
28502 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
28503 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
28504 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
28505 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
28506 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
28507 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
28508 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
28509 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
28510 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
28511 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
28512 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
28513 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
28514 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
28515 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
28516 .ilen = 512,
28517 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
28518 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28519 "\x10\x11\x12\x13\x14\x15\x16\x17"
28520 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28521 "\x20\x21\x22\x23\x24\x25\x26\x27"
28522 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28523 "\x30\x31\x32\x33\x34\x35\x36\x37"
28524 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28525 "\x40\x41\x42\x43\x44\x45\x46\x47"
28526 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28527 "\x50\x51\x52\x53\x54\x55\x56\x57"
28528 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28529 "\x60\x61\x62\x63\x64\x65\x66\x67"
28530 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28531 "\x70\x71\x72\x73\x74\x75\x76\x77"
28532 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28533 "\x80\x81\x82\x83\x84\x85\x86\x87"
28534 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28535 "\x90\x91\x92\x93\x94\x95\x96\x97"
28536 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28537 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28538 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28539 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28540 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28541 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28542 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28543 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28544 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28545 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28546 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28547 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28548 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28549 "\x00\x01\x02\x03\x04\x05\x06\x07"
28550 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28551 "\x10\x11\x12\x13\x14\x15\x16\x17"
28552 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28553 "\x20\x21\x22\x23\x24\x25\x26\x27"
28554 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28555 "\x30\x31\x32\x33\x34\x35\x36\x37"
28556 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28557 "\x40\x41\x42\x43\x44\x45\x46\x47"
28558 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28559 "\x50\x51\x52\x53\x54\x55\x56\x57"
28560 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28561 "\x60\x61\x62\x63\x64\x65\x66\x67"
28562 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28563 "\x70\x71\x72\x73\x74\x75\x76\x77"
28564 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28565 "\x80\x81\x82\x83\x84\x85\x86\x87"
28566 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28567 "\x90\x91\x92\x93\x94\x95\x96\x97"
28568 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28569 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28570 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28571 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28572 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28573 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28574 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28575 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28576 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28577 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28578 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28579 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28580 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
28581 .rlen = 512,
28582 }, {
28583 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
28584 "\x23\x53\x60\x28\x74\x71\x35\x26"
28585 "\x62\x49\x77\x57\x24\x70\x93\x69"
28586 "\x99\x59\x57\x49\x66\x96\x76\x27"
28587 "\x31\x41\x59\x26\x53\x58\x97\x93"
28588 "\x23\x84\x62\x64\x33\x83\x27\x95"
28589 "\x02\x88\x41\x97\x16\x93\x99\x37"
28590 "\x51\x05\x82\x09\x74\x94\x45\x92",
28591 .klen = 64,
28592 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
28593 "\x00\x00\x00\x00\x00\x00\x00\x00",
28594 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
28595 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
28596 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
28597 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
28598 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
28599 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
28600 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
28601 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
28602 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
28603 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
28604 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
28605 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
28606 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
28607 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
28608 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
28609 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
28610 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
28611 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
28612 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
28613 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
28614 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
28615 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
28616 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
28617 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
28618 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
28619 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
28620 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
28621 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
28622 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
28623 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
28624 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
28625 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
28626 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
28627 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
28628 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
28629 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
28630 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
28631 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
28632 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
28633 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
28634 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
28635 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
28636 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
28637 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
28638 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
28639 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
28640 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
28641 "\x21\x17\xf8\x59\x15\x24\x64\x22"
28642 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
28643 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
28644 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
28645 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
28646 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
28647 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
28648 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
28649 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
28650 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
28651 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
28652 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
28653 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
28654 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
28655 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
28656 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
28657 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
28658 .ilen = 512,
28659 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
28660 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28661 "\x10\x11\x12\x13\x14\x15\x16\x17"
28662 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28663 "\x20\x21\x22\x23\x24\x25\x26\x27"
28664 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28665 "\x30\x31\x32\x33\x34\x35\x36\x37"
28666 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28667 "\x40\x41\x42\x43\x44\x45\x46\x47"
28668 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28669 "\x50\x51\x52\x53\x54\x55\x56\x57"
28670 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28671 "\x60\x61\x62\x63\x64\x65\x66\x67"
28672 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28673 "\x70\x71\x72\x73\x74\x75\x76\x77"
28674 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28675 "\x80\x81\x82\x83\x84\x85\x86\x87"
28676 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28677 "\x90\x91\x92\x93\x94\x95\x96\x97"
28678 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28679 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28680 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28681 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28682 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28683 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28684 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28685 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28686 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28687 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28688 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28689 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28690 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28691 "\x00\x01\x02\x03\x04\x05\x06\x07"
28692 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28693 "\x10\x11\x12\x13\x14\x15\x16\x17"
28694 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28695 "\x20\x21\x22\x23\x24\x25\x26\x27"
28696 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28697 "\x30\x31\x32\x33\x34\x35\x36\x37"
28698 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28699 "\x40\x41\x42\x43\x44\x45\x46\x47"
28700 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28701 "\x50\x51\x52\x53\x54\x55\x56\x57"
28702 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28703 "\x60\x61\x62\x63\x64\x65\x66\x67"
28704 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28705 "\x70\x71\x72\x73\x74\x75\x76\x77"
28706 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28707 "\x80\x81\x82\x83\x84\x85\x86\x87"
28708 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28709 "\x90\x91\x92\x93\x94\x95\x96\x97"
28710 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28711 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28712 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28713 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28714 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28715 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28716 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28717 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28718 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28719 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28720 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28721 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28722 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
28723 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030028724 .also_non_np = 1,
Ard Biesheuvel3b9b8fe2014-07-27 19:18:50 +020028725 .np = 3,
28726 .tap = { 512 - 20, 4, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020028727 },
Herbert Xuda7f0332008-07-31 17:08:25 +080028728};
28729
28730/*
28731 * SEED test vectors
28732 */
28733#define SEED_ENC_TEST_VECTORS 4
28734#define SEED_DEC_TEST_VECTORS 4
28735
28736static struct cipher_testvec seed_enc_tv_template[] = {
28737 {
28738 .key = zeroed_string,
28739 .klen = 16,
28740 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
28741 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
28742 .ilen = 16,
28743 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
28744 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
28745 .rlen = 16,
28746 }, {
28747 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
28748 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
28749 .klen = 16,
28750 .input = zeroed_string,
28751 .ilen = 16,
28752 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
28753 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
28754 .rlen = 16,
28755 }, {
28756 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
28757 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
28758 .klen = 16,
28759 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
28760 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
28761 .ilen = 16,
28762 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
28763 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
28764 .rlen = 16,
28765 }, {
28766 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
28767 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
28768 .klen = 16,
28769 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
28770 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
28771 .ilen = 16,
28772 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
28773 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
28774 .rlen = 16,
28775 }
28776};
28777
28778static struct cipher_testvec seed_dec_tv_template[] = {
28779 {
28780 .key = zeroed_string,
28781 .klen = 16,
28782 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
28783 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
28784 .ilen = 16,
28785 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
28786 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
28787 .rlen = 16,
28788 }, {
28789 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
28790 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
28791 .klen = 16,
28792 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
28793 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
28794 .ilen = 16,
28795 .result = zeroed_string,
28796 .rlen = 16,
28797 }, {
28798 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
28799 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
28800 .klen = 16,
28801 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
28802 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
28803 .ilen = 16,
28804 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
28805 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
28806 .rlen = 16,
28807 }, {
28808 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
28809 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
28810 .klen = 16,
28811 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
28812 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
28813 .ilen = 16,
28814 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
28815 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
28816 .rlen = 16,
28817 }
28818};
28819
28820#define SALSA20_STREAM_ENC_TEST_VECTORS 5
28821static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
28822 /*
28823 * Testvectors from verified.test-vectors submitted to ECRYPT.
28824 * They are truncated to size 39, 64, 111, 129 to test a variety
28825 * of input length.
28826 */
28827 { /* Set 3, vector 0 */
28828 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
28829 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
28830 .klen = 16,
28831 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
28832 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
28833 "\x00\x00\x00\x00\x00\x00\x00\x00"
28834 "\x00\x00\x00\x00\x00\x00\x00\x00"
28835 "\x00\x00\x00\x00\x00\x00\x00\x00"
28836 "\x00\x00\x00\x00\x00\x00\x00",
28837 .ilen = 39,
28838 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
28839 "\x68\x02\x41\x0C\x68\x86\x88\x89"
28840 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
28841 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
28842 "\x58\x3F\x52\x79\x70\xEB\xC1",
28843 .rlen = 39,
28844 }, { /* Set 5, vector 0 */
28845 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
28846 "\x00\x00\x00\x00\x00\x00\x00\x00",
28847 .klen = 16,
28848 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
28849 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
28850 "\x00\x00\x00\x00\x00\x00\x00\x00"
28851 "\x00\x00\x00\x00\x00\x00\x00\x00"
28852 "\x00\x00\x00\x00\x00\x00\x00\x00"
28853 "\x00\x00\x00\x00\x00\x00\x00\x00"
28854 "\x00\x00\x00\x00\x00\x00\x00\x00"
28855 "\x00\x00\x00\x00\x00\x00\x00\x00"
28856 "\x00\x00\x00\x00\x00\x00\x00\x00",
28857 .ilen = 64,
28858 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
28859 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
28860 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
28861 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
28862 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
28863 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
28864 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
28865 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
28866 .rlen = 64,
28867 }, { /* Set 3, vector 27 */
28868 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
28869 "\x23\x24\x25\x26\x27\x28\x29\x2A"
28870 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
28871 "\x33\x34\x35\x36\x37\x38\x39\x3A",
28872 .klen = 32,
28873 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
28874 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
28875 "\x00\x00\x00\x00\x00\x00\x00\x00"
28876 "\x00\x00\x00\x00\x00\x00\x00\x00"
28877 "\x00\x00\x00\x00\x00\x00\x00\x00"
28878 "\x00\x00\x00\x00\x00\x00\x00\x00"
28879 "\x00\x00\x00\x00\x00\x00\x00\x00"
28880 "\x00\x00\x00\x00\x00\x00\x00\x00"
28881 "\x00\x00\x00\x00\x00\x00\x00\x00"
28882 "\x00\x00\x00\x00\x00\x00\x00\x00"
28883 "\x00\x00\x00\x00\x00\x00\x00\x00"
28884 "\x00\x00\x00\x00\x00\x00\x00\x00"
28885 "\x00\x00\x00\x00\x00\x00\x00\x00"
28886 "\x00\x00\x00\x00\x00\x00\x00\x00"
28887 "\x00\x00\x00\x00\x00\x00\x00",
28888 .ilen = 111,
28889 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
28890 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
28891 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
28892 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
28893 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
28894 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
28895 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
28896 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
28897 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
28898 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
28899 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
28900 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
28901 "\x95\x46\x45\x54\xE9\x75\x03\x08"
28902 "\x44\xAF\xE5\x8A\x81\x12\x09",
28903 .rlen = 111,
28904 }, { /* Set 5, vector 27 */
28905 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
28906 "\x00\x00\x00\x00\x00\x00\x00\x00"
28907 "\x00\x00\x00\x00\x00\x00\x00\x00"
28908 "\x00\x00\x00\x00\x00\x00\x00\x00",
28909 .klen = 32,
28910 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
28911 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
28912 "\x00\x00\x00\x00\x00\x00\x00\x00"
28913 "\x00\x00\x00\x00\x00\x00\x00\x00"
28914 "\x00\x00\x00\x00\x00\x00\x00\x00"
28915 "\x00\x00\x00\x00\x00\x00\x00\x00"
28916 "\x00\x00\x00\x00\x00\x00\x00\x00"
28917 "\x00\x00\x00\x00\x00\x00\x00\x00"
28918 "\x00\x00\x00\x00\x00\x00\x00\x00"
28919 "\x00\x00\x00\x00\x00\x00\x00\x00"
28920 "\x00\x00\x00\x00\x00\x00\x00\x00"
28921 "\x00\x00\x00\x00\x00\x00\x00\x00"
28922 "\x00\x00\x00\x00\x00\x00\x00\x00"
28923 "\x00\x00\x00\x00\x00\x00\x00\x00"
28924 "\x00\x00\x00\x00\x00\x00\x00\x00"
28925 "\x00\x00\x00\x00\x00\x00\x00\x00"
28926 "\x00\x00\x00\x00\x00\x00\x00\x00"
28927 "\x00",
28928 .ilen = 129,
28929 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
28930 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
28931 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
28932 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
28933 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
28934 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
28935 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
28936 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
28937 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
28938 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
28939 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
28940 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
28941 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
28942 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
28943 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
28944 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
28945 "\x5A",
28946 .rlen = 129,
28947 }, { /* large test vector generated using Crypto++ */
28948 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
28949 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28950 "\x10\x11\x12\x13\x14\x15\x16\x17"
28951 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
28952 .klen = 32,
28953 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
28954 "\x00\x00\x00\x00\x00\x00\x00\x00",
28955 .input =
28956 "\x00\x01\x02\x03\x04\x05\x06\x07"
28957 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
28958 "\x10\x11\x12\x13\x14\x15\x16\x17"
28959 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
28960 "\x20\x21\x22\x23\x24\x25\x26\x27"
28961 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
28962 "\x30\x31\x32\x33\x34\x35\x36\x37"
28963 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
28964 "\x40\x41\x42\x43\x44\x45\x46\x47"
28965 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
28966 "\x50\x51\x52\x53\x54\x55\x56\x57"
28967 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
28968 "\x60\x61\x62\x63\x64\x65\x66\x67"
28969 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
28970 "\x70\x71\x72\x73\x74\x75\x76\x77"
28971 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
28972 "\x80\x81\x82\x83\x84\x85\x86\x87"
28973 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
28974 "\x90\x91\x92\x93\x94\x95\x96\x97"
28975 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
28976 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
28977 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
28978 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
28979 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
28980 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
28981 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
28982 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
28983 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
28984 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
28985 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
28986 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
28987 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
28988 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
28989 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
28990 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
28991 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
28992 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
28993 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
28994 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
28995 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
28996 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
28997 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
28998 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
28999 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
29000 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
29001 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
29002 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
29003 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
29004 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
29005 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
29006 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
29007 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
29008 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
29009 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
29010 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
29011 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
29012 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
29013 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
29014 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
29015 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
29016 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
29017 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
29018 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
29019 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
29020 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
29021 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
29022 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
29023 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
29024 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
29025 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
29026 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
29027 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
29028 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
29029 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
29030 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
29031 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
29032 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
29033 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
29034 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
29035 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
29036 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
29037 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
29038 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
29039 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
29040 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
29041 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
29042 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
29043 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
29044 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
29045 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
29046 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
29047 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
29048 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
29049 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
29050 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
29051 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
29052 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
29053 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
29054 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
29055 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
29056 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
29057 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
29058 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
29059 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
29060 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
29061 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
29062 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
29063 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
29064 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
29065 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
29066 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
29067 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
29068 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
29069 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
29070 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
29071 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
29072 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
29073 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
29074 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
29075 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
29076 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
29077 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
29078 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
29079 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
29080 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
29081 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
29082 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
29083 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
29084 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
29085 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
29086 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
29087 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
29088 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
29089 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
29090 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
29091 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
29092 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
29093 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
29094 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
29095 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
29096 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
29097 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
29098 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
29099 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
29100 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
29101 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
29102 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
29103 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
29104 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
29105 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
29106 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
29107 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
29108 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
29109 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
29110 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
29111 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
29112 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
29113 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
29114 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
29115 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
29116 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
29117 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
29118 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
29119 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
29120 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
29121 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
29122 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
29123 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
29124 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
29125 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
29126 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
29127 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
29128 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
29129 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
29130 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
29131 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
29132 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
29133 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
29134 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
29135 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
29136 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
29137 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
29138 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
29139 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
29140 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
29141 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
29142 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
29143 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
29144 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
29145 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
29146 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
29147 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
29148 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
29149 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
29150 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
29151 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
29152 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
29153 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
29154 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
29155 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
29156 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
29157 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
29158 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
29159 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
29160 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
29161 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
29162 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
29163 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
29164 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
29165 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
29166 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
29167 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
29168 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
29169 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
29170 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
29171 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
29172 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
29173 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
29174 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
29175 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
29176 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
29177 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
29178 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
29179 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
29180 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
29181 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
29182 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
29183 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
29184 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
29185 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
29186 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
29187 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
29188 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
29189 "\x38\x47\x56\x65\x74\x83\x92\xa1"
29190 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
29191 "\x28\x37\x46\x55\x64\x73\x82\x91"
29192 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
29193 "\x18\x27\x36\x45\x54\x63\x72\x81"
29194 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
29195 "\x08\x17\x26\x35\x44\x53\x62\x71"
29196 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
29197 "\xf8\x07\x16\x25\x34\x43\x52\x61"
29198 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
29199 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
29200 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
29201 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
29202 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
29203 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
29204 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
29205 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
29206 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
29207 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
29208 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
29209 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
29210 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
29211 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
29212 "\x00\x11\x22\x33\x44\x55\x66\x77"
29213 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
29214 "\x10\x21\x32\x43\x54\x65\x76\x87"
29215 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
29216 "\x20\x31\x42\x53\x64\x75\x86\x97"
29217 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
29218 "\x30\x41\x52\x63\x74\x85\x96\xa7"
29219 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
29220 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
29221 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
29222 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
29223 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
29224 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
29225 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
29226 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
29227 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
29228 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
29229 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
29230 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
29231 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
29232 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
29233 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
29234 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
29235 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
29236 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
29237 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
29238 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
29239 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
29240 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
29241 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
29242 "\xf0\x01\x12\x23\x34\x45\x56\x67"
29243 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
29244 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
29245 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
29246 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
29247 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
29248 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
29249 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
29250 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
29251 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
29252 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
29253 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
29254 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
29255 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
29256 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
29257 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
29258 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
29259 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
29260 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
29261 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
29262 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
29263 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
29264 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
29265 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
29266 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
29267 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
29268 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
29269 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
29270 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
29271 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
29272 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
29273 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
29274 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
29275 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
29276 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
29277 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
29278 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
29279 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
29280 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
29281 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
29282 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
29283 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
29284 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
29285 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
29286 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
29287 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
29288 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
29289 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
29290 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
29291 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
29292 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
29293 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
29294 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
29295 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
29296 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
29297 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
29298 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
29299 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
29300 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
29301 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
29302 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
29303 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
29304 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
29305 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
29306 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
29307 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
29308 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
29309 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
29310 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
29311 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
29312 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
29313 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
29314 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
29315 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
29316 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
29317 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
29318 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
29319 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
29320 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
29321 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
29322 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
29323 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
29324 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
29325 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
29326 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
29327 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
29328 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
29329 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
29330 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
29331 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
29332 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
29333 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
29334 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
29335 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
29336 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
29337 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
29338 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
29339 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
29340 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
29341 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
29342 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
29343 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
29344 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
29345 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
29346 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
29347 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
29348 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
29349 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
29350 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
29351 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
29352 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
29353 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
29354 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
29355 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
29356 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
29357 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
29358 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
29359 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
29360 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
29361 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
29362 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
29363 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
29364 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
29365 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
29366 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
29367 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
29368 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
29369 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
29370 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
29371 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
29372 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
29373 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
29374 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
29375 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
29376 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
29377 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
29378 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
29379 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
29380 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
29381 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
29382 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
29383 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
29384 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
29385 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
29386 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
29387 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
29388 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
29389 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
29390 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
29391 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
29392 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
29393 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
29394 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
29395 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
29396 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
29397 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
29398 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
29399 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
29400 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
29401 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
29402 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
29403 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
29404 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
29405 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
29406 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
29407 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
29408 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
29409 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
29410 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
29411 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
29412 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
29413 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
29414 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
29415 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
29416 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
29417 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
29418 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
29419 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
29420 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
29421 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
29422 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
29423 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
29424 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
29425 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
29426 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
29427 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
29428 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
29429 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
29430 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
29431 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
29432 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
29433 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
29434 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
29435 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
29436 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
29437 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
29438 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
29439 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
29440 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
29441 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
29442 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
29443 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
29444 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
29445 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
29446 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
29447 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
29448 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
29449 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
29450 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
29451 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
29452 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
29453 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
29454 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
29455 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
29456 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
29457 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
29458 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
29459 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
29460 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
29461 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
29462 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
29463 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
29464 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
29465 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
29466 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
29467 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
29468 "\x00\x21\x42\x63",
29469 .ilen = 4100,
29470 .result =
29471 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
29472 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
29473 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
29474 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
29475 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
29476 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
29477 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
29478 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
29479 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
29480 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
29481 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
29482 "\xbb\xde\x56\x86\xab\x65\x21\x30"
29483 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
29484 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
29485 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
29486 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
29487 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
29488 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
29489 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
29490 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
29491 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
29492 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
29493 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
29494 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
29495 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
29496 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
29497 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
29498 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
29499 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
29500 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
29501 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
29502 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
29503 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
29504 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
29505 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
29506 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
29507 "\x62\x08\x18\x7a\x25\x49\x28\xac"
29508 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
29509 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
29510 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
29511 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
29512 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
29513 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
29514 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
29515 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
29516 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
29517 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
29518 "\x33\xee\x14\x19\x22\x52\x89\xa7"
29519 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
29520 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
29521 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
29522 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
29523 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
29524 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
29525 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
29526 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
29527 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
29528 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
29529 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
29530 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
29531 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
29532 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
29533 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
29534 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
29535 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
29536 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
29537 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
29538 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
29539 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
29540 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
29541 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
29542 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
29543 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
29544 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
29545 "\x49\x97\x33\xab\x36\x14\x0a\x70"
29546 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
29547 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
29548 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
29549 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
29550 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
29551 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
29552 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
29553 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
29554 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
29555 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
29556 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
29557 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
29558 "\xad\x04\x07\xae\x22\x90\x4a\x93"
29559 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
29560 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
29561 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
29562 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
29563 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
29564 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
29565 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
29566 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
29567 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
29568 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
29569 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
29570 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
29571 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
29572 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
29573 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
29574 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
29575 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
29576 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
29577 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
29578 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
29579 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
29580 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
29581 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
29582 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
29583 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
29584 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
29585 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
29586 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
29587 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
29588 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
29589 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
29590 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
29591 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
29592 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
29593 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
29594 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
29595 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
29596 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
29597 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
29598 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
29599 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
29600 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
29601 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
29602 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
29603 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
29604 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
29605 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
29606 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
29607 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
29608 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
29609 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
29610 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
29611 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
29612 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
29613 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
29614 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
29615 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
29616 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
29617 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
29618 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
29619 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
29620 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
29621 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
29622 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
29623 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
29624 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
29625 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
29626 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
29627 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
29628 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
29629 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
29630 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
29631 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
29632 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
29633 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
29634 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
29635 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
29636 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
29637 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
29638 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
29639 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
29640 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
29641 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
29642 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
29643 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
29644 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
29645 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
29646 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
29647 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
29648 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
29649 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
29650 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
29651 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
29652 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
29653 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
29654 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
29655 "\x2e\x53\x49\x97\x94\x33\xae\x40"
29656 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
29657 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
29658 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
29659 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
29660 "\xce\x87\xad\xcc\x72\x05\x00\x29"
29661 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
29662 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
29663 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
29664 "\xac\xc0\x79\x50\x69\xca\x59\x32"
29665 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
29666 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
29667 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
29668 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
29669 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
29670 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
29671 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
29672 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
29673 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
29674 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
29675 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
29676 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
29677 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
29678 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
29679 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
29680 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
29681 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
29682 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
29683 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
29684 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
29685 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
29686 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
29687 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
29688 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
29689 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
29690 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
29691 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
29692 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
29693 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
29694 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
29695 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
29696 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
29697 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
29698 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
29699 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
29700 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
29701 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
29702 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
29703 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
29704 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
29705 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
29706 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
29707 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
29708 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
29709 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
29710 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
29711 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
29712 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
29713 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
29714 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
29715 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
29716 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
29717 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
29718 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
29719 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
29720 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
29721 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
29722 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
29723 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
29724 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
29725 "\x38\x55\xab\x33\x26\xef\x9f\x43"
29726 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
29727 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
29728 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
29729 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
29730 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
29731 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
29732 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
29733 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
29734 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
29735 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
29736 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
29737 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
29738 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
29739 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
29740 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
29741 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
29742 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
29743 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
29744 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
29745 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
29746 "\x62\x36\x43\xb2\x82\x15\x75\x50"
29747 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
29748 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
29749 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
29750 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
29751 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
29752 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
29753 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
29754 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
29755 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
29756 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
29757 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
29758 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
29759 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
29760 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
29761 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
29762 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
29763 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
29764 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
29765 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
29766 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
29767 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
29768 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
29769 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
29770 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
29771 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
29772 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
29773 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
29774 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
29775 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
29776 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
29777 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
29778 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
29779 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
29780 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
29781 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
29782 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
29783 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
29784 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
29785 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
29786 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
29787 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
29788 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
29789 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
29790 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
29791 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
29792 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
29793 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
29794 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
29795 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
29796 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
29797 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
29798 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
29799 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
29800 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
29801 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
29802 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
29803 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
29804 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
29805 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
29806 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
29807 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
29808 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
29809 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
29810 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
29811 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
29812 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
29813 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
29814 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
29815 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
29816 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
29817 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
29818 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
29819 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
29820 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
29821 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
29822 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
29823 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
29824 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
29825 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
29826 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
29827 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
29828 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
29829 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
29830 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
29831 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
29832 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
29833 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
29834 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
29835 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
29836 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
29837 "\x73\x2e\x71\x79\x16\x06\x63\x28"
29838 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
29839 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
29840 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
29841 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
29842 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
29843 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
29844 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
29845 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
29846 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
29847 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
29848 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
29849 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
29850 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
29851 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
29852 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
29853 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
29854 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
29855 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
29856 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
29857 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
29858 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
29859 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
29860 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
29861 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
29862 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
29863 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
29864 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
29865 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
29866 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
29867 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
29868 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
29869 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
29870 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
29871 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
29872 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
29873 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
29874 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
29875 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
29876 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
29877 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
29878 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
29879 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
29880 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
29881 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
29882 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
29883 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
29884 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
29885 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
29886 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
29887 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
29888 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
29889 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
29890 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
29891 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
29892 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
29893 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
29894 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
29895 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
29896 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
29897 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
29898 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
29899 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
29900 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
29901 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
29902 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
29903 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
29904 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
29905 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
29906 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
29907 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
29908 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
29909 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
29910 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
29911 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
29912 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
29913 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
29914 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
29915 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
29916 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
29917 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
29918 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
29919 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
29920 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
29921 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
29922 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
29923 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
29924 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
29925 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
29926 "\x85\x73\x78\x45\x20\x7f\xae\x13"
29927 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
29928 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
29929 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
29930 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
29931 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
29932 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
29933 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
29934 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
29935 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
29936 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
29937 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
29938 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
29939 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
29940 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
29941 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
29942 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
29943 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
29944 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
29945 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
29946 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
29947 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
29948 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
29949 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
29950 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
29951 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
29952 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
29953 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
29954 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
29955 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
29956 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
29957 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
29958 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
29959 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
29960 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
29961 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
29962 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
29963 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
29964 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
29965 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
29966 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
29967 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
29968 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
29969 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
29970 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
29971 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
29972 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
29973 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
29974 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
29975 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
29976 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
29977 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
29978 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
29979 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
29980 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
29981 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
29982 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
29983 "\xaf\xdf\x11\x95",
29984 .rlen = 4100,
29985 .np = 2,
29986 .tap = { 4064, 36 },
29987 },
29988};
29989
Martin Willi3590ebf2015-06-01 13:43:57 +020029990#define CHACHA20_ENC_TEST_VECTORS 3
29991static struct cipher_testvec chacha20_enc_tv_template[] = {
29992 { /* RFC7539 A.2. Test Vector #1 */
29993 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
29994 "\x00\x00\x00\x00\x00\x00\x00\x00"
29995 "\x00\x00\x00\x00\x00\x00\x00\x00"
29996 "\x00\x00\x00\x00\x00\x00\x00\x00",
29997 .klen = 32,
29998 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
29999 "\x00\x00\x00\x00\x00\x00\x00\x00",
30000 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
30001 "\x00\x00\x00\x00\x00\x00\x00\x00"
30002 "\x00\x00\x00\x00\x00\x00\x00\x00"
30003 "\x00\x00\x00\x00\x00\x00\x00\x00"
30004 "\x00\x00\x00\x00\x00\x00\x00\x00"
30005 "\x00\x00\x00\x00\x00\x00\x00\x00"
30006 "\x00\x00\x00\x00\x00\x00\x00\x00"
30007 "\x00\x00\x00\x00\x00\x00\x00\x00",
30008 .ilen = 64,
30009 .result = "\x76\xb8\xe0\xad\xa0\xf1\x3d\x90"
30010 "\x40\x5d\x6a\xe5\x53\x86\xbd\x28"
30011 "\xbd\xd2\x19\xb8\xa0\x8d\xed\x1a"
30012 "\xa8\x36\xef\xcc\x8b\x77\x0d\xc7"
30013 "\xda\x41\x59\x7c\x51\x57\x48\x8d"
30014 "\x77\x24\xe0\x3f\xb8\xd8\x4a\x37"
30015 "\x6a\x43\xb8\xf4\x15\x18\xa1\x1c"
30016 "\xc3\x87\xb6\x69\xb2\xee\x65\x86",
30017 .rlen = 64,
30018 }, { /* RFC7539 A.2. Test Vector #2 */
30019 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
30020 "\x00\x00\x00\x00\x00\x00\x00\x00"
30021 "\x00\x00\x00\x00\x00\x00\x00\x00"
30022 "\x00\x00\x00\x00\x00\x00\x00\x01",
30023 .klen = 32,
30024 .iv = "\x01\x00\x00\x00\x00\x00\x00\x00"
30025 "\x00\x00\x00\x00\x00\x00\x00\x02",
30026 .input = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
30027 "\x69\x73\x73\x69\x6f\x6e\x20\x74"
30028 "\x6f\x20\x74\x68\x65\x20\x49\x45"
30029 "\x54\x46\x20\x69\x6e\x74\x65\x6e"
30030 "\x64\x65\x64\x20\x62\x79\x20\x74"
30031 "\x68\x65\x20\x43\x6f\x6e\x74\x72"
30032 "\x69\x62\x75\x74\x6f\x72\x20\x66"
30033 "\x6f\x72\x20\x70\x75\x62\x6c\x69"
30034 "\x63\x61\x74\x69\x6f\x6e\x20\x61"
30035 "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
30036 "\x20\x70\x61\x72\x74\x20\x6f\x66"
30037 "\x20\x61\x6e\x20\x49\x45\x54\x46"
30038 "\x20\x49\x6e\x74\x65\x72\x6e\x65"
30039 "\x74\x2d\x44\x72\x61\x66\x74\x20"
30040 "\x6f\x72\x20\x52\x46\x43\x20\x61"
30041 "\x6e\x64\x20\x61\x6e\x79\x20\x73"
30042 "\x74\x61\x74\x65\x6d\x65\x6e\x74"
30043 "\x20\x6d\x61\x64\x65\x20\x77\x69"
30044 "\x74\x68\x69\x6e\x20\x74\x68\x65"
30045 "\x20\x63\x6f\x6e\x74\x65\x78\x74"
30046 "\x20\x6f\x66\x20\x61\x6e\x20\x49"
30047 "\x45\x54\x46\x20\x61\x63\x74\x69"
30048 "\x76\x69\x74\x79\x20\x69\x73\x20"
30049 "\x63\x6f\x6e\x73\x69\x64\x65\x72"
30050 "\x65\x64\x20\x61\x6e\x20\x22\x49"
30051 "\x45\x54\x46\x20\x43\x6f\x6e\x74"
30052 "\x72\x69\x62\x75\x74\x69\x6f\x6e"
30053 "\x22\x2e\x20\x53\x75\x63\x68\x20"
30054 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
30055 "\x74\x73\x20\x69\x6e\x63\x6c\x75"
30056 "\x64\x65\x20\x6f\x72\x61\x6c\x20"
30057 "\x73\x74\x61\x74\x65\x6d\x65\x6e"
30058 "\x74\x73\x20\x69\x6e\x20\x49\x45"
30059 "\x54\x46\x20\x73\x65\x73\x73\x69"
30060 "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
30061 "\x77\x65\x6c\x6c\x20\x61\x73\x20"
30062 "\x77\x72\x69\x74\x74\x65\x6e\x20"
30063 "\x61\x6e\x64\x20\x65\x6c\x65\x63"
30064 "\x74\x72\x6f\x6e\x69\x63\x20\x63"
30065 "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
30066 "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
30067 "\x64\x65\x20\x61\x74\x20\x61\x6e"
30068 "\x79\x20\x74\x69\x6d\x65\x20\x6f"
30069 "\x72\x20\x70\x6c\x61\x63\x65\x2c"
30070 "\x20\x77\x68\x69\x63\x68\x20\x61"
30071 "\x72\x65\x20\x61\x64\x64\x72\x65"
30072 "\x73\x73\x65\x64\x20\x74\x6f",
30073 .ilen = 375,
30074 .result = "\xa3\xfb\xf0\x7d\xf3\xfa\x2f\xde"
30075 "\x4f\x37\x6c\xa2\x3e\x82\x73\x70"
30076 "\x41\x60\x5d\x9f\x4f\x4f\x57\xbd"
30077 "\x8c\xff\x2c\x1d\x4b\x79\x55\xec"
30078 "\x2a\x97\x94\x8b\xd3\x72\x29\x15"
30079 "\xc8\xf3\xd3\x37\xf7\xd3\x70\x05"
30080 "\x0e\x9e\x96\xd6\x47\xb7\xc3\x9f"
30081 "\x56\xe0\x31\xca\x5e\xb6\x25\x0d"
30082 "\x40\x42\xe0\x27\x85\xec\xec\xfa"
30083 "\x4b\x4b\xb5\xe8\xea\xd0\x44\x0e"
30084 "\x20\xb6\xe8\xdb\x09\xd8\x81\xa7"
30085 "\xc6\x13\x2f\x42\x0e\x52\x79\x50"
30086 "\x42\xbd\xfa\x77\x73\xd8\xa9\x05"
30087 "\x14\x47\xb3\x29\x1c\xe1\x41\x1c"
30088 "\x68\x04\x65\x55\x2a\xa6\xc4\x05"
30089 "\xb7\x76\x4d\x5e\x87\xbe\xa8\x5a"
30090 "\xd0\x0f\x84\x49\xed\x8f\x72\xd0"
30091 "\xd6\x62\xab\x05\x26\x91\xca\x66"
30092 "\x42\x4b\xc8\x6d\x2d\xf8\x0e\xa4"
30093 "\x1f\x43\xab\xf9\x37\xd3\x25\x9d"
30094 "\xc4\xb2\xd0\xdf\xb4\x8a\x6c\x91"
30095 "\x39\xdd\xd7\xf7\x69\x66\xe9\x28"
30096 "\xe6\x35\x55\x3b\xa7\x6c\x5c\x87"
30097 "\x9d\x7b\x35\xd4\x9e\xb2\xe6\x2b"
30098 "\x08\x71\xcd\xac\x63\x89\x39\xe2"
30099 "\x5e\x8a\x1e\x0e\xf9\xd5\x28\x0f"
30100 "\xa8\xca\x32\x8b\x35\x1c\x3c\x76"
30101 "\x59\x89\xcb\xcf\x3d\xaa\x8b\x6c"
30102 "\xcc\x3a\xaf\x9f\x39\x79\xc9\x2b"
30103 "\x37\x20\xfc\x88\xdc\x95\xed\x84"
30104 "\xa1\xbe\x05\x9c\x64\x99\xb9\xfd"
30105 "\xa2\x36\xe7\xe8\x18\xb0\x4b\x0b"
30106 "\xc3\x9c\x1e\x87\x6b\x19\x3b\xfe"
30107 "\x55\x69\x75\x3f\x88\x12\x8c\xc0"
30108 "\x8a\xaa\x9b\x63\xd1\xa1\x6f\x80"
30109 "\xef\x25\x54\xd7\x18\x9c\x41\x1f"
30110 "\x58\x69\xca\x52\xc5\xb8\x3f\xa3"
30111 "\x6f\xf2\x16\xb9\xc1\xd3\x00\x62"
30112 "\xbe\xbc\xfd\x2d\xc5\xbc\xe0\x91"
30113 "\x19\x34\xfd\xa7\x9a\x86\xf6\xe6"
30114 "\x98\xce\xd7\x59\xc3\xff\x9b\x64"
30115 "\x77\x33\x8f\x3d\xa4\xf9\xcd\x85"
30116 "\x14\xea\x99\x82\xcc\xaf\xb3\x41"
30117 "\xb2\x38\x4d\xd9\x02\xf3\xd1\xab"
30118 "\x7a\xc6\x1d\xd2\x9c\x6f\x21\xba"
30119 "\x5b\x86\x2f\x37\x30\xe3\x7c\xfd"
30120 "\xc4\xfd\x80\x6c\x22\xf2\x21",
30121 .rlen = 375,
30122 }, { /* RFC7539 A.2. Test Vector #3 */
30123 .key = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
30124 "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
30125 "\x47\x39\x17\xc1\x40\x2b\x80\x09"
30126 "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
30127 .klen = 32,
30128 .iv = "\x2a\x00\x00\x00\x00\x00\x00\x00"
30129 "\x00\x00\x00\x00\x00\x00\x00\x02",
30130 .input = "\x27\x54\x77\x61\x73\x20\x62\x72"
30131 "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
30132 "\x6e\x64\x20\x74\x68\x65\x20\x73"
30133 "\x6c\x69\x74\x68\x79\x20\x74\x6f"
30134 "\x76\x65\x73\x0a\x44\x69\x64\x20"
30135 "\x67\x79\x72\x65\x20\x61\x6e\x64"
30136 "\x20\x67\x69\x6d\x62\x6c\x65\x20"
30137 "\x69\x6e\x20\x74\x68\x65\x20\x77"
30138 "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
30139 "\x20\x6d\x69\x6d\x73\x79\x20\x77"
30140 "\x65\x72\x65\x20\x74\x68\x65\x20"
30141 "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
30142 "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
30143 "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
30144 "\x72\x61\x74\x68\x73\x20\x6f\x75"
30145 "\x74\x67\x72\x61\x62\x65\x2e",
30146 .ilen = 127,
30147 .result = "\x62\xe6\x34\x7f\x95\xed\x87\xa4"
30148 "\x5f\xfa\xe7\x42\x6f\x27\xa1\xdf"
30149 "\x5f\xb6\x91\x10\x04\x4c\x0d\x73"
30150 "\x11\x8e\xff\xa9\x5b\x01\xe5\xcf"
30151 "\x16\x6d\x3d\xf2\xd7\x21\xca\xf9"
30152 "\xb2\x1e\x5f\xb1\x4c\x61\x68\x71"
30153 "\xfd\x84\xc5\x4f\x9d\x65\xb2\x83"
30154 "\x19\x6c\x7f\xe4\xf6\x05\x53\xeb"
30155 "\xf3\x9c\x64\x02\xc4\x22\x34\xe3"
30156 "\x2a\x35\x6b\x3e\x76\x43\x12\xa6"
30157 "\x1a\x55\x32\x05\x57\x16\xea\xd6"
30158 "\x96\x25\x68\xf8\x7d\x3f\x3f\x77"
30159 "\x04\xc6\xa8\xd1\xbc\xd1\xbf\x4d"
30160 "\x50\xd6\x15\x4b\x6d\xa7\x31\xb1"
30161 "\x87\xb5\x8d\xfd\x72\x8a\xfa\x36"
30162 "\x75\x7a\x79\x7a\xc1\x88\xd1",
30163 .rlen = 127,
30164 },
30165};
30166
Herbert Xuda7f0332008-07-31 17:08:25 +080030167/*
30168 * CTS (Cipher Text Stealing) mode tests
30169 */
30170#define CTS_MODE_ENC_TEST_VECTORS 6
30171#define CTS_MODE_DEC_TEST_VECTORS 6
30172static struct cipher_testvec cts_mode_enc_tv_template[] = {
30173 { /* from rfc3962 */
30174 .klen = 16,
30175 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30176 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30177 .ilen = 17,
30178 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30179 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30180 "\x20",
30181 .rlen = 17,
30182 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
30183 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
30184 "\x97",
30185 }, {
30186 .klen = 16,
30187 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30188 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30189 .ilen = 31,
30190 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30191 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30192 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30193 "\x20\x47\x61\x75\x27\x73\x20",
30194 .rlen = 31,
30195 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
30196 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
30197 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30198 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
30199 }, {
30200 .klen = 16,
30201 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30202 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30203 .ilen = 32,
30204 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30205 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30206 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30207 "\x20\x47\x61\x75\x27\x73\x20\x43",
30208 .rlen = 32,
30209 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30210 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
30211 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30212 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
30213 }, {
30214 .klen = 16,
30215 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30216 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30217 .ilen = 47,
30218 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30219 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30220 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30221 "\x20\x47\x61\x75\x27\x73\x20\x43"
30222 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30223 "\x70\x6c\x65\x61\x73\x65\x2c",
30224 .rlen = 47,
30225 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30226 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30227 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
30228 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
30229 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30230 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
30231 }, {
30232 .klen = 16,
30233 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30234 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30235 .ilen = 48,
30236 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30237 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30238 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30239 "\x20\x47\x61\x75\x27\x73\x20\x43"
30240 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30241 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
30242 .rlen = 48,
30243 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30244 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30245 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
30246 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
30247 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30248 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
30249 }, {
30250 .klen = 16,
30251 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30252 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30253 .ilen = 64,
30254 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30255 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30256 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30257 "\x20\x47\x61\x75\x27\x73\x20\x43"
30258 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30259 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
30260 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
30261 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
30262 .rlen = 64,
30263 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30264 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30265 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30266 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
30267 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
30268 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
30269 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
30270 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
30271 }
30272};
30273
30274static struct cipher_testvec cts_mode_dec_tv_template[] = {
30275 { /* from rfc3962 */
30276 .klen = 16,
30277 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30278 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30279 .rlen = 17,
30280 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30281 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30282 "\x20",
30283 .ilen = 17,
30284 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
30285 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
30286 "\x97",
30287 }, {
30288 .klen = 16,
30289 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30290 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30291 .rlen = 31,
30292 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30293 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30294 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30295 "\x20\x47\x61\x75\x27\x73\x20",
30296 .ilen = 31,
30297 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
30298 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
30299 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30300 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
30301 }, {
30302 .klen = 16,
30303 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30304 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30305 .rlen = 32,
30306 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30307 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30308 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30309 "\x20\x47\x61\x75\x27\x73\x20\x43",
30310 .ilen = 32,
30311 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30312 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
30313 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30314 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
30315 }, {
30316 .klen = 16,
30317 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30318 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30319 .rlen = 47,
30320 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30321 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30322 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30323 "\x20\x47\x61\x75\x27\x73\x20\x43"
30324 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30325 "\x70\x6c\x65\x61\x73\x65\x2c",
30326 .ilen = 47,
30327 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30328 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30329 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
30330 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
30331 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30332 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
30333 }, {
30334 .klen = 16,
30335 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30336 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30337 .rlen = 48,
30338 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30339 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30340 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30341 "\x20\x47\x61\x75\x27\x73\x20\x43"
30342 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30343 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
30344 .ilen = 48,
30345 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30346 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30347 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
30348 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
30349 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30350 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
30351 }, {
30352 .klen = 16,
30353 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
30354 "\x74\x65\x72\x69\x79\x61\x6b\x69",
30355 .rlen = 64,
30356 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
30357 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
30358 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
30359 "\x20\x47\x61\x75\x27\x73\x20\x43"
30360 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
30361 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
30362 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
30363 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
30364 .ilen = 64,
30365 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
30366 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
30367 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
30368 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
30369 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
30370 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
30371 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
30372 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
30373 }
30374};
30375
30376/*
30377 * Compression stuff.
30378 */
30379#define COMP_BUF_SIZE 512
30380
30381struct comp_testvec {
30382 int inlen, outlen;
30383 char input[COMP_BUF_SIZE];
30384 char output[COMP_BUF_SIZE];
30385};
30386
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080030387struct pcomp_testvec {
David Howellsf94a3592015-04-28 15:36:30 +010030388 const void *params;
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080030389 unsigned int paramsize;
30390 int inlen, outlen;
30391 char input[COMP_BUF_SIZE];
30392 char output[COMP_BUF_SIZE];
30393};
30394
Herbert Xuda7f0332008-07-31 17:08:25 +080030395/*
30396 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110030397 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080030398 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080030399
Herbert Xuda7f0332008-07-31 17:08:25 +080030400#define DEFLATE_COMP_TEST_VECTORS 2
30401#define DEFLATE_DECOMP_TEST_VECTORS 2
30402
30403static struct comp_testvec deflate_comp_tv_template[] = {
30404 {
30405 .inlen = 70,
30406 .outlen = 38,
30407 .input = "Join us now and share the software "
30408 "Join us now and share the software ",
30409 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
30410 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
30411 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
30412 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
30413 "\x71\xbc\x08\x2b\x01\x00",
30414 }, {
30415 .inlen = 191,
30416 .outlen = 122,
30417 .input = "This document describes a compression method based on the DEFLATE"
30418 "compression algorithm. This document defines the application of "
30419 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
30420 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
30421 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
30422 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
30423 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
30424 "\x68\x12\x51\xae\x76\x67\xd6\x27"
30425 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
30426 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
30427 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
30428 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
30429 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
30430 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
30431 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
30432 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
30433 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
30434 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
30435 "\xfa\x02",
30436 },
30437};
30438
30439static struct comp_testvec deflate_decomp_tv_template[] = {
30440 {
30441 .inlen = 122,
30442 .outlen = 191,
30443 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
30444 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
30445 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
30446 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
30447 "\x68\x12\x51\xae\x76\x67\xd6\x27"
30448 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
30449 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
30450 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
30451 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
30452 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
30453 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
30454 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
30455 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
30456 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
30457 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
30458 "\xfa\x02",
30459 .output = "This document describes a compression method based on the DEFLATE"
30460 "compression algorithm. This document defines the application of "
30461 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
30462 }, {
30463 .inlen = 38,
30464 .outlen = 70,
30465 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
30466 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
30467 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
30468 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
30469 "\x71\xbc\x08\x2b\x01\x00",
30470 .output = "Join us now and share the software "
30471 "Join us now and share the software ",
30472 },
30473};
30474
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080030475#define ZLIB_COMP_TEST_VECTORS 2
30476#define ZLIB_DECOMP_TEST_VECTORS 2
30477
30478static const struct {
30479 struct nlattr nla;
30480 int val;
30481} deflate_comp_params[] = {
30482 {
30483 .nla = {
30484 .nla_len = NLA_HDRLEN + sizeof(int),
30485 .nla_type = ZLIB_COMP_LEVEL,
30486 },
30487 .val = Z_DEFAULT_COMPRESSION,
30488 }, {
30489 .nla = {
30490 .nla_len = NLA_HDRLEN + sizeof(int),
30491 .nla_type = ZLIB_COMP_METHOD,
30492 },
30493 .val = Z_DEFLATED,
30494 }, {
30495 .nla = {
30496 .nla_len = NLA_HDRLEN + sizeof(int),
30497 .nla_type = ZLIB_COMP_WINDOWBITS,
30498 },
30499 .val = -11,
30500 }, {
30501 .nla = {
30502 .nla_len = NLA_HDRLEN + sizeof(int),
30503 .nla_type = ZLIB_COMP_MEMLEVEL,
30504 },
30505 .val = MAX_MEM_LEVEL,
30506 }, {
30507 .nla = {
30508 .nla_len = NLA_HDRLEN + sizeof(int),
30509 .nla_type = ZLIB_COMP_STRATEGY,
30510 },
30511 .val = Z_DEFAULT_STRATEGY,
30512 }
30513};
30514
30515static const struct {
30516 struct nlattr nla;
30517 int val;
30518} deflate_decomp_params[] = {
30519 {
30520 .nla = {
30521 .nla_len = NLA_HDRLEN + sizeof(int),
30522 .nla_type = ZLIB_DECOMP_WINDOWBITS,
30523 },
30524 .val = -11,
30525 }
30526};
30527
30528static struct pcomp_testvec zlib_comp_tv_template[] = {
30529 {
30530 .params = &deflate_comp_params,
30531 .paramsize = sizeof(deflate_comp_params),
30532 .inlen = 70,
30533 .outlen = 38,
30534 .input = "Join us now and share the software "
30535 "Join us now and share the software ",
30536 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
30537 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
30538 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
30539 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
30540 "\x71\xbc\x08\x2b\x01\x00",
30541 }, {
30542 .params = &deflate_comp_params,
30543 .paramsize = sizeof(deflate_comp_params),
30544 .inlen = 191,
30545 .outlen = 122,
30546 .input = "This document describes a compression method based on the DEFLATE"
30547 "compression algorithm. This document defines the application of "
30548 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
30549 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
30550 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
30551 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
30552 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
30553 "\x68\x12\x51\xae\x76\x67\xd6\x27"
30554 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
30555 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
30556 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
30557 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
30558 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
30559 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
30560 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
30561 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
30562 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
30563 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
30564 "\xfa\x02",
30565 },
30566};
30567
30568static struct pcomp_testvec zlib_decomp_tv_template[] = {
30569 {
30570 .params = &deflate_decomp_params,
30571 .paramsize = sizeof(deflate_decomp_params),
30572 .inlen = 122,
30573 .outlen = 191,
30574 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
30575 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
30576 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
30577 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
30578 "\x68\x12\x51\xae\x76\x67\xd6\x27"
30579 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
30580 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
30581 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
30582 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
30583 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
30584 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
30585 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
30586 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
30587 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
30588 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
30589 "\xfa\x02",
30590 .output = "This document describes a compression method based on the DEFLATE"
30591 "compression algorithm. This document defines the application of "
30592 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
30593 }, {
30594 .params = &deflate_decomp_params,
30595 .paramsize = sizeof(deflate_decomp_params),
30596 .inlen = 38,
30597 .outlen = 70,
30598 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
30599 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
30600 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
30601 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
30602 "\x71\xbc\x08\x2b\x01\x00",
30603 .output = "Join us now and share the software "
30604 "Join us now and share the software ",
30605 },
30606};
30607
Herbert Xuda7f0332008-07-31 17:08:25 +080030608/*
30609 * LZO test vectors (null-terminated strings).
30610 */
30611#define LZO_COMP_TEST_VECTORS 2
30612#define LZO_DECOMP_TEST_VECTORS 2
30613
30614static struct comp_testvec lzo_comp_tv_template[] = {
30615 {
30616 .inlen = 70,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030617 .outlen = 57,
Herbert Xuda7f0332008-07-31 17:08:25 +080030618 .input = "Join us now and share the software "
30619 "Join us now and share the software ",
30620 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030621 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30622 "\x64\x20\x73\x68\x61\x72\x65\x20"
30623 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30624 "\x77\x70\x01\x32\x88\x00\x0c\x65"
30625 "\x20\x74\x68\x65\x20\x73\x6f\x66"
30626 "\x74\x77\x61\x72\x65\x20\x11\x00"
30627 "\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080030628 }, {
30629 .inlen = 159,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030630 .outlen = 131,
Herbert Xuda7f0332008-07-31 17:08:25 +080030631 .input = "This document describes a compression method based on the LZO "
30632 "compression algorithm. This document defines the application of "
30633 "the LZO algorithm used in UBIFS.",
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030634 .output = "\x00\x2c\x54\x68\x69\x73\x20\x64"
Herbert Xuda7f0332008-07-31 17:08:25 +080030635 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
30636 "\x64\x65\x73\x63\x72\x69\x62\x65"
30637 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
30638 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
30639 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
30640 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020030641 "\x74\x68\x65\x20\x4c\x5a\x4f\x20"
30642 "\x2a\x8c\x00\x09\x61\x6c\x67\x6f"
30643 "\x72\x69\x74\x68\x6d\x2e\x20\x20"
30644 "\x2e\x54\x01\x03\x66\x69\x6e\x65"
30645 "\x73\x20\x74\x06\x05\x61\x70\x70"
30646 "\x6c\x69\x63\x61\x74\x76\x0a\x6f"
30647 "\x66\x88\x02\x60\x09\x27\xf0\x00"
30648 "\x0c\x20\x75\x73\x65\x64\x20\x69"
30649 "\x6e\x20\x55\x42\x49\x46\x53\x2e"
30650 "\x11\x00\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080030651 },
30652};
30653
30654static struct comp_testvec lzo_decomp_tv_template[] = {
30655 {
30656 .inlen = 133,
30657 .outlen = 159,
30658 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
30659 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
30660 "\x64\x65\x73\x63\x72\x69\x62\x65"
30661 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
30662 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
30663 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
30664 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
30665 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
30666 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
30667 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
30668 "\x68\x69\x73\x2a\x54\x01\x02\x66"
30669 "\x69\x6e\x65\x73\x94\x06\x05\x61"
30670 "\x70\x70\x6c\x69\x63\x61\x74\x76"
30671 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
30672 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
30673 "\x20\x69\x6e\x20\x55\x42\x49\x46"
30674 "\x53\x2e\x11\x00\x00",
30675 .output = "This document describes a compression method based on the LZO "
30676 "compression algorithm. This document defines the application of "
30677 "the LZO algorithm used in UBIFS.",
30678 }, {
30679 .inlen = 46,
30680 .outlen = 70,
30681 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
30682 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
30683 "\x64\x20\x73\x68\x61\x72\x65\x20"
30684 "\x74\x68\x65\x20\x73\x6f\x66\x74"
30685 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
30686 "\x3d\x88\x00\x11\x00\x00",
30687 .output = "Join us now and share the software "
30688 "Join us now and share the software ",
30689 },
30690};
30691
30692/*
30693 * Michael MIC test vectors from IEEE 802.11i
30694 */
30695#define MICHAEL_MIC_TEST_VECTORS 6
30696
30697static struct hash_testvec michael_mic_tv_template[] = {
30698 {
30699 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
30700 .ksize = 8,
30701 .plaintext = zeroed_string,
30702 .psize = 0,
30703 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
30704 },
30705 {
30706 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
30707 .ksize = 8,
30708 .plaintext = "M",
30709 .psize = 1,
30710 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
30711 },
30712 {
30713 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
30714 .ksize = 8,
30715 .plaintext = "Mi",
30716 .psize = 2,
30717 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
30718 },
30719 {
30720 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
30721 .ksize = 8,
30722 .plaintext = "Mic",
30723 .psize = 3,
30724 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
30725 },
30726 {
30727 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
30728 .ksize = 8,
30729 .plaintext = "Mich",
30730 .psize = 4,
30731 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
30732 },
30733 {
30734 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
30735 .ksize = 8,
30736 .plaintext = "Michael",
30737 .psize = 7,
30738 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
30739 }
30740};
30741
30742/*
Ard Biesheuvelebb34722015-05-04 11:00:17 +020030743 * CRC32 test vectors
30744 */
30745#define CRC32_TEST_VECTORS 14
30746
30747static struct hash_testvec crc32_tv_template[] = {
30748 {
30749 .key = "\x87\xa9\xcb\xed",
30750 .ksize = 4,
30751 .psize = 0,
30752 .digest = "\x87\xa9\xcb\xed",
30753 },
30754 {
30755 .key = "\xff\xff\xff\xff",
30756 .ksize = 4,
30757 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30758 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30759 "\x11\x12\x13\x14\x15\x16\x17\x18"
30760 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30761 "\x21\x22\x23\x24\x25\x26\x27\x28",
30762 .psize = 40,
30763 .digest = "\x3a\xdf\x4b\xb0",
30764 },
30765 {
30766 .key = "\xff\xff\xff\xff",
30767 .ksize = 4,
30768 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30769 "\x31\x32\x33\x34\x35\x36\x37\x38"
30770 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30771 "\x41\x42\x43\x44\x45\x46\x47\x48"
30772 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
30773 .psize = 40,
30774 .digest = "\xa9\x7a\x7f\x7b",
30775 },
30776 {
30777 .key = "\xff\xff\xff\xff",
30778 .ksize = 4,
30779 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
30780 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30781 "\x61\x62\x63\x64\x65\x66\x67\x68"
30782 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30783 "\x71\x72\x73\x74\x75\x76\x77\x78",
30784 .psize = 40,
30785 .digest = "\xba\xd3\xf8\x1c",
30786 },
30787 {
30788 .key = "\xff\xff\xff\xff",
30789 .ksize = 4,
30790 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30791 "\x81\x82\x83\x84\x85\x86\x87\x88"
30792 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30793 "\x91\x92\x93\x94\x95\x96\x97\x98"
30794 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
30795 .psize = 40,
30796 .digest = "\xa8\xa9\xc2\x02",
30797 },
30798 {
30799 .key = "\xff\xff\xff\xff",
30800 .ksize = 4,
30801 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30802 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30803 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30804 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30805 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
30806 .psize = 40,
30807 .digest = "\x27\xf0\x57\xe2",
30808 },
30809 {
30810 .key = "\xff\xff\xff\xff",
30811 .ksize = 4,
30812 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30813 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30814 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30815 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30816 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30817 .psize = 40,
30818 .digest = "\x49\x78\x10\x08",
30819 },
30820 {
30821 .key = "\x80\xea\xd3\xf1",
30822 .ksize = 4,
30823 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30824 "\x31\x32\x33\x34\x35\x36\x37\x38"
30825 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30826 "\x41\x42\x43\x44\x45\x46\x47\x48"
30827 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
30828 .psize = 40,
30829 .digest = "\x9a\xb1\xdc\xf0",
30830 },
30831 {
30832 .key = "\xf3\x4a\x1d\x5d",
30833 .ksize = 4,
30834 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
30835 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30836 "\x61\x62\x63\x64\x65\x66\x67\x68"
30837 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30838 "\x71\x72\x73\x74\x75\x76\x77\x78",
30839 .psize = 40,
30840 .digest = "\xb4\x97\xcc\xd4",
30841 },
30842 {
30843 .key = "\x2e\x80\x04\x59",
30844 .ksize = 4,
30845 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30846 "\x81\x82\x83\x84\x85\x86\x87\x88"
30847 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30848 "\x91\x92\x93\x94\x95\x96\x97\x98"
30849 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
30850 .psize = 40,
30851 .digest = "\x67\x9b\xfa\x79",
30852 },
30853 {
30854 .key = "\xa6\xcc\x19\x85",
30855 .ksize = 4,
30856 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30857 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30858 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30859 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30860 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
30861 .psize = 40,
30862 .digest = "\x24\xb5\x16\xef",
30863 },
30864 {
30865 .key = "\x41\xfc\xfe\x2d",
30866 .ksize = 4,
30867 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30868 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30869 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30870 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30871 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30872 .psize = 40,
30873 .digest = "\x15\x94\x80\x39",
30874 },
30875 {
30876 .key = "\xff\xff\xff\xff",
30877 .ksize = 4,
30878 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
30879 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
30880 "\x11\x12\x13\x14\x15\x16\x17\x18"
30881 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
30882 "\x21\x22\x23\x24\x25\x26\x27\x28"
30883 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
30884 "\x31\x32\x33\x34\x35\x36\x37\x38"
30885 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
30886 "\x41\x42\x43\x44\x45\x46\x47\x48"
30887 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
30888 "\x51\x52\x53\x54\x55\x56\x57\x58"
30889 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
30890 "\x61\x62\x63\x64\x65\x66\x67\x68"
30891 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
30892 "\x71\x72\x73\x74\x75\x76\x77\x78"
30893 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
30894 "\x81\x82\x83\x84\x85\x86\x87\x88"
30895 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
30896 "\x91\x92\x93\x94\x95\x96\x97\x98"
30897 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
30898 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
30899 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
30900 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
30901 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
30902 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
30903 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
30904 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
30905 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
30906 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
30907 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
30908 .psize = 240,
30909 .digest = "\x6c\xc6\x56\xde",
30910 .np = 2,
30911 .tap = { 31, 209 }
30912 }, {
30913 .key = "\xff\xff\xff\xff",
30914 .ksize = 4,
30915 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
30916 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
30917 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
30918 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
30919 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
30920 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
30921 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
30922 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
30923 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
30924 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
30925 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
30926 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
30927 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
30928 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
30929 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
30930 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
30931 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
30932 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
30933 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
30934 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
30935 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
30936 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
30937 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
30938 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
30939 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
30940 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
30941 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
30942 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
30943 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
30944 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
30945 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
30946 "\x47\xde\x75\x0c\x80\x17\xae\x22"
30947 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
30948 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
30949 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
30950 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
30951 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
30952 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
30953 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
30954 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
30955 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
30956 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
30957 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
30958 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
30959 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
30960 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
30961 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
30962 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
30963 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
30964 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
30965 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
30966 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
30967 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
30968 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
30969 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
30970 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
30971 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
30972 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
30973 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
30974 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
30975 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
30976 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
30977 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
30978 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
30979 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
30980 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
30981 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
30982 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
30983 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
30984 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
30985 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
30986 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
30987 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
30988 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
30989 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
30990 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
30991 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
30992 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
30993 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
30994 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
30995 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
30996 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
30997 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
30998 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
30999 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
31000 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
31001 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
31002 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
31003 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
31004 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
31005 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
31006 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
31007 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
31008 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
31009 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
31010 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
31011 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
31012 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
31013 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
31014 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
31015 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
31016 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
31017 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
31018 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
31019 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
31020 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
31021 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
31022 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
31023 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
31024 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
31025 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
31026 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
31027 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
31028 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
31029 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
31030 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
31031 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
31032 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
31033 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
31034 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
31035 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
31036 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
31037 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
31038 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
31039 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
31040 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
31041 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
31042 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
31043 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
31044 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
31045 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
31046 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
31047 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
31048 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
31049 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
31050 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
31051 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
31052 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
31053 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
31054 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
31055 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
31056 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
31057 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
31058 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
31059 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
31060 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
31061 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
31062 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
31063 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
31064 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
31065 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
31066 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
31067 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
31068 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
31069 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
31070 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
31071 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
31072 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
31073 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
31074 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
31075 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
31076 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
31077 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
31078 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
31079 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
31080 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
31081 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
31082 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
31083 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
31084 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
31085 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
31086 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
31087 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
31088 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
31089 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
31090 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
31091 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
31092 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
31093 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
31094 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
31095 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
31096 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
31097 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
31098 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
31099 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
31100 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
31101 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
31102 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
31103 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
31104 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
31105 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
31106 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
31107 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
31108 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
31109 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
31110 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
31111 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
31112 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
31113 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
31114 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
31115 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
31116 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
31117 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
31118 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
31119 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
31120 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
31121 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
31122 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
31123 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
31124 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
31125 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
31126 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
31127 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
31128 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
31129 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
31130 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
31131 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
31132 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
31133 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
31134 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
31135 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
31136 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
31137 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
31138 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
31139 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
31140 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
31141 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
31142 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
31143 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
31144 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
31145 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
31146 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
31147 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
31148 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
31149 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
31150 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
31151 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
31152 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
31153 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
31154 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
31155 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
31156 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
31157 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
31158 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
31159 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
31160 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
31161 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
31162 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
31163 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
31164 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
31165 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
31166 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
31167 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
31168 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
31169 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
31170 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
31171 .psize = 2048,
31172 .digest = "\xfb\x3a\x7a\xda",
31173 }
31174};
31175
31176/*
Herbert Xuda7f0332008-07-31 17:08:25 +080031177 * CRC32C test vectors
31178 */
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020031179#define CRC32C_TEST_VECTORS 15
Herbert Xuda7f0332008-07-31 17:08:25 +080031180
31181static struct hash_testvec crc32c_tv_template[] = {
31182 {
31183 .psize = 0,
31184 .digest = "\x00\x00\x00\x00",
31185 },
31186 {
31187 .key = "\x87\xa9\xcb\xed",
31188 .ksize = 4,
31189 .psize = 0,
31190 .digest = "\x78\x56\x34\x12",
31191 },
31192 {
31193 .key = "\xff\xff\xff\xff",
31194 .ksize = 4,
31195 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31196 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31197 "\x11\x12\x13\x14\x15\x16\x17\x18"
31198 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31199 "\x21\x22\x23\x24\x25\x26\x27\x28",
31200 .psize = 40,
31201 .digest = "\x7f\x15\x2c\x0e",
31202 },
31203 {
31204 .key = "\xff\xff\xff\xff",
31205 .ksize = 4,
31206 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31207 "\x31\x32\x33\x34\x35\x36\x37\x38"
31208 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31209 "\x41\x42\x43\x44\x45\x46\x47\x48"
31210 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
31211 .psize = 40,
31212 .digest = "\xf6\xeb\x80\xe9",
31213 },
31214 {
31215 .key = "\xff\xff\xff\xff",
31216 .ksize = 4,
31217 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
31218 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31219 "\x61\x62\x63\x64\x65\x66\x67\x68"
31220 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31221 "\x71\x72\x73\x74\x75\x76\x77\x78",
31222 .psize = 40,
31223 .digest = "\xed\xbd\x74\xde",
31224 },
31225 {
31226 .key = "\xff\xff\xff\xff",
31227 .ksize = 4,
31228 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31229 "\x81\x82\x83\x84\x85\x86\x87\x88"
31230 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31231 "\x91\x92\x93\x94\x95\x96\x97\x98"
31232 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
31233 .psize = 40,
31234 .digest = "\x62\xc8\x79\xd5",
31235 },
31236 {
31237 .key = "\xff\xff\xff\xff",
31238 .ksize = 4,
31239 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31240 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31241 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31242 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31243 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
31244 .psize = 40,
31245 .digest = "\xd0\x9a\x97\xba",
31246 },
31247 {
31248 .key = "\xff\xff\xff\xff",
31249 .ksize = 4,
31250 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31251 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31252 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31253 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31254 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31255 .psize = 40,
31256 .digest = "\x13\xd9\x29\x2b",
31257 },
31258 {
31259 .key = "\x80\xea\xd3\xf1",
31260 .ksize = 4,
31261 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31262 "\x31\x32\x33\x34\x35\x36\x37\x38"
31263 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31264 "\x41\x42\x43\x44\x45\x46\x47\x48"
31265 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
31266 .psize = 40,
31267 .digest = "\x0c\xb5\xe2\xa2",
31268 },
31269 {
31270 .key = "\xf3\x4a\x1d\x5d",
31271 .ksize = 4,
31272 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
31273 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31274 "\x61\x62\x63\x64\x65\x66\x67\x68"
31275 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31276 "\x71\x72\x73\x74\x75\x76\x77\x78",
31277 .psize = 40,
31278 .digest = "\xd1\x7f\xfb\xa6",
31279 },
31280 {
31281 .key = "\x2e\x80\x04\x59",
31282 .ksize = 4,
31283 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31284 "\x81\x82\x83\x84\x85\x86\x87\x88"
31285 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31286 "\x91\x92\x93\x94\x95\x96\x97\x98"
31287 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
31288 .psize = 40,
31289 .digest = "\x59\x33\xe6\x7a",
31290 },
31291 {
31292 .key = "\xa6\xcc\x19\x85",
31293 .ksize = 4,
31294 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31295 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31296 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31297 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31298 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
31299 .psize = 40,
31300 .digest = "\xbe\x03\x01\xd2",
31301 },
31302 {
31303 .key = "\x41\xfc\xfe\x2d",
31304 .ksize = 4,
31305 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31306 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31307 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31308 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31309 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31310 .psize = 40,
31311 .digest = "\x75\xd3\xc5\x24",
31312 },
31313 {
31314 .key = "\xff\xff\xff\xff",
31315 .ksize = 4,
31316 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31317 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31318 "\x11\x12\x13\x14\x15\x16\x17\x18"
31319 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31320 "\x21\x22\x23\x24\x25\x26\x27\x28"
31321 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31322 "\x31\x32\x33\x34\x35\x36\x37\x38"
31323 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31324 "\x41\x42\x43\x44\x45\x46\x47\x48"
31325 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
31326 "\x51\x52\x53\x54\x55\x56\x57\x58"
31327 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31328 "\x61\x62\x63\x64\x65\x66\x67\x68"
31329 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31330 "\x71\x72\x73\x74\x75\x76\x77\x78"
31331 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31332 "\x81\x82\x83\x84\x85\x86\x87\x88"
31333 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31334 "\x91\x92\x93\x94\x95\x96\x97\x98"
31335 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
31336 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31337 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31338 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31339 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31340 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
31341 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31342 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31343 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31344 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31345 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31346 .psize = 240,
31347 .digest = "\x75\xd3\xc5\x24",
31348 .np = 2,
31349 .tap = { 31, 209 }
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020031350 }, {
31351 .key = "\xff\xff\xff\xff",
31352 .ksize = 4,
31353 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
31354 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
31355 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
31356 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
31357 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
31358 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
31359 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
31360 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
31361 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
31362 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
31363 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
31364 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
31365 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
31366 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
31367 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
31368 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
31369 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
31370 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
31371 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
31372 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
31373 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
31374 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
31375 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
31376 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
31377 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
31378 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
31379 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
31380 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
31381 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
31382 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
31383 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
31384 "\x47\xde\x75\x0c\x80\x17\xae\x22"
31385 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
31386 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
31387 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
31388 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
31389 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
31390 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
31391 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
31392 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
31393 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
31394 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
31395 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
31396 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
31397 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
31398 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
31399 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
31400 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
31401 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
31402 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
31403 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
31404 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
31405 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
31406 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
31407 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
31408 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
31409 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
31410 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
31411 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
31412 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
31413 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
31414 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
31415 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
31416 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
31417 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
31418 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
31419 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
31420 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
31421 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
31422 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
31423 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
31424 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
31425 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
31426 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
31427 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
31428 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
31429 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
31430 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
31431 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
31432 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
31433 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
31434 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
31435 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
31436 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
31437 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
31438 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
31439 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
31440 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
31441 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
31442 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
31443 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
31444 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
31445 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
31446 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
31447 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
31448 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
31449 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
31450 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
31451 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
31452 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
31453 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
31454 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
31455 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
31456 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
31457 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
31458 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
31459 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
31460 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
31461 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
31462 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
31463 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
31464 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
31465 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
31466 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
31467 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
31468 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
31469 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
31470 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
31471 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
31472 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
31473 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
31474 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
31475 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
31476 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
31477 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
31478 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
31479 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
31480 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
31481 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
31482 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
31483 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
31484 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
31485 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
31486 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
31487 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
31488 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
31489 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
31490 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
31491 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
31492 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
31493 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
31494 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
31495 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
31496 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
31497 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
31498 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
31499 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
31500 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
31501 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
31502 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
31503 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
31504 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
31505 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
31506 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
31507 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
31508 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
31509 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
31510 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
31511 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
31512 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
31513 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
31514 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
31515 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
31516 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
31517 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
31518 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
31519 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
31520 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
31521 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
31522 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
31523 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
31524 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
31525 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
31526 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
31527 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
31528 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
31529 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
31530 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
31531 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
31532 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
31533 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
31534 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
31535 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
31536 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
31537 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
31538 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
31539 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
31540 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
31541 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
31542 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
31543 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
31544 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
31545 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
31546 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
31547 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
31548 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
31549 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
31550 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
31551 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
31552 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
31553 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
31554 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
31555 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
31556 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
31557 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
31558 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
31559 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
31560 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
31561 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
31562 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
31563 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
31564 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
31565 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
31566 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
31567 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
31568 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
31569 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
31570 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
31571 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
31572 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
31573 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
31574 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
31575 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
31576 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
31577 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
31578 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
31579 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
31580 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
31581 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
31582 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
31583 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
31584 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
31585 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
31586 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
31587 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
31588 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
31589 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
31590 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
31591 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
31592 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
31593 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
31594 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
31595 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
31596 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
31597 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
31598 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
31599 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
31600 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
31601 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
31602 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
31603 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
31604 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
31605 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
31606 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
31607 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
31608 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
31609 .psize = 2048,
31610 .digest = "\xec\x26\x4d\x95",
31611 }
Herbert Xuda7f0332008-07-31 17:08:25 +080031612};
31613
Sonic Zhanga482b082012-05-25 17:54:13 +080031614/*
31615 * Blakcifn CRC test vectors
31616 */
31617#define BFIN_CRC_TEST_VECTORS 6
31618
31619static struct hash_testvec bfin_crc_tv_template[] = {
31620 {
31621 .psize = 0,
31622 .digest = "\x00\x00\x00\x00",
31623 },
31624 {
31625 .key = "\x87\xa9\xcb\xed",
31626 .ksize = 4,
31627 .psize = 0,
31628 .digest = "\x87\xa9\xcb\xed",
31629 },
31630 {
31631 .key = "\xff\xff\xff\xff",
31632 .ksize = 4,
31633 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31634 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31635 "\x11\x12\x13\x14\x15\x16\x17\x18"
31636 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31637 "\x21\x22\x23\x24\x25\x26\x27\x28",
31638 .psize = 40,
31639 .digest = "\x84\x0c\x8d\xa2",
31640 },
31641 {
31642 .key = "\xff\xff\xff\xff",
31643 .ksize = 4,
31644 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31645 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31646 "\x11\x12\x13\x14\x15\x16\x17\x18"
31647 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31648 "\x21\x22\x23\x24\x25\x26",
31649 .psize = 38,
31650 .digest = "\x8c\x58\xec\xb7",
31651 },
31652 {
31653 .key = "\xff\xff\xff\xff",
31654 .ksize = 4,
31655 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31656 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31657 "\x11\x12\x13\x14\x15\x16\x17\x18"
31658 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31659 "\x21\x22\x23\x24\x25\x26\x27",
31660 .psize = 39,
31661 .digest = "\xdc\x50\x28\x7b",
31662 },
31663 {
31664 .key = "\xff\xff\xff\xff",
31665 .ksize = 4,
31666 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
31667 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
31668 "\x11\x12\x13\x14\x15\x16\x17\x18"
31669 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
31670 "\x21\x22\x23\x24\x25\x26\x27\x28"
31671 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
31672 "\x31\x32\x33\x34\x35\x36\x37\x38"
31673 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
31674 "\x41\x42\x43\x44\x45\x46\x47\x48"
31675 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
31676 "\x51\x52\x53\x54\x55\x56\x57\x58"
31677 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
31678 "\x61\x62\x63\x64\x65\x66\x67\x68"
31679 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
31680 "\x71\x72\x73\x74\x75\x76\x77\x78"
31681 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
31682 "\x81\x82\x83\x84\x85\x86\x87\x88"
31683 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
31684 "\x91\x92\x93\x94\x95\x96\x97\x98"
31685 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
31686 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
31687 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
31688 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
31689 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
31690 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
31691 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
31692 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
31693 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
31694 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
31695 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
31696 .psize = 240,
31697 .digest = "\x10\x19\x4a\x5c",
31698 .np = 2,
31699 .tap = { 31, 209 }
31700 },
31701
31702};
31703
KOVACS Krisztian1443cc92014-08-22 10:44:36 +020031704#define LZ4_COMP_TEST_VECTORS 1
31705#define LZ4_DECOMP_TEST_VECTORS 1
31706
31707static struct comp_testvec lz4_comp_tv_template[] = {
31708 {
31709 .inlen = 70,
31710 .outlen = 45,
31711 .input = "Join us now and share the software "
31712 "Join us now and share the software ",
31713 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
31714 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
31715 "\x64\x20\x73\x68\x61\x72\x65\x20"
31716 "\x74\x68\x65\x20\x73\x6f\x66\x74"
31717 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
31718 "\x77\x61\x72\x65\x20",
31719 },
31720};
31721
31722static struct comp_testvec lz4_decomp_tv_template[] = {
31723 {
31724 .inlen = 45,
31725 .outlen = 70,
31726 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
31727 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
31728 "\x64\x20\x73\x68\x61\x72\x65\x20"
31729 "\x74\x68\x65\x20\x73\x6f\x66\x74"
31730 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
31731 "\x77\x61\x72\x65\x20",
31732 .output = "Join us now and share the software "
31733 "Join us now and share the software ",
31734 },
31735};
31736
31737#define LZ4HC_COMP_TEST_VECTORS 1
31738#define LZ4HC_DECOMP_TEST_VECTORS 1
31739
31740static struct comp_testvec lz4hc_comp_tv_template[] = {
31741 {
31742 .inlen = 70,
31743 .outlen = 45,
31744 .input = "Join us now and share the software "
31745 "Join us now and share the software ",
31746 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
31747 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
31748 "\x64\x20\x73\x68\x61\x72\x65\x20"
31749 "\x74\x68\x65\x20\x73\x6f\x66\x74"
31750 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
31751 "\x77\x61\x72\x65\x20",
31752 },
31753};
31754
31755static struct comp_testvec lz4hc_decomp_tv_template[] = {
31756 {
31757 .inlen = 45,
31758 .outlen = 70,
31759 .input = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
31760 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
31761 "\x64\x20\x73\x68\x61\x72\x65\x20"
31762 "\x74\x68\x65\x20\x73\x6f\x66\x74"
31763 "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
31764 "\x77\x61\x72\x65\x20",
31765 .output = "Join us now and share the software "
31766 "Join us now and share the software ",
31767 },
31768};
31769
Herbert Xuda7f0332008-07-31 17:08:25 +080031770#endif /* _CRYPTO_TESTMGR_H */