blob: 3db83dbba1d939d19800cb2d7439417ddfece4ff [file] [log] [blame]
Herbert Xuda7f0332008-07-31 17:08:25 +08001/*
2 * Algorithm testing framework and tests.
3 *
4 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
5 * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
6 * Copyright (c) 2007 Nokia Siemens Networks
7 * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au>
8 *
Adrian Hoban69435b92010-11-04 15:02:04 -04009 * Updated RFC4106 AES-GCM testing. Some test vectors were taken from
10 * http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/
11 * gcm/gcm-test-vectors.tar.gz
12 * Authors: Aidan O'Mahony (aidan.o.mahony@intel.com)
13 * Adrian Hoban <adrian.hoban@intel.com>
14 * Gabriele Paoloni <gabriele.paoloni@intel.com>
15 * Tadeusz Struk (tadeusz.struk@intel.com)
16 * Copyright (c) 2010, Intel Corporation.
17 *
Herbert Xuda7f0332008-07-31 17:08:25 +080018 * This program is free software; you can redistribute it and/or modify it
19 * under the terms of the GNU General Public License as published by the Free
20 * Software Foundation; either version 2 of the License, or (at your option)
21 * any later version.
22 *
23 */
24#ifndef _CRYPTO_TESTMGR_H
25#define _CRYPTO_TESTMGR_H
26
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080027#include <linux/netlink.h>
28#include <linux/zlib.h>
29
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080030#include <crypto/compress.h>
31
Herbert Xuda7f0332008-07-31 17:08:25 +080032#define MAX_DIGEST_SIZE 64
33#define MAX_TAP 8
34
35#define MAX_KEYLEN 56
36#define MAX_IVLEN 32
37
38struct hash_testvec {
39 /* only used with keyed hash algorithms */
40 char *key;
41 char *plaintext;
42 char *digest;
43 unsigned char tap[MAX_TAP];
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020044 unsigned short psize;
Herbert Xuda7f0332008-07-31 17:08:25 +080045 unsigned char np;
46 unsigned char ksize;
47};
48
49struct cipher_testvec {
50 char *key;
51 char *iv;
52 char *input;
53 char *result;
54 unsigned short tap[MAX_TAP];
55 int np;
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030056 unsigned char also_non_np;
Herbert Xuda7f0332008-07-31 17:08:25 +080057 unsigned char fail;
58 unsigned char wk; /* weak key flag */
59 unsigned char klen;
60 unsigned short ilen;
61 unsigned short rlen;
62};
63
64struct aead_testvec {
65 char *key;
66 char *iv;
67 char *input;
68 char *assoc;
69 char *result;
70 unsigned char tap[MAX_TAP];
71 unsigned char atap[MAX_TAP];
72 int np;
73 int anp;
74 unsigned char fail;
Jarod Wilsone44a1b42009-05-04 19:22:11 +080075 unsigned char novrfy; /* ccm dec verification failure expected */
Herbert Xuda7f0332008-07-31 17:08:25 +080076 unsigned char wk; /* weak key flag */
77 unsigned char klen;
78 unsigned short ilen;
79 unsigned short alen;
80 unsigned short rlen;
81};
82
Jarod Wilson7647d6c2009-05-04 19:44:50 +080083struct cprng_testvec {
84 char *key;
85 char *dt;
86 char *v;
87 char *result;
88 unsigned char klen;
89 unsigned short dtlen;
90 unsigned short vlen;
91 unsigned short rlen;
92 unsigned short loops;
93};
94
Herbert Xuda7f0332008-07-31 17:08:25 +080095static char zeroed_string[48];
96
97/*
98 * MD4 test vectors from RFC1320
99 */
100#define MD4_TEST_VECTORS 7
101
102static struct hash_testvec md4_tv_template [] = {
103 {
104 .plaintext = "",
105 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
106 "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
107 }, {
108 .plaintext = "a",
109 .psize = 1,
110 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
111 "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
112 }, {
113 .plaintext = "abc",
114 .psize = 3,
115 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
116 "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
117 }, {
118 .plaintext = "message digest",
119 .psize = 14,
120 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
121 "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
122 }, {
123 .plaintext = "abcdefghijklmnopqrstuvwxyz",
124 .psize = 26,
125 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
126 "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
127 .np = 2,
128 .tap = { 13, 13 },
129 }, {
130 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
131 .psize = 62,
132 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
133 "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
134 }, {
135 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
136 "45678901234567890",
137 .psize = 80,
138 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
139 "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
140 },
141};
142
143/*
144 * MD5 test vectors from RFC1321
145 */
146#define MD5_TEST_VECTORS 7
147
148static struct hash_testvec md5_tv_template[] = {
149 {
150 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
151 "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
152 }, {
153 .plaintext = "a",
154 .psize = 1,
155 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
156 "\x31\xc3\x99\xe2\x69\x77\x26\x61",
157 }, {
158 .plaintext = "abc",
159 .psize = 3,
160 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
161 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
162 }, {
163 .plaintext = "message digest",
164 .psize = 14,
165 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
166 "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
167 }, {
168 .plaintext = "abcdefghijklmnopqrstuvwxyz",
169 .psize = 26,
170 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
171 "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
172 .np = 2,
173 .tap = {13, 13}
174 }, {
175 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
176 .psize = 62,
177 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
178 "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
179 }, {
180 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
181 "345678901234567890",
182 .psize = 80,
183 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
184 "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
185 }
186
187};
188
189/*
190 * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
191 */
192#define RMD128_TEST_VECTORS 10
193
194static struct hash_testvec rmd128_tv_template[] = {
195 {
196 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
197 "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
198 }, {
199 .plaintext = "a",
200 .psize = 1,
201 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
202 "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
203 }, {
204 .plaintext = "abc",
205 .psize = 3,
206 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
207 "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
208 }, {
209 .plaintext = "message digest",
210 .psize = 14,
211 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
212 "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
213 }, {
214 .plaintext = "abcdefghijklmnopqrstuvwxyz",
215 .psize = 26,
216 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
217 "\x10\x71\x49\x22\xb3\x71\x83\x4e",
218 }, {
219 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
220 "fghijklmnopqrstuvwxyz0123456789",
221 .psize = 62,
222 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
223 "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
224 }, {
225 .plaintext = "1234567890123456789012345678901234567890"
226 "1234567890123456789012345678901234567890",
227 .psize = 80,
228 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
229 "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
230 }, {
231 .plaintext = "abcdbcdecdefdefgefghfghighij"
232 "hijkijkljklmklmnlmnomnopnopq",
233 .psize = 56,
234 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
235 "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
236 .np = 2,
237 .tap = { 28, 28 },
238 }, {
239 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
240 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
241 "lmnopqrsmnopqrstnopqrstu",
242 .psize = 112,
243 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
244 "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
245 }, {
246 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
247 .psize = 32,
248 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
249 "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
250 }
251};
252
253/*
254 * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
255 */
256#define RMD160_TEST_VECTORS 10
257
258static struct hash_testvec rmd160_tv_template[] = {
259 {
260 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
261 "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
262 }, {
263 .plaintext = "a",
264 .psize = 1,
265 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
266 "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
267 }, {
268 .plaintext = "abc",
269 .psize = 3,
270 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
271 "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
272 }, {
273 .plaintext = "message digest",
274 .psize = 14,
275 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
276 "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
277 }, {
278 .plaintext = "abcdefghijklmnopqrstuvwxyz",
279 .psize = 26,
280 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
281 "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
282 }, {
283 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
284 "fghijklmnopqrstuvwxyz0123456789",
285 .psize = 62,
286 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
287 "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
288 }, {
289 .plaintext = "1234567890123456789012345678901234567890"
290 "1234567890123456789012345678901234567890",
291 .psize = 80,
292 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
293 "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
294 }, {
295 .plaintext = "abcdbcdecdefdefgefghfghighij"
296 "hijkijkljklmklmnlmnomnopnopq",
297 .psize = 56,
298 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
299 "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
300 .np = 2,
301 .tap = { 28, 28 },
302 }, {
303 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
304 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
305 "lmnopqrsmnopqrstnopqrstu",
306 .psize = 112,
307 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
308 "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
309 }, {
310 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
311 .psize = 32,
312 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
313 "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
314 }
315};
316
317/*
318 * RIPEMD-256 test vectors
319 */
320#define RMD256_TEST_VECTORS 8
321
322static struct hash_testvec rmd256_tv_template[] = {
323 {
324 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
325 "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
326 "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
327 "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
328 }, {
329 .plaintext = "a",
330 .psize = 1,
331 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
332 "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
333 "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
334 "\xcd\x88\x3a\x91\x34\x69\x29\x25",
335 }, {
336 .plaintext = "abc",
337 .psize = 3,
338 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
339 "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
340 "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
341 "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
342 }, {
343 .plaintext = "message digest",
344 .psize = 14,
345 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
346 "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
347 "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
348 "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
349 }, {
350 .plaintext = "abcdefghijklmnopqrstuvwxyz",
351 .psize = 26,
352 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
353 "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
354 "\x78\x96\x11\x8a\x51\x97\x96\x87"
355 "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
356 }, {
357 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
358 "fghijklmnopqrstuvwxyz0123456789",
359 .psize = 62,
360 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
361 "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
362 "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
363 "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
364 }, {
365 .plaintext = "1234567890123456789012345678901234567890"
366 "1234567890123456789012345678901234567890",
367 .psize = 80,
368 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
369 "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
370 "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
371 "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
372 }, {
373 .plaintext = "abcdbcdecdefdefgefghfghighij"
374 "hijkijkljklmklmnlmnomnopnopq",
375 .psize = 56,
376 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
377 "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
378 "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
379 "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
380 .np = 2,
381 .tap = { 28, 28 },
382 }
383};
384
385/*
386 * RIPEMD-320 test vectors
387 */
388#define RMD320_TEST_VECTORS 8
389
390static struct hash_testvec rmd320_tv_template[] = {
391 {
392 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
393 "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
394 "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
395 "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
396 }, {
397 .plaintext = "a",
398 .psize = 1,
399 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
400 "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
401 "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
402 "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
403 }, {
404 .plaintext = "abc",
405 .psize = 3,
406 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
407 "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
408 "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
409 "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
410 }, {
411 .plaintext = "message digest",
412 .psize = 14,
413 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
414 "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
415 "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
416 "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
417 }, {
418 .plaintext = "abcdefghijklmnopqrstuvwxyz",
419 .psize = 26,
420 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
421 "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
422 "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
423 "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
424 }, {
425 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
426 "fghijklmnopqrstuvwxyz0123456789",
427 .psize = 62,
428 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
429 "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
430 "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
431 "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
432 }, {
433 .plaintext = "1234567890123456789012345678901234567890"
434 "1234567890123456789012345678901234567890",
435 .psize = 80,
436 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
437 "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
438 "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
439 "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
440 }, {
441 .plaintext = "abcdbcdecdefdefgefghfghighij"
442 "hijkijkljklmklmnlmnomnopnopq",
443 .psize = 56,
444 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
445 "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
446 "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
447 "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
448 .np = 2,
449 .tap = { 28, 28 },
450 }
451};
452
Herbert Xu684115212013-09-07 12:56:26 +1000453#define CRCT10DIF_TEST_VECTORS 3
454static struct hash_testvec crct10dif_tv_template[] = {
455 {
456 .plaintext = "abc",
457 .psize = 3,
458#ifdef __LITTLE_ENDIAN
459 .digest = "\x3b\x44",
460#else
461 .digest = "\x44\x3b",
462#endif
463 }, {
464 .plaintext = "1234567890123456789012345678901234567890"
465 "123456789012345678901234567890123456789",
466 .psize = 79,
467#ifdef __LITTLE_ENDIAN
468 .digest = "\x70\x4b",
469#else
470 .digest = "\x4b\x70",
471#endif
472 }, {
473 .plaintext =
474 "abcddddddddddddddddddddddddddddddddddddddddddddddddddddd",
475 .psize = 56,
476#ifdef __LITTLE_ENDIAN
477 .digest = "\xe3\x9c",
478#else
479 .digest = "\x9c\xe3",
480#endif
481 .np = 2,
482 .tap = { 28, 28 }
483 }
484};
485
Herbert Xuda7f0332008-07-31 17:08:25 +0800486/*
487 * SHA1 test vectors from from FIPS PUB 180-1
Herbert Xubd1f2992011-02-17 14:24:45 +1100488 * Long vector from CAVS 5.0
Herbert Xuda7f0332008-07-31 17:08:25 +0800489 */
Herbert Xubd1f2992011-02-17 14:24:45 +1100490#define SHA1_TEST_VECTORS 3
Herbert Xuda7f0332008-07-31 17:08:25 +0800491
492static struct hash_testvec sha1_tv_template[] = {
493 {
494 .plaintext = "abc",
495 .psize = 3,
496 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
497 "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
498 }, {
499 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
500 .psize = 56,
501 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
502 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
503 .np = 2,
504 .tap = { 28, 28 }
Herbert Xubd1f2992011-02-17 14:24:45 +1100505 }, {
506 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
507 "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
508 "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
509 "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
510 "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
511 "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
512 "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
513 "\x72\x28\x26\xc0\x66\x86\x9e\xda"
514 "\xcd\x73\xb2\x54\x80\x35\x18\x58"
515 "\x13\xe2\x26\x34\xa9\xda\x44\x00"
516 "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
517 "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
518 "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
519 "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
520 "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
521 "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
522 "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
523 "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
524 "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
525 "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
526 "\x5a\x90\x11",
527 .psize = 163,
528 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
529 "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
530 .np = 4,
531 .tap = { 63, 64, 31, 5 }
Herbert Xuda7f0332008-07-31 17:08:25 +0800532 }
533};
534
535
536/*
537 * SHA224 test vectors from from FIPS PUB 180-2
538 */
539#define SHA224_TEST_VECTORS 2
540
541static struct hash_testvec sha224_tv_template[] = {
542 {
543 .plaintext = "abc",
544 .psize = 3,
545 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
546 "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
547 "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
548 "\xE3\x6C\x9D\xA7",
549 }, {
550 .plaintext =
551 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
552 .psize = 56,
553 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
554 "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
555 "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
556 "\x52\x52\x25\x25",
557 .np = 2,
558 .tap = { 28, 28 }
559 }
560};
561
562/*
563 * SHA256 test vectors from from NIST
564 */
565#define SHA256_TEST_VECTORS 2
566
567static struct hash_testvec sha256_tv_template[] = {
568 {
569 .plaintext = "abc",
570 .psize = 3,
571 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
572 "\x41\x41\x40\xde\x5d\xae\x22\x23"
573 "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
574 "\xb4\x10\xff\x61\xf2\x00\x15\xad",
575 }, {
576 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
577 .psize = 56,
578 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
579 "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
580 "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
581 "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
582 .np = 2,
583 .tap = { 28, 28 }
584 },
585};
586
587/*
588 * SHA384 test vectors from from NIST and kerneli
589 */
590#define SHA384_TEST_VECTORS 4
591
592static struct hash_testvec sha384_tv_template[] = {
593 {
594 .plaintext= "abc",
595 .psize = 3,
596 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
597 "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
598 "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
599 "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
600 "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
601 "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
602 }, {
603 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
604 .psize = 56,
605 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
606 "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
607 "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
608 "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
609 "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
610 "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
611 }, {
612 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
613 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
614 .psize = 112,
615 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
616 "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
617 "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
618 "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
619 "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
620 "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
621 }, {
622 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
623 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
624 .psize = 104,
625 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
626 "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
627 "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
628 "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
629 "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
630 "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
631 .np = 4,
632 .tap = { 26, 26, 26, 26 }
633 },
634};
635
636/*
637 * SHA512 test vectors from from NIST and kerneli
638 */
639#define SHA512_TEST_VECTORS 4
640
641static struct hash_testvec sha512_tv_template[] = {
642 {
643 .plaintext = "abc",
644 .psize = 3,
645 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
646 "\xcc\x41\x73\x49\xae\x20\x41\x31"
647 "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
648 "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
649 "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
650 "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
651 "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
652 "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
653 }, {
654 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
655 .psize = 56,
656 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
657 "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
658 "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
659 "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
660 "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
661 "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
662 "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
663 "\x54\xec\x63\x12\x38\xca\x34\x45",
664 }, {
665 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
666 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
667 .psize = 112,
668 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
669 "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
670 "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
671 "\x72\x99\xae\xad\xb6\x88\x90\x18"
672 "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
673 "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
674 "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
675 "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
676 }, {
677 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
678 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
679 .psize = 104,
680 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
681 "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
682 "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
683 "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
684 "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
685 "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
686 "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
687 "\xed\xb4\x19\x87\x23\x28\x50\xc9",
688 .np = 4,
689 .tap = { 26, 26, 26, 26 }
690 },
691};
692
693
694/*
695 * WHIRLPOOL test vectors from Whirlpool package
696 * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
697 * submission
698 */
699#define WP512_TEST_VECTORS 8
700
701static struct hash_testvec wp512_tv_template[] = {
702 {
703 .plaintext = "",
704 .psize = 0,
705 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
706 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
707 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
708 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
709 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
710 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
711 "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
712 "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
713
714
715 }, {
716 .plaintext = "a",
717 .psize = 1,
718 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
719 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
720 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
721 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
722 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
723 "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
724 "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
725 "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
726 }, {
727 .plaintext = "abc",
728 .psize = 3,
729 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
730 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
731 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
732 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
733 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
734 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
735 "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
736 "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
737 }, {
738 .plaintext = "message digest",
739 .psize = 14,
740 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
741 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
742 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
743 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
744 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
745 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
746 "\x92\xED\x92\x00\x52\x83\x8F\x33"
747 "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
748 }, {
749 .plaintext = "abcdefghijklmnopqrstuvwxyz",
750 .psize = 26,
751 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
752 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
753 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
754 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
755 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
756 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
757 "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
758 "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
759 }, {
760 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
761 "abcdefghijklmnopqrstuvwxyz0123456789",
762 .psize = 62,
763 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
764 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
765 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
766 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
767 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
768 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
769 "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
770 "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
771 }, {
772 .plaintext = "1234567890123456789012345678901234567890"
773 "1234567890123456789012345678901234567890",
774 .psize = 80,
775 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
776 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
777 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
778 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
779 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
780 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
781 "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
782 "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
783 }, {
784 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
785 .psize = 32,
786 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
787 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
788 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
789 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
790 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
791 "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
792 "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
793 "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
794 },
795};
796
797#define WP384_TEST_VECTORS 8
798
799static struct hash_testvec wp384_tv_template[] = {
800 {
801 .plaintext = "",
802 .psize = 0,
803 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
804 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
805 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
806 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
807 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
808 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
809
810
811 }, {
812 .plaintext = "a",
813 .psize = 1,
814 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
815 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
816 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
817 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
818 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
819 "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
820 }, {
821 .plaintext = "abc",
822 .psize = 3,
823 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
824 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
825 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
826 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
827 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
828 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
829 }, {
830 .plaintext = "message digest",
831 .psize = 14,
832 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
833 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
834 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
835 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
836 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
837 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
838 }, {
839 .plaintext = "abcdefghijklmnopqrstuvwxyz",
840 .psize = 26,
841 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
842 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
843 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
844 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
845 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
846 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
847 }, {
848 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
849 "abcdefghijklmnopqrstuvwxyz0123456789",
850 .psize = 62,
851 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
852 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
853 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
854 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
855 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
856 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
857 }, {
858 .plaintext = "1234567890123456789012345678901234567890"
859 "1234567890123456789012345678901234567890",
860 .psize = 80,
861 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
862 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
863 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
864 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
865 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
866 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
867 }, {
868 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
869 .psize = 32,
870 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
871 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
872 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
873 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
874 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
875 "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
876 },
877};
878
879#define WP256_TEST_VECTORS 8
880
881static struct hash_testvec wp256_tv_template[] = {
882 {
883 .plaintext = "",
884 .psize = 0,
885 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
886 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
887 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
888 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
889
890
891 }, {
892 .plaintext = "a",
893 .psize = 1,
894 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
895 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
896 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
897 "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
898 }, {
899 .plaintext = "abc",
900 .psize = 3,
901 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
902 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
903 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
904 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
905 }, {
906 .plaintext = "message digest",
907 .psize = 14,
908 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
909 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
910 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
911 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
912 }, {
913 .plaintext = "abcdefghijklmnopqrstuvwxyz",
914 .psize = 26,
915 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
916 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
917 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
918 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
919 }, {
920 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
921 "abcdefghijklmnopqrstuvwxyz0123456789",
922 .psize = 62,
923 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
924 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
925 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
926 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
927 }, {
928 .plaintext = "1234567890123456789012345678901234567890"
929 "1234567890123456789012345678901234567890",
930 .psize = 80,
931 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
932 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
933 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
934 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
935 }, {
936 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
937 .psize = 32,
938 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
939 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
940 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
941 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
942 },
943};
944
945/*
946 * TIGER test vectors from Tiger website
947 */
948#define TGR192_TEST_VECTORS 6
949
950static struct hash_testvec tgr192_tv_template[] = {
951 {
952 .plaintext = "",
953 .psize = 0,
954 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
955 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
956 "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
957 }, {
958 .plaintext = "abc",
959 .psize = 3,
960 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
961 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
962 "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
963 }, {
964 .plaintext = "Tiger",
965 .psize = 5,
966 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
967 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
968 "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
969 }, {
970 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
971 .psize = 64,
972 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
973 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
974 "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
975 }, {
976 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
977 .psize = 64,
978 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
979 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
980 "\x57\x89\x65\x65\x97\x5f\x91\x97",
981 }, {
982 .plaintext = "Tiger - A Fast New Hash Function, "
983 "by Ross Anderson and Eli Biham, "
984 "proceedings of Fast Software Encryption 3, "
985 "Cambridge, 1996.",
986 .psize = 125,
987 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
988 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
989 "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
990 },
991};
992
993#define TGR160_TEST_VECTORS 6
994
995static struct hash_testvec tgr160_tv_template[] = {
996 {
997 .plaintext = "",
998 .psize = 0,
999 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1000 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
1001 "\xf3\x73\xde\x2d",
1002 }, {
1003 .plaintext = "abc",
1004 .psize = 3,
1005 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1006 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
1007 "\x93\x5f\x7b\x95",
1008 }, {
1009 .plaintext = "Tiger",
1010 .psize = 5,
1011 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1012 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
1013 "\x37\x79\x0c\x11",
1014 }, {
1015 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1016 .psize = 64,
1017 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1018 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
1019 "\xb5\x86\x44\x50",
1020 }, {
1021 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1022 .psize = 64,
1023 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1024 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
1025 "\x57\x89\x65\x65",
1026 }, {
1027 .plaintext = "Tiger - A Fast New Hash Function, "
1028 "by Ross Anderson and Eli Biham, "
1029 "proceedings of Fast Software Encryption 3, "
1030 "Cambridge, 1996.",
1031 .psize = 125,
1032 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1033 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1034 "\xdd\x68\x15\x1d",
1035 },
1036};
1037
1038#define TGR128_TEST_VECTORS 6
1039
1040static struct hash_testvec tgr128_tv_template[] = {
1041 {
1042 .plaintext = "",
1043 .psize = 0,
1044 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1045 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
1046 }, {
1047 .plaintext = "abc",
1048 .psize = 3,
1049 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1050 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
1051 }, {
1052 .plaintext = "Tiger",
1053 .psize = 5,
1054 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1055 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
1056 }, {
1057 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1058 .psize = 64,
1059 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1060 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
1061 }, {
1062 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1063 .psize = 64,
1064 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1065 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
1066 }, {
1067 .plaintext = "Tiger - A Fast New Hash Function, "
1068 "by Ross Anderson and Eli Biham, "
1069 "proceedings of Fast Software Encryption 3, "
1070 "Cambridge, 1996.",
1071 .psize = 125,
1072 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1073 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
1074 },
1075};
1076
Youquan, Song507069c2009-11-23 20:23:04 +08001077#define GHASH_TEST_VECTORS 1
1078
1079static struct hash_testvec ghash_tv_template[] =
1080{
1081 {
1082
1083 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
1084 .ksize = 16,
1085 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
1086 .psize = 16,
1087 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
1088 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
1089 },
1090};
1091
Herbert Xuda7f0332008-07-31 17:08:25 +08001092/*
1093 * HMAC-MD5 test vectors from RFC2202
1094 * (These need to be fixed to not use strlen).
1095 */
1096#define HMAC_MD5_TEST_VECTORS 7
1097
1098static struct hash_testvec hmac_md5_tv_template[] =
1099{
1100 {
1101 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1102 .ksize = 16,
1103 .plaintext = "Hi There",
1104 .psize = 8,
1105 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
1106 "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
1107 }, {
1108 .key = "Jefe",
1109 .ksize = 4,
1110 .plaintext = "what do ya want for nothing?",
1111 .psize = 28,
1112 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
1113 "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
1114 .np = 2,
1115 .tap = {14, 14}
1116 }, {
1117 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1118 .ksize = 16,
1119 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1120 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1121 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1122 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1123 .psize = 50,
1124 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
1125 "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
1126 }, {
1127 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1128 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1129 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1130 .ksize = 25,
1131 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1132 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1133 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1134 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1135 .psize = 50,
1136 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
1137 "\x3a\x75\x16\x47\x46\xff\xaa\x79",
1138 }, {
1139 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1140 .ksize = 16,
1141 .plaintext = "Test With Truncation",
1142 .psize = 20,
1143 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
1144 "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
1145 }, {
1146 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1147 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1148 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1149 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1150 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1151 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1152 "\xaa\xaa",
1153 .ksize = 80,
1154 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1155 .psize = 54,
1156 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
1157 "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
1158 }, {
1159 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1160 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1161 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1162 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1163 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1164 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1165 "\xaa\xaa",
1166 .ksize = 80,
1167 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1168 "Block-Size Data",
1169 .psize = 73,
1170 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
1171 "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
1172 },
1173};
1174
1175/*
1176 * HMAC-RIPEMD128 test vectors from RFC2286
1177 */
1178#define HMAC_RMD128_TEST_VECTORS 7
1179
1180static struct hash_testvec hmac_rmd128_tv_template[] = {
1181 {
1182 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1183 .ksize = 16,
1184 .plaintext = "Hi There",
1185 .psize = 8,
1186 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
1187 "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
1188 }, {
1189 .key = "Jefe",
1190 .ksize = 4,
1191 .plaintext = "what do ya want for nothing?",
1192 .psize = 28,
1193 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
1194 "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
1195 .np = 2,
1196 .tap = { 14, 14 },
1197 }, {
1198 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1199 .ksize = 16,
1200 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1201 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1202 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1203 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1204 .psize = 50,
1205 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
1206 "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
1207 }, {
1208 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1209 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1210 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1211 .ksize = 25,
1212 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1213 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1214 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1215 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1216 .psize = 50,
1217 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
1218 "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
1219 }, {
1220 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1221 .ksize = 16,
1222 .plaintext = "Test With Truncation",
1223 .psize = 20,
1224 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
1225 "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
1226 }, {
1227 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1228 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1229 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1230 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1231 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1232 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1233 "\xaa\xaa",
1234 .ksize = 80,
1235 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1236 .psize = 54,
1237 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
1238 "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
1239 }, {
1240 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1241 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1242 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1243 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1244 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1245 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1246 "\xaa\xaa",
1247 .ksize = 80,
1248 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1249 "Block-Size Data",
1250 .psize = 73,
1251 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
1252 "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
1253 },
1254};
1255
1256/*
1257 * HMAC-RIPEMD160 test vectors from RFC2286
1258 */
1259#define HMAC_RMD160_TEST_VECTORS 7
1260
1261static struct hash_testvec hmac_rmd160_tv_template[] = {
1262 {
1263 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1264 .ksize = 20,
1265 .plaintext = "Hi There",
1266 .psize = 8,
1267 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
1268 "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
1269 }, {
1270 .key = "Jefe",
1271 .ksize = 4,
1272 .plaintext = "what do ya want for nothing?",
1273 .psize = 28,
1274 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
1275 "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
1276 .np = 2,
1277 .tap = { 14, 14 },
1278 }, {
1279 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1280 .ksize = 20,
1281 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1282 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1283 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1284 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1285 .psize = 50,
1286 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
1287 "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
1288 }, {
1289 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1290 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1291 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1292 .ksize = 25,
1293 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1294 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1295 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1296 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1297 .psize = 50,
1298 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
1299 "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
1300 }, {
1301 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1302 .ksize = 20,
1303 .plaintext = "Test With Truncation",
1304 .psize = 20,
1305 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
1306 "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
1307 }, {
1308 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1309 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1310 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1311 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1312 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1313 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1314 "\xaa\xaa",
1315 .ksize = 80,
1316 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1317 .psize = 54,
1318 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
1319 "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
1320 }, {
1321 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1322 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1323 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1324 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1325 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1326 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1327 "\xaa\xaa",
1328 .ksize = 80,
1329 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1330 "Block-Size Data",
1331 .psize = 73,
1332 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
1333 "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
1334 },
1335};
1336
1337/*
1338 * HMAC-SHA1 test vectors from RFC2202
1339 */
1340#define HMAC_SHA1_TEST_VECTORS 7
1341
1342static struct hash_testvec hmac_sha1_tv_template[] = {
1343 {
1344 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1345 .ksize = 20,
1346 .plaintext = "Hi There",
1347 .psize = 8,
1348 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
1349 "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
1350 "\x46\xbe",
1351 }, {
1352 .key = "Jefe",
1353 .ksize = 4,
1354 .plaintext = "what do ya want for nothing?",
1355 .psize = 28,
1356 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
1357 "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
1358 .np = 2,
1359 .tap = { 14, 14 }
1360 }, {
1361 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1362 .ksize = 20,
1363 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1364 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1365 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1366 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1367 .psize = 50,
1368 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
1369 "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
1370 }, {
1371 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1372 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1373 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1374 .ksize = 25,
1375 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1376 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1377 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1378 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1379 .psize = 50,
1380 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
1381 "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
1382 }, {
1383 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1384 .ksize = 20,
1385 .plaintext = "Test With Truncation",
1386 .psize = 20,
1387 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
1388 "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
1389 }, {
1390 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1391 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1392 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1393 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1394 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1395 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1396 "\xaa\xaa",
1397 .ksize = 80,
1398 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1399 .psize = 54,
1400 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
1401 "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
1402 }, {
1403 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1404 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1405 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1406 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1407 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1408 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1409 "\xaa\xaa",
1410 .ksize = 80,
1411 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1412 "Block-Size Data",
1413 .psize = 73,
1414 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
1415 "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
1416 },
1417};
1418
1419
1420/*
1421 * SHA224 HMAC test vectors from RFC4231
1422 */
1423#define HMAC_SHA224_TEST_VECTORS 4
1424
1425static struct hash_testvec hmac_sha224_tv_template[] = {
1426 {
1427 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1428 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1429 "\x0b\x0b\x0b\x0b",
1430 .ksize = 20,
1431 /* ("Hi There") */
1432 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
1433 .psize = 8,
1434 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
1435 "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
1436 "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
1437 "\x53\x68\x4b\x22",
1438 }, {
1439 .key = "Jefe",
1440 .ksize = 4,
1441 /* ("what do ya want for nothing?") */
1442 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
1443 "\x79\x61\x20\x77\x61\x6e\x74\x20"
1444 "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
1445 "\x69\x6e\x67\x3f",
1446 .psize = 28,
1447 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
1448 "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
1449 "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
1450 "\x8f\xd0\x5e\x44",
1451 .np = 4,
1452 .tap = { 7, 7, 7, 7 }
1453 }, {
1454 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1455 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1456 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1457 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1458 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1459 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1460 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1461 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1462 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1463 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1464 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1465 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1466 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1467 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1468 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1469 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1470 "\xaa\xaa\xaa",
1471 .ksize = 131,
1472 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
1473 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
1474 "\x6e\x67\x20\x4c\x61\x72\x67\x65"
1475 "\x72\x20\x54\x68\x61\x6e\x20\x42"
1476 "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
1477 "\x65\x20\x4b\x65\x79\x20\x2d\x20"
1478 "\x48\x61\x73\x68\x20\x4b\x65\x79"
1479 "\x20\x46\x69\x72\x73\x74",
1480 .psize = 54,
1481 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
1482 "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
1483 "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
1484 "\x3f\xa6\x87\x0e",
1485 }, {
1486 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1487 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1488 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1489 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1490 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1491 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1492 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1493 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1494 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1495 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1496 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1497 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1498 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1499 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1500 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1501 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1502 "\xaa\xaa\xaa",
1503 .ksize = 131,
1504 /* ("This is a test using a larger than block-size key and a")
1505 (" larger than block-size data. The key needs to be")
1506 (" hashed before being used by the HMAC algorithm.") */
1507 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
1508 "\x61\x20\x74\x65\x73\x74\x20\x75"
1509 "\x73\x69\x6e\x67\x20\x61\x20\x6c"
1510 "\x61\x72\x67\x65\x72\x20\x74\x68"
1511 "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
1512 "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
1513 "\x79\x20\x61\x6e\x64\x20\x61\x20"
1514 "\x6c\x61\x72\x67\x65\x72\x20\x74"
1515 "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
1516 "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
1517 "\x61\x74\x61\x2e\x20\x54\x68\x65"
1518 "\x20\x6b\x65\x79\x20\x6e\x65\x65"
1519 "\x64\x73\x20\x74\x6f\x20\x62\x65"
1520 "\x20\x68\x61\x73\x68\x65\x64\x20"
1521 "\x62\x65\x66\x6f\x72\x65\x20\x62"
1522 "\x65\x69\x6e\x67\x20\x75\x73\x65"
1523 "\x64\x20\x62\x79\x20\x74\x68\x65"
1524 "\x20\x48\x4d\x41\x43\x20\x61\x6c"
1525 "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
1526 .psize = 152,
1527 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
1528 "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
1529 "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
1530 "\xf6\xf5\x65\xd1",
1531 },
1532};
1533
1534/*
1535 * HMAC-SHA256 test vectors from
1536 * draft-ietf-ipsec-ciph-sha-256-01.txt
1537 */
1538#define HMAC_SHA256_TEST_VECTORS 10
1539
1540static struct hash_testvec hmac_sha256_tv_template[] = {
1541 {
1542 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1543 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1544 "\x11\x12\x13\x14\x15\x16\x17\x18"
1545 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1546 .ksize = 32,
1547 .plaintext = "abc",
1548 .psize = 3,
1549 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
1550 "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
1551 "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
1552 "\x92\x75\x90\x21\xcf\xab\x81\x81",
1553 }, {
1554 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1555 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1556 "\x11\x12\x13\x14\x15\x16\x17\x18"
1557 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1558 .ksize = 32,
1559 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1560 .psize = 56,
1561 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
1562 "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
1563 "\xe6\x98\xe3\x61\x19\x42\x11\x49"
1564 "\xea\x8c\x71\x24\x56\x69\x7d\x30",
1565 }, {
1566 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1567 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1568 "\x11\x12\x13\x14\x15\x16\x17\x18"
1569 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1570 .ksize = 32,
1571 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
1572 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1573 .psize = 112,
1574 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
1575 "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
1576 "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
1577 "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
1578 }, {
1579 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1580 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1581 "\x0b\x0b\x0b\x0b\x0b\x0b",
1582 .ksize = 32,
1583 .plaintext = "Hi There",
1584 .psize = 8,
1585 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
1586 "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
1587 "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
1588 "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
1589 }, {
1590 .key = "Jefe",
1591 .ksize = 4,
1592 .plaintext = "what do ya want for nothing?",
1593 .psize = 28,
1594 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
1595 "\x6a\x04\x24\x26\x08\x95\x75\xc7"
1596 "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
1597 "\x9d\xec\x58\xb9\x64\xec\x38\x43",
1598 .np = 2,
1599 .tap = { 14, 14 }
1600 }, {
1601 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1602 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1603 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1604 .ksize = 32,
1605 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1606 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1607 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1608 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1609 .psize = 50,
1610 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
1611 "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
1612 "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
1613 "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
1614 }, {
1615 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1616 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1617 "\x11\x12\x13\x14\x15\x16\x17\x18"
1618 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
1619 "\x21\x22\x23\x24\x25",
1620 .ksize = 37,
1621 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1622 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1623 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1624 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1625 .psize = 50,
1626 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
1627 "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
1628 "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
1629 "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
1630 }, {
1631 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1632 "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1633 "\x0c\x0c\x0c\x0c\x0c\x0c",
1634 .ksize = 32,
1635 .plaintext = "Test With Truncation",
1636 .psize = 20,
1637 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
1638 "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
1639 "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
1640 "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
1641 }, {
1642 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1643 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1644 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1645 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1646 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1647 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1648 "\xaa\xaa",
1649 .ksize = 80,
1650 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1651 .psize = 54,
1652 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
1653 "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
1654 "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
1655 "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
1656 }, {
1657 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1658 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1659 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1660 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1661 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1662 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1663 "\xaa\xaa",
1664 .ksize = 80,
1665 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
1666 "One Block-Size Data",
1667 .psize = 73,
1668 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
1669 "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
1670 "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
1671 "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
1672 },
1673};
1674
Jussi Kivilinna93b5e862013-04-08 10:48:44 +03001675#define CMAC_AES_TEST_VECTORS 6
1676
1677static struct hash_testvec aes_cmac128_tv_template[] = {
1678 { /* From NIST Special Publication 800-38B, AES-128 */
1679 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
1680 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
1681 .plaintext = zeroed_string,
1682 .digest = "\xbb\x1d\x69\x29\xe9\x59\x37\x28"
1683 "\x7f\xa3\x7d\x12\x9b\x75\x67\x46",
1684 .psize = 0,
1685 .ksize = 16,
1686 }, {
1687 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
1688 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
1689 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
1690 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a",
1691 .digest = "\x07\x0a\x16\xb4\x6b\x4d\x41\x44"
1692 "\xf7\x9b\xdd\x9d\xd0\x4a\x28\x7c",
1693 .psize = 16,
1694 .ksize = 16,
1695 }, {
1696 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
1697 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
1698 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
1699 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
1700 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
1701 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
1702 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11",
1703 .digest = "\xdf\xa6\x67\x47\xde\x9a\xe6\x30"
1704 "\x30\xca\x32\x61\x14\x97\xc8\x27",
1705 .psize = 40,
1706 .ksize = 16,
1707 }, {
1708 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
1709 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
1710 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
1711 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
1712 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
1713 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
1714 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
1715 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
1716 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
1717 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
1718 .digest = "\x51\xf0\xbe\xbf\x7e\x3b\x9d\x92"
1719 "\xfc\x49\x74\x17\x79\x36\x3c\xfe",
1720 .psize = 64,
1721 .ksize = 16,
1722 }, { /* From NIST Special Publication 800-38B, AES-256 */
1723 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
1724 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
1725 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
1726 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
1727 .plaintext = zeroed_string,
1728 .digest = "\x02\x89\x62\xf6\x1b\x7b\xf8\x9e"
1729 "\xfc\x6b\x55\x1f\x46\x67\xd9\x83",
1730 .psize = 0,
1731 .ksize = 32,
1732 }, {
1733 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
1734 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
1735 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
1736 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
1737 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
1738 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
1739 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
1740 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
1741 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
1742 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
1743 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
1744 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
1745 .digest = "\xe1\x99\x21\x90\x54\x9f\x6e\xd5"
1746 "\x69\x6a\x2c\x05\x6c\x31\x54\x10",
1747 .psize = 64,
1748 .ksize = 32,
1749 }
1750};
1751
1752#define CMAC_DES3_EDE_TEST_VECTORS 4
1753
1754static struct hash_testvec des3_ede_cmac64_tv_template[] = {
1755/*
1756 * From NIST Special Publication 800-38B, Three Key TDEA
1757 * Corrected test vectors from:
1758 * http://csrc.nist.gov/publications/nistpubs/800-38B/Updated_CMAC_Examples.pdf
1759 */
1760 {
1761 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
1762 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
1763 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
1764 .plaintext = zeroed_string,
1765 .digest = "\xb7\xa6\x88\xe1\x22\xff\xaf\x95",
1766 .psize = 0,
1767 .ksize = 24,
1768 }, {
1769 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
1770 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
1771 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
1772 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96",
1773 .digest = "\x8e\x8f\x29\x31\x36\x28\x37\x97",
1774 .psize = 8,
1775 .ksize = 24,
1776 }, {
1777 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
1778 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
1779 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
1780 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
1781 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
1782 "\xae\x2d\x8a\x57",
1783 .digest = "\x74\x3d\xdb\xe0\xce\x2d\xc2\xed",
1784 .psize = 20,
1785 .ksize = 24,
1786 }, {
1787 .key = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
1788 "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
1789 "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
1790 .plaintext = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
1791 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
1792 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
1793 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51",
1794 .digest = "\x33\xe6\xb1\x09\x24\x00\xea\xe5",
1795 .psize = 32,
1796 .ksize = 24,
1797 }
1798};
1799
Herbert Xuda7f0332008-07-31 17:08:25 +08001800#define XCBC_AES_TEST_VECTORS 6
1801
1802static struct hash_testvec aes_xcbc128_tv_template[] = {
1803 {
1804 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1805 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1806 .plaintext = zeroed_string,
1807 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
1808 "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
1809 .psize = 0,
1810 .ksize = 16,
1811 }, {
1812 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1813 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1814 .plaintext = "\x00\x01\x02",
1815 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
1816 "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
1817 .psize = 3,
1818 .ksize = 16,
1819 } , {
1820 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1821 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1822 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1823 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1824 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
1825 "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
1826 .psize = 16,
1827 .ksize = 16,
1828 }, {
1829 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1830 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1831 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1832 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1833 "\x10\x11\x12\x13",
1834 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
1835 "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
1836 .tap = { 10, 10 },
1837 .psize = 20,
1838 .np = 2,
1839 .ksize = 16,
1840 }, {
1841 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1842 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1843 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1844 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1845 "\x10\x11\x12\x13\x14\x15\x16\x17"
1846 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
1847 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
1848 "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
1849 .psize = 32,
1850 .ksize = 16,
1851 }, {
1852 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1853 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1854 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1855 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1856 "\x10\x11\x12\x13\x14\x15\x16\x17"
1857 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
1858 "\x20\x21",
1859 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
1860 "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
1861 .tap = { 17, 17 },
1862 .psize = 34,
1863 .np = 2,
1864 .ksize = 16,
1865 }
1866};
1867
Salman Qaziba1ee072012-10-05 14:24:14 -07001868#define VMAC_AES_TEST_VECTORS 11
Shane Wang304a2042010-03-18 20:22:55 +08001869static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
Shane Wangf1939f72009-09-02 20:05:22 +10001870 '\x02', '\x03', '\x02', '\x02',
1871 '\x02', '\x04', '\x01', '\x07',
1872 '\x04', '\x01', '\x04', '\x03',};
Shane Wang304a2042010-03-18 20:22:55 +08001873static char vmac_string2[128] = {'a', 'b', 'c',};
1874static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
1875 'a', 'b', 'c', 'a', 'b', 'c',
1876 'a', 'b', 'c', 'a', 'b', 'c',
1877 'a', 'b', 'c', 'a', 'b', 'c',
1878 'a', 'b', 'c', 'a', 'b', 'c',
1879 'a', 'b', 'c', 'a', 'b', 'c',
1880 'a', 'b', 'c', 'a', 'b', 'c',
1881 'a', 'b', 'c', 'a', 'b', 'c',
1882 };
1883
Salman Qaziba1ee072012-10-05 14:24:14 -07001884static char vmac_string4[17] = {'b', 'c', 'e', 'f',
1885 'i', 'j', 'l', 'm',
1886 'o', 'p', 'r', 's',
1887 't', 'u', 'w', 'x', 'z'};
1888
1889static char vmac_string5[127] = {'r', 'm', 'b', 't', 'c',
1890 'o', 'l', 'k', ']', '%',
1891 '9', '2', '7', '!', 'A'};
1892
1893static char vmac_string6[129] = {'p', 't', '*', '7', 'l',
1894 'i', '!', '#', 'w', '0',
1895 'z', '/', '4', 'A', 'n'};
1896
Shane Wangf1939f72009-09-02 20:05:22 +10001897static struct hash_testvec aes_vmac128_tv_template[] = {
1898 {
Shane Wang304a2042010-03-18 20:22:55 +08001899 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1900 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1901 .plaintext = NULL,
1902 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
1903 .psize = 0,
1904 .ksize = 16,
1905 }, {
Shane Wangf1939f72009-09-02 20:05:22 +10001906 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1907 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Shane Wang304a2042010-03-18 20:22:55 +08001908 .plaintext = vmac_string1,
1909 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
1910 .psize = 128,
1911 .ksize = 16,
1912 }, {
1913 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1914 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1915 .plaintext = vmac_string2,
1916 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
1917 .psize = 128,
1918 .ksize = 16,
1919 }, {
1920 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1921 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1922 .plaintext = vmac_string3,
1923 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
1924 .psize = 128,
1925 .ksize = 16,
1926 }, {
1927 .key = "abcdefghijklmnop",
1928 .plaintext = NULL,
1929 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
1930 .psize = 0,
1931 .ksize = 16,
1932 }, {
1933 .key = "abcdefghijklmnop",
1934 .plaintext = vmac_string1,
1935 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
1936 .psize = 128,
1937 .ksize = 16,
1938 }, {
1939 .key = "abcdefghijklmnop",
1940 .plaintext = vmac_string2,
1941 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
1942 .psize = 128,
1943 .ksize = 16,
1944 }, {
1945 .key = "abcdefghijklmnop",
1946 .plaintext = vmac_string3,
1947 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
Shane Wangf1939f72009-09-02 20:05:22 +10001948 .psize = 128,
1949 .ksize = 16,
Salman Qaziba1ee072012-10-05 14:24:14 -07001950 }, {
1951 .key = "a09b5cd!f#07K\x00\x00\x00",
1952 .plaintext = vmac_string4,
1953 .digest = "\xab\xa5\x0f\xea\x42\x4e\xa1\x5f",
1954 .psize = sizeof(vmac_string4),
1955 .ksize = 16,
1956 }, {
1957 .key = "a09b5cd!f#07K\x00\x00\x00",
1958 .plaintext = vmac_string5,
1959 .digest = "\x25\x31\x98\xbc\x1d\xe8\x67\x60",
1960 .psize = sizeof(vmac_string5),
1961 .ksize = 16,
1962 }, {
1963 .key = "a09b5cd!f#07K\x00\x00\x00",
1964 .plaintext = vmac_string6,
1965 .digest = "\xc4\xae\x9b\x47\x95\x65\xeb\x41",
1966 .psize = sizeof(vmac_string6),
1967 .ksize = 16,
Shane Wangf1939f72009-09-02 20:05:22 +10001968 },
1969};
1970
Herbert Xuda7f0332008-07-31 17:08:25 +08001971/*
1972 * SHA384 HMAC test vectors from RFC4231
1973 */
1974
1975#define HMAC_SHA384_TEST_VECTORS 4
1976
1977static struct hash_testvec hmac_sha384_tv_template[] = {
1978 {
1979 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1980 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1981 "\x0b\x0b\x0b\x0b",
1982 .ksize = 20,
1983 .plaintext = "Hi There",
1984 .psize = 8,
1985 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
1986 "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
1987 "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
1988 "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
1989 "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
1990 "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
1991 }, {
1992 .key = "Jefe",
1993 .ksize = 4,
1994 .plaintext = "what do ya want for nothing?",
1995 .psize = 28,
1996 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
1997 "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
1998 "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
1999 "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
2000 "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
2001 "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
2002 .np = 4,
2003 .tap = { 7, 7, 7, 7 }
2004 }, {
2005 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2006 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2007 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2008 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2009 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2010 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2011 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2012 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2013 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2014 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2015 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2016 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2017 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2018 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2019 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2020 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2021 "\xaa\xaa\xaa",
2022 .ksize = 131,
2023 .plaintext = "Test Using Larger Than Block-Siz"
2024 "e Key - Hash Key First",
2025 .psize = 54,
2026 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
2027 "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
2028 "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
2029 "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
2030 "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
2031 "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
2032 }, {
2033 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2034 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2035 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2036 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2037 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2038 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2039 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2040 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2041 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2042 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2043 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2044 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2045 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2046 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2047 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2048 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2049 "\xaa\xaa\xaa",
2050 .ksize = 131,
2051 .plaintext = "This is a test u"
2052 "sing a larger th"
2053 "an block-size ke"
2054 "y and a larger t"
2055 "han block-size d"
2056 "ata. The key nee"
2057 "ds to be hashed "
2058 "before being use"
2059 "d by the HMAC al"
2060 "gorithm.",
2061 .psize = 152,
2062 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
2063 "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
2064 "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
2065 "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
2066 "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
2067 "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
2068 },
2069};
2070
2071/*
2072 * SHA512 HMAC test vectors from RFC4231
2073 */
2074
2075#define HMAC_SHA512_TEST_VECTORS 4
2076
2077static struct hash_testvec hmac_sha512_tv_template[] = {
2078 {
2079 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2080 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2081 "\x0b\x0b\x0b\x0b",
2082 .ksize = 20,
2083 .plaintext = "Hi There",
2084 .psize = 8,
2085 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
2086 "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
2087 "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
2088 "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
2089 "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
2090 "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
2091 "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
2092 "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
2093 }, {
2094 .key = "Jefe",
2095 .ksize = 4,
2096 .plaintext = "what do ya want for nothing?",
2097 .psize = 28,
2098 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
2099 "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
2100 "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
2101 "\x10\x27\x0c\xd7\xea\x25\x05\x54"
2102 "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
2103 "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
2104 "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
2105 "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
2106 .np = 4,
2107 .tap = { 7, 7, 7, 7 }
2108 }, {
2109 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2110 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2111 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2112 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2113 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2114 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2115 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2116 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2117 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2118 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2119 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2120 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2121 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2122 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2123 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2124 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2125 "\xaa\xaa\xaa",
2126 .ksize = 131,
2127 .plaintext = "Test Using Large"
2128 "r Than Block-Siz"
2129 "e Key - Hash Key"
2130 " First",
2131 .psize = 54,
2132 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
2133 "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
2134 "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
2135 "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
2136 "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
2137 "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
2138 "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
2139 "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
2140 }, {
2141 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2142 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2143 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2144 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2145 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2146 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2147 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2148 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2149 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2150 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2151 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2152 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2153 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2154 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2155 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2156 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2157 "\xaa\xaa\xaa",
2158 .ksize = 131,
2159 .plaintext =
2160 "This is a test u"
2161 "sing a larger th"
2162 "an block-size ke"
2163 "y and a larger t"
2164 "han block-size d"
2165 "ata. The key nee"
2166 "ds to be hashed "
2167 "before being use"
2168 "d by the HMAC al"
2169 "gorithm.",
2170 .psize = 152,
2171 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
2172 "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
2173 "\xde\xbd\x71\xf8\x86\x72\x89\x86"
2174 "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
2175 "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
2176 "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
2177 "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
2178 "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
2179 },
2180};
2181
2182/*
2183 * DES test vectors.
2184 */
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03002185#define DES_ENC_TEST_VECTORS 11
2186#define DES_DEC_TEST_VECTORS 5
2187#define DES_CBC_ENC_TEST_VECTORS 6
2188#define DES_CBC_DEC_TEST_VECTORS 5
2189#define DES_CTR_ENC_TEST_VECTORS 2
2190#define DES_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinnae080b172012-10-20 14:53:12 +03002191#define DES3_EDE_ENC_TEST_VECTORS 4
2192#define DES3_EDE_DEC_TEST_VECTORS 4
2193#define DES3_EDE_CBC_ENC_TEST_VECTORS 2
2194#define DES3_EDE_CBC_DEC_TEST_VECTORS 2
2195#define DES3_EDE_CTR_ENC_TEST_VECTORS 2
2196#define DES3_EDE_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08002197
2198static struct cipher_testvec des_enc_tv_template[] = {
2199 { /* From Applied Cryptography */
2200 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2201 .klen = 8,
2202 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2203 .ilen = 8,
2204 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2205 .rlen = 8,
2206 }, { /* Same key, different plaintext block */
2207 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2208 .klen = 8,
2209 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
2210 .ilen = 8,
2211 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2212 .rlen = 8,
2213 }, { /* Sbox test from NBS */
2214 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2215 .klen = 8,
2216 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2217 .ilen = 8,
2218 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2219 .rlen = 8,
2220 }, { /* Three blocks */
2221 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2222 .klen = 8,
2223 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2224 "\x22\x33\x44\x55\x66\x77\x88\x99"
2225 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2226 .ilen = 24,
2227 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2228 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2229 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2230 .rlen = 24,
2231 }, { /* Weak key */
2232 .fail = 1,
2233 .wk = 1,
2234 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
2235 .klen = 8,
2236 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2237 .ilen = 8,
2238 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2239 .rlen = 8,
2240 }, { /* Two blocks -- for testing encryption across pages */
2241 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2242 .klen = 8,
2243 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2244 "\x22\x33\x44\x55\x66\x77\x88\x99",
2245 .ilen = 16,
2246 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2247 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2248 .rlen = 16,
2249 .np = 2,
2250 .tap = { 8, 8 }
2251 }, { /* Four blocks -- for testing encryption with chunking */
2252 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2253 .klen = 8,
2254 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2255 "\x22\x33\x44\x55\x66\x77\x88\x99"
2256 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
2257 "\x22\x33\x44\x55\x66\x77\x88\x99",
2258 .ilen = 32,
2259 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2260 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2261 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
2262 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2263 .rlen = 32,
2264 .np = 3,
2265 .tap = { 14, 10, 8 }
2266 }, {
2267 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2268 .klen = 8,
2269 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2270 "\x22\x33\x44\x55\x66\x77\x88\x99"
2271 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2272 .ilen = 24,
2273 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2274 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2275 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2276 .rlen = 24,
2277 .np = 4,
2278 .tap = { 2, 1, 3, 18 }
2279 }, {
2280 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2281 .klen = 8,
2282 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2283 "\x22\x33\x44\x55\x66\x77\x88\x99",
2284 .ilen = 16,
2285 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2286 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2287 .rlen = 16,
2288 .np = 5,
2289 .tap = { 2, 2, 2, 2, 8 }
2290 }, {
2291 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2292 .klen = 8,
2293 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2294 .ilen = 8,
2295 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2296 .rlen = 8,
2297 .np = 8,
2298 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03002299 }, { /* Generated with Crypto++ */
2300 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2301 .klen = 8,
2302 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2303 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2304 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2305 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2306 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2307 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2308 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2309 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2310 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2311 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2312 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2313 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2314 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2315 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2316 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2317 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2318 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2319 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2320 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2321 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2322 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2323 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2324 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2325 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2326 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2327 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2328 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2329 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2330 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2331 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2332 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
2333 .ilen = 248,
2334 .result = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
2335 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
2336 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
2337 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
2338 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
2339 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
2340 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
2341 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
2342 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
2343 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
2344 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
2345 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
2346 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
2347 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
2348 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
2349 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
2350 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
2351 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
2352 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
2353 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
2354 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
2355 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
2356 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
2357 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
2358 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
2359 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
2360 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
2361 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
2362 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
2363 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
2364 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
2365 .rlen = 248,
2366 .also_non_np = 1,
2367 .np = 2,
2368 .tap = { 248 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002369 },
2370};
2371
2372static struct cipher_testvec des_dec_tv_template[] = {
2373 { /* From Applied Cryptography */
2374 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2375 .klen = 8,
2376 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2377 .ilen = 8,
2378 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2379 .rlen = 8,
2380 }, { /* Sbox test from NBS */
2381 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2382 .klen = 8,
2383 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2384 .ilen = 8,
2385 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2386 .rlen = 8,
2387 }, { /* Two blocks, for chunking test */
2388 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2389 .klen = 8,
2390 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2391 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2392 .ilen = 16,
2393 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2394 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2395 .rlen = 16,
2396 .np = 2,
2397 .tap = { 8, 8 }
2398 }, {
2399 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2400 .klen = 8,
2401 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2402 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2403 .ilen = 16,
2404 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2405 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2406 .rlen = 16,
2407 .np = 3,
2408 .tap = { 3, 12, 1 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03002409 }, { /* Generated with Crypto++ */
2410 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2411 .klen = 8,
2412 .input = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
2413 "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
2414 "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
2415 "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
2416 "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
2417 "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
2418 "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
2419 "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
2420 "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
2421 "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
2422 "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
2423 "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
2424 "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
2425 "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
2426 "\x2E\x51\x16\xCA\x09\x89\x54\x62"
2427 "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
2428 "\x62\xF0\x02\x58\x83\xAF\x30\x87"
2429 "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
2430 "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
2431 "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
2432 "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
2433 "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
2434 "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
2435 "\xE9\x95\x61\x74\x12\xED\x07\xD7"
2436 "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
2437 "\x51\x96\x16\xF7\x94\x61\xB8\x87"
2438 "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
2439 "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
2440 "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
2441 "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
2442 "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
2443 .ilen = 248,
2444 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2445 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2446 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2447 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2448 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2449 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2450 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2451 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2452 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2453 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2454 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2455 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2456 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2457 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2458 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2459 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2460 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2461 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2462 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2463 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2464 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2465 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2466 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2467 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2468 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2469 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2470 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2471 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2472 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2473 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2474 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
2475 .rlen = 248,
2476 .also_non_np = 1,
2477 .np = 2,
2478 .tap = { 248 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002479 },
2480};
2481
2482static struct cipher_testvec des_cbc_enc_tv_template[] = {
2483 { /* From OpenSSL */
2484 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2485 .klen = 8,
2486 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2487 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2488 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2489 "\x68\x65\x20\x74\x69\x6d\x65\x20",
2490 .ilen = 24,
2491 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2492 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2493 "\x46\x8e\x91\x15\x78\x88\xba\x68",
2494 .rlen = 24,
2495 }, { /* FIPS Pub 81 */
2496 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2497 .klen = 8,
2498 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2499 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2500 .ilen = 8,
2501 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2502 .rlen = 8,
2503 }, {
2504 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2505 .klen = 8,
2506 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2507 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2508 .ilen = 8,
2509 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2510 .rlen = 8,
2511 }, {
2512 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2513 .klen = 8,
2514 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2515 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2516 .ilen = 8,
2517 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2518 .rlen = 8,
2519 }, { /* Copy of openssl vector for chunk testing */
2520 /* From OpenSSL */
2521 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2522 .klen = 8,
2523 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2524 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2525 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2526 "\x68\x65\x20\x74\x69\x6d\x65\x20",
2527 .ilen = 24,
2528 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2529 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2530 "\x46\x8e\x91\x15\x78\x88\xba\x68",
2531 .rlen = 24,
2532 .np = 2,
2533 .tap = { 13, 11 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03002534 }, { /* Generated with Crypto++ */
2535 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2536 .klen = 8,
2537 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
2538 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2539 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2540 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2541 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2542 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2543 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2544 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2545 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2546 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2547 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2548 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2549 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2550 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2551 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2552 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2553 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2554 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2555 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2556 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2557 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2558 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2559 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2560 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2561 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2562 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2563 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2564 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2565 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2566 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2567 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2568 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
2569 .ilen = 248,
2570 .result = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
2571 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
2572 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
2573 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
2574 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
2575 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
2576 "\x81\x72\x74\xDE\x30\x19\x69\x49"
2577 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
2578 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
2579 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
2580 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
2581 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
2582 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
2583 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
2584 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
2585 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
2586 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
2587 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
2588 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
2589 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
2590 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
2591 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
2592 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
2593 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
2594 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
2595 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
2596 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
2597 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
2598 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
2599 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
2600 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
2601 .rlen = 248,
2602 .also_non_np = 1,
2603 .np = 2,
2604 .tap = { 248 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08002605 },
2606};
2607
2608static struct cipher_testvec des_cbc_dec_tv_template[] = {
2609 { /* FIPS Pub 81 */
2610 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2611 .klen = 8,
2612 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2613 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2614 .ilen = 8,
2615 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2616 .rlen = 8,
2617 }, {
2618 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2619 .klen = 8,
2620 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2621 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2622 .ilen = 8,
2623 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2624 .rlen = 8,
2625 }, {
2626 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2627 .klen = 8,
2628 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2629 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2630 .ilen = 8,
2631 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2632 .rlen = 8,
2633 }, { /* Copy of above, for chunk testing */
2634 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2635 .klen = 8,
2636 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2637 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2638 .ilen = 8,
2639 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2640 .rlen = 8,
2641 .np = 2,
2642 .tap = { 4, 4 }
Jussi Kivilinna8163fc32012-10-20 14:53:07 +03002643 }, { /* Generated with Crypto++ */
2644 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2645 .klen = 8,
2646 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
2647 .input = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
2648 "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
2649 "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
2650 "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
2651 "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
2652 "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
2653 "\x81\x72\x74\xDE\x30\x19\x69\x49"
2654 "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
2655 "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
2656 "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
2657 "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
2658 "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
2659 "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
2660 "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
2661 "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
2662 "\x49\x90\x88\x6A\x09\x8F\x76\x59"
2663 "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
2664 "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
2665 "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
2666 "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
2667 "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
2668 "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
2669 "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
2670 "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
2671 "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
2672 "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
2673 "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
2674 "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
2675 "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
2676 "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
2677 "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
2678 .ilen = 248,
2679 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2680 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2681 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2682 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2683 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2684 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2685 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2686 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2687 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2688 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2689 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2690 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2691 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2692 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2693 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2694 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2695 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2696 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2697 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2698 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2699 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2700 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2701 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2702 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2703 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2704 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2705 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2706 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2707 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2708 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2709 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
2710 .rlen = 248,
2711 .also_non_np = 1,
2712 .np = 2,
2713 .tap = { 248 - 8, 8 },
2714 },
2715};
2716
2717static struct cipher_testvec des_ctr_enc_tv_template[] = {
2718 { /* Generated with Crypto++ */
2719 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2720 .klen = 8,
2721 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
2722 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2723 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2724 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2725 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2726 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2727 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2728 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2729 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2730 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2731 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2732 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2733 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2734 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2735 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2736 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2737 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2738 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2739 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2740 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2741 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2742 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2743 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2744 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2745 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2746 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2747 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2748 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2749 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2750 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2751 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2752 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
2753 .ilen = 248,
2754 .result = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
2755 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
2756 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
2757 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
2758 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
2759 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
2760 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
2761 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
2762 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
2763 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
2764 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
2765 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
2766 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
2767 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
2768 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
2769 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
2770 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
2771 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
2772 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
2773 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
2774 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
2775 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
2776 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
2777 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
2778 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
2779 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
2780 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
2781 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
2782 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
2783 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
2784 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
2785 .rlen = 248,
2786 .also_non_np = 1,
2787 .np = 2,
2788 .tap = { 248 - 8, 8 },
2789 }, { /* Generated with Crypto++ */
2790 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2791 .klen = 8,
2792 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
2793 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2794 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2795 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2796 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2797 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2798 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2799 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2800 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2801 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2802 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2803 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2804 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2805 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2806 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2807 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2808 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2809 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2810 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2811 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2812 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2813 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2814 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2815 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2816 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2817 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2818 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2819 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2820 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2821 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2822 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2823 "\xC6\x2F\xBB\x24\x8D\x19\x82",
2824 .ilen = 247,
2825 .result = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
2826 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
2827 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
2828 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
2829 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
2830 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
2831 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
2832 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
2833 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
2834 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
2835 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
2836 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
2837 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
2838 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
2839 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
2840 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
2841 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
2842 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
2843 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
2844 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
2845 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
2846 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
2847 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
2848 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
2849 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
2850 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
2851 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
2852 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
2853 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
2854 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
2855 "\x91\x45\x05\x3E\x58\xBF\x32",
2856 .rlen = 247,
2857 .also_non_np = 1,
2858 .np = 2,
2859 .tap = { 247 - 8, 8 },
2860 },
2861};
2862
2863static struct cipher_testvec des_ctr_dec_tv_template[] = {
2864 { /* Generated with Crypto++ */
2865 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2866 .klen = 8,
2867 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
2868 .input = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
2869 "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
2870 "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
2871 "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
2872 "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
2873 "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
2874 "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
2875 "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
2876 "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
2877 "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
2878 "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
2879 "\xBE\x4C\x91\x43\x22\x65\x72\x48"
2880 "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
2881 "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
2882 "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
2883 "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
2884 "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
2885 "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
2886 "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
2887 "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
2888 "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
2889 "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
2890 "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
2891 "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
2892 "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
2893 "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
2894 "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
2895 "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
2896 "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
2897 "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
2898 "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
2899 .ilen = 248,
2900 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2901 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2902 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2903 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2904 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2905 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2906 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2907 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2908 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2909 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2910 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2911 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2912 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2913 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2914 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2915 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2916 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2917 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2918 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2919 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2920 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2921 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2922 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2923 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2924 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2925 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2926 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2927 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2928 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
2929 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
2930 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
2931 .rlen = 248,
2932 .also_non_np = 1,
2933 .np = 2,
2934 .tap = { 248 - 8, 8 },
2935 }, { /* Generated with Crypto++ */
2936 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
2937 .klen = 8,
2938 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
2939 .input = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
2940 "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
2941 "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
2942 "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
2943 "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
2944 "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
2945 "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
2946 "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
2947 "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
2948 "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
2949 "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
2950 "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
2951 "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
2952 "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
2953 "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
2954 "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
2955 "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
2956 "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
2957 "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
2958 "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
2959 "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
2960 "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
2961 "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
2962 "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
2963 "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
2964 "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
2965 "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
2966 "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
2967 "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
2968 "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
2969 "\x91\x45\x05\x3E\x58\xBF\x32",
2970 .ilen = 247,
2971 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
2972 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
2973 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
2974 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
2975 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
2976 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
2977 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
2978 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
2979 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
2980 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
2981 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
2982 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
2983 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
2984 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
2985 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
2986 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
2987 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
2988 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
2989 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
2990 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
2991 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
2992 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
2993 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
2994 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
2995 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
2996 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
2997 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
2998 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
2999 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3000 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3001 "\xC6\x2F\xBB\x24\x8D\x19\x82",
3002 .rlen = 247,
3003 .also_non_np = 1,
3004 .np = 2,
3005 .tap = { 247 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003006 },
3007};
3008
3009static struct cipher_testvec des3_ede_enc_tv_template[] = {
3010 { /* These are from openssl */
3011 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3012 "\x55\x55\x55\x55\x55\x55\x55\x55"
3013 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3014 .klen = 24,
3015 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
3016 .ilen = 8,
3017 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
3018 .rlen = 8,
3019 }, {
3020 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
3021 "\x86\x02\x87\x66\x59\x08\x21\x98"
3022 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
3023 .klen = 24,
3024 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
3025 .ilen = 8,
3026 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
3027 .rlen = 8,
3028 }, {
3029 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
3030 "\x91\x07\xd0\x15\x89\x19\x01\x01"
3031 "\x19\x07\x92\x10\x98\x1a\x01\x01",
3032 .klen = 24,
3033 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
3034 .ilen = 8,
3035 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
3036 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003037 }, { /* Generated with Crypto++ */
3038 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
3039 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
3040 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
3041 .klen = 24,
3042 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
3043 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
3044 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
3045 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
3046 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
3047 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
3048 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
3049 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
3050 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
3051 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
3052 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
3053 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
3054 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
3055 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
3056 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
3057 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
3058 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
3059 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
3060 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
3061 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
3062 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
3063 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
3064 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
3065 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
3066 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
3067 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
3068 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
3069 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
3070 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
3071 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
3072 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
3073 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
3074 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
3075 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
3076 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
3077 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
3078 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
3079 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
3080 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
3081 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
3082 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
3083 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
3084 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
3085 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
3086 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
3087 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
3088 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
3089 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
3090 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
3091 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
3092 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
3093 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
3094 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
3095 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
3096 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
3097 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
3098 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
3099 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
3100 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
3101 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
3102 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
3103 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
3104 .ilen = 496,
3105 .result = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
3106 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
3107 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
3108 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
3109 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
3110 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
3111 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
3112 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
3113 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
3114 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
3115 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
3116 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
3117 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
3118 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
3119 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
3120 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
3121 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
3122 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
3123 "\x45\x86\x50\x01\x70\x35\x99\x92"
3124 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
3125 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
3126 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
3127 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
3128 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
3129 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
3130 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
3131 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
3132 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
3133 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
3134 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
3135 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
3136 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
3137 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
3138 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
3139 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
3140 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
3141 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
3142 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
3143 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
3144 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
3145 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
3146 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
3147 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
3148 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
3149 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
3150 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
3151 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
3152 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
3153 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
3154 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
3155 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
3156 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
3157 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
3158 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
3159 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
3160 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
3161 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
3162 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
3163 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
3164 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
3165 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
3166 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
3167 .rlen = 496,
3168 .also_non_np = 1,
3169 .np = 2,
3170 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003171 },
3172};
3173
3174static struct cipher_testvec des3_ede_dec_tv_template[] = {
3175 { /* These are from openssl */
3176 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3177 "\x55\x55\x55\x55\x55\x55\x55\x55"
3178 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3179 .klen = 24,
3180 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
3181 .ilen = 8,
3182 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
3183 .rlen = 8,
3184 }, {
3185 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
3186 "\x86\x02\x87\x66\x59\x08\x21\x98"
3187 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
3188 .klen = 24,
3189 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
3190 .ilen = 8,
3191 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
3192 .rlen = 8,
3193 }, {
3194 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
3195 "\x91\x07\xd0\x15\x89\x19\x01\x01"
3196 "\x19\x07\x92\x10\x98\x1a\x01\x01",
3197 .klen = 24,
3198 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
3199 .ilen = 8,
3200 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
3201 .rlen = 8,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003202 }, { /* Generated with Crypto++ */
3203 .key = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
3204 "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
3205 "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
3206 .klen = 24,
3207 .input = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
3208 "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
3209 "\x81\x01\x04\x00\x76\xFA\xED\xD3"
3210 "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
3211 "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
3212 "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
3213 "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
3214 "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
3215 "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
3216 "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
3217 "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
3218 "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
3219 "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
3220 "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
3221 "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
3222 "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
3223 "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
3224 "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
3225 "\x45\x86\x50\x01\x70\x35\x99\x92"
3226 "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
3227 "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
3228 "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
3229 "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
3230 "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
3231 "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
3232 "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
3233 "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
3234 "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
3235 "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
3236 "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
3237 "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
3238 "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
3239 "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
3240 "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
3241 "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
3242 "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
3243 "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
3244 "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
3245 "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
3246 "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
3247 "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
3248 "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
3249 "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
3250 "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
3251 "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
3252 "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
3253 "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
3254 "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
3255 "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
3256 "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
3257 "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
3258 "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
3259 "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
3260 "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
3261 "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
3262 "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
3263 "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
3264 "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
3265 "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
3266 "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
3267 "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
3268 "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
3269 .ilen = 496,
3270 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
3271 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
3272 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
3273 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
3274 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
3275 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
3276 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
3277 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
3278 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
3279 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
3280 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
3281 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
3282 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
3283 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
3284 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
3285 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
3286 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
3287 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
3288 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
3289 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
3290 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
3291 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
3292 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
3293 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
3294 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
3295 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
3296 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
3297 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
3298 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
3299 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
3300 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
3301 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
3302 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
3303 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
3304 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
3305 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
3306 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
3307 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
3308 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
3309 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
3310 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
3311 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
3312 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
3313 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
3314 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
3315 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
3316 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
3317 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
3318 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
3319 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
3320 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
3321 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
3322 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
3323 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
3324 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
3325 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
3326 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
3327 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
3328 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
3329 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
3330 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
3331 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
3332 .rlen = 496,
3333 .also_non_np = 1,
3334 .np = 2,
3335 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003336 },
3337};
3338
3339static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
3340 { /* Generated from openssl */
3341 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
3342 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
3343 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
3344 .klen = 24,
3345 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
3346 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
3347 "\x53\x20\x63\x65\x65\x72\x73\x74"
3348 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
3349 "\x20\x79\x65\x53\x72\x63\x74\x65"
3350 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
3351 "\x79\x6e\x53\x20\x63\x65\x65\x72"
3352 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
3353 "\x6e\x61\x20\x79\x65\x53\x72\x63"
3354 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
3355 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
3356 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
3357 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
3358 "\x72\x63\x74\x65\x20\x73\x6f\x54"
3359 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
3360 "\x63\x65\x65\x72\x73\x74\x54\x20"
3361 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
3362 .ilen = 128,
3363 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
3364 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
3365 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
3366 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
3367 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
3368 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
3369 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
3370 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
3371 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
3372 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
3373 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
3374 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
3375 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
3376 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
3377 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
3378 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
3379 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003380 }, { /* Generated with Crypto++ */
3381 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
3382 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
3383 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
3384 .klen = 24,
3385 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
3386 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
3387 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
3388 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
3389 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
3390 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
3391 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
3392 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
3393 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
3394 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
3395 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
3396 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
3397 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
3398 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
3399 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
3400 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
3401 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
3402 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
3403 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
3404 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
3405 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
3406 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
3407 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
3408 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
3409 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
3410 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
3411 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
3412 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
3413 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
3414 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
3415 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
3416 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
3417 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
3418 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
3419 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
3420 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
3421 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
3422 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
3423 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
3424 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
3425 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
3426 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
3427 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
3428 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
3429 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
3430 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
3431 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
3432 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
3433 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
3434 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
3435 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
3436 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
3437 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
3438 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
3439 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
3440 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
3441 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
3442 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
3443 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
3444 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
3445 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
3446 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
3447 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
3448 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
3449 .ilen = 496,
3450 .result = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
3451 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
3452 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
3453 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
3454 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
3455 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
3456 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
3457 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
3458 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
3459 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
3460 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
3461 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
3462 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
3463 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
3464 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
3465 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
3466 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
3467 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
3468 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
3469 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
3470 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
3471 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
3472 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
3473 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
3474 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
3475 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
3476 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
3477 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
3478 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
3479 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
3480 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
3481 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
3482 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
3483 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
3484 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
3485 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
3486 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
3487 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
3488 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
3489 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
3490 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
3491 "\x73\x50\x08\x56\x20\x9B\x94\x23"
3492 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
3493 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
3494 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
3495 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
3496 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
3497 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
3498 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
3499 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
3500 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
3501 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
3502 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
3503 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
3504 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
3505 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
3506 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
3507 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
3508 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
3509 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
3510 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
3511 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
3512 .rlen = 496,
3513 .also_non_np = 1,
3514 .np = 2,
3515 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08003516 },
3517};
3518
3519static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
3520 { /* Generated from openssl */
3521 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
3522 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
3523 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
3524 .klen = 24,
3525 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
3526 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
3527 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
3528 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
3529 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
3530 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
3531 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
3532 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
3533 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
3534 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
3535 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
3536 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
3537 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
3538 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
3539 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
3540 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
3541 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
3542 .ilen = 128,
3543 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
3544 "\x53\x20\x63\x65\x65\x72\x73\x74"
3545 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
3546 "\x20\x79\x65\x53\x72\x63\x74\x65"
3547 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
3548 "\x79\x6e\x53\x20\x63\x65\x65\x72"
3549 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
3550 "\x6e\x61\x20\x79\x65\x53\x72\x63"
3551 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
3552 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
3553 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
3554 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
3555 "\x72\x63\x74\x65\x20\x73\x6f\x54"
3556 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
3557 "\x63\x65\x65\x72\x73\x74\x54\x20"
3558 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
3559 .rlen = 128,
Jussi Kivilinnae080b172012-10-20 14:53:12 +03003560 }, { /* Generated with Crypto++ */
3561 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
3562 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
3563 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
3564 .klen = 24,
3565 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
3566 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
3567 .input = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
3568 "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
3569 "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
3570 "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
3571 "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
3572 "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
3573 "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
3574 "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
3575 "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
3576 "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
3577 "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
3578 "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
3579 "\x11\x35\x61\x94\x88\x7B\x1C\x48"
3580 "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
3581 "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
3582 "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
3583 "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
3584 "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
3585 "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
3586 "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
3587 "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
3588 "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
3589 "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
3590 "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
3591 "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
3592 "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
3593 "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
3594 "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
3595 "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
3596 "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
3597 "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
3598 "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
3599 "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
3600 "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
3601 "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
3602 "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
3603 "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
3604 "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
3605 "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
3606 "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
3607 "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
3608 "\x73\x50\x08\x56\x20\x9B\x94\x23"
3609 "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
3610 "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
3611 "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
3612 "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
3613 "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
3614 "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
3615 "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
3616 "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
3617 "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
3618 "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
3619 "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
3620 "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
3621 "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
3622 "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
3623 "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
3624 "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
3625 "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
3626 "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
3627 "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
3628 "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
3629 .ilen = 496,
3630 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
3631 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
3632 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
3633 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
3634 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
3635 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
3636 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
3637 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
3638 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
3639 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
3640 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
3641 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
3642 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
3643 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
3644 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
3645 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
3646 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
3647 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
3648 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
3649 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
3650 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
3651 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
3652 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
3653 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
3654 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
3655 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
3656 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
3657 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
3658 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
3659 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
3660 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
3661 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
3662 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
3663 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
3664 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
3665 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
3666 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
3667 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
3668 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
3669 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
3670 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
3671 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
3672 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
3673 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
3674 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
3675 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
3676 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
3677 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
3678 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
3679 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
3680 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
3681 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
3682 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
3683 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
3684 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
3685 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
3686 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
3687 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
3688 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
3689 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
3690 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
3691 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
3692 .rlen = 496,
3693 .also_non_np = 1,
3694 .np = 2,
3695 .tap = { 496 - 16, 16 },
3696 },
3697};
3698
3699static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = {
3700 { /* Generated with Crypto++ */
3701 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
3702 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
3703 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
3704 .klen = 24,
3705 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
3706 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3707 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
3708 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
3709 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
3710 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
3711 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
3712 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
3713 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
3714 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
3715 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
3716 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
3717 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
3718 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
3719 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
3720 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
3721 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
3722 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
3723 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
3724 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
3725 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
3726 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
3727 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
3728 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
3729 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
3730 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
3731 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
3732 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
3733 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
3734 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
3735 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
3736 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
3737 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
3738 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
3739 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
3740 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
3741 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
3742 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
3743 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
3744 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
3745 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
3746 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
3747 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
3748 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
3749 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
3750 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
3751 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
3752 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
3753 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
3754 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
3755 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
3756 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
3757 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
3758 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
3759 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
3760 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
3761 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
3762 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
3763 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
3764 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
3765 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
3766 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
3767 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
3768 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
3769 .ilen = 496,
3770 .result = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
3771 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
3772 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
3773 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
3774 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
3775 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
3776 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
3777 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
3778 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
3779 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
3780 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
3781 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
3782 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
3783 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
3784 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
3785 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
3786 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
3787 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
3788 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
3789 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
3790 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
3791 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
3792 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
3793 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
3794 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
3795 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
3796 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
3797 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
3798 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
3799 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
3800 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
3801 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
3802 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
3803 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
3804 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
3805 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
3806 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
3807 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
3808 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
3809 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
3810 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
3811 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
3812 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
3813 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
3814 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
3815 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
3816 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
3817 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
3818 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
3819 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
3820 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
3821 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
3822 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
3823 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
3824 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
3825 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
3826 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
3827 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
3828 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
3829 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
3830 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
3831 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
3832 .rlen = 496,
3833 .also_non_np = 1,
3834 .np = 2,
3835 .tap = { 496 - 16, 16 },
3836 }, { /* Generated with Crypto++ */
3837 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
3838 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
3839 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
3840 .klen = 24,
3841 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
3842 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
3843 .input = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
3844 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
3845 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
3846 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
3847 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
3848 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
3849 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
3850 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
3851 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
3852 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
3853 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
3854 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
3855 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
3856 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
3857 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
3858 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
3859 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
3860 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
3861 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
3862 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
3863 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
3864 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
3865 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
3866 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
3867 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
3868 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
3869 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
3870 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
3871 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
3872 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
3873 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
3874 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
3875 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
3876 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
3877 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
3878 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
3879 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
3880 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
3881 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
3882 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
3883 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
3884 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
3885 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
3886 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
3887 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
3888 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
3889 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
3890 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
3891 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
3892 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
3893 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
3894 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
3895 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
3896 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
3897 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
3898 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
3899 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
3900 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
3901 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
3902 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
3903 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
3904 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
3905 "\x2E\xB1\x18",
3906 .ilen = 499,
3907 .result = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
3908 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
3909 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
3910 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
3911 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
3912 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
3913 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
3914 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
3915 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
3916 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
3917 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
3918 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
3919 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
3920 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
3921 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
3922 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
3923 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
3924 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
3925 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
3926 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
3927 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
3928 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
3929 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
3930 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
3931 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
3932 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
3933 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
3934 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
3935 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
3936 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
3937 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
3938 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
3939 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
3940 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
3941 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
3942 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
3943 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
3944 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
3945 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
3946 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
3947 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
3948 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
3949 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
3950 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
3951 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
3952 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
3953 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
3954 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
3955 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
3956 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
3957 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
3958 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
3959 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
3960 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
3961 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
3962 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
3963 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
3964 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
3965 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
3966 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
3967 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
3968 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
3969 "\xF2\x79\xD9",
3970 .rlen = 499,
3971 .also_non_np = 1,
3972 .np = 2,
3973 .tap = { 499 - 16, 16 },
3974 },
3975};
3976
3977static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = {
3978 { /* Generated with Crypto++ */
3979 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
3980 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
3981 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
3982 .klen = 24,
3983 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
3984 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3985 .input = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
3986 "\x19\xCD\x6F\x32\x53\x05\x22\x15"
3987 "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
3988 "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
3989 "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
3990 "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
3991 "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
3992 "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
3993 "\x13\x78\xDC\x89\x12\x12\x43\xFA"
3994 "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
3995 "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
3996 "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
3997 "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
3998 "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
3999 "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
4000 "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
4001 "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
4002 "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
4003 "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
4004 "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
4005 "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
4006 "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
4007 "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
4008 "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
4009 "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
4010 "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
4011 "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
4012 "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
4013 "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
4014 "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
4015 "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
4016 "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
4017 "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
4018 "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
4019 "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
4020 "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
4021 "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
4022 "\x83\x37\x4F\x1F\x48\x30\xED\x04"
4023 "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
4024 "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
4025 "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
4026 "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
4027 "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
4028 "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
4029 "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
4030 "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
4031 "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
4032 "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
4033 "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
4034 "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
4035 "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
4036 "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
4037 "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
4038 "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
4039 "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
4040 "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
4041 "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
4042 "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
4043 "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
4044 "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
4045 "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
4046 "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
4047 .ilen = 496,
4048 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4049 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4050 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4051 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4052 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4053 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4054 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4055 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4056 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4057 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4058 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4059 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4060 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4061 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4062 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4063 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4064 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4065 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4066 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4067 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4068 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4069 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4070 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4071 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4072 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4073 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4074 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4075 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4076 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4077 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4078 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4079 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4080 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4081 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4082 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4083 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4084 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4085 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4086 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4087 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4088 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4089 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4090 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4091 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4092 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4093 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4094 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4095 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4096 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4097 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4098 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4099 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4100 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4101 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4102 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4103 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4104 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4105 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4106 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4107 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4108 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4109 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4110 .rlen = 496,
4111 .also_non_np = 1,
4112 .np = 2,
4113 .tap = { 496 - 16, 16 },
4114 }, { /* Generated with Crypto++ */
4115 .key = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4116 "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4117 "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4118 .klen = 24,
4119 .iv = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4120 "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4121 .input = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
4122 "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
4123 "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
4124 "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
4125 "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
4126 "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
4127 "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
4128 "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
4129 "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
4130 "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
4131 "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
4132 "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
4133 "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
4134 "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
4135 "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
4136 "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
4137 "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
4138 "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
4139 "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
4140 "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
4141 "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
4142 "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
4143 "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
4144 "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
4145 "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
4146 "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
4147 "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
4148 "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
4149 "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
4150 "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
4151 "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
4152 "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
4153 "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
4154 "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
4155 "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
4156 "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
4157 "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
4158 "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
4159 "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
4160 "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
4161 "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
4162 "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
4163 "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
4164 "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
4165 "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
4166 "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
4167 "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
4168 "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
4169 "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
4170 "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
4171 "\x8A\x19\x08\xE1\x08\x48\x59\x51"
4172 "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
4173 "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
4174 "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
4175 "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
4176 "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
4177 "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
4178 "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
4179 "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
4180 "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
4181 "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
4182 "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
4183 "\xF2\x79\xD9",
4184 .ilen = 499,
4185 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4186 "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4187 "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4188 "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4189 "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4190 "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4191 "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4192 "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4193 "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4194 "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4195 "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4196 "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4197 "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4198 "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4199 "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4200 "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4201 "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4202 "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4203 "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4204 "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4205 "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4206 "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4207 "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4208 "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4209 "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4210 "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4211 "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4212 "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4213 "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4214 "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4215 "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4216 "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4217 "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4218 "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4219 "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4220 "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4221 "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4222 "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4223 "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4224 "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4225 "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4226 "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4227 "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4228 "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4229 "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4230 "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4231 "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4232 "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4233 "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4234 "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4235 "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4236 "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4237 "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4238 "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4239 "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4240 "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4241 "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4242 "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4243 "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4244 "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4245 "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4246 "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
4247 "\x2E\xB1\x18",
4248 .rlen = 499,
4249 .also_non_np = 1,
4250 .np = 2,
4251 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004252 },
4253};
4254
4255/*
4256 * Blowfish test vectors.
4257 */
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004258#define BF_ENC_TEST_VECTORS 7
4259#define BF_DEC_TEST_VECTORS 7
4260#define BF_CBC_ENC_TEST_VECTORS 2
4261#define BF_CBC_DEC_TEST_VECTORS 2
4262#define BF_CTR_ENC_TEST_VECTORS 2
4263#define BF_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +08004264
4265static struct cipher_testvec bf_enc_tv_template[] = {
4266 { /* DES test vectors from OpenSSL */
4267 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
4268 .klen = 8,
4269 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
4270 .ilen = 8,
4271 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
4272 .rlen = 8,
4273 }, {
4274 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
4275 .klen = 8,
4276 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4277 .ilen = 8,
4278 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
4279 .rlen = 8,
4280 }, {
4281 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
4282 .klen = 8,
4283 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4284 .ilen = 8,
4285 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
4286 .rlen = 8,
4287 }, { /* Vary the keylength... */
4288 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
4289 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
4290 .klen = 16,
4291 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4292 .ilen = 8,
4293 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
4294 .rlen = 8,
4295 }, {
4296 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
4297 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
4298 "\x00\x11\x22\x33\x44",
4299 .klen = 21,
4300 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4301 .ilen = 8,
4302 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
4303 .rlen = 8,
4304 }, { /* Generated with bf488 */
4305 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
4306 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
4307 "\x00\x11\x22\x33\x44\x55\x66\x77"
4308 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
4309 "\x58\x40\x23\x64\x1a\xba\x61\x76"
4310 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
4311 "\xff\xff\xff\xff\xff\xff\xff\xff",
4312 .klen = 56,
4313 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4314 .ilen = 8,
4315 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
4316 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004317 }, { /* Generated with Crypto++ */
4318 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4319 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4320 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4321 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4322 .klen = 32,
4323 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4324 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4325 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4326 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004327 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4328 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4329 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4330 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4331 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4332 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4333 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4334 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4335 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4336 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4337 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4338 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4339 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4340 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4341 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4342 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4343 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4344 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4345 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4346 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4347 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4348 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4349 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4350 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4351 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4352 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4353 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4354 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4355 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4356 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4357 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4358 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4359 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4360 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4361 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4362 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4363 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4364 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4365 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4366 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4367 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4368 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4369 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4370 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4371 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4372 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4373 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4374 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4375 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4376 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4377 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4378 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4379 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4380 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4381 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4382 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4383 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4384 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4385 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
4386 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004387 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
4388 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
4389 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
4390 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004391 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
4392 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
4393 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
4394 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
4395 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
4396 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
4397 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
4398 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
4399 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
4400 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
4401 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
4402 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
4403 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
4404 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
4405 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
4406 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
4407 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
4408 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
4409 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
4410 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
4411 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
4412 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
4413 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
4414 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
4415 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
4416 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
4417 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
4418 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
4419 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
4420 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
4421 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
4422 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
4423 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
4424 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
4425 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
4426 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
4427 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
4428 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
4429 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
4430 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
4431 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
4432 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
4433 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
4434 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
4435 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
4436 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
4437 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
4438 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
4439 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
4440 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
4441 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
4442 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
4443 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
4444 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
4445 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
4446 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
4447 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
4448 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
4449 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
4450 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004451 .also_non_np = 1,
4452 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004453 .tap = { 504 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004454 },
4455};
4456
4457static struct cipher_testvec bf_dec_tv_template[] = {
4458 { /* DES test vectors from OpenSSL */
4459 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
4460 .klen = 8,
4461 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
4462 .ilen = 8,
4463 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
4464 .rlen = 8,
4465 }, {
4466 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
4467 .klen = 8,
4468 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
4469 .ilen = 8,
4470 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
4471 .rlen = 8,
4472 }, {
4473 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
4474 .klen = 8,
4475 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
4476 .ilen = 8,
4477 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4478 .rlen = 8,
4479 }, { /* Vary the keylength... */
4480 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
4481 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
4482 .klen = 16,
4483 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
4484 .ilen = 8,
4485 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4486 .rlen = 8,
4487 }, {
4488 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
4489 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
4490 "\x00\x11\x22\x33\x44",
4491 .klen = 21,
4492 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
4493 .ilen = 8,
4494 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4495 .rlen = 8,
4496 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
4497 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
4498 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
4499 "\x00\x11\x22\x33\x44\x55\x66\x77"
4500 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
4501 "\x58\x40\x23\x64\x1a\xba\x61\x76"
4502 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
4503 "\xff\xff\xff\xff\xff\xff\xff\xff",
4504 .klen = 56,
4505 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
4506 .ilen = 8,
4507 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4508 .rlen = 8,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004509 }, { /* Generated with Crypto++ */
4510 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4511 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4512 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4513 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4514 .klen = 32,
4515 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
4516 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
4517 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
4518 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004519 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
4520 "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
4521 "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
4522 "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
4523 "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
4524 "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
4525 "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
4526 "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
4527 "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
4528 "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
4529 "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
4530 "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
4531 "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
4532 "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
4533 "\x47\x82\x98\x23\x33\x36\xBC\x1B"
4534 "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
4535 "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
4536 "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
4537 "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
4538 "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
4539 "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
4540 "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
4541 "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
4542 "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
4543 "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
4544 "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
4545 "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
4546 "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
4547 "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
4548 "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
4549 "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
4550 "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
4551 "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
4552 "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
4553 "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
4554 "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
4555 "\x3E\x42\x14\x49\x88\x51\xBF\x68"
4556 "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
4557 "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
4558 "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
4559 "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
4560 "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
4561 "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
4562 "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
4563 "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
4564 "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
4565 "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
4566 "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
4567 "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
4568 "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
4569 "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
4570 "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
4571 "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
4572 "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
4573 "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
4574 "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
4575 "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
4576 "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
4577 "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
4578 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004579 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4580 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4581 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4582 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004583 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4584 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4585 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4586 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4587 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4588 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4589 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4590 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4591 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4592 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4593 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4594 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4595 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4596 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4597 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4598 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4599 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4600 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4601 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4602 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4603 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4604 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4605 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4606 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4607 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4608 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4609 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4610 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4611 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4612 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4613 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4614 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4615 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4616 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4617 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4618 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4619 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4620 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4621 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4622 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4623 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4624 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4625 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4626 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4627 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4628 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4629 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4630 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4631 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4632 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4633 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4634 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4635 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4636 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4637 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4638 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4639 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4640 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4641 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
4642 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004643 .also_non_np = 1,
4644 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004645 .tap = { 504 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004646 },
4647};
4648
4649static struct cipher_testvec bf_cbc_enc_tv_template[] = {
4650 { /* From OpenSSL */
4651 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4652 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
4653 .klen = 16,
4654 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4655 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
4656 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
4657 "\x68\x65\x20\x74\x69\x6d\x65\x20"
4658 "\x66\x6f\x72\x20\x00\x00\x00\x00",
4659 .ilen = 32,
4660 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
4661 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
4662 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
4663 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
4664 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004665 }, { /* Generated with Crypto++ */
4666 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4667 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4668 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4669 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4670 .klen = 32,
4671 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
4672 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4673 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4674 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4675 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004676 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4677 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4678 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4679 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4680 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4681 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4682 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4683 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4684 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4685 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4686 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4687 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4688 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4689 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4690 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4691 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4692 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4693 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4694 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4695 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4696 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4697 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4698 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4699 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4700 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4701 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4702 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4703 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4704 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4705 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4706 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4707 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4708 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4709 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4710 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4711 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4712 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4713 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4714 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4715 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4716 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4717 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4718 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4719 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4720 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4721 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4722 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4723 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4724 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4725 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4726 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4727 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4728 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4729 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4730 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4731 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4732 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4733 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4734 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
4735 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004736 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
4737 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
4738 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
4739 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004740 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
4741 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
4742 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
4743 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
4744 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
4745 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
4746 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
4747 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
4748 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
4749 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
4750 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
4751 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
4752 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
4753 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
4754 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
4755 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
4756 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
4757 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
4758 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
4759 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
4760 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
4761 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
4762 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
4763 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
4764 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
4765 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
4766 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
4767 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
4768 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
4769 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
4770 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
4771 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
4772 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
4773 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
4774 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
4775 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
4776 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
4777 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
4778 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
4779 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
4780 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
4781 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
4782 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
4783 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
4784 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
4785 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
4786 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
4787 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
4788 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
4789 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
4790 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
4791 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
4792 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
4793 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
4794 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
4795 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
4796 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
4797 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
4798 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
4799 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004800 .also_non_np = 1,
4801 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004802 .tap = { 504 - 8, 8 },
Herbert Xuda7f0332008-07-31 17:08:25 +08004803 },
4804};
4805
4806static struct cipher_testvec bf_cbc_dec_tv_template[] = {
4807 { /* From OpenSSL */
4808 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4809 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
4810 .klen = 16,
4811 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4812 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
4813 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
4814 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
4815 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
4816 .ilen = 32,
4817 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
4818 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
4819 "\x68\x65\x20\x74\x69\x6d\x65\x20"
4820 "\x66\x6f\x72\x20\x00\x00\x00\x00",
4821 .rlen = 32,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004822 }, { /* Generated with Crypto++ */
4823 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4824 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4825 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4826 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4827 .klen = 32,
4828 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
4829 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
4830 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
4831 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
4832 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004833 "\x01\x9C\x93\x63\x51\x60\x82\xD2"
4834 "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
4835 "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
4836 "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
4837 "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
4838 "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
4839 "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
4840 "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
4841 "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
4842 "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
4843 "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
4844 "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
4845 "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
4846 "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
4847 "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
4848 "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
4849 "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
4850 "\x65\xFE\x15\x40\xD0\x62\x41\x02"
4851 "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
4852 "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
4853 "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
4854 "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
4855 "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
4856 "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
4857 "\x04\xF0\x86\x08\x78\x18\x42\xE0"
4858 "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
4859 "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
4860 "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
4861 "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
4862 "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
4863 "\x97\x18\x92\xFF\x15\x11\xCE\xED"
4864 "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
4865 "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
4866 "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
4867 "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
4868 "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
4869 "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
4870 "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
4871 "\x43\x12\x73\x77\xDB\x91\x83\x5B"
4872 "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
4873 "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
4874 "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
4875 "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
4876 "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
4877 "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
4878 "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
4879 "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
4880 "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
4881 "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
4882 "\xC5\xF8\x69\x83\x28\x84\x87\x56"
4883 "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
4884 "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
4885 "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
4886 "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
4887 "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
4888 "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
4889 "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
4890 "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
4891 "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
4892 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004893 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4894 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4895 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4896 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004897 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4898 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4899 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4900 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4901 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4902 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4903 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4904 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4905 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4906 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4907 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4908 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4909 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4910 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4911 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4912 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4913 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4914 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4915 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4916 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4917 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4918 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4919 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4920 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4921 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4922 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4923 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4924 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4925 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4926 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4927 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4928 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4929 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4930 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4931 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4932 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4933 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4934 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4935 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4936 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4937 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4938 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4939 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4940 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4941 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4942 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4943 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4944 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4945 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4946 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4947 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4948 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4949 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4950 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4951 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4952 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4953 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4954 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4955 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
4956 .rlen = 504,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03004957 .also_non_np = 1,
4958 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004959 .tap = { 504 - 8, 8 },
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03004960 },
4961};
4962
4963static struct cipher_testvec bf_ctr_enc_tv_template[] = {
4964 { /* Generated with Crypto++ */
4965 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4966 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4967 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4968 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4969 .klen = 32,
4970 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
4971 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4972 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4973 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4974 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03004975 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4976 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4977 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4978 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4979 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4980 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4981 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4982 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4983 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4984 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4985 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4986 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4987 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4988 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4989 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4990 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4991 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4992 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4993 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4994 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4995 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4996 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4997 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4998 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4999 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5000 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5001 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5002 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5003 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5004 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5005 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5006 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5007 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5008 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5009 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5010 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5011 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5012 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5013 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5014 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5015 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5016 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5017 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5018 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5019 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5020 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5021 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5022 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5023 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5024 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5025 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5026 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5027 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5028 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5029 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5030 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5031 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5032 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5033 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5034 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005035 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
5036 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
5037 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
5038 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005039 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
5040 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
5041 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
5042 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
5043 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
5044 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
5045 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
5046 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
5047 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
5048 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
5049 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
5050 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
5051 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
5052 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
5053 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
5054 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
5055 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
5056 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
5057 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
5058 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
5059 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
5060 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
5061 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
5062 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
5063 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
5064 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
5065 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
5066 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
5067 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
5068 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
5069 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
5070 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
5071 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
5072 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
5073 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
5074 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
5075 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
5076 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
5077 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
5078 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
5079 "\x82\x63\x11\xB3\x54\x49\x00\x08"
5080 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
5081 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
5082 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
5083 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
5084 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
5085 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
5086 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
5087 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
5088 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
5089 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
5090 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
5091 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
5092 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
5093 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
5094 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
5095 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
5096 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
5097 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
5098 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005099 }, { /* Generated with Crypto++ */
5100 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5101 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5102 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5103 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5104 .klen = 32,
5105 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5106 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5107 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5108 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5109 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5110 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005111 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5112 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5113 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5114 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5115 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5116 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5117 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5118 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5119 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5120 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5121 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5122 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5123 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5124 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5125 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5126 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5127 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5128 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5129 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5130 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5131 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5132 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5133 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5134 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5135 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5136 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5137 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5138 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5139 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5140 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5141 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5142 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5143 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5144 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5145 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5146 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5147 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5148 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5149 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5150 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5151 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5152 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5153 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5154 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5155 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5156 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5157 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5158 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5159 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5160 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5161 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5162 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5163 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5164 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5165 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5166 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5167 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5168 "\x2B\xC2\x59\xF0\x64\xFB\x92",
5169 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005170 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
5171 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
5172 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
5173 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
5174 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005175 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
5176 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
5177 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
5178 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
5179 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
5180 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
5181 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
5182 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
5183 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
5184 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
5185 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
5186 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
5187 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
5188 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
5189 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
5190 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
5191 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
5192 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
5193 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
5194 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
5195 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
5196 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
5197 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
5198 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
5199 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
5200 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
5201 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
5202 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
5203 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
5204 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
5205 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
5206 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
5207 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
5208 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
5209 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
5210 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
5211 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
5212 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
5213 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
5214 "\x82\x63\x11\xB3\x54\x49\x00\x08"
5215 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
5216 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
5217 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
5218 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
5219 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
5220 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
5221 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
5222 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
5223 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
5224 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
5225 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
5226 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
5227 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
5228 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
5229 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
5230 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
5231 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
5232 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
5233 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005234 .also_non_np = 1,
5235 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005236 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03005237 }, { /* Generated with Crypto++ */
5238 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5239 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5240 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5241 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5242 .klen = 32,
5243 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5244 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5245 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5246 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5247 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5248 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5249 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5250 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5251 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5252 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5253 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5254 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5255 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5256 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5257 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5258 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5259 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5260 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5261 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5262 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5263 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5264 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5265 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5266 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5267 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5268 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5269 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5270 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5271 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5272 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5273 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5274 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5275 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5276 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5277 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5278 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5279 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5280 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5281 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5282 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5283 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5284 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5285 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5286 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5287 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5288 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5289 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5290 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5291 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5292 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5293 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5294 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5295 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5296 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5297 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5298 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5299 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5300 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5301 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5302 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5303 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5304 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5305 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5306 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5307 .ilen = 504,
5308 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
5309 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
5310 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
5311 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
5312 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
5313 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
5314 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
5315 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
5316 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
5317 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
5318 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
5319 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
5320 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
5321 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
5322 "\x0B\x82\x59\x14\x26\x67\x08\x09"
5323 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
5324 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
5325 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
5326 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
5327 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
5328 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
5329 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
5330 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
5331 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
5332 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
5333 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
5334 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
5335 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
5336 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
5337 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
5338 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
5339 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
5340 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
5341 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
5342 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
5343 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
5344 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
5345 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
5346 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
5347 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
5348 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
5349 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
5350 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
5351 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
5352 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
5353 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
5354 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
5355 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
5356 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
5357 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
5358 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
5359 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
5360 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
5361 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
5362 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
5363 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
5364 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
5365 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
5366 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
5367 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
5368 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
5369 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
5370 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
5371 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005372 },
5373};
5374
5375static struct cipher_testvec bf_ctr_dec_tv_template[] = {
5376 { /* Generated with Crypto++ */
5377 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5378 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5379 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5380 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5381 .klen = 32,
5382 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5383 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
5384 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
5385 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
5386 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005387 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
5388 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
5389 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
5390 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
5391 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
5392 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
5393 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
5394 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
5395 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
5396 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
5397 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
5398 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
5399 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
5400 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
5401 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
5402 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
5403 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
5404 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
5405 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
5406 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
5407 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
5408 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
5409 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
5410 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
5411 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
5412 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
5413 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
5414 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
5415 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
5416 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
5417 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
5418 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
5419 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
5420 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
5421 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
5422 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
5423 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
5424 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
5425 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
5426 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
5427 "\x82\x63\x11\xB3\x54\x49\x00\x08"
5428 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
5429 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
5430 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
5431 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
5432 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
5433 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
5434 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
5435 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
5436 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
5437 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
5438 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
5439 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
5440 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
5441 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
5442 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
5443 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
5444 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
5445 "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
5446 .ilen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005447 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5448 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5449 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5450 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005451 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5452 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5453 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5454 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5455 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5456 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5457 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5458 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5459 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5460 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5461 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5462 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5463 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5464 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5465 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5466 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5467 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5468 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5469 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5470 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5471 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5472 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5473 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5474 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5475 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5476 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5477 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5478 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5479 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5480 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5481 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5482 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5483 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5484 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5485 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5486 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5487 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5488 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5489 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5490 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5491 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5492 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5493 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5494 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5495 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5496 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5497 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5498 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5499 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5500 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5501 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5502 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5503 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5504 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5505 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5506 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5507 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5508 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5509 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5510 .rlen = 504,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005511 }, { /* Generated with Crypto++ */
5512 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5513 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5514 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5515 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5516 .klen = 32,
5517 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5518 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
5519 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
5520 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
5521 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
5522 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005523 "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
5524 "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
5525 "\x97\xEB\x98\x75\xC4\x73\x45\x83"
5526 "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
5527 "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
5528 "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
5529 "\x13\xD2\x96\x68\x69\x10\x67\x0C"
5530 "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
5531 "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
5532 "\x88\x09\x40\x59\xBD\x12\x64\xB5"
5533 "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
5534 "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
5535 "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
5536 "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
5537 "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
5538 "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
5539 "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
5540 "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
5541 "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
5542 "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
5543 "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
5544 "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
5545 "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
5546 "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
5547 "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
5548 "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
5549 "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
5550 "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
5551 "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
5552 "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
5553 "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
5554 "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
5555 "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
5556 "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
5557 "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
5558 "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
5559 "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
5560 "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
5561 "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
5562 "\x82\x63\x11\xB3\x54\x49\x00\x08"
5563 "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
5564 "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
5565 "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
5566 "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
5567 "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
5568 "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
5569 "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
5570 "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
5571 "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
5572 "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
5573 "\x91\x04\x94\x99\x03\x3B\x42\x6D"
5574 "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
5575 "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
5576 "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
5577 "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
5578 "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
5579 "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
5580 "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
5581 .ilen = 503,
Jussi Kivilinna85b63e32011-10-10 23:03:03 +03005582 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5583 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5584 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5585 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5586 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005587 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5588 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5589 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5590 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5591 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5592 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5593 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5594 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5595 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5596 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5597 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5598 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5599 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5600 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5601 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5602 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5603 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5604 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5605 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5606 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5607 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5608 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5609 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5610 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5611 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5612 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5613 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5614 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5615 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5616 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5617 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5618 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5619 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5620 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5621 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5622 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5623 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5624 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5625 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5626 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5627 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5628 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5629 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5630 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5631 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5632 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5633 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5634 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5635 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5636 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5637 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5638 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5639 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5640 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5641 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5642 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5643 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5644 "\x2B\xC2\x59\xF0\x64\xFB\x92",
5645 .rlen = 503,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005646 .also_non_np = 1,
5647 .np = 2,
Jussi Kivilinna963ae392012-10-20 14:52:52 +03005648 .tap = { 503 - 8, 8 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03005649 }, { /* Generated with Crypto++ */
5650 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5651 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5652 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5653 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5654 .klen = 32,
5655 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5656 .input = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
5657 "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
5658 "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
5659 "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
5660 "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
5661 "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
5662 "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
5663 "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
5664 "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
5665 "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
5666 "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
5667 "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
5668 "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
5669 "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
5670 "\x0B\x82\x59\x14\x26\x67\x08\x09"
5671 "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
5672 "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
5673 "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
5674 "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
5675 "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
5676 "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
5677 "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
5678 "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
5679 "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
5680 "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
5681 "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
5682 "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
5683 "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
5684 "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
5685 "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
5686 "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
5687 "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
5688 "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
5689 "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
5690 "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
5691 "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
5692 "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
5693 "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
5694 "\xB4\x19\xD8\x19\x45\x66\x27\x02"
5695 "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
5696 "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
5697 "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
5698 "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
5699 "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
5700 "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
5701 "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
5702 "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
5703 "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
5704 "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
5705 "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
5706 "\x91\x51\x4E\x71\xF2\x98\x85\x16"
5707 "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
5708 "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
5709 "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
5710 "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
5711 "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
5712 "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
5713 "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
5714 "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
5715 "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
5716 "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
5717 "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
5718 "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
5719 .ilen = 504,
5720 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5721 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5722 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5723 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5724 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5725 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5726 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5727 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5728 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5729 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5730 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5731 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5732 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5733 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5734 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5735 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5736 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5737 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5738 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5739 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5740 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5741 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5742 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5743 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5744 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5745 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5746 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5747 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5748 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5749 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5750 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5751 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5752 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5753 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5754 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5755 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5756 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5757 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5758 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5759 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5760 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5761 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5762 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5763 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5764 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5765 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5766 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5767 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5768 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5769 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5770 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5771 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5772 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5773 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5774 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5775 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5776 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5777 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5778 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5779 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5780 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5781 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5782 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5783 .rlen = 504,
Herbert Xuda7f0332008-07-31 17:08:25 +08005784 },
5785};
5786
5787/*
5788 * Twofish test vectors.
5789 */
Jussi Kivilinna573da622011-10-10 23:03:12 +03005790#define TF_ENC_TEST_VECTORS 4
5791#define TF_DEC_TEST_VECTORS 4
5792#define TF_CBC_ENC_TEST_VECTORS 5
5793#define TF_CBC_DEC_TEST_VECTORS 5
5794#define TF_CTR_ENC_TEST_VECTORS 2
5795#define TF_CTR_DEC_TEST_VECTORS 2
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03005796#define TF_LRW_ENC_TEST_VECTORS 8
5797#define TF_LRW_DEC_TEST_VECTORS 8
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03005798#define TF_XTS_ENC_TEST_VECTORS 5
5799#define TF_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08005800
5801static struct cipher_testvec tf_enc_tv_template[] = {
5802 {
5803 .key = zeroed_string,
5804 .klen = 16,
5805 .input = zeroed_string,
5806 .ilen = 16,
5807 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
5808 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
5809 .rlen = 16,
5810 }, {
5811 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5812 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
5813 "\x00\x11\x22\x33\x44\x55\x66\x77",
5814 .klen = 24,
5815 .input = zeroed_string,
5816 .ilen = 16,
5817 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
5818 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
5819 .rlen = 16,
5820 }, {
5821 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5822 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
5823 "\x00\x11\x22\x33\x44\x55\x66\x77"
5824 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
5825 .klen = 32,
5826 .input = zeroed_string,
5827 .ilen = 16,
5828 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
5829 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
5830 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03005831 }, { /* Generated with Crypto++ */
5832 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
5833 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
5834 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
5835 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
5836 .klen = 32,
5837 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5838 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5839 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5840 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5841 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5842 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5843 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02005844 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5845 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5846 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5847 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5848 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5849 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5850 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5851 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5852 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5853 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5854 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5855 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5856 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5857 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5858 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5859 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5860 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5861 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5862 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5863 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5864 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5865 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5866 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5867 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5868 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5869 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5870 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5871 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5872 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5873 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5874 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5875 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5876 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5877 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5878 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5879 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5880 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5881 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5882 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5883 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5884 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5885 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5886 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5887 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5888 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5889 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5890 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5891 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5892 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5893 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5894 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5895 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5896 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5897 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5898 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
5899 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03005900 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
5901 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
5902 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
5903 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
5904 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
5905 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
5906 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02005907 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
5908 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
5909 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
5910 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
5911 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
5912 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
5913 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
5914 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
5915 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
5916 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
5917 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
5918 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
5919 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
5920 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
5921 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
5922 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
5923 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
5924 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
5925 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
5926 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
5927 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
5928 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
5929 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
5930 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
5931 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
5932 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
5933 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
5934 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
5935 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
5936 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
5937 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
5938 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
5939 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
5940 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
5941 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
5942 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
5943 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
5944 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
5945 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
5946 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
5947 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
5948 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
5949 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
5950 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
5951 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
5952 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
5953 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
5954 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
5955 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
5956 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
5957 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
5958 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
5959 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
5960 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
5961 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
5962 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03005963 .also_non_np = 1,
5964 .np = 2,
5965 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08005966 },
5967};
5968
5969static struct cipher_testvec tf_dec_tv_template[] = {
5970 {
5971 .key = zeroed_string,
5972 .klen = 16,
5973 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
5974 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
5975 .ilen = 16,
5976 .result = zeroed_string,
5977 .rlen = 16,
5978 }, {
5979 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5980 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
5981 "\x00\x11\x22\x33\x44\x55\x66\x77",
5982 .klen = 24,
5983 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
5984 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
5985 .ilen = 16,
5986 .result = zeroed_string,
5987 .rlen = 16,
5988 }, {
5989 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5990 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
5991 "\x00\x11\x22\x33\x44\x55\x66\x77"
5992 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
5993 .klen = 32,
5994 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
5995 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
5996 .ilen = 16,
5997 .result = zeroed_string,
5998 .rlen = 16,
Jussi Kivilinna573da622011-10-10 23:03:12 +03005999 }, { /* Generated with Crypto++ */
6000 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
6001 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
6002 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
6003 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
6004 .klen = 32,
6005 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
6006 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
6007 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
6008 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
6009 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
6010 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
6011 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006012 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
6013 "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
6014 "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
6015 "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
6016 "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
6017 "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
6018 "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
6019 "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
6020 "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
6021 "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
6022 "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
6023 "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
6024 "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
6025 "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
6026 "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
6027 "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
6028 "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
6029 "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
6030 "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
6031 "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
6032 "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
6033 "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
6034 "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
6035 "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
6036 "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
6037 "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
6038 "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
6039 "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
6040 "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
6041 "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
6042 "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
6043 "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
6044 "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
6045 "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
6046 "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
6047 "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
6048 "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
6049 "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
6050 "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
6051 "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
6052 "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
6053 "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
6054 "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
6055 "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
6056 "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
6057 "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
6058 "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
6059 "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
6060 "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
6061 "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
6062 "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
6063 "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
6064 "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
6065 "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
6066 "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
6067 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006068 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6069 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6070 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6071 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6072 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6073 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6074 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006075 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6076 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6077 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6078 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6079 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6080 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6081 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6082 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6083 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6084 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6085 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6086 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6087 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6088 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6089 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6090 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6091 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6092 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6093 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6094 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6095 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6096 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6097 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6098 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6099 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6100 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6101 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6102 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6103 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6104 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6105 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6106 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6107 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6108 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6109 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6110 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6111 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6112 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6113 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6114 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6115 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6116 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6117 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6118 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6119 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6120 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6121 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6122 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6123 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6124 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6125 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6126 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6127 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6128 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6129 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6130 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006131 .also_non_np = 1,
6132 .np = 2,
6133 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006134 },
6135};
6136
6137static struct cipher_testvec tf_cbc_enc_tv_template[] = {
6138 { /* Generated with Nettle */
6139 .key = zeroed_string,
6140 .klen = 16,
6141 .iv = zeroed_string,
6142 .input = zeroed_string,
6143 .ilen = 16,
6144 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6145 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
6146 .rlen = 16,
6147 }, {
6148 .key = zeroed_string,
6149 .klen = 16,
6150 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6151 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
6152 .input = zeroed_string,
6153 .ilen = 16,
6154 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
6155 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
6156 .rlen = 16,
6157 }, {
6158 .key = zeroed_string,
6159 .klen = 16,
6160 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
6161 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
6162 .input = zeroed_string,
6163 .ilen = 16,
6164 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
6165 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
6166 .rlen = 16,
6167 }, {
6168 .key = zeroed_string,
6169 .klen = 16,
6170 .iv = zeroed_string,
6171 .input = zeroed_string,
6172 .ilen = 48,
6173 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6174 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
6175 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
6176 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
6177 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
6178 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
6179 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006180 }, { /* Generated with Crypto++ */
6181 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6182 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6183 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6184 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6185 .klen = 32,
6186 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6187 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6188 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6189 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6190 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6191 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6192 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6193 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6194 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006195 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6196 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6197 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6198 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6199 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6200 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6201 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6202 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6203 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6204 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6205 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6206 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6207 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6208 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6209 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6210 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6211 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6212 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6213 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6214 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6215 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6216 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6217 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6218 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6219 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6220 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6221 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6222 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6223 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6224 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6225 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6226 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6227 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6228 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6229 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6230 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6231 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6232 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6233 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6234 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6235 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6236 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6237 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6238 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6239 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6240 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6241 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6242 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6243 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6244 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6245 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6246 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6247 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6248 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6249 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6250 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006251 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
6252 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
6253 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
6254 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
6255 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
6256 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
6257 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006258 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
6259 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
6260 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
6261 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
6262 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
6263 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
6264 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
6265 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
6266 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
6267 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
6268 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
6269 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
6270 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
6271 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
6272 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
6273 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
6274 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
6275 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
6276 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
6277 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
6278 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
6279 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
6280 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
6281 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
6282 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
6283 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
6284 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
6285 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
6286 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
6287 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
6288 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
6289 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
6290 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
6291 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
6292 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
6293 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
6294 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
6295 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
6296 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
6297 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
6298 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
6299 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
6300 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
6301 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
6302 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
6303 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
6304 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
6305 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
6306 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
6307 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
6308 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
6309 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
6310 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
6311 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
6312 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
6313 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006314 .also_non_np = 1,
6315 .np = 2,
6316 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08006317 },
6318};
6319
6320static struct cipher_testvec tf_cbc_dec_tv_template[] = {
6321 { /* Reverse of the first four above */
6322 .key = zeroed_string,
6323 .klen = 16,
6324 .iv = zeroed_string,
6325 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6326 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
6327 .ilen = 16,
6328 .result = zeroed_string,
6329 .rlen = 16,
6330 }, {
6331 .key = zeroed_string,
6332 .klen = 16,
6333 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6334 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
6335 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
6336 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
6337 .ilen = 16,
6338 .result = zeroed_string,
6339 .rlen = 16,
6340 }, {
6341 .key = zeroed_string,
6342 .klen = 16,
6343 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
6344 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
6345 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
6346 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
6347 .ilen = 16,
6348 .result = zeroed_string,
6349 .rlen = 16,
6350 }, {
6351 .key = zeroed_string,
6352 .klen = 16,
6353 .iv = zeroed_string,
6354 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
6355 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
6356 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
6357 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
6358 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
6359 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
6360 .ilen = 48,
6361 .result = zeroed_string,
6362 .rlen = 48,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006363 }, { /* Generated with Crypto++ */
6364 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6365 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6366 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6367 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6368 .klen = 32,
6369 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6370 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6371 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
6372 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
6373 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
6374 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
6375 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
6376 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
6377 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006378 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
6379 "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
6380 "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
6381 "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
6382 "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
6383 "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
6384 "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
6385 "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
6386 "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
6387 "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
6388 "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
6389 "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
6390 "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
6391 "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
6392 "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
6393 "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
6394 "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
6395 "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
6396 "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
6397 "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
6398 "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
6399 "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
6400 "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
6401 "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
6402 "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
6403 "\x75\x42\x62\x04\x31\x1F\x95\x7C"
6404 "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
6405 "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
6406 "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
6407 "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
6408 "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
6409 "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
6410 "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
6411 "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
6412 "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
6413 "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
6414 "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
6415 "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
6416 "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
6417 "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
6418 "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
6419 "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
6420 "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
6421 "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
6422 "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
6423 "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
6424 "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
6425 "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
6426 "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
6427 "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
6428 "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
6429 "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
6430 "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
6431 "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
6432 "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
6433 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006434 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6435 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6436 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6437 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6438 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6439 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6440 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006441 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6442 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6443 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6444 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6445 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6446 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6447 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6448 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6449 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6450 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6451 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6452 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6453 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6454 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6455 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6456 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6457 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6458 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6459 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6460 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6461 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6462 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6463 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6464 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6465 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6466 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6467 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6468 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6469 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6470 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6471 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6472 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6473 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6474 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6475 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6476 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6477 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6478 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6479 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6480 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6481 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6482 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6483 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6484 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6485 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6486 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6487 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6488 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6489 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6490 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6491 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6492 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6493 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6494 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6495 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6496 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006497 .also_non_np = 1,
6498 .np = 2,
6499 .tap = { 496 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03006500 },
6501};
6502
6503static struct cipher_testvec tf_ctr_enc_tv_template[] = {
6504 { /* Generated with Crypto++ */
6505 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6506 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6507 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6508 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6509 .klen = 32,
6510 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6511 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6512 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6513 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6514 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6515 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6516 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6517 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6518 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006519 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6520 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6521 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6522 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6523 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6524 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6525 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6526 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6527 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6528 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6529 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6530 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6531 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6532 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6533 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6534 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6535 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6536 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6537 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6538 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6539 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6540 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6541 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6542 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6543 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6544 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6545 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6546 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6547 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6548 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6549 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6550 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6551 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6552 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6553 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6554 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6555 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6556 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6557 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6558 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6559 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6560 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6561 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6562 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6563 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6564 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6565 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6566 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6567 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6568 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6569 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6570 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6571 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6572 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6573 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6574 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006575 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
6576 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
6577 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
6578 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
6579 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
6580 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
6581 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006582 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
6583 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
6584 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
6585 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
6586 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
6587 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
6588 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
6589 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
6590 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
6591 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
6592 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
6593 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
6594 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
6595 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
6596 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
6597 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
6598 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
6599 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
6600 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
6601 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
6602 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
6603 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
6604 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
6605 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
6606 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
6607 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
6608 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
6609 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
6610 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
6611 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
6612 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
6613 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
6614 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
6615 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
6616 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
6617 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
6618 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
6619 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
6620 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
6621 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
6622 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
6623 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
6624 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
6625 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
6626 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
6627 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
6628 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
6629 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
6630 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
6631 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
6632 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
6633 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
6634 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
6635 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
6636 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
6637 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006638 }, { /* Generated with Crypto++ */
6639 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6640 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6641 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6642 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6643 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03006644 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
6645 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6646 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6647 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6648 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6649 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6650 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6651 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6652 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6653 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6654 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6655 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6656 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6657 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6658 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6659 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6660 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6661 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6662 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6663 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6664 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6665 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6666 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6667 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6668 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6669 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6670 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6671 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6672 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6673 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6674 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6675 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6676 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6677 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6678 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6679 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6680 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6681 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6682 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6683 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6684 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6685 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6686 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6687 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6688 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6689 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6690 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6691 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6692 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6693 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6694 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6695 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6696 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6697 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6698 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6699 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6700 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6701 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6702 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6703 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6704 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6705 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6706 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6707 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6708 .ilen = 496,
6709 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
6710 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
6711 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
6712 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
6713 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
6714 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
6715 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
6716 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
6717 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
6718 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
6719 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
6720 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
6721 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
6722 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
6723 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
6724 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
6725 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
6726 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
6727 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
6728 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
6729 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
6730 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
6731 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
6732 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
6733 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
6734 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
6735 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
6736 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
6737 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
6738 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
6739 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
6740 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
6741 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
6742 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
6743 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
6744 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
6745 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
6746 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
6747 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
6748 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
6749 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
6750 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
6751 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
6752 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
6753 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
6754 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
6755 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
6756 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
6757 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
6758 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
6759 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
6760 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
6761 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
6762 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
6763 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
6764 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
6765 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
6766 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
6767 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
6768 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
6769 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
6770 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
6771 .rlen = 496,
6772 }, { /* Generated with Crypto++ */
6773 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6774 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6775 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6776 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6777 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006778 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6779 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6780 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6781 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6782 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6783 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6784 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6785 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6786 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6787 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006788 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6789 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6790 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6791 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6792 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6793 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6794 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6795 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6796 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6797 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6798 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6799 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6800 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6801 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6802 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6803 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6804 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6805 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6806 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6807 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6808 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6809 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6810 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6811 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6812 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6813 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6814 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6815 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6816 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6817 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6818 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6819 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6820 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6821 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6822 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6823 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6824 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6825 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6826 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6827 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6828 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6829 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6830 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6831 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6832 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6833 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6834 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6835 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6836 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6837 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6838 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6839 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6840 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6841 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6842 "\x2B\xC2\x59",
6843 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006844 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
6845 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
6846 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
6847 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
6848 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
6849 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
6850 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
6851 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006852 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
6853 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
6854 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
6855 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
6856 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
6857 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
6858 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
6859 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
6860 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
6861 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
6862 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
6863 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
6864 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
6865 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
6866 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
6867 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
6868 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
6869 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
6870 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
6871 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
6872 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
6873 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
6874 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
6875 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
6876 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
6877 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
6878 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
6879 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
6880 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
6881 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
6882 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
6883 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
6884 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
6885 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
6886 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
6887 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
6888 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
6889 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
6890 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
6891 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
6892 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
6893 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
6894 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
6895 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
6896 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
6897 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
6898 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
6899 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
6900 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
6901 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
6902 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
6903 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
6904 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
6905 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
6906 "\x6C\x82\x9D",
6907 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03006908 .also_non_np = 1,
6909 .np = 2,
6910 .tap = { 499 - 16, 16 },
Jussi Kivilinna573da622011-10-10 23:03:12 +03006911 },
6912};
6913
6914static struct cipher_testvec tf_ctr_dec_tv_template[] = {
6915 { /* Generated with Crypto++ */
6916 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6917 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6918 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6919 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6920 .klen = 32,
6921 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6922 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6923 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
6924 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
6925 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
6926 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
6927 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
6928 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
6929 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006930 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
6931 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
6932 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
6933 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
6934 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
6935 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
6936 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
6937 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
6938 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
6939 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
6940 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
6941 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
6942 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
6943 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
6944 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
6945 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
6946 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
6947 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
6948 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
6949 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
6950 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
6951 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
6952 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
6953 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
6954 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
6955 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
6956 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
6957 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
6958 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
6959 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
6960 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
6961 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
6962 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
6963 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
6964 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
6965 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
6966 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
6967 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
6968 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
6969 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
6970 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
6971 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
6972 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
6973 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
6974 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
6975 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
6976 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
6977 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
6978 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
6979 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
6980 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
6981 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
6982 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
6983 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
6984 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
6985 .ilen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03006986 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6987 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6988 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6989 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6990 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6991 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6992 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02006993 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6994 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6995 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6996 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6997 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6998 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6999 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7000 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7001 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7002 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7003 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7004 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7005 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7006 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7007 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7008 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7009 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7010 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7011 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7012 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7013 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7014 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7015 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7016 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7017 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7018 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7019 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7020 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7021 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7022 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7023 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7024 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7025 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7026 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7027 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7028 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7029 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7030 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7031 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7032 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7033 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7034 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7035 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7036 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7037 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7038 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7039 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7040 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7041 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7042 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7043 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7044 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7045 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7046 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7047 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7048 .rlen = 496,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007049 }, { /* Generated with Crypto++ */
7050 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7051 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7052 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7053 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7054 .klen = 32,
Jussi Kivilinna549595a2012-09-19 09:42:59 +03007055 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
7056 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
7057 .input = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
7058 "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
7059 "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
7060 "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
7061 "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
7062 "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
7063 "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
7064 "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
7065 "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
7066 "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
7067 "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
7068 "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
7069 "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
7070 "\x39\x18\x09\xA4\x82\x59\x78\xE7"
7071 "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
7072 "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
7073 "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
7074 "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
7075 "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
7076 "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
7077 "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
7078 "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
7079 "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
7080 "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
7081 "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
7082 "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
7083 "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
7084 "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
7085 "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
7086 "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
7087 "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
7088 "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
7089 "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
7090 "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
7091 "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
7092 "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
7093 "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
7094 "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
7095 "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
7096 "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
7097 "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
7098 "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
7099 "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
7100 "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
7101 "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
7102 "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
7103 "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
7104 "\xDE\x55\x1B\x50\x14\x53\x44\x17"
7105 "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
7106 "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
7107 "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
7108 "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
7109 "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
7110 "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
7111 "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
7112 "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
7113 "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
7114 "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
7115 "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
7116 "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
7117 "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
7118 "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
7119 .ilen = 496,
7120 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7121 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7122 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7123 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7124 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7125 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7126 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7127 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7128 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7129 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7130 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7131 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7132 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7133 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7134 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7135 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7136 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7137 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7138 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7139 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7140 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7141 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7142 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7143 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7144 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7145 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7146 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7147 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7148 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7149 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7150 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7151 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7152 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7153 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7154 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7155 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7156 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7157 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7158 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7159 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7160 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7161 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7162 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7163 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7164 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7165 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7166 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7167 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7168 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7169 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7170 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7171 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7172 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7173 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7174 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7175 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7176 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7177 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7178 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7179 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7180 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7181 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7182 .rlen = 496,
7183 }, { /* Generated with Crypto++ */
7184 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7185 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7186 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7187 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7188 .klen = 32,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007189 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7190 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7191 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
7192 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
7193 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
7194 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
7195 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
7196 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
7197 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
7198 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007199 "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
7200 "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
7201 "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
7202 "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
7203 "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
7204 "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
7205 "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
7206 "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
7207 "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
7208 "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
7209 "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
7210 "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
7211 "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
7212 "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
7213 "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
7214 "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
7215 "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
7216 "\x23\x61\x48\xEA\x80\x04\x27\xAA"
7217 "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
7218 "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
7219 "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
7220 "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
7221 "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
7222 "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
7223 "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
7224 "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
7225 "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
7226 "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
7227 "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
7228 "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
7229 "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
7230 "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
7231 "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
7232 "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
7233 "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
7234 "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
7235 "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
7236 "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
7237 "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
7238 "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
7239 "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
7240 "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
7241 "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
7242 "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
7243 "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
7244 "\x11\xE9\x43\x83\x76\xAA\x53\x37"
7245 "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
7246 "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
7247 "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
7248 "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
7249 "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
7250 "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
7251 "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
7252 "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
7253 "\x6C\x82\x9D",
7254 .ilen = 499,
Jussi Kivilinna573da622011-10-10 23:03:12 +03007255 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7256 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7257 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7258 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7259 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7260 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7261 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7262 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
Johannes Goetzfried4da7de42012-05-28 15:55:38 +02007263 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7264 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7265 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7266 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7267 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7268 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7269 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7270 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7271 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7272 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7273 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7274 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7275 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7276 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7277 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7278 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7279 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7280 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7281 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7282 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7283 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7284 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7285 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7286 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7287 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7288 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7289 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7290 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7291 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7292 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7293 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7294 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7295 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7296 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7297 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7298 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7299 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7300 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7301 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7302 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7303 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7304 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7305 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7306 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7307 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7308 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7309 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7310 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7311 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7312 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7313 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7314 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7315 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7316 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7317 "\x2B\xC2\x59",
7318 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007319 .also_non_np = 1,
7320 .np = 2,
7321 .tap = { 499 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08007322 },
7323};
7324
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03007325static struct cipher_testvec tf_lrw_enc_tv_template[] = {
7326 /* Generated from AES-LRW test vectors */
7327 {
7328 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
7329 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
7330 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
7331 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
7332 .klen = 32,
7333 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7334 "\x00\x00\x00\x00\x00\x00\x00\x01",
7335 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7336 "\x38\x39\x41\x42\x43\x44\x45\x46",
7337 .ilen = 16,
7338 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
7339 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
7340 .rlen = 16,
7341 }, {
7342 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
7343 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
7344 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
7345 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
7346 .klen = 32,
7347 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7348 "\x00\x00\x00\x00\x00\x00\x00\x02",
7349 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7350 "\x38\x39\x41\x42\x43\x44\x45\x46",
7351 .ilen = 16,
7352 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
7353 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
7354 .rlen = 16,
7355 }, {
7356 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
7357 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
7358 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
7359 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
7360 .klen = 32,
7361 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7362 "\x00\x00\x00\x02\x00\x00\x00\x00",
7363 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7364 "\x38\x39\x41\x42\x43\x44\x45\x46",
7365 .ilen = 16,
7366 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
7367 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
7368 .rlen = 16,
7369 }, {
7370 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
7371 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
7372 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
7373 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
7374 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
7375 .klen = 40,
7376 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7377 "\x00\x00\x00\x00\x00\x00\x00\x01",
7378 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7379 "\x38\x39\x41\x42\x43\x44\x45\x46",
7380 .ilen = 16,
7381 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
7382 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
7383 .rlen = 16,
7384 }, {
7385 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
7386 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
7387 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
7388 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
7389 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
7390 .klen = 40,
7391 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7392 "\x00\x00\x00\x02\x00\x00\x00\x00",
7393 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7394 "\x38\x39\x41\x42\x43\x44\x45\x46",
7395 .ilen = 16,
7396 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
7397 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
7398 .rlen = 16,
7399 }, {
7400 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7401 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7402 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7403 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7404 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7405 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7406 .klen = 48,
7407 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7408 "\x00\x00\x00\x00\x00\x00\x00\x01",
7409 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7410 "\x38\x39\x41\x42\x43\x44\x45\x46",
7411 .ilen = 16,
7412 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
7413 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
7414 .rlen = 16,
7415 }, {
7416 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
7417 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
7418 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
7419 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
7420 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
7421 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
7422 .klen = 48,
7423 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7424 "\x00\x00\x00\x02\x00\x00\x00\x00",
7425 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
7426 "\x38\x39\x41\x42\x43\x44\x45\x46",
7427 .ilen = 16,
7428 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
7429 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
7430 .rlen = 16,
7431 }, {
7432 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7433 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7434 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7435 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7436 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7437 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7438 .klen = 48,
7439 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7440 "\x00\x00\x00\x00\x00\x00\x00\x01",
7441 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
7442 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
7443 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
7444 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
7445 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
7446 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
7447 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
7448 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
7449 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
7450 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
7451 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
7452 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
7453 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
7454 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
7455 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
7456 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
7457 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
7458 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
7459 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
7460 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
7461 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
7462 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
7463 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
7464 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
7465 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
7466 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
7467 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
7468 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
7469 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
7470 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
7471 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
7472 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
7473 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
7474 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
7475 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
7476 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
7477 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
7478 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
7479 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
7480 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
7481 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
7482 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
7483 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
7484 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
7485 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
7486 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
7487 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
7488 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
7489 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
7490 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
7491 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
7492 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
7493 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
7494 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
7495 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
7496 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
7497 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
7498 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
7499 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
7500 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
7501 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
7502 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
7503 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
7504 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
7505 .ilen = 512,
7506 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
7507 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
7508 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
7509 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
7510 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
7511 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
7512 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
7513 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
7514 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
7515 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
7516 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
7517 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
7518 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
7519 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
7520 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
7521 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
7522 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
7523 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
7524 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
7525 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
7526 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
7527 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
7528 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
7529 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
7530 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
7531 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
7532 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
7533 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
7534 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
7535 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
7536 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
7537 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
7538 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
7539 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
7540 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
7541 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
7542 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
7543 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
7544 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
7545 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
7546 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
7547 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
7548 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
7549 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
7550 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
7551 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
7552 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
7553 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
7554 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
7555 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
7556 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
7557 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
7558 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
7559 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
7560 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
7561 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
7562 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
7563 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
7564 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
7565 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
7566 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
7567 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
7568 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
7569 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
7570 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007571 .also_non_np = 1,
7572 .np = 2,
7573 .tap = { 512 - 16, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03007574 },
7575};
7576
7577static struct cipher_testvec tf_lrw_dec_tv_template[] = {
7578 /* Generated from AES-LRW test vectors */
7579 /* same as enc vectors with input and result reversed */
7580 {
7581 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
7582 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
7583 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
7584 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
7585 .klen = 32,
7586 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7587 "\x00\x00\x00\x00\x00\x00\x00\x01",
7588 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
7589 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
7590 .ilen = 16,
7591 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7592 "\x38\x39\x41\x42\x43\x44\x45\x46",
7593 .rlen = 16,
7594 }, {
7595 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
7596 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
7597 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
7598 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
7599 .klen = 32,
7600 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7601 "\x00\x00\x00\x00\x00\x00\x00\x02",
7602 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
7603 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
7604 .ilen = 16,
7605 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7606 "\x38\x39\x41\x42\x43\x44\x45\x46",
7607 .rlen = 16,
7608 }, {
7609 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
7610 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
7611 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
7612 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
7613 .klen = 32,
7614 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7615 "\x00\x00\x00\x02\x00\x00\x00\x00",
7616 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
7617 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
7618 .ilen = 16,
7619 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7620 "\x38\x39\x41\x42\x43\x44\x45\x46",
7621 .rlen = 16,
7622 }, {
7623 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
7624 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
7625 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
7626 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
7627 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
7628 .klen = 40,
7629 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7630 "\x00\x00\x00\x00\x00\x00\x00\x01",
7631 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
7632 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
7633 .ilen = 16,
7634 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7635 "\x38\x39\x41\x42\x43\x44\x45\x46",
7636 .rlen = 16,
7637 }, {
7638 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
7639 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
7640 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
7641 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
7642 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
7643 .klen = 40,
7644 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7645 "\x00\x00\x00\x02\x00\x00\x00\x00",
7646 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
7647 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
7648 .ilen = 16,
7649 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7650 "\x38\x39\x41\x42\x43\x44\x45\x46",
7651 .rlen = 16,
7652 }, {
7653 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7654 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7655 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7656 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7657 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7658 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7659 .klen = 48,
7660 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7661 "\x00\x00\x00\x00\x00\x00\x00\x01",
7662 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
7663 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
7664 .ilen = 16,
7665 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7666 "\x38\x39\x41\x42\x43\x44\x45\x46",
7667 .rlen = 16,
7668 }, {
7669 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
7670 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
7671 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
7672 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
7673 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
7674 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
7675 .klen = 48,
7676 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7677 "\x00\x00\x00\x02\x00\x00\x00\x00",
7678 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
7679 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
7680 .ilen = 16,
7681 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
7682 "\x38\x39\x41\x42\x43\x44\x45\x46",
7683 .rlen = 16,
7684 }, {
7685 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
7686 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
7687 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
7688 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
7689 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
7690 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
7691 .klen = 48,
7692 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7693 "\x00\x00\x00\x00\x00\x00\x00\x01",
7694 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
7695 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
7696 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
7697 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
7698 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
7699 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
7700 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
7701 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
7702 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
7703 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
7704 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
7705 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
7706 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
7707 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
7708 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
7709 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
7710 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
7711 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
7712 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
7713 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
7714 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
7715 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
7716 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
7717 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
7718 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
7719 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
7720 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
7721 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
7722 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
7723 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
7724 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
7725 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
7726 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
7727 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
7728 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
7729 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
7730 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
7731 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
7732 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
7733 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
7734 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
7735 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
7736 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
7737 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
7738 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
7739 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
7740 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
7741 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
7742 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
7743 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
7744 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
7745 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
7746 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
7747 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
7748 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
7749 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
7750 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
7751 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
7752 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
7753 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
7754 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
7755 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
7756 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
7757 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
7758 .ilen = 512,
7759 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
7760 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
7761 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
7762 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
7763 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
7764 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
7765 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
7766 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
7767 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
7768 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
7769 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
7770 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
7771 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
7772 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
7773 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
7774 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
7775 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
7776 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
7777 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
7778 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
7779 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
7780 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
7781 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
7782 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
7783 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
7784 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
7785 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
7786 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
7787 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
7788 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
7789 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
7790 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
7791 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
7792 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
7793 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
7794 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
7795 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
7796 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
7797 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
7798 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
7799 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
7800 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
7801 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
7802 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
7803 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
7804 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
7805 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
7806 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
7807 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
7808 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
7809 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
7810 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
7811 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
7812 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
7813 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
7814 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
7815 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
7816 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
7817 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
7818 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
7819 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
7820 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
7821 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
7822 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
7823 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03007824 .also_non_np = 1,
7825 .np = 2,
7826 .tap = { 512 - 16, 16 },
Jussi Kivilinna0b2a1552011-10-18 13:32:50 +03007827 },
7828};
7829
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03007830static struct cipher_testvec tf_xts_enc_tv_template[] = {
7831 /* Generated from AES-XTS test vectors */
7832{
7833 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
7834 "\x00\x00\x00\x00\x00\x00\x00\x00"
7835 "\x00\x00\x00\x00\x00\x00\x00\x00"
7836 "\x00\x00\x00\x00\x00\x00\x00\x00",
7837 .klen = 32,
7838 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7839 "\x00\x00\x00\x00\x00\x00\x00\x00",
7840 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
7841 "\x00\x00\x00\x00\x00\x00\x00\x00"
7842 "\x00\x00\x00\x00\x00\x00\x00\x00"
7843 "\x00\x00\x00\x00\x00\x00\x00\x00",
7844 .ilen = 32,
7845 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
7846 "\x30\x74\xe4\x44\x52\x77\x97\x43"
7847 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
7848 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
7849 .rlen = 32,
7850 }, {
7851 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
7852 "\x11\x11\x11\x11\x11\x11\x11\x11"
7853 "\x22\x22\x22\x22\x22\x22\x22\x22"
7854 "\x22\x22\x22\x22\x22\x22\x22\x22",
7855 .klen = 32,
7856 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
7857 "\x00\x00\x00\x00\x00\x00\x00\x00",
7858 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
7859 "\x44\x44\x44\x44\x44\x44\x44\x44"
7860 "\x44\x44\x44\x44\x44\x44\x44\x44"
7861 "\x44\x44\x44\x44\x44\x44\x44\x44",
7862 .ilen = 32,
7863 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
7864 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
7865 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
7866 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
7867 .rlen = 32,
7868 }, {
7869 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
7870 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
7871 "\x22\x22\x22\x22\x22\x22\x22\x22"
7872 "\x22\x22\x22\x22\x22\x22\x22\x22",
7873 .klen = 32,
7874 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
7875 "\x00\x00\x00\x00\x00\x00\x00\x00",
7876 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
7877 "\x44\x44\x44\x44\x44\x44\x44\x44"
7878 "\x44\x44\x44\x44\x44\x44\x44\x44"
7879 "\x44\x44\x44\x44\x44\x44\x44\x44",
7880 .ilen = 32,
7881 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
7882 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
7883 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
7884 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
7885 .rlen = 32,
7886 }, {
7887 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
7888 "\x23\x53\x60\x28\x74\x71\x35\x26"
7889 "\x31\x41\x59\x26\x53\x58\x97\x93"
7890 "\x23\x84\x62\x64\x33\x83\x27\x95",
7891 .klen = 32,
7892 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
7893 "\x00\x00\x00\x00\x00\x00\x00\x00",
7894 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
7895 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7896 "\x10\x11\x12\x13\x14\x15\x16\x17"
7897 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7898 "\x20\x21\x22\x23\x24\x25\x26\x27"
7899 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7900 "\x30\x31\x32\x33\x34\x35\x36\x37"
7901 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7902 "\x40\x41\x42\x43\x44\x45\x46\x47"
7903 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7904 "\x50\x51\x52\x53\x54\x55\x56\x57"
7905 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7906 "\x60\x61\x62\x63\x64\x65\x66\x67"
7907 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7908 "\x70\x71\x72\x73\x74\x75\x76\x77"
7909 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7910 "\x80\x81\x82\x83\x84\x85\x86\x87"
7911 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7912 "\x90\x91\x92\x93\x94\x95\x96\x97"
7913 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7914 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7915 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7916 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7917 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7918 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7919 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7920 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7921 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7922 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7923 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7924 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7925 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7926 "\x00\x01\x02\x03\x04\x05\x06\x07"
7927 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7928 "\x10\x11\x12\x13\x14\x15\x16\x17"
7929 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7930 "\x20\x21\x22\x23\x24\x25\x26\x27"
7931 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7932 "\x30\x31\x32\x33\x34\x35\x36\x37"
7933 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7934 "\x40\x41\x42\x43\x44\x45\x46\x47"
7935 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7936 "\x50\x51\x52\x53\x54\x55\x56\x57"
7937 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7938 "\x60\x61\x62\x63\x64\x65\x66\x67"
7939 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7940 "\x70\x71\x72\x73\x74\x75\x76\x77"
7941 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7942 "\x80\x81\x82\x83\x84\x85\x86\x87"
7943 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7944 "\x90\x91\x92\x93\x94\x95\x96\x97"
7945 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7946 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7947 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7948 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7949 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7950 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7951 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7952 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7953 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7954 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7955 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7956 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7957 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7958 .ilen = 512,
7959 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
7960 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
7961 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
7962 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
7963 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
7964 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
7965 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
7966 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
7967 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
7968 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
7969 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
7970 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
7971 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
7972 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
7973 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
7974 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
7975 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
7976 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
7977 "\x39\x80\x39\x09\x97\x65\xf2\x83"
7978 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
7979 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
7980 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
7981 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
7982 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
7983 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
7984 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
7985 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
7986 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
7987 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
7988 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
7989 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
7990 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
7991 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
7992 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
7993 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
7994 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
7995 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
7996 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
7997 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
7998 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
7999 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
8000 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
8001 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
8002 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
8003 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
8004 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
8005 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
8006 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
8007 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
8008 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
8009 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
8010 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
8011 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
8012 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
8013 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
8014 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
8015 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
8016 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
8017 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
8018 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
8019 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
8020 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
8021 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
8022 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
8023 .rlen = 512,
8024 }, {
8025 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
8026 "\x23\x53\x60\x28\x74\x71\x35\x26"
8027 "\x62\x49\x77\x57\x24\x70\x93\x69"
8028 "\x99\x59\x57\x49\x66\x96\x76\x27"
8029 "\x31\x41\x59\x26\x53\x58\x97\x93"
8030 "\x23\x84\x62\x64\x33\x83\x27\x95"
8031 "\x02\x88\x41\x97\x16\x93\x99\x37"
8032 "\x51\x05\x82\x09\x74\x94\x45\x92",
8033 .klen = 64,
8034 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
8035 "\x00\x00\x00\x00\x00\x00\x00\x00",
8036 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
8037 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8038 "\x10\x11\x12\x13\x14\x15\x16\x17"
8039 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8040 "\x20\x21\x22\x23\x24\x25\x26\x27"
8041 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8042 "\x30\x31\x32\x33\x34\x35\x36\x37"
8043 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8044 "\x40\x41\x42\x43\x44\x45\x46\x47"
8045 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8046 "\x50\x51\x52\x53\x54\x55\x56\x57"
8047 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8048 "\x60\x61\x62\x63\x64\x65\x66\x67"
8049 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8050 "\x70\x71\x72\x73\x74\x75\x76\x77"
8051 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8052 "\x80\x81\x82\x83\x84\x85\x86\x87"
8053 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8054 "\x90\x91\x92\x93\x94\x95\x96\x97"
8055 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8056 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8057 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8058 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8059 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8060 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8061 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8062 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8063 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8064 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8065 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8066 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8067 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
8068 "\x00\x01\x02\x03\x04\x05\x06\x07"
8069 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8070 "\x10\x11\x12\x13\x14\x15\x16\x17"
8071 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8072 "\x20\x21\x22\x23\x24\x25\x26\x27"
8073 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8074 "\x30\x31\x32\x33\x34\x35\x36\x37"
8075 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8076 "\x40\x41\x42\x43\x44\x45\x46\x47"
8077 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8078 "\x50\x51\x52\x53\x54\x55\x56\x57"
8079 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8080 "\x60\x61\x62\x63\x64\x65\x66\x67"
8081 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8082 "\x70\x71\x72\x73\x74\x75\x76\x77"
8083 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8084 "\x80\x81\x82\x83\x84\x85\x86\x87"
8085 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8086 "\x90\x91\x92\x93\x94\x95\x96\x97"
8087 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8088 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8089 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8090 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8091 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8092 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8093 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8094 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8095 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8096 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8097 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8098 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8099 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
8100 .ilen = 512,
8101 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
8102 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
8103 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
8104 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
8105 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
8106 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
8107 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
8108 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
8109 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
8110 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
8111 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
8112 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
8113 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
8114 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
8115 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
8116 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
8117 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
8118 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
8119 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
8120 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
8121 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
8122 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
8123 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
8124 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
8125 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
8126 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
8127 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
8128 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
8129 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
8130 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
8131 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
8132 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
8133 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
8134 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
8135 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
8136 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
8137 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
8138 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
8139 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
8140 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
8141 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
8142 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
8143 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
8144 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
8145 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
8146 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
8147 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
8148 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
8149 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
8150 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
8151 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
8152 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
8153 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
8154 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
8155 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
8156 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
8157 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
8158 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
8159 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
8160 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
8161 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
8162 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
8163 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
8164 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
8165 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008166 .also_non_np = 1,
8167 .np = 2,
8168 .tap = { 512 - 16, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03008169 },
8170};
8171
8172static struct cipher_testvec tf_xts_dec_tv_template[] = {
8173 /* Generated from AES-XTS test vectors */
8174 /* same as enc vectors with input and result reversed */
8175 {
8176 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
8177 "\x00\x00\x00\x00\x00\x00\x00\x00"
8178 "\x00\x00\x00\x00\x00\x00\x00\x00"
8179 "\x00\x00\x00\x00\x00\x00\x00\x00",
8180 .klen = 32,
8181 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8182 "\x00\x00\x00\x00\x00\x00\x00\x00",
8183 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
8184 "\x30\x74\xe4\x44\x52\x77\x97\x43"
8185 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
8186 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
8187 .ilen = 32,
8188 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
8189 "\x00\x00\x00\x00\x00\x00\x00\x00"
8190 "\x00\x00\x00\x00\x00\x00\x00\x00"
8191 "\x00\x00\x00\x00\x00\x00\x00\x00",
8192 .rlen = 32,
8193 }, {
8194 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
8195 "\x11\x11\x11\x11\x11\x11\x11\x11"
8196 "\x22\x22\x22\x22\x22\x22\x22\x22"
8197 "\x22\x22\x22\x22\x22\x22\x22\x22",
8198 .klen = 32,
8199 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8200 "\x00\x00\x00\x00\x00\x00\x00\x00",
8201 .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
8202 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
8203 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
8204 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
8205 .ilen = 32,
8206 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
8207 "\x44\x44\x44\x44\x44\x44\x44\x44"
8208 "\x44\x44\x44\x44\x44\x44\x44\x44"
8209 "\x44\x44\x44\x44\x44\x44\x44\x44",
8210 .rlen = 32,
8211 }, {
8212 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
8213 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
8214 "\x22\x22\x22\x22\x22\x22\x22\x22"
8215 "\x22\x22\x22\x22\x22\x22\x22\x22",
8216 .klen = 32,
8217 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
8218 "\x00\x00\x00\x00\x00\x00\x00\x00",
8219 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
8220 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
8221 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
8222 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
8223 .ilen = 32,
8224 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
8225 "\x44\x44\x44\x44\x44\x44\x44\x44"
8226 "\x44\x44\x44\x44\x44\x44\x44\x44"
8227 "\x44\x44\x44\x44\x44\x44\x44\x44",
8228 .rlen = 32,
8229 }, {
8230 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
8231 "\x23\x53\x60\x28\x74\x71\x35\x26"
8232 "\x31\x41\x59\x26\x53\x58\x97\x93"
8233 "\x23\x84\x62\x64\x33\x83\x27\x95",
8234 .klen = 32,
8235 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
8236 "\x00\x00\x00\x00\x00\x00\x00\x00",
8237 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
8238 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
8239 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
8240 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
8241 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
8242 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
8243 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
8244 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
8245 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
8246 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
8247 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
8248 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
8249 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
8250 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
8251 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
8252 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
8253 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
8254 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
8255 "\x39\x80\x39\x09\x97\x65\xf2\x83"
8256 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
8257 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
8258 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
8259 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
8260 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
8261 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
8262 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
8263 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
8264 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
8265 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
8266 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
8267 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
8268 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
8269 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
8270 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
8271 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
8272 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
8273 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
8274 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
8275 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
8276 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
8277 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
8278 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
8279 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
8280 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
8281 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
8282 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
8283 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
8284 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
8285 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
8286 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
8287 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
8288 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
8289 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
8290 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
8291 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
8292 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
8293 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
8294 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
8295 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
8296 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
8297 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
8298 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
8299 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
8300 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
8301 .ilen = 512,
8302 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8303 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8304 "\x10\x11\x12\x13\x14\x15\x16\x17"
8305 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8306 "\x20\x21\x22\x23\x24\x25\x26\x27"
8307 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8308 "\x30\x31\x32\x33\x34\x35\x36\x37"
8309 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8310 "\x40\x41\x42\x43\x44\x45\x46\x47"
8311 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8312 "\x50\x51\x52\x53\x54\x55\x56\x57"
8313 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8314 "\x60\x61\x62\x63\x64\x65\x66\x67"
8315 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8316 "\x70\x71\x72\x73\x74\x75\x76\x77"
8317 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8318 "\x80\x81\x82\x83\x84\x85\x86\x87"
8319 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8320 "\x90\x91\x92\x93\x94\x95\x96\x97"
8321 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8322 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8323 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8324 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8325 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8326 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8327 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8328 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8329 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8330 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8331 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8332 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8333 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
8334 "\x00\x01\x02\x03\x04\x05\x06\x07"
8335 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8336 "\x10\x11\x12\x13\x14\x15\x16\x17"
8337 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8338 "\x20\x21\x22\x23\x24\x25\x26\x27"
8339 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8340 "\x30\x31\x32\x33\x34\x35\x36\x37"
8341 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8342 "\x40\x41\x42\x43\x44\x45\x46\x47"
8343 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8344 "\x50\x51\x52\x53\x54\x55\x56\x57"
8345 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8346 "\x60\x61\x62\x63\x64\x65\x66\x67"
8347 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8348 "\x70\x71\x72\x73\x74\x75\x76\x77"
8349 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8350 "\x80\x81\x82\x83\x84\x85\x86\x87"
8351 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8352 "\x90\x91\x92\x93\x94\x95\x96\x97"
8353 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8354 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8355 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8356 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8357 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8358 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8359 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8360 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8361 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8362 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8363 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8364 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8365 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
8366 .rlen = 512,
8367 }, {
8368 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
8369 "\x23\x53\x60\x28\x74\x71\x35\x26"
8370 "\x62\x49\x77\x57\x24\x70\x93\x69"
8371 "\x99\x59\x57\x49\x66\x96\x76\x27"
8372 "\x31\x41\x59\x26\x53\x58\x97\x93"
8373 "\x23\x84\x62\x64\x33\x83\x27\x95"
8374 "\x02\x88\x41\x97\x16\x93\x99\x37"
8375 "\x51\x05\x82\x09\x74\x94\x45\x92",
8376 .klen = 64,
8377 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
8378 "\x00\x00\x00\x00\x00\x00\x00\x00",
8379 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
8380 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
8381 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
8382 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
8383 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
8384 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
8385 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
8386 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
8387 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
8388 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
8389 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
8390 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
8391 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
8392 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
8393 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
8394 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
8395 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
8396 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
8397 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
8398 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
8399 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
8400 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
8401 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
8402 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
8403 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
8404 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
8405 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
8406 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
8407 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
8408 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
8409 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
8410 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
8411 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
8412 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
8413 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
8414 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
8415 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
8416 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
8417 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
8418 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
8419 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
8420 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
8421 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
8422 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
8423 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
8424 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
8425 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
8426 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
8427 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
8428 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
8429 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
8430 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
8431 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
8432 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
8433 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
8434 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
8435 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
8436 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
8437 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
8438 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
8439 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
8440 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
8441 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
8442 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
8443 .ilen = 512,
8444 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8445 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8446 "\x10\x11\x12\x13\x14\x15\x16\x17"
8447 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8448 "\x20\x21\x22\x23\x24\x25\x26\x27"
8449 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8450 "\x30\x31\x32\x33\x34\x35\x36\x37"
8451 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8452 "\x40\x41\x42\x43\x44\x45\x46\x47"
8453 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8454 "\x50\x51\x52\x53\x54\x55\x56\x57"
8455 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8456 "\x60\x61\x62\x63\x64\x65\x66\x67"
8457 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8458 "\x70\x71\x72\x73\x74\x75\x76\x77"
8459 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8460 "\x80\x81\x82\x83\x84\x85\x86\x87"
8461 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8462 "\x90\x91\x92\x93\x94\x95\x96\x97"
8463 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8464 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8465 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8466 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8467 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8468 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8469 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8470 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8471 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8472 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8473 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8474 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8475 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
8476 "\x00\x01\x02\x03\x04\x05\x06\x07"
8477 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8478 "\x10\x11\x12\x13\x14\x15\x16\x17"
8479 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
8480 "\x20\x21\x22\x23\x24\x25\x26\x27"
8481 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
8482 "\x30\x31\x32\x33\x34\x35\x36\x37"
8483 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
8484 "\x40\x41\x42\x43\x44\x45\x46\x47"
8485 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
8486 "\x50\x51\x52\x53\x54\x55\x56\x57"
8487 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
8488 "\x60\x61\x62\x63\x64\x65\x66\x67"
8489 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
8490 "\x70\x71\x72\x73\x74\x75\x76\x77"
8491 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
8492 "\x80\x81\x82\x83\x84\x85\x86\x87"
8493 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
8494 "\x90\x91\x92\x93\x94\x95\x96\x97"
8495 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
8496 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
8497 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
8498 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
8499 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
8500 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
8501 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
8502 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
8503 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
8504 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
8505 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
8506 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
8507 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
8508 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008509 .also_non_np = 1,
8510 .np = 2,
8511 .tap = { 512 - 16, 16 },
Jussi Kivilinnaaed265b2011-10-18 13:33:33 +03008512 },
8513};
8514
Herbert Xuda7f0332008-07-31 17:08:25 +08008515/*
8516 * Serpent test vectors. These are backwards because Serpent writes
8517 * octet sequences in right-to-left mode.
8518 */
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008519#define SERPENT_ENC_TEST_VECTORS 5
8520#define SERPENT_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +08008521
8522#define TNEPRES_ENC_TEST_VECTORS 4
8523#define TNEPRES_DEC_TEST_VECTORS 4
8524
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008525#define SERPENT_CBC_ENC_TEST_VECTORS 1
8526#define SERPENT_CBC_DEC_TEST_VECTORS 1
8527
8528#define SERPENT_CTR_ENC_TEST_VECTORS 2
8529#define SERPENT_CTR_DEC_TEST_VECTORS 2
8530
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +03008531#define SERPENT_LRW_ENC_TEST_VECTORS 8
8532#define SERPENT_LRW_DEC_TEST_VECTORS 8
8533
Jussi Kivilinna18be20b2011-10-18 13:33:17 +03008534#define SERPENT_XTS_ENC_TEST_VECTORS 5
8535#define SERPENT_XTS_DEC_TEST_VECTORS 5
8536
Herbert Xuda7f0332008-07-31 17:08:25 +08008537static struct cipher_testvec serpent_enc_tv_template[] = {
8538 {
8539 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
8540 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8541 .ilen = 16,
8542 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
8543 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
8544 .rlen = 16,
8545 }, {
8546 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8547 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8548 .klen = 16,
8549 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
8550 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8551 .ilen = 16,
8552 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
8553 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
8554 .rlen = 16,
8555 }, {
8556 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8557 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8558 "\x10\x11\x12\x13\x14\x15\x16\x17"
8559 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8560 .klen = 32,
8561 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
8562 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8563 .ilen = 16,
8564 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
8565 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
8566 .rlen = 16,
8567 }, {
8568 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
8569 .klen = 16,
8570 .input = zeroed_string,
8571 .ilen = 16,
8572 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
8573 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
8574 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008575 }, { /* Generated with Crypto++ */
8576 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8577 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8578 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8579 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8580 .klen = 32,
8581 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8582 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8583 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8584 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8585 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8586 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8587 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8588 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8589 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8590 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8591 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8592 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8593 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8594 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8595 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8596 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8597 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008598 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8599 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8600 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8601 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8602 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8603 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8604 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8605 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8606 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8607 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8608 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8609 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8610 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8611 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8612 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8613 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8614 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8615 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8616 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8617 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8618 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8619 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8620 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8621 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8622 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8623 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8624 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8625 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8626 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8627 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8628 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8629 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8630 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8631 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8632 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8633 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8634 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8635 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8636 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8637 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8638 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8639 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8640 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8641 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8642 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8643 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008644 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
8645 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
8646 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
8647 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
8648 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
8649 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
8650 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
8651 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
8652 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
8653 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
8654 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
8655 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
8656 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
8657 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
8658 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
8659 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
8660 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008661 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
8662 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
8663 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
8664 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
8665 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
8666 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
8667 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
8668 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
8669 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
8670 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
8671 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
8672 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
8673 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
8674 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
8675 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
8676 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
8677 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
8678 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
8679 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
8680 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
8681 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
8682 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
8683 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
8684 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
8685 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
8686 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
8687 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
8688 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
8689 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
8690 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
8691 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
8692 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
8693 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
8694 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
8695 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
8696 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
8697 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
8698 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
8699 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
8700 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
8701 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
8702 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
8703 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
8704 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
8705 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
8706 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008707 .also_non_np = 1,
8708 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008709 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08008710 },
8711};
8712
8713static struct cipher_testvec tnepres_enc_tv_template[] = {
8714 { /* KeySize=128, PT=0, I=1 */
8715 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
8716 "\x00\x00\x00\x00\x00\x00\x00\x00",
8717 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
8718 "\x00\x00\x00\x00\x00\x00\x00\x00",
8719 .klen = 16,
8720 .ilen = 16,
8721 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
8722 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
8723 .rlen = 16,
8724 }, { /* KeySize=192, PT=0, I=1 */
8725 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
8726 "\x00\x00\x00\x00\x00\x00\x00\x00"
8727 "\x00\x00\x00\x00\x00\x00\x00\x00",
8728 .klen = 24,
8729 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
8730 "\x00\x00\x00\x00\x00\x00\x00\x00",
8731 .ilen = 16,
8732 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
8733 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
8734 .rlen = 16,
8735 }, { /* KeySize=256, PT=0, I=1 */
8736 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
8737 "\x00\x00\x00\x00\x00\x00\x00\x00"
8738 "\x00\x00\x00\x00\x00\x00\x00\x00"
8739 "\x00\x00\x00\x00\x00\x00\x00\x00",
8740 .klen = 32,
8741 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
8742 "\x00\x00\x00\x00\x00\x00\x00\x00",
8743 .ilen = 16,
8744 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
8745 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
8746 .rlen = 16,
8747 }, { /* KeySize=256, I=257 */
8748 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
8749 "\x17\x16\x15\x14\x13\x12\x11\x10"
8750 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
8751 "\x07\x06\x05\x04\x03\x02\x01\x00",
8752 .klen = 32,
8753 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
8754 "\x07\x06\x05\x04\x03\x02\x01\x00",
8755 .ilen = 16,
8756 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
8757 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
8758 .rlen = 16,
8759 },
8760};
8761
8762
8763static struct cipher_testvec serpent_dec_tv_template[] = {
8764 {
8765 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
8766 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
8767 .ilen = 16,
8768 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8769 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8770 .rlen = 16,
8771 }, {
8772 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8773 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8774 .klen = 16,
8775 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
8776 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
8777 .ilen = 16,
8778 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8779 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8780 .rlen = 16,
8781 }, {
8782 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8783 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8784 "\x10\x11\x12\x13\x14\x15\x16\x17"
8785 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8786 .klen = 32,
8787 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
8788 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
8789 .ilen = 16,
8790 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8791 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8792 .rlen = 16,
8793 }, {
8794 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
8795 .klen = 16,
8796 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
8797 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
8798 .ilen = 16,
8799 .result = zeroed_string,
8800 .rlen = 16,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008801 }, { /* Generated with Crypto++ */
8802 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8803 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8804 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8805 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8806 .klen = 32,
8807 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
8808 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
8809 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
8810 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
8811 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
8812 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
8813 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
8814 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
8815 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
8816 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
8817 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
8818 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
8819 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
8820 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
8821 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
8822 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
8823 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008824 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
8825 "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
8826 "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
8827 "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
8828 "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
8829 "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
8830 "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
8831 "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
8832 "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
8833 "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
8834 "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
8835 "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
8836 "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
8837 "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
8838 "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
8839 "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
8840 "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
8841 "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
8842 "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
8843 "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
8844 "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
8845 "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
8846 "\x87\x70\x14\xD0\x01\x57\xCB\x42"
8847 "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
8848 "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
8849 "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
8850 "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
8851 "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
8852 "\x71\x80\x05\x35\x3F\x40\x0B\x21"
8853 "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
8854 "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
8855 "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
8856 "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
8857 "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
8858 "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
8859 "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
8860 "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
8861 "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
8862 "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
8863 "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
8864 "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
8865 "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
8866 "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
8867 "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
8868 "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
8869 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008870 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8871 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8872 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8873 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8874 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8875 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8876 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8877 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8878 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8879 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8880 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8881 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8882 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8883 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8884 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8885 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8886 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008887 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8888 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8889 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8890 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8891 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8892 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8893 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8894 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8895 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8896 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8897 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8898 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8899 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8900 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8901 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8902 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8903 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8904 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8905 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8906 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8907 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8908 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8909 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8910 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8911 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8912 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8913 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8914 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8915 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8916 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8917 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8918 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8919 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8920 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8921 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8922 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8923 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8924 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8925 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8926 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8927 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8928 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8929 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8930 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8931 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8932 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03008933 .also_non_np = 1,
8934 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03008935 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +08008936 },
8937};
8938
8939static struct cipher_testvec tnepres_dec_tv_template[] = {
8940 {
8941 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
8942 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
8943 .ilen = 16,
8944 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8945 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8946 .rlen = 16,
8947 }, {
8948 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8949 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8950 .klen = 16,
8951 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
8952 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
8953 .ilen = 16,
8954 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8955 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8956 .rlen = 16,
8957 }, {
8958 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
8959 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8960 "\x10\x11\x12\x13\x14\x15\x16\x17"
8961 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8962 .klen = 32,
8963 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
8964 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
8965 .ilen = 16,
8966 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8967 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8968 .rlen = 16,
8969 }, { /* KeySize=128, I=121 */
8970 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
8971 .klen = 16,
8972 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
8973 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
8974 .ilen = 16,
8975 .result = zeroed_string,
8976 .rlen = 16,
8977 },
8978};
8979
Jussi Kivilinna9d259172011-10-18 00:02:53 +03008980static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
8981 { /* Generated with Crypto++ */
8982 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8983 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8984 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8985 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8986 .klen = 32,
8987 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8988 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8989 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8990 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8991 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8992 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8993 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8994 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8995 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8996 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8997 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8998 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8999 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9000 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9001 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9002 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9003 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9004 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9005 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009006 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9007 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9008 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9009 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9010 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9011 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9012 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9013 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9014 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9015 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9016 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9017 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9018 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9019 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9020 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9021 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9022 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9023 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9024 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9025 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9026 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9027 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9028 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9029 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9030 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9031 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9032 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9033 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9034 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9035 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9036 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9037 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9038 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9039 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9040 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9041 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9042 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9043 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9044 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9045 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9046 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9047 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9048 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9049 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9050 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9051 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009052 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
9053 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
9054 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
9055 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
9056 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
9057 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
9058 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
9059 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
9060 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
9061 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
9062 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
9063 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
9064 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
9065 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
9066 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
9067 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
9068 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009069 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
9070 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
9071 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
9072 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
9073 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
9074 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
9075 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
9076 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
9077 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
9078 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
9079 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
9080 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
9081 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
9082 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
9083 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
9084 "\x81\x92\x66\x67\x15\x1E\x39\x98"
9085 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
9086 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
9087 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
9088 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
9089 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
9090 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
9091 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
9092 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
9093 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
9094 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
9095 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
9096 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
9097 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
9098 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
9099 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
9100 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
9101 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
9102 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
9103 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
9104 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
9105 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
9106 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
9107 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
9108 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
9109 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
9110 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
9111 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
9112 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
9113 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
9114 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009115 .also_non_np = 1,
9116 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009117 .tap = { 496 - 16, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009118 },
9119};
9120
9121static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
9122 { /* Generated with Crypto++ */
9123 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9124 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9125 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9126 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9127 .klen = 32,
9128 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9129 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9130 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
9131 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
9132 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
9133 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
9134 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
9135 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
9136 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
9137 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
9138 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
9139 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
9140 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
9141 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
9142 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
9143 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
9144 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
9145 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
9146 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009147 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
9148 "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
9149 "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
9150 "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
9151 "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
9152 "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
9153 "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
9154 "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
9155 "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
9156 "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
9157 "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
9158 "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
9159 "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
9160 "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
9161 "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
9162 "\x81\x92\x66\x67\x15\x1E\x39\x98"
9163 "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
9164 "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
9165 "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
9166 "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
9167 "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
9168 "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
9169 "\x04\x05\x46\xD3\x90\x0F\x64\x64"
9170 "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
9171 "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
9172 "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
9173 "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
9174 "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
9175 "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
9176 "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
9177 "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
9178 "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
9179 "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
9180 "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
9181 "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
9182 "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
9183 "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
9184 "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
9185 "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
9186 "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
9187 "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
9188 "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
9189 "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
9190 "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
9191 "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
9192 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009193 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9194 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9195 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9196 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9197 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9198 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9199 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9200 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9201 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9202 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9203 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9204 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9205 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9206 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9207 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9208 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9209 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009210 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9211 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9212 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9213 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9214 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9215 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9216 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9217 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9218 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9219 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9220 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9221 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9222 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9223 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9224 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9225 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9226 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9227 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9228 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9229 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9230 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9231 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9232 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9233 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9234 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9235 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9236 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9237 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9238 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9239 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9240 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9241 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9242 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9243 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9244 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9245 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9246 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9247 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9248 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9249 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9250 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9251 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9252 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9253 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9254 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9255 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009256 .also_non_np = 1,
9257 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009258 .tap = { 496 - 16, 16 },
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009259 },
9260};
9261
9262static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
9263 { /* Generated with Crypto++ */
9264 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9265 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9266 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9267 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9268 .klen = 32,
9269 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9270 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9271 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9272 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9273 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9274 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9275 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9276 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9277 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9278 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9279 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9280 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9281 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9282 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9283 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9284 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9285 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9286 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9287 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009288 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9289 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9290 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9291 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9292 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9293 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9294 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9295 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9296 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9297 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9298 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9299 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9300 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9301 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9302 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9303 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9304 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9305 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9306 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9307 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9308 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9309 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9310 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9311 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9312 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9313 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9314 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9315 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9316 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9317 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9318 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9319 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9320 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9321 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9322 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9323 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9324 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9325 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9326 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9327 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9328 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9329 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9330 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9331 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9332 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9333 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009334 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
9335 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
9336 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
9337 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
9338 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
9339 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
9340 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
9341 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
9342 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
9343 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
9344 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
9345 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
9346 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
9347 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
9348 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
9349 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
9350 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009351 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
9352 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
9353 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
9354 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
9355 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
9356 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
9357 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
9358 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
9359 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
9360 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
9361 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
9362 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
9363 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
9364 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
9365 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
9366 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
9367 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
9368 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
9369 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
9370 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
9371 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
9372 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
9373 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
9374 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
9375 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
9376 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
9377 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
9378 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
9379 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
9380 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
9381 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
9382 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
9383 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
9384 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
9385 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
9386 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
9387 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
9388 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
9389 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
9390 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
9391 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
9392 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
9393 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
9394 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
9395 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
9396 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009397 }, { /* Generated with Crypto++ */
9398 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9399 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9400 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9401 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9402 .klen = 32,
9403 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9404 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9405 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9406 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9407 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9408 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9409 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9410 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9411 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9412 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9413 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9414 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9415 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9416 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9417 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9418 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9419 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9420 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9421 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9422 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009423 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9424 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9425 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9426 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9427 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9428 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9429 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9430 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9431 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9432 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9433 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9434 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9435 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9436 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9437 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9438 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9439 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9440 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9441 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9442 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9443 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9444 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9445 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9446 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9447 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9448 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9449 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9450 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9451 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9452 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9453 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9454 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9455 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9456 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9457 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9458 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9459 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9460 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9461 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9462 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9463 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9464 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9465 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9466 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
9467 "\x2B\xC2\x59",
9468 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009469 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
9470 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
9471 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
9472 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
9473 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
9474 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
9475 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
9476 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
9477 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
9478 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
9479 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
9480 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
9481 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
9482 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
9483 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
9484 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
9485 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
9486 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009487 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
9488 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
9489 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
9490 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
9491 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
9492 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
9493 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
9494 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
9495 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
9496 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
9497 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
9498 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
9499 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
9500 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
9501 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
9502 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
9503 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
9504 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
9505 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
9506 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
9507 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
9508 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
9509 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
9510 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
9511 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
9512 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
9513 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
9514 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
9515 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
9516 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
9517 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
9518 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
9519 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
9520 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
9521 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
9522 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
9523 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
9524 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
9525 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
9526 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
9527 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
9528 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
9529 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
9530 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
9531 "\x38\xE2\xE5",
9532 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009533 .also_non_np = 1,
9534 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009535 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03009536 }, { /* Generated with Crypto++ */
9537 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9538 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9539 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9540 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9541 .klen = 32,
9542 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
9543 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
9544 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9545 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9546 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9547 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9548 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9549 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9550 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9551 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9552 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9553 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9554 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9555 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9556 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9557 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9558 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9559 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9560 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9561 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9562 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9563 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9564 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9565 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9566 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9567 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9568 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9569 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9570 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9571 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9572 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9573 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9574 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9575 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9576 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9577 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9578 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9579 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9580 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9581 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9582 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9583 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9584 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9585 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9586 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9587 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9588 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9589 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9590 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9591 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9592 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9593 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9594 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9595 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9596 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9597 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9598 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9599 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9600 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9601 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9602 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9603 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9604 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9605 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9606 .ilen = 496,
9607 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
9608 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
9609 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
9610 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
9611 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
9612 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
9613 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
9614 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
9615 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
9616 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
9617 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
9618 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
9619 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
9620 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
9621 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
9622 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
9623 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
9624 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
9625 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
9626 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
9627 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
9628 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
9629 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
9630 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
9631 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
9632 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
9633 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
9634 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
9635 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
9636 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
9637 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
9638 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
9639 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
9640 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
9641 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
9642 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
9643 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
9644 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
9645 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
9646 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
9647 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
9648 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
9649 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
9650 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
9651 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
9652 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
9653 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
9654 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
9655 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
9656 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
9657 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
9658 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
9659 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
9660 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
9661 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
9662 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
9663 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
9664 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
9665 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
9666 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
9667 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
9668 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
9669 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009670 },
9671};
9672
9673static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
9674 { /* Generated with Crypto++ */
9675 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9676 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9677 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9678 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9679 .klen = 32,
9680 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9681 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9682 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
9683 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
9684 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
9685 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
9686 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
9687 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
9688 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
9689 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
9690 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
9691 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
9692 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
9693 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
9694 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
9695 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
9696 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
9697 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
9698 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009699 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
9700 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
9701 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
9702 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
9703 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
9704 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
9705 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
9706 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
9707 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
9708 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
9709 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
9710 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
9711 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
9712 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
9713 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
9714 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
9715 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
9716 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
9717 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
9718 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
9719 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
9720 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
9721 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
9722 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
9723 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
9724 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
9725 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
9726 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
9727 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
9728 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
9729 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
9730 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
9731 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
9732 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
9733 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
9734 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
9735 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
9736 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
9737 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
9738 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
9739 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
9740 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
9741 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
9742 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
9743 "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
9744 .ilen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009745 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9746 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9747 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9748 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9749 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9750 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9751 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9752 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9753 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9754 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9755 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9756 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9757 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9758 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9759 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9760 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9761 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009762 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9763 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9764 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9765 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9766 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9767 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9768 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9769 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9770 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9771 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9772 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9773 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9774 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9775 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9776 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9777 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9778 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9779 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9780 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9781 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9782 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9783 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9784 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9785 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9786 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9787 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9788 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9789 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9790 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9791 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9792 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9793 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9794 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9795 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9796 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9797 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9798 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9799 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9800 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9801 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9802 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9803 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9804 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9805 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9806 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9807 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009808 }, { /* Generated with Crypto++ */
9809 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9810 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9811 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9812 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9813 .klen = 32,
9814 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
9815 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
9816 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
9817 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
9818 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
9819 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
9820 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
9821 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
9822 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
9823 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
9824 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
9825 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
9826 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
9827 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
9828 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
9829 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
9830 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
9831 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
9832 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
9833 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009834 "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
9835 "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
9836 "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
9837 "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
9838 "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
9839 "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
9840 "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
9841 "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
9842 "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
9843 "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
9844 "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
9845 "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
9846 "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
9847 "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
9848 "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
9849 "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
9850 "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
9851 "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
9852 "\x07\x97\x38\x4B\x5C\x56\x98\x67"
9853 "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
9854 "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
9855 "\x18\x06\x15\x9D\x5A\x10\x13\x37"
9856 "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
9857 "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
9858 "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
9859 "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
9860 "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
9861 "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
9862 "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
9863 "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
9864 "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
9865 "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
9866 "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
9867 "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
9868 "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
9869 "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
9870 "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
9871 "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
9872 "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
9873 "\x90\x47\x40\x92\xE6\x69\xD1\x96"
9874 "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
9875 "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
9876 "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
9877 "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
9878 "\x38\xE2\xE5",
9879 .ilen = 499,
Jussi Kivilinna9d259172011-10-18 00:02:53 +03009880 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9881 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9882 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9883 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9884 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9885 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9886 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9887 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9888 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9889 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9890 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9891 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9892 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9893 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9894 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9895 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9896 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9897 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009898 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9899 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9900 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9901 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9902 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9903 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9904 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9905 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9906 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9907 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9908 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9909 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9910 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9911 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9912 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9913 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9914 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9915 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9916 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9917 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9918 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9919 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9920 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9921 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9922 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9923 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9924 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9925 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9926 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9927 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9928 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9929 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9930 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9931 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9932 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9933 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9934 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9935 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9936 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9937 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9938 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9939 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9940 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9941 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
9942 "\x2B\xC2\x59",
9943 .rlen = 499,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +03009944 .also_non_np = 1,
9945 .np = 2,
Jussi Kivilinna9f28e972012-10-20 14:52:57 +03009946 .tap = { 499 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +03009947 }, { /* Generated with Crypto++ */
9948 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9949 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9950 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9951 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9952 .klen = 32,
9953 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
9954 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
9955 .input = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
9956 "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
9957 "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
9958 "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
9959 "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
9960 "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
9961 "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
9962 "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
9963 "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
9964 "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
9965 "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
9966 "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
9967 "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
9968 "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
9969 "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
9970 "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
9971 "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
9972 "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
9973 "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
9974 "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
9975 "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
9976 "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
9977 "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
9978 "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
9979 "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
9980 "\x29\x5E\x01\x47\x13\x32\x78\xBE"
9981 "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
9982 "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
9983 "\x38\x35\x11\x26\x4A\xB4\x06\x32"
9984 "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
9985 "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
9986 "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
9987 "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
9988 "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
9989 "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
9990 "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
9991 "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
9992 "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
9993 "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
9994 "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
9995 "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
9996 "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
9997 "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
9998 "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
9999 "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
10000 "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
10001 "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
10002 "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
10003 "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
10004 "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
10005 "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
10006 "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
10007 "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
10008 "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
10009 "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
10010 "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
10011 "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
10012 "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
10013 "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
10014 "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
10015 "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
10016 "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
10017 .ilen = 496,
10018 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10019 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10020 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10021 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10022 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10023 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10024 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10025 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10026 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10027 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10028 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10029 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10030 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10031 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10032 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10033 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10034 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10035 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10036 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10037 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10038 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10039 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10040 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10041 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10042 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10043 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10044 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10045 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10046 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10047 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10048 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10049 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10050 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10051 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10052 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10053 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10054 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10055 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10056 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10057 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10058 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10059 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10060 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10061 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10062 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10063 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10064 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10065 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10066 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10067 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10068 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10069 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10070 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10071 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10072 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10073 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10074 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10075 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10076 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10077 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10078 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10079 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10080 .rlen = 496,
Jussi Kivilinna9d259172011-10-18 00:02:53 +030010081 },
10082};
Herbert Xuda7f0332008-07-31 17:08:25 +080010083
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030010084static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
10085 /* Generated from AES-LRW test vectors */
10086 {
10087 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
10088 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
10089 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
10090 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
10091 .klen = 32,
10092 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10093 "\x00\x00\x00\x00\x00\x00\x00\x01",
10094 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10095 "\x38\x39\x41\x42\x43\x44\x45\x46",
10096 .ilen = 16,
10097 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
10098 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
10099 .rlen = 16,
10100 }, {
10101 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
10102 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
10103 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
10104 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
10105 .klen = 32,
10106 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10107 "\x00\x00\x00\x00\x00\x00\x00\x02",
10108 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10109 "\x38\x39\x41\x42\x43\x44\x45\x46",
10110 .ilen = 16,
10111 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
10112 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
10113 .rlen = 16,
10114 }, {
10115 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
10116 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
10117 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
10118 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
10119 .klen = 32,
10120 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10121 "\x00\x00\x00\x02\x00\x00\x00\x00",
10122 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10123 "\x38\x39\x41\x42\x43\x44\x45\x46",
10124 .ilen = 16,
10125 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
10126 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
10127 .rlen = 16,
10128 }, {
10129 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
10130 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
10131 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
10132 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
10133 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
10134 .klen = 40,
10135 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10136 "\x00\x00\x00\x00\x00\x00\x00\x01",
10137 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10138 "\x38\x39\x41\x42\x43\x44\x45\x46",
10139 .ilen = 16,
10140 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
10141 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
10142 .rlen = 16,
10143 }, {
10144 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
10145 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
10146 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
10147 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
10148 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
10149 .klen = 40,
10150 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10151 "\x00\x00\x00\x02\x00\x00\x00\x00",
10152 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10153 "\x38\x39\x41\x42\x43\x44\x45\x46",
10154 .ilen = 16,
10155 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
10156 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
10157 .rlen = 16,
10158 }, {
10159 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10160 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10161 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10162 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10163 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10164 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10165 .klen = 48,
10166 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10167 "\x00\x00\x00\x00\x00\x00\x00\x01",
10168 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10169 "\x38\x39\x41\x42\x43\x44\x45\x46",
10170 .ilen = 16,
10171 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
10172 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
10173 .rlen = 16,
10174 }, {
10175 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
10176 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
10177 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
10178 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
10179 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
10180 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
10181 .klen = 48,
10182 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10183 "\x00\x00\x00\x02\x00\x00\x00\x00",
10184 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
10185 "\x38\x39\x41\x42\x43\x44\x45\x46",
10186 .ilen = 16,
10187 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
10188 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
10189 .rlen = 16,
10190 }, {
10191 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10192 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10193 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10194 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10195 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10196 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10197 .klen = 48,
10198 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10199 "\x00\x00\x00\x00\x00\x00\x00\x01",
10200 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
10201 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
10202 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
10203 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
10204 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
10205 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
10206 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
10207 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
10208 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
10209 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
10210 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
10211 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
10212 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
10213 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
10214 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
10215 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
10216 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
10217 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
10218 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
10219 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
10220 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
10221 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
10222 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
10223 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
10224 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
10225 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
10226 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
10227 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
10228 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
10229 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
10230 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
10231 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
10232 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
10233 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
10234 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
10235 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
10236 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
10237 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
10238 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
10239 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
10240 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
10241 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
10242 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
10243 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
10244 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
10245 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
10246 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
10247 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
10248 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
10249 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
10250 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
10251 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
10252 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
10253 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
10254 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
10255 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
10256 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
10257 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
10258 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
10259 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
10260 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
10261 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
10262 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
10263 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
10264 .ilen = 512,
10265 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
10266 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
10267 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
10268 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
10269 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
10270 "\xce\xab\xda\x33\x30\x20\x12\xfa"
10271 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
10272 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
10273 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
10274 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
10275 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
10276 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
10277 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
10278 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
10279 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
10280 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
10281 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
10282 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
10283 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
10284 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
10285 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
10286 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
10287 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
10288 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
10289 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
10290 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
10291 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
10292 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
10293 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
10294 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
10295 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
10296 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
10297 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
10298 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
10299 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
10300 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
10301 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
10302 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
10303 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
10304 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
10305 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
10306 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
10307 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
10308 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
10309 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
10310 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
10311 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
10312 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
10313 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
10314 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
10315 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
10316 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
10317 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
10318 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
10319 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
10320 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
10321 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
10322 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
10323 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
10324 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
10325 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
10326 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
10327 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
10328 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
10329 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010330 .also_non_np = 1,
10331 .np = 2,
10332 .tap = { 512 - 16, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030010333 },
10334};
10335
10336static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
10337 /* Generated from AES-LRW test vectors */
10338 /* same as enc vectors with input and result reversed */
10339 {
10340 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
10341 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
10342 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
10343 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
10344 .klen = 32,
10345 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10346 "\x00\x00\x00\x00\x00\x00\x00\x01",
10347 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
10348 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
10349 .ilen = 16,
10350 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10351 "\x38\x39\x41\x42\x43\x44\x45\x46",
10352 .rlen = 16,
10353 }, {
10354 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
10355 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
10356 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
10357 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
10358 .klen = 32,
10359 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10360 "\x00\x00\x00\x00\x00\x00\x00\x02",
10361 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
10362 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
10363 .ilen = 16,
10364 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10365 "\x38\x39\x41\x42\x43\x44\x45\x46",
10366 .rlen = 16,
10367 }, {
10368 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
10369 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
10370 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
10371 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
10372 .klen = 32,
10373 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10374 "\x00\x00\x00\x02\x00\x00\x00\x00",
10375 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
10376 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
10377 .ilen = 16,
10378 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10379 "\x38\x39\x41\x42\x43\x44\x45\x46",
10380 .rlen = 16,
10381 }, {
10382 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
10383 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
10384 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
10385 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
10386 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
10387 .klen = 40,
10388 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10389 "\x00\x00\x00\x00\x00\x00\x00\x01",
10390 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
10391 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
10392 .ilen = 16,
10393 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10394 "\x38\x39\x41\x42\x43\x44\x45\x46",
10395 .rlen = 16,
10396 }, {
10397 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
10398 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
10399 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
10400 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
10401 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
10402 .klen = 40,
10403 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10404 "\x00\x00\x00\x02\x00\x00\x00\x00",
10405 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
10406 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
10407 .ilen = 16,
10408 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10409 "\x38\x39\x41\x42\x43\x44\x45\x46",
10410 .rlen = 16,
10411 }, {
10412 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10413 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10414 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10415 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10416 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10417 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10418 .klen = 48,
10419 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10420 "\x00\x00\x00\x00\x00\x00\x00\x01",
10421 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
10422 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
10423 .ilen = 16,
10424 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10425 "\x38\x39\x41\x42\x43\x44\x45\x46",
10426 .rlen = 16,
10427 }, {
10428 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
10429 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
10430 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
10431 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
10432 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
10433 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
10434 .klen = 48,
10435 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10436 "\x00\x00\x00\x02\x00\x00\x00\x00",
10437 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
10438 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
10439 .ilen = 16,
10440 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10441 "\x38\x39\x41\x42\x43\x44\x45\x46",
10442 .rlen = 16,
10443 }, {
10444 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10445 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10446 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10447 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10448 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10449 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10450 .klen = 48,
10451 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10452 "\x00\x00\x00\x00\x00\x00\x00\x01",
10453 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
10454 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
10455 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
10456 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
10457 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
10458 "\xce\xab\xda\x33\x30\x20\x12\xfa"
10459 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
10460 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
10461 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
10462 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
10463 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
10464 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
10465 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
10466 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
10467 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
10468 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
10469 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
10470 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
10471 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
10472 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
10473 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
10474 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
10475 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
10476 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
10477 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
10478 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
10479 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
10480 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
10481 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
10482 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
10483 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
10484 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
10485 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
10486 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
10487 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
10488 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
10489 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
10490 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
10491 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
10492 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
10493 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
10494 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
10495 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
10496 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
10497 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
10498 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
10499 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
10500 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
10501 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
10502 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
10503 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
10504 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
10505 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
10506 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
10507 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
10508 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
10509 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
10510 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
10511 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
10512 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
10513 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
10514 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
10515 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
10516 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
10517 .ilen = 512,
10518 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
10519 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
10520 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
10521 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
10522 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
10523 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
10524 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
10525 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
10526 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
10527 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
10528 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
10529 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
10530 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
10531 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
10532 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
10533 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
10534 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
10535 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
10536 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
10537 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
10538 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
10539 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
10540 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
10541 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
10542 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
10543 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
10544 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
10545 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
10546 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
10547 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
10548 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
10549 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
10550 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
10551 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
10552 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
10553 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
10554 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
10555 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
10556 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
10557 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
10558 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
10559 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
10560 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
10561 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
10562 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
10563 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
10564 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
10565 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
10566 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
10567 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
10568 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
10569 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
10570 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
10571 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
10572 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
10573 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
10574 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
10575 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
10576 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
10577 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
10578 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
10579 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
10580 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
10581 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
10582 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010583 .also_non_np = 1,
10584 .np = 2,
10585 .tap = { 512 - 16, 16 },
Jussi Kivilinnad7bfc0f2011-10-18 13:32:34 +030010586 },
10587};
10588
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030010589static struct cipher_testvec serpent_xts_enc_tv_template[] = {
10590 /* Generated from AES-XTS test vectors */
10591 {
10592 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
10593 "\x00\x00\x00\x00\x00\x00\x00\x00"
10594 "\x00\x00\x00\x00\x00\x00\x00\x00"
10595 "\x00\x00\x00\x00\x00\x00\x00\x00",
10596 .klen = 32,
10597 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10598 "\x00\x00\x00\x00\x00\x00\x00\x00",
10599 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
10600 "\x00\x00\x00\x00\x00\x00\x00\x00"
10601 "\x00\x00\x00\x00\x00\x00\x00\x00"
10602 "\x00\x00\x00\x00\x00\x00\x00\x00",
10603 .ilen = 32,
10604 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
10605 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
10606 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
10607 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
10608 .rlen = 32,
10609 }, {
10610 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
10611 "\x11\x11\x11\x11\x11\x11\x11\x11"
10612 "\x22\x22\x22\x22\x22\x22\x22\x22"
10613 "\x22\x22\x22\x22\x22\x22\x22\x22",
10614 .klen = 32,
10615 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10616 "\x00\x00\x00\x00\x00\x00\x00\x00",
10617 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
10618 "\x44\x44\x44\x44\x44\x44\x44\x44"
10619 "\x44\x44\x44\x44\x44\x44\x44\x44"
10620 "\x44\x44\x44\x44\x44\x44\x44\x44",
10621 .ilen = 32,
10622 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
10623 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
10624 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
10625 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
10626 .rlen = 32,
10627 }, {
10628 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
10629 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
10630 "\x22\x22\x22\x22\x22\x22\x22\x22"
10631 "\x22\x22\x22\x22\x22\x22\x22\x22",
10632 .klen = 32,
10633 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10634 "\x00\x00\x00\x00\x00\x00\x00\x00",
10635 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
10636 "\x44\x44\x44\x44\x44\x44\x44\x44"
10637 "\x44\x44\x44\x44\x44\x44\x44\x44"
10638 "\x44\x44\x44\x44\x44\x44\x44\x44",
10639 .ilen = 32,
10640 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
10641 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
10642 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
10643 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
10644 .rlen = 32,
10645 }, {
10646 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10647 "\x23\x53\x60\x28\x74\x71\x35\x26"
10648 "\x31\x41\x59\x26\x53\x58\x97\x93"
10649 "\x23\x84\x62\x64\x33\x83\x27\x95",
10650 .klen = 32,
10651 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10652 "\x00\x00\x00\x00\x00\x00\x00\x00",
10653 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10654 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10655 "\x10\x11\x12\x13\x14\x15\x16\x17"
10656 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10657 "\x20\x21\x22\x23\x24\x25\x26\x27"
10658 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10659 "\x30\x31\x32\x33\x34\x35\x36\x37"
10660 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10661 "\x40\x41\x42\x43\x44\x45\x46\x47"
10662 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10663 "\x50\x51\x52\x53\x54\x55\x56\x57"
10664 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10665 "\x60\x61\x62\x63\x64\x65\x66\x67"
10666 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10667 "\x70\x71\x72\x73\x74\x75\x76\x77"
10668 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10669 "\x80\x81\x82\x83\x84\x85\x86\x87"
10670 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10671 "\x90\x91\x92\x93\x94\x95\x96\x97"
10672 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10673 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10674 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10675 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10676 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10677 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10678 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10679 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10680 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10681 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10682 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10683 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10684 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10685 "\x00\x01\x02\x03\x04\x05\x06\x07"
10686 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10687 "\x10\x11\x12\x13\x14\x15\x16\x17"
10688 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10689 "\x20\x21\x22\x23\x24\x25\x26\x27"
10690 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10691 "\x30\x31\x32\x33\x34\x35\x36\x37"
10692 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10693 "\x40\x41\x42\x43\x44\x45\x46\x47"
10694 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10695 "\x50\x51\x52\x53\x54\x55\x56\x57"
10696 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10697 "\x60\x61\x62\x63\x64\x65\x66\x67"
10698 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10699 "\x70\x71\x72\x73\x74\x75\x76\x77"
10700 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10701 "\x80\x81\x82\x83\x84\x85\x86\x87"
10702 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10703 "\x90\x91\x92\x93\x94\x95\x96\x97"
10704 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10705 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10706 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10707 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10708 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10709 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10710 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10711 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10712 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10713 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10714 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10715 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10716 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10717 .ilen = 512,
10718 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
10719 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
10720 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
10721 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
10722 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
10723 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
10724 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
10725 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
10726 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
10727 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
10728 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
10729 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
10730 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
10731 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
10732 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
10733 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
10734 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
10735 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
10736 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
10737 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
10738 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
10739 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
10740 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
10741 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
10742 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
10743 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
10744 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
10745 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
10746 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
10747 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
10748 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
10749 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
10750 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
10751 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
10752 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
10753 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
10754 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
10755 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
10756 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
10757 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
10758 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
10759 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
10760 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
10761 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
10762 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
10763 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
10764 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
10765 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
10766 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
10767 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
10768 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
10769 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
10770 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
10771 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
10772 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
10773 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
10774 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
10775 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
10776 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
10777 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
10778 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
10779 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
10780 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
10781 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
10782 .rlen = 512,
10783 }, {
10784 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10785 "\x23\x53\x60\x28\x74\x71\x35\x26"
10786 "\x62\x49\x77\x57\x24\x70\x93\x69"
10787 "\x99\x59\x57\x49\x66\x96\x76\x27"
10788 "\x31\x41\x59\x26\x53\x58\x97\x93"
10789 "\x23\x84\x62\x64\x33\x83\x27\x95"
10790 "\x02\x88\x41\x97\x16\x93\x99\x37"
10791 "\x51\x05\x82\x09\x74\x94\x45\x92",
10792 .klen = 64,
10793 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
10794 "\x00\x00\x00\x00\x00\x00\x00\x00",
10795 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
10796 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10797 "\x10\x11\x12\x13\x14\x15\x16\x17"
10798 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10799 "\x20\x21\x22\x23\x24\x25\x26\x27"
10800 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10801 "\x30\x31\x32\x33\x34\x35\x36\x37"
10802 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10803 "\x40\x41\x42\x43\x44\x45\x46\x47"
10804 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10805 "\x50\x51\x52\x53\x54\x55\x56\x57"
10806 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10807 "\x60\x61\x62\x63\x64\x65\x66\x67"
10808 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10809 "\x70\x71\x72\x73\x74\x75\x76\x77"
10810 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10811 "\x80\x81\x82\x83\x84\x85\x86\x87"
10812 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10813 "\x90\x91\x92\x93\x94\x95\x96\x97"
10814 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10815 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10816 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10817 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10818 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10819 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10820 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10821 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10822 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10823 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10824 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10825 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10826 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
10827 "\x00\x01\x02\x03\x04\x05\x06\x07"
10828 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10829 "\x10\x11\x12\x13\x14\x15\x16\x17"
10830 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10831 "\x20\x21\x22\x23\x24\x25\x26\x27"
10832 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10833 "\x30\x31\x32\x33\x34\x35\x36\x37"
10834 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10835 "\x40\x41\x42\x43\x44\x45\x46\x47"
10836 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10837 "\x50\x51\x52\x53\x54\x55\x56\x57"
10838 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10839 "\x60\x61\x62\x63\x64\x65\x66\x67"
10840 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
10841 "\x70\x71\x72\x73\x74\x75\x76\x77"
10842 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
10843 "\x80\x81\x82\x83\x84\x85\x86\x87"
10844 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
10845 "\x90\x91\x92\x93\x94\x95\x96\x97"
10846 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
10847 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10848 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10849 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10850 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10851 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10852 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10853 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10854 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
10855 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
10856 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
10857 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
10858 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
10859 .ilen = 512,
10860 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
10861 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
10862 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
10863 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
10864 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
10865 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
10866 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
10867 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
10868 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
10869 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
10870 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
10871 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
10872 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
10873 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
10874 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
10875 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
10876 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
10877 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
10878 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
10879 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
10880 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
10881 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
10882 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
10883 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
10884 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
10885 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
10886 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
10887 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
10888 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
10889 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
10890 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
10891 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
10892 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
10893 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
10894 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
10895 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
10896 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
10897 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
10898 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
10899 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
10900 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
10901 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
10902 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
10903 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
10904 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
10905 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
10906 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
10907 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
10908 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
10909 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
10910 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
10911 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
10912 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
10913 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
10914 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
10915 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
10916 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
10917 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
10918 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
10919 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
10920 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
10921 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
10922 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
10923 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
10924 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030010925 .also_non_np = 1,
10926 .np = 2,
10927 .tap = { 512 - 16, 16 },
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030010928 },
10929};
10930
10931static struct cipher_testvec serpent_xts_dec_tv_template[] = {
10932 /* Generated from AES-XTS test vectors */
10933 /* same as enc vectors with input and result reversed */
10934 {
10935 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
10936 "\x00\x00\x00\x00\x00\x00\x00\x00"
10937 "\x00\x00\x00\x00\x00\x00\x00\x00"
10938 "\x00\x00\x00\x00\x00\x00\x00\x00",
10939 .klen = 32,
10940 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10941 "\x00\x00\x00\x00\x00\x00\x00\x00",
10942 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
10943 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
10944 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
10945 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
10946 .ilen = 32,
10947 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
10948 "\x00\x00\x00\x00\x00\x00\x00\x00"
10949 "\x00\x00\x00\x00\x00\x00\x00\x00"
10950 "\x00\x00\x00\x00\x00\x00\x00\x00",
10951 .rlen = 32,
10952 }, {
10953 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
10954 "\x11\x11\x11\x11\x11\x11\x11\x11"
10955 "\x22\x22\x22\x22\x22\x22\x22\x22"
10956 "\x22\x22\x22\x22\x22\x22\x22\x22",
10957 .klen = 32,
10958 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10959 "\x00\x00\x00\x00\x00\x00\x00\x00",
10960 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
10961 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
10962 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
10963 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
10964 .ilen = 32,
10965 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
10966 "\x44\x44\x44\x44\x44\x44\x44\x44"
10967 "\x44\x44\x44\x44\x44\x44\x44\x44"
10968 "\x44\x44\x44\x44\x44\x44\x44\x44",
10969 .rlen = 32,
10970 }, {
10971 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
10972 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
10973 "\x22\x22\x22\x22\x22\x22\x22\x22"
10974 "\x22\x22\x22\x22\x22\x22\x22\x22",
10975 .klen = 32,
10976 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
10977 "\x00\x00\x00\x00\x00\x00\x00\x00",
10978 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
10979 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
10980 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
10981 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
10982 .ilen = 32,
10983 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
10984 "\x44\x44\x44\x44\x44\x44\x44\x44"
10985 "\x44\x44\x44\x44\x44\x44\x44\x44"
10986 "\x44\x44\x44\x44\x44\x44\x44\x44",
10987 .rlen = 32,
10988 }, {
10989 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
10990 "\x23\x53\x60\x28\x74\x71\x35\x26"
10991 "\x31\x41\x59\x26\x53\x58\x97\x93"
10992 "\x23\x84\x62\x64\x33\x83\x27\x95",
10993 .klen = 32,
10994 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
10995 "\x00\x00\x00\x00\x00\x00\x00\x00",
10996 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
10997 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
10998 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
10999 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
11000 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
11001 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
11002 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
11003 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
11004 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
11005 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
11006 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
11007 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
11008 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
11009 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
11010 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
11011 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
11012 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
11013 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
11014 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
11015 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
11016 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
11017 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
11018 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
11019 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
11020 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
11021 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
11022 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
11023 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
11024 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
11025 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
11026 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
11027 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
11028 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
11029 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
11030 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
11031 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
11032 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
11033 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
11034 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
11035 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
11036 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
11037 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
11038 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
11039 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
11040 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
11041 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
11042 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
11043 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
11044 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
11045 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
11046 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
11047 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
11048 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
11049 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
11050 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
11051 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
11052 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
11053 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
11054 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
11055 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
11056 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
11057 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
11058 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
11059 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
11060 .ilen = 512,
11061 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
11062 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11063 "\x10\x11\x12\x13\x14\x15\x16\x17"
11064 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11065 "\x20\x21\x22\x23\x24\x25\x26\x27"
11066 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11067 "\x30\x31\x32\x33\x34\x35\x36\x37"
11068 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11069 "\x40\x41\x42\x43\x44\x45\x46\x47"
11070 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11071 "\x50\x51\x52\x53\x54\x55\x56\x57"
11072 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11073 "\x60\x61\x62\x63\x64\x65\x66\x67"
11074 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11075 "\x70\x71\x72\x73\x74\x75\x76\x77"
11076 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11077 "\x80\x81\x82\x83\x84\x85\x86\x87"
11078 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11079 "\x90\x91\x92\x93\x94\x95\x96\x97"
11080 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11081 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11082 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11083 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11084 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11085 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11086 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11087 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11088 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11089 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11090 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11091 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11092 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11093 "\x00\x01\x02\x03\x04\x05\x06\x07"
11094 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11095 "\x10\x11\x12\x13\x14\x15\x16\x17"
11096 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11097 "\x20\x21\x22\x23\x24\x25\x26\x27"
11098 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11099 "\x30\x31\x32\x33\x34\x35\x36\x37"
11100 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11101 "\x40\x41\x42\x43\x44\x45\x46\x47"
11102 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11103 "\x50\x51\x52\x53\x54\x55\x56\x57"
11104 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11105 "\x60\x61\x62\x63\x64\x65\x66\x67"
11106 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11107 "\x70\x71\x72\x73\x74\x75\x76\x77"
11108 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11109 "\x80\x81\x82\x83\x84\x85\x86\x87"
11110 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11111 "\x90\x91\x92\x93\x94\x95\x96\x97"
11112 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11113 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11114 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11115 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11116 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11117 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11118 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11119 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11120 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11121 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11122 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11123 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11124 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11125 .rlen = 512,
11126 }, {
11127 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
11128 "\x23\x53\x60\x28\x74\x71\x35\x26"
11129 "\x62\x49\x77\x57\x24\x70\x93\x69"
11130 "\x99\x59\x57\x49\x66\x96\x76\x27"
11131 "\x31\x41\x59\x26\x53\x58\x97\x93"
11132 "\x23\x84\x62\x64\x33\x83\x27\x95"
11133 "\x02\x88\x41\x97\x16\x93\x99\x37"
11134 "\x51\x05\x82\x09\x74\x94\x45\x92",
11135 .klen = 64,
11136 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
11137 "\x00\x00\x00\x00\x00\x00\x00\x00",
11138 .input = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
11139 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
11140 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
11141 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
11142 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
11143 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
11144 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
11145 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
11146 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
11147 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
11148 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
11149 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
11150 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
11151 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
11152 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
11153 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
11154 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
11155 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
11156 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
11157 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
11158 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
11159 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
11160 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
11161 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
11162 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
11163 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
11164 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
11165 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
11166 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
11167 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
11168 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
11169 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
11170 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
11171 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
11172 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
11173 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
11174 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
11175 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
11176 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
11177 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
11178 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
11179 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
11180 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
11181 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
11182 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
11183 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
11184 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
11185 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
11186 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
11187 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
11188 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
11189 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
11190 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
11191 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
11192 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
11193 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
11194 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
11195 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
11196 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
11197 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
11198 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
11199 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
11200 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
11201 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
11202 .ilen = 512,
11203 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
11204 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11205 "\x10\x11\x12\x13\x14\x15\x16\x17"
11206 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11207 "\x20\x21\x22\x23\x24\x25\x26\x27"
11208 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11209 "\x30\x31\x32\x33\x34\x35\x36\x37"
11210 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11211 "\x40\x41\x42\x43\x44\x45\x46\x47"
11212 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11213 "\x50\x51\x52\x53\x54\x55\x56\x57"
11214 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11215 "\x60\x61\x62\x63\x64\x65\x66\x67"
11216 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11217 "\x70\x71\x72\x73\x74\x75\x76\x77"
11218 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11219 "\x80\x81\x82\x83\x84\x85\x86\x87"
11220 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11221 "\x90\x91\x92\x93\x94\x95\x96\x97"
11222 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11223 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11224 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11225 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11226 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11227 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11228 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11229 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11230 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11231 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11232 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11233 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11234 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11235 "\x00\x01\x02\x03\x04\x05\x06\x07"
11236 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11237 "\x10\x11\x12\x13\x14\x15\x16\x17"
11238 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11239 "\x20\x21\x22\x23\x24\x25\x26\x27"
11240 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11241 "\x30\x31\x32\x33\x34\x35\x36\x37"
11242 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11243 "\x40\x41\x42\x43\x44\x45\x46\x47"
11244 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11245 "\x50\x51\x52\x53\x54\x55\x56\x57"
11246 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11247 "\x60\x61\x62\x63\x64\x65\x66\x67"
11248 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11249 "\x70\x71\x72\x73\x74\x75\x76\x77"
11250 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11251 "\x80\x81\x82\x83\x84\x85\x86\x87"
11252 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11253 "\x90\x91\x92\x93\x94\x95\x96\x97"
11254 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11255 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11256 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11257 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11258 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11259 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11260 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11261 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11262 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11263 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11264 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11265 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11266 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11267 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011268 .also_non_np = 1,
11269 .np = 2,
11270 .tap = { 512 - 16, 16 },
Jussi Kivilinna18be20b2011-10-18 13:33:17 +030011271 },
11272};
11273
Herbert Xuda7f0332008-07-31 17:08:25 +080011274/* Cast6 test vectors from RFC 2612 */
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011275#define CAST6_ENC_TEST_VECTORS 4
11276#define CAST6_DEC_TEST_VECTORS 4
11277#define CAST6_CBC_ENC_TEST_VECTORS 1
11278#define CAST6_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030011279#define CAST6_CTR_ENC_TEST_VECTORS 2
11280#define CAST6_CTR_DEC_TEST_VECTORS 2
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011281#define CAST6_LRW_ENC_TEST_VECTORS 1
11282#define CAST6_LRW_DEC_TEST_VECTORS 1
11283#define CAST6_XTS_ENC_TEST_VECTORS 1
11284#define CAST6_XTS_DEC_TEST_VECTORS 1
Herbert Xuda7f0332008-07-31 17:08:25 +080011285
11286static struct cipher_testvec cast6_enc_tv_template[] = {
11287 {
11288 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
11289 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
11290 .klen = 16,
11291 .input = zeroed_string,
11292 .ilen = 16,
11293 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
11294 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
11295 .rlen = 16,
11296 }, {
11297 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
11298 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
11299 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
11300 .klen = 24,
11301 .input = zeroed_string,
11302 .ilen = 16,
11303 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
11304 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
11305 .rlen = 16,
11306 }, {
11307 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
11308 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
11309 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
11310 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
11311 .klen = 32,
11312 .input = zeroed_string,
11313 .ilen = 16,
11314 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
11315 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
11316 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011317 }, { /* Generated from TF test vectors */
11318 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11319 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11320 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11321 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11322 .klen = 32,
11323 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11324 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11325 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11326 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11327 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11328 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11329 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11330 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11331 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11332 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11333 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11334 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11335 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11336 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11337 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11338 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11339 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11340 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11341 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11342 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11343 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11344 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11345 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11346 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11347 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11348 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11349 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11350 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11351 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11352 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11353 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11354 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11355 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11356 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11357 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11358 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11359 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11360 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11361 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11362 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11363 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11364 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11365 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11366 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11367 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11368 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11369 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11370 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11371 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11372 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11373 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11374 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11375 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11376 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11377 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11378 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11379 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11380 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11381 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11382 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11383 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11384 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11385 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11386 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11387 .ilen = 496,
11388 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
11389 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
11390 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
11391 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
11392 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
11393 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
11394 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
11395 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
11396 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
11397 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
11398 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
11399 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
11400 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
11401 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
11402 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
11403 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
11404 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
11405 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
11406 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
11407 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
11408 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
11409 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
11410 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
11411 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
11412 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
11413 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
11414 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
11415 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
11416 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
11417 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
11418 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
11419 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
11420 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
11421 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
11422 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
11423 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
11424 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
11425 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
11426 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
11427 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
11428 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
11429 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
11430 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
11431 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
11432 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
11433 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
11434 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
11435 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
11436 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
11437 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
11438 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
11439 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
11440 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
11441 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
11442 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
11443 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
11444 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
11445 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
11446 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
11447 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
11448 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
11449 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
11450 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011451 .also_non_np = 1,
11452 .np = 2,
11453 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080011454 },
11455};
11456
11457static struct cipher_testvec cast6_dec_tv_template[] = {
11458 {
11459 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
11460 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
11461 .klen = 16,
11462 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
11463 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
11464 .ilen = 16,
11465 .result = zeroed_string,
11466 .rlen = 16,
11467 }, {
11468 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
11469 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
11470 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
11471 .klen = 24,
11472 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
11473 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
11474 .ilen = 16,
11475 .result = zeroed_string,
11476 .rlen = 16,
11477 }, {
11478 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
11479 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
11480 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
11481 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
11482 .klen = 32,
11483 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
11484 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
11485 .ilen = 16,
11486 .result = zeroed_string,
11487 .rlen = 16,
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011488 }, { /* Generated from TF test vectors */
11489 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11490 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11491 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11492 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11493 .klen = 32,
11494 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11495 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11496 .input = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
11497 "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
11498 "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
11499 "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
11500 "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
11501 "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
11502 "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
11503 "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
11504 "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
11505 "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
11506 "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
11507 "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
11508 "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
11509 "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
11510 "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
11511 "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
11512 "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
11513 "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
11514 "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
11515 "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
11516 "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
11517 "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
11518 "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
11519 "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
11520 "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
11521 "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
11522 "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
11523 "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
11524 "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
11525 "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
11526 "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
11527 "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
11528 "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
11529 "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
11530 "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
11531 "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
11532 "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
11533 "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
11534 "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
11535 "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
11536 "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
11537 "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
11538 "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
11539 "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
11540 "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
11541 "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
11542 "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
11543 "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
11544 "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
11545 "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
11546 "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
11547 "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
11548 "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
11549 "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
11550 "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
11551 "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
11552 "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
11553 "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
11554 "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
11555 "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
11556 "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
11557 "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
11558 .ilen = 496,
11559 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11560 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11561 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11562 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11563 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11564 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11565 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11566 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11567 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11568 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11569 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11570 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11571 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11572 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11573 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11574 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11575 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11576 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11577 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11578 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11579 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11580 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11581 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11582 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11583 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11584 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11585 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11586 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11587 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11588 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11589 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11590 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11591 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11592 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11593 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11594 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11595 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11596 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11597 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11598 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11599 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11600 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11601 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11602 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11603 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11604 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11605 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11606 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11607 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11608 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11609 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11610 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11611 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11612 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11613 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11614 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11615 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11616 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11617 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11618 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11619 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11620 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11621 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011622 .also_non_np = 1,
11623 .np = 2,
11624 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011625 },
11626};
11627
11628static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
11629 { /* Generated from TF test vectors */
11630 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11631 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11632 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11633 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11634 .klen = 32,
11635 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11636 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11637 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11638 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11639 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11640 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11641 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11642 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11643 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11644 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11645 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11646 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11647 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11648 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11649 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11650 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11651 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11652 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11653 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11654 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11655 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11656 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11657 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11658 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11659 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11660 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11661 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11662 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11663 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11664 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11665 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11666 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11667 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11668 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11669 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11670 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11671 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11672 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11673 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11674 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11675 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11676 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11677 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11678 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11679 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11680 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11681 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11682 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11683 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11684 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11685 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11686 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11687 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11688 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11689 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11690 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11691 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11692 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11693 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11694 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11695 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11696 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11697 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11698 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11699 .ilen = 496,
11700 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
11701 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
11702 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
11703 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
11704 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
11705 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
11706 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
11707 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
11708 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
11709 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
11710 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
11711 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
11712 "\x23\x16\x47\x72\x81\x13\x3A\x72"
11713 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
11714 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
11715 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
11716 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
11717 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
11718 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
11719 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
11720 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
11721 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
11722 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
11723 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
11724 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
11725 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
11726 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
11727 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
11728 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
11729 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
11730 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
11731 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
11732 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
11733 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
11734 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
11735 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
11736 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
11737 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
11738 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
11739 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
11740 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
11741 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
11742 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
11743 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
11744 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
11745 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
11746 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
11747 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
11748 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
11749 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
11750 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
11751 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
11752 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
11753 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
11754 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
11755 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
11756 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
11757 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
11758 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
11759 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
11760 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
11761 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
11762 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011763 .also_non_np = 1,
11764 .np = 2,
11765 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011766 },
11767};
11768
11769static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
11770 { /* Generated from TF test vectors */
11771 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11772 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11773 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11774 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11775 .klen = 32,
11776 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11777 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11778 .input = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
11779 "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
11780 "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
11781 "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
11782 "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
11783 "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
11784 "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
11785 "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
11786 "\x57\x95\xE1\x21\x26\x10\x9A\x21"
11787 "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
11788 "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
11789 "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
11790 "\x23\x16\x47\x72\x81\x13\x3A\x72"
11791 "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
11792 "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
11793 "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
11794 "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
11795 "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
11796 "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
11797 "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
11798 "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
11799 "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
11800 "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
11801 "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
11802 "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
11803 "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
11804 "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
11805 "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
11806 "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
11807 "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
11808 "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
11809 "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
11810 "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
11811 "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
11812 "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
11813 "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
11814 "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
11815 "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
11816 "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
11817 "\x73\x3F\x12\x91\x47\x54\xBA\x39"
11818 "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
11819 "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
11820 "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
11821 "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
11822 "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
11823 "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
11824 "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
11825 "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
11826 "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
11827 "\x80\x21\x83\x58\x3C\x76\xFD\x28"
11828 "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
11829 "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
11830 "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
11831 "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
11832 "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
11833 "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
11834 "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
11835 "\x56\x4D\x82\x62\x37\xA3\x48\x01"
11836 "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
11837 "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
11838 "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
11839 "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
11840 .ilen = 496,
11841 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11842 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11843 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11844 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11845 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11846 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11847 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11848 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11849 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11850 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11851 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11852 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11853 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11854 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11855 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11856 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11857 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11858 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11859 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11860 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11861 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11862 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11863 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11864 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11865 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11866 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11867 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11868 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11869 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11870 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11871 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11872 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11873 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11874 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11875 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11876 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11877 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11878 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11879 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11880 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11881 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11882 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11883 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11884 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11885 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11886 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11887 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11888 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11889 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11890 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11891 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11892 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11893 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11894 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11895 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11896 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11897 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11898 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11899 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11900 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11901 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11902 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11903 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030011904 .also_non_np = 1,
11905 .np = 2,
11906 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011907 },
11908};
11909
11910static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
11911 { /* Generated from TF test vectors */
11912 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11913 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11914 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11915 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11916 .klen = 32,
11917 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11918 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11919 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11920 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030011921 "\x3A",
11922 .ilen = 17,
11923 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
11924 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
11925 "\x57",
11926 .rlen = 17,
11927 }, { /* Generated from TF test vectors */
11928 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11929 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11930 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11931 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11932 .klen = 32,
11933 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11934 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11935 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11936 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020011937 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11938 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11939 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11940 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11941 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11942 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11943 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11944 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11945 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11946 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11947 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11948 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11949 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11950 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11951 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11952 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11953 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11954 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11955 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11956 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11957 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11958 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11959 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11960 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11961 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11962 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11963 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11964 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11965 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11966 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11967 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11968 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11969 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11970 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11971 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11972 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11973 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11974 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11975 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11976 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11977 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11978 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11979 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11980 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11981 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11982 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11983 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11984 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11985 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11986 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11987 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11988 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11989 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11990 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11991 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11992 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11993 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11994 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11995 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11996 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11997 .ilen = 496,
11998 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
11999 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
12000 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
12001 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
12002 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
12003 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
12004 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
12005 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
12006 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
12007 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
12008 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
12009 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
12010 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
12011 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
12012 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
12013 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
12014 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
12015 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
12016 "\x49\x61\x22\x52\x64\x8C\x46\x41"
12017 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
12018 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
12019 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
12020 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
12021 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
12022 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
12023 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
12024 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
12025 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
12026 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
12027 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
12028 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
12029 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
12030 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
12031 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
12032 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
12033 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
12034 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
12035 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
12036 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
12037 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
12038 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
12039 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
12040 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
12041 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
12042 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
12043 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
12044 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
12045 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
12046 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
12047 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
12048 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
12049 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
12050 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
12051 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
12052 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
12053 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
12054 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
12055 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
12056 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
12057 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
12058 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
12059 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
12060 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012061 .also_non_np = 1,
12062 .np = 2,
12063 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012064 },
12065};
12066
12067static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
12068 { /* Generated from TF test vectors */
12069 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12070 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12071 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12072 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12073 .klen = 32,
12074 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12075 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12076 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
12077 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030012078 "\x57",
12079 .ilen = 17,
12080 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12081 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12082 "\x3A",
12083 .rlen = 17,
12084 }, { /* Generated from TF test vectors */
12085 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12086 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12087 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12088 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12089 .klen = 32,
12090 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12091 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12092 .input = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
12093 "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012094 "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
12095 "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
12096 "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
12097 "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
12098 "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
12099 "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
12100 "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
12101 "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
12102 "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
12103 "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
12104 "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
12105 "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
12106 "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
12107 "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
12108 "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
12109 "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
12110 "\x49\x61\x22\x52\x64\x8C\x46\x41"
12111 "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
12112 "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
12113 "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
12114 "\x00\x14\x15\x59\xC1\x30\x64\xAF"
12115 "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
12116 "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
12117 "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
12118 "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
12119 "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
12120 "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
12121 "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
12122 "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
12123 "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
12124 "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
12125 "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
12126 "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
12127 "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
12128 "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
12129 "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
12130 "\x60\x40\x38\x90\x20\x46\xC7\xB3"
12131 "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
12132 "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
12133 "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
12134 "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
12135 "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
12136 "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
12137 "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
12138 "\x73\xFC\x91\xAB\x79\x41\x23\x14"
12139 "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
12140 "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
12141 "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
12142 "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
12143 "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
12144 "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
12145 "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
12146 "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
12147 "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
12148 "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
12149 "\x19\x35\x88\x22\x45\x59\x0E\x8F"
12150 "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
12151 "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
12152 "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
12153 "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
12154 .ilen = 496,
12155 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12156 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12157 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12158 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12159 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12160 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12161 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12162 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12163 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12164 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12165 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12166 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12167 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12168 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12169 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12170 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12171 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12172 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12173 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12174 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12175 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12176 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12177 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12178 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12179 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12180 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12181 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12182 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12183 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12184 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12185 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12186 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12187 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12188 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12189 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12190 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12191 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12192 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12193 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12194 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12195 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12196 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12197 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12198 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12199 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12200 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12201 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12202 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12203 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12204 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12205 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12206 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12207 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12208 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12209 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12210 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12211 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12212 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12213 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12214 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12215 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12216 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12217 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012218 .also_non_np = 1,
12219 .np = 2,
12220 .tap = { 496 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012221 },
12222};
12223
12224static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
12225 { /* Generated from TF test vectors */
12226 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
12227 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
12228 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
12229 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
12230 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
12231 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
12232 .klen = 48,
12233 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12234 "\x00\x00\x00\x00\x00\x00\x00\x01",
12235 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
12236 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
12237 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
12238 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
12239 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
12240 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
12241 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
12242 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
12243 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
12244 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
12245 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
12246 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
12247 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
12248 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
12249 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
12250 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
12251 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
12252 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
12253 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
12254 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
12255 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
12256 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
12257 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
12258 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
12259 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
12260 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
12261 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
12262 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
12263 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
12264 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
12265 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
12266 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
12267 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
12268 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
12269 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
12270 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
12271 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
12272 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
12273 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
12274 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
12275 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
12276 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
12277 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
12278 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
12279 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
12280 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
12281 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
12282 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
12283 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
12284 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
12285 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
12286 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
12287 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
12288 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
12289 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
12290 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
12291 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
12292 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
12293 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
12294 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
12295 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
12296 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
12297 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
12298 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
12299 .ilen = 512,
12300 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
12301 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
12302 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
12303 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
12304 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
12305 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
12306 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
12307 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
12308 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
12309 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
12310 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
12311 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
12312 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
12313 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
12314 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
12315 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
12316 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
12317 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
12318 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
12319 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
12320 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
12321 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
12322 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
12323 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
12324 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
12325 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
12326 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
12327 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
12328 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
12329 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
12330 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
12331 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
12332 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
12333 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
12334 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
12335 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
12336 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
12337 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
12338 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
12339 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
12340 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
12341 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
12342 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
12343 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
12344 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
12345 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
12346 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
12347 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
12348 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
12349 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
12350 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
12351 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
12352 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
12353 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
12354 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
12355 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
12356 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
12357 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
12358 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
12359 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
12360 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
12361 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
12362 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
12363 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
12364 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012365 .also_non_np = 1,
12366 .np = 2,
12367 .tap = { 512 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012368 },
12369};
12370
12371static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
12372 { /* Generated from TF test vectors */
12373 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
12374 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
12375 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
12376 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
12377 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
12378 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
12379 .klen = 48,
12380 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
12381 "\x00\x00\x00\x00\x00\x00\x00\x01",
12382 .input = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
12383 "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
12384 "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
12385 "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
12386 "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
12387 "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
12388 "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
12389 "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
12390 "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
12391 "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
12392 "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
12393 "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
12394 "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
12395 "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
12396 "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
12397 "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
12398 "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
12399 "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
12400 "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
12401 "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
12402 "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
12403 "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
12404 "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
12405 "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
12406 "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
12407 "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
12408 "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
12409 "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
12410 "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
12411 "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
12412 "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
12413 "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
12414 "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
12415 "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
12416 "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
12417 "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
12418 "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
12419 "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
12420 "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
12421 "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
12422 "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
12423 "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
12424 "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
12425 "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
12426 "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
12427 "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
12428 "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
12429 "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
12430 "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
12431 "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
12432 "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
12433 "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
12434 "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
12435 "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
12436 "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
12437 "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
12438 "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
12439 "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
12440 "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
12441 "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
12442 "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
12443 "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
12444 "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
12445 "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
12446 .ilen = 512,
12447 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
12448 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
12449 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
12450 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
12451 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
12452 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
12453 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
12454 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
12455 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
12456 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
12457 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
12458 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
12459 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
12460 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
12461 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
12462 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
12463 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
12464 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
12465 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
12466 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
12467 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
12468 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
12469 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
12470 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
12471 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
12472 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
12473 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
12474 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
12475 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
12476 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
12477 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
12478 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
12479 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
12480 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
12481 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
12482 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
12483 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
12484 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
12485 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
12486 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
12487 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
12488 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
12489 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
12490 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
12491 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
12492 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
12493 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
12494 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
12495 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
12496 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
12497 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
12498 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
12499 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
12500 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
12501 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
12502 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
12503 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
12504 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
12505 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
12506 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
12507 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
12508 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
12509 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
12510 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
12511 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012512 .also_non_np = 1,
12513 .np = 2,
12514 .tap = { 512 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012515 },
12516};
12517
12518static struct cipher_testvec cast6_xts_enc_tv_template[] = {
12519 { /* Generated from TF test vectors */
12520 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12521 "\x23\x53\x60\x28\x74\x71\x35\x26"
12522 "\x62\x49\x77\x57\x24\x70\x93\x69"
12523 "\x99\x59\x57\x49\x66\x96\x76\x27"
12524 "\x31\x41\x59\x26\x53\x58\x97\x93"
12525 "\x23\x84\x62\x64\x33\x83\x27\x95"
12526 "\x02\x88\x41\x97\x16\x93\x99\x37"
12527 "\x51\x05\x82\x09\x74\x94\x45\x92",
12528 .klen = 64,
12529 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12530 "\x00\x00\x00\x00\x00\x00\x00\x00",
12531 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
12532 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12533 "\x10\x11\x12\x13\x14\x15\x16\x17"
12534 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12535 "\x20\x21\x22\x23\x24\x25\x26\x27"
12536 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12537 "\x30\x31\x32\x33\x34\x35\x36\x37"
12538 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12539 "\x40\x41\x42\x43\x44\x45\x46\x47"
12540 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12541 "\x50\x51\x52\x53\x54\x55\x56\x57"
12542 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12543 "\x60\x61\x62\x63\x64\x65\x66\x67"
12544 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12545 "\x70\x71\x72\x73\x74\x75\x76\x77"
12546 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12547 "\x80\x81\x82\x83\x84\x85\x86\x87"
12548 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12549 "\x90\x91\x92\x93\x94\x95\x96\x97"
12550 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12551 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12552 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12553 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12554 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12555 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12556 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12557 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12558 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12559 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12560 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12561 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12562 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12563 "\x00\x01\x02\x03\x04\x05\x06\x07"
12564 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12565 "\x10\x11\x12\x13\x14\x15\x16\x17"
12566 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12567 "\x20\x21\x22\x23\x24\x25\x26\x27"
12568 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12569 "\x30\x31\x32\x33\x34\x35\x36\x37"
12570 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12571 "\x40\x41\x42\x43\x44\x45\x46\x47"
12572 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12573 "\x50\x51\x52\x53\x54\x55\x56\x57"
12574 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12575 "\x60\x61\x62\x63\x64\x65\x66\x67"
12576 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12577 "\x70\x71\x72\x73\x74\x75\x76\x77"
12578 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12579 "\x80\x81\x82\x83\x84\x85\x86\x87"
12580 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12581 "\x90\x91\x92\x93\x94\x95\x96\x97"
12582 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12583 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12584 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12585 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12586 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12587 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12588 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12589 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12590 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12591 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12592 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12593 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12594 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12595 .ilen = 512,
12596 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
12597 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
12598 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
12599 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
12600 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
12601 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
12602 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
12603 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
12604 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
12605 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
12606 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
12607 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
12608 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
12609 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
12610 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
12611 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
12612 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
12613 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
12614 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
12615 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
12616 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
12617 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
12618 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
12619 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
12620 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
12621 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
12622 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
12623 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
12624 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
12625 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
12626 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
12627 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
12628 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
12629 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
12630 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
12631 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
12632 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
12633 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
12634 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
12635 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
12636 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
12637 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
12638 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
12639 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
12640 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
12641 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
12642 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
12643 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
12644 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
12645 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
12646 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
12647 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
12648 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
12649 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
12650 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
12651 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
12652 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
12653 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
12654 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
12655 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
12656 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
12657 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
12658 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
12659 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
12660 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012661 .also_non_np = 1,
12662 .np = 2,
12663 .tap = { 512 - 16, 16 },
Johannes Goetzfried9b8b0402012-07-11 19:38:29 +020012664 },
12665};
12666
12667static struct cipher_testvec cast6_xts_dec_tv_template[] = {
12668 { /* Generated from TF test vectors */
12669 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
12670 "\x23\x53\x60\x28\x74\x71\x35\x26"
12671 "\x62\x49\x77\x57\x24\x70\x93\x69"
12672 "\x99\x59\x57\x49\x66\x96\x76\x27"
12673 "\x31\x41\x59\x26\x53\x58\x97\x93"
12674 "\x23\x84\x62\x64\x33\x83\x27\x95"
12675 "\x02\x88\x41\x97\x16\x93\x99\x37"
12676 "\x51\x05\x82\x09\x74\x94\x45\x92",
12677 .klen = 64,
12678 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
12679 "\x00\x00\x00\x00\x00\x00\x00\x00",
12680 .input = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
12681 "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
12682 "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
12683 "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
12684 "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
12685 "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
12686 "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
12687 "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
12688 "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
12689 "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
12690 "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
12691 "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
12692 "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
12693 "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
12694 "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
12695 "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
12696 "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
12697 "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
12698 "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
12699 "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
12700 "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
12701 "\x71\x38\x17\x91\x44\xE8\xFC\x65"
12702 "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
12703 "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
12704 "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
12705 "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
12706 "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
12707 "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
12708 "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
12709 "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
12710 "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
12711 "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
12712 "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
12713 "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
12714 "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
12715 "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
12716 "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
12717 "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
12718 "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
12719 "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
12720 "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
12721 "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
12722 "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
12723 "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
12724 "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
12725 "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
12726 "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
12727 "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
12728 "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
12729 "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
12730 "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
12731 "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
12732 "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
12733 "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
12734 "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
12735 "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
12736 "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
12737 "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
12738 "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
12739 "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
12740 "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
12741 "\x45\x72\x80\x17\x81\xBD\x9D\x62"
12742 "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
12743 "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
12744 .ilen = 512,
12745 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12746 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12747 "\x10\x11\x12\x13\x14\x15\x16\x17"
12748 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12749 "\x20\x21\x22\x23\x24\x25\x26\x27"
12750 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12751 "\x30\x31\x32\x33\x34\x35\x36\x37"
12752 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12753 "\x40\x41\x42\x43\x44\x45\x46\x47"
12754 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12755 "\x50\x51\x52\x53\x54\x55\x56\x57"
12756 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12757 "\x60\x61\x62\x63\x64\x65\x66\x67"
12758 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12759 "\x70\x71\x72\x73\x74\x75\x76\x77"
12760 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12761 "\x80\x81\x82\x83\x84\x85\x86\x87"
12762 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12763 "\x90\x91\x92\x93\x94\x95\x96\x97"
12764 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12765 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12766 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12767 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12768 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12769 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12770 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12771 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12772 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12773 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12774 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12775 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12776 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12777 "\x00\x01\x02\x03\x04\x05\x06\x07"
12778 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12779 "\x10\x11\x12\x13\x14\x15\x16\x17"
12780 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12781 "\x20\x21\x22\x23\x24\x25\x26\x27"
12782 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12783 "\x30\x31\x32\x33\x34\x35\x36\x37"
12784 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12785 "\x40\x41\x42\x43\x44\x45\x46\x47"
12786 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12787 "\x50\x51\x52\x53\x54\x55\x56\x57"
12788 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12789 "\x60\x61\x62\x63\x64\x65\x66\x67"
12790 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12791 "\x70\x71\x72\x73\x74\x75\x76\x77"
12792 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12793 "\x80\x81\x82\x83\x84\x85\x86\x87"
12794 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12795 "\x90\x91\x92\x93\x94\x95\x96\x97"
12796 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12797 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12798 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12799 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12800 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12801 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12802 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12803 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12804 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12805 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12806 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12807 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12808 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12809 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030012810 .also_non_np = 1,
12811 .np = 2,
12812 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080012813 },
12814};
12815
12816
12817/*
12818 * AES test vectors.
12819 */
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030012820#define AES_ENC_TEST_VECTORS 4
12821#define AES_DEC_TEST_VECTORS 4
12822#define AES_CBC_ENC_TEST_VECTORS 5
12823#define AES_CBC_DEC_TEST_VECTORS 5
Horia Geantabca4feb2014-03-14 17:46:51 +020012824#define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
12825#define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
12826#define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
12827#define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
Horia Geantae46e9a42012-07-03 19:16:54 +030012828#define HMAC_SHA1_AES_CBC_ENC_TEST_VECTORS 7
12829#define HMAC_SHA256_AES_CBC_ENC_TEST_VECTORS 7
12830#define HMAC_SHA512_AES_CBC_ENC_TEST_VECTORS 7
Herbert Xuda7f0332008-07-31 17:08:25 +080012831#define AES_LRW_ENC_TEST_VECTORS 8
12832#define AES_LRW_DEC_TEST_VECTORS 8
Jarod Wilson5165e5b2011-05-31 15:23:57 +100012833#define AES_XTS_ENC_TEST_VECTORS 5
12834#define AES_XTS_DEC_TEST_VECTORS 5
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030012835#define AES_CTR_ENC_TEST_VECTORS 5
12836#define AES_CTR_DEC_TEST_VECTORS 5
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100012837#define AES_OFB_ENC_TEST_VECTORS 1
12838#define AES_OFB_DEC_TEST_VECTORS 1
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080012839#define AES_CTR_3686_ENC_TEST_VECTORS 7
12840#define AES_CTR_3686_DEC_TEST_VECTORS 6
Herbert Xuda7f0332008-07-31 17:08:25 +080012841#define AES_GCM_ENC_TEST_VECTORS 9
12842#define AES_GCM_DEC_TEST_VECTORS 8
Adrian Hoban69435b92010-11-04 15:02:04 -040012843#define AES_GCM_4106_ENC_TEST_VECTORS 7
12844#define AES_GCM_4106_DEC_TEST_VECTORS 7
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030012845#define AES_GCM_4543_ENC_TEST_VECTORS 1
12846#define AES_GCM_4543_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080012847#define AES_CCM_ENC_TEST_VECTORS 7
12848#define AES_CCM_DEC_TEST_VECTORS 7
Jarod Wilson5d667322009-05-04 19:23:40 +080012849#define AES_CCM_4309_ENC_TEST_VECTORS 7
12850#define AES_CCM_4309_DEC_TEST_VECTORS 10
Herbert Xuda7f0332008-07-31 17:08:25 +080012851
12852static struct cipher_testvec aes_enc_tv_template[] = {
12853 { /* From FIPS-197 */
12854 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
12855 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
12856 .klen = 16,
12857 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
12858 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
12859 .ilen = 16,
12860 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
12861 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
12862 .rlen = 16,
12863 }, {
12864 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
12865 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12866 "\x10\x11\x12\x13\x14\x15\x16\x17",
12867 .klen = 24,
12868 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
12869 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
12870 .ilen = 16,
12871 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
12872 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
12873 .rlen = 16,
12874 }, {
12875 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
12876 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12877 "\x10\x11\x12\x13\x14\x15\x16\x17"
12878 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12879 .klen = 32,
12880 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
12881 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
12882 .ilen = 16,
12883 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
12884 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
12885 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030012886 }, { /* Generated with Crypto++ */
12887 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
12888 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
12889 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
12890 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
12891 .klen = 32,
12892 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
12893 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
12894 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
12895 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
12896 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
12897 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
12898 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
12899 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
12900 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
12901 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
12902 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
12903 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
12904 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
12905 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
12906 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
12907 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
12908 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
12909 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
12910 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
12911 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
12912 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
12913 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
12914 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
12915 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
12916 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
12917 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
12918 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
12919 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
12920 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
12921 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
12922 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
12923 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
12924 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
12925 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
12926 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
12927 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
12928 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
12929 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
12930 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
12931 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
12932 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
12933 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
12934 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
12935 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
12936 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
12937 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
12938 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
12939 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
12940 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
12941 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
12942 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
12943 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
12944 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
12945 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
12946 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
12947 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
12948 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
12949 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
12950 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
12951 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
12952 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
12953 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
12954 .ilen = 496,
12955 .result = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
12956 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
12957 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
12958 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
12959 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
12960 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
12961 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
12962 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
12963 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
12964 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
12965 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
12966 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
12967 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
12968 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
12969 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
12970 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
12971 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
12972 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
12973 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
12974 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
12975 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
12976 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
12977 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
12978 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
12979 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
12980 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
12981 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
12982 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
12983 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
12984 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
12985 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
12986 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
12987 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
12988 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
12989 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
12990 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
12991 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
12992 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
12993 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
12994 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
12995 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
12996 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
12997 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
12998 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
12999 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
13000 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
13001 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
13002 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
13003 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
13004 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
13005 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
13006 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
13007 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
13008 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
13009 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
13010 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
13011 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
13012 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
13013 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
13014 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
13015 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
13016 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
13017 .rlen = 496,
13018 .also_non_np = 1,
13019 .np = 2,
13020 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080013021 },
13022};
13023
13024static struct cipher_testvec aes_dec_tv_template[] = {
13025 { /* From FIPS-197 */
13026 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13027 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13028 .klen = 16,
13029 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
13030 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
13031 .ilen = 16,
13032 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
13033 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
13034 .rlen = 16,
13035 }, {
13036 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13037 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13038 "\x10\x11\x12\x13\x14\x15\x16\x17",
13039 .klen = 24,
13040 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
13041 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
13042 .ilen = 16,
13043 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
13044 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
13045 .rlen = 16,
13046 }, {
13047 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
13048 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13049 "\x10\x11\x12\x13\x14\x15\x16\x17"
13050 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13051 .klen = 32,
13052 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
13053 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
13054 .ilen = 16,
13055 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
13056 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
13057 .rlen = 16,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013058 }, { /* Generated with Crypto++ */
13059 .key = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
13060 "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
13061 "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
13062 "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
13063 .klen = 32,
13064 .input = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
13065 "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
13066 "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
13067 "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
13068 "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
13069 "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
13070 "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
13071 "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
13072 "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
13073 "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
13074 "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
13075 "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
13076 "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
13077 "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
13078 "\x41\x72\x51\x97\x1D\x07\x49\xA0"
13079 "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
13080 "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
13081 "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
13082 "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
13083 "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
13084 "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
13085 "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
13086 "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
13087 "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
13088 "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
13089 "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
13090 "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
13091 "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
13092 "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
13093 "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
13094 "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
13095 "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
13096 "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
13097 "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
13098 "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
13099 "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
13100 "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
13101 "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
13102 "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
13103 "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
13104 "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
13105 "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
13106 "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
13107 "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
13108 "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
13109 "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
13110 "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
13111 "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
13112 "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
13113 "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
13114 "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
13115 "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
13116 "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
13117 "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
13118 "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
13119 "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
13120 "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
13121 "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
13122 "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
13123 "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
13124 "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
13125 "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
13126 .ilen = 496,
13127 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
13128 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
13129 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
13130 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
13131 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
13132 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
13133 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
13134 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
13135 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
13136 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
13137 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
13138 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
13139 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
13140 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
13141 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
13142 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
13143 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
13144 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
13145 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
13146 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
13147 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
13148 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
13149 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
13150 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
13151 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
13152 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
13153 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
13154 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
13155 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
13156 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
13157 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
13158 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
13159 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
13160 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
13161 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
13162 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
13163 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
13164 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
13165 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
13166 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
13167 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
13168 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
13169 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
13170 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
13171 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
13172 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
13173 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
13174 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
13175 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
13176 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
13177 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
13178 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
13179 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
13180 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
13181 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
13182 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
13183 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
13184 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
13185 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
13186 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
13187 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
13188 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
13189 .rlen = 496,
13190 .also_non_np = 1,
13191 .np = 2,
13192 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080013193 },
13194};
13195
13196static struct cipher_testvec aes_cbc_enc_tv_template[] = {
13197 { /* From RFC 3602 */
13198 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
13199 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
13200 .klen = 16,
13201 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
13202 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
13203 .input = "Single block msg",
13204 .ilen = 16,
13205 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
13206 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
13207 .rlen = 16,
13208 }, {
13209 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
13210 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
13211 .klen = 16,
13212 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
13213 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
13214 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
13215 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13216 "\x10\x11\x12\x13\x14\x15\x16\x17"
13217 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13218 .ilen = 32,
13219 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
13220 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
13221 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
13222 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
13223 .rlen = 32,
13224 }, { /* From NIST SP800-38A */
13225 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
13226 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
13227 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
13228 .klen = 24,
13229 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13230 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13231 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13232 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13233 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13234 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13235 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13236 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13237 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13238 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13239 .ilen = 64,
13240 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
13241 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
13242 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
13243 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
13244 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
13245 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
13246 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
13247 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
13248 .rlen = 64,
13249 }, {
13250 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
13251 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
13252 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
13253 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
13254 .klen = 32,
13255 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13256 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13257 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13258 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13259 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13260 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13261 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13262 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13263 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13264 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13265 .ilen = 64,
13266 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
13267 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
13268 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
13269 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
13270 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
13271 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
13272 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
13273 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
13274 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013275 }, { /* Generated with Crypto++ */
13276 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
13277 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
13278 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
13279 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
13280 .klen = 32,
13281 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
13282 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
13283 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
13284 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
13285 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
13286 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
13287 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
13288 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
13289 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
13290 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
13291 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
13292 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
13293 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
13294 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
13295 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
13296 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
13297 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
13298 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
13299 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
13300 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
13301 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
13302 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
13303 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
13304 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
13305 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
13306 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
13307 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
13308 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
13309 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
13310 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
13311 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
13312 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
13313 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
13314 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
13315 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
13316 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
13317 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
13318 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
13319 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
13320 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
13321 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
13322 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
13323 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
13324 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
13325 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
13326 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
13327 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
13328 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
13329 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
13330 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
13331 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
13332 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
13333 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
13334 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
13335 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
13336 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
13337 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
13338 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
13339 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
13340 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
13341 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
13342 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
13343 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
13344 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
13345 .ilen = 496,
13346 .result = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
13347 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
13348 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
13349 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
13350 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
13351 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
13352 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
13353 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
13354 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
13355 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
13356 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
13357 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
13358 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
13359 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
13360 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
13361 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
13362 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
13363 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
13364 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
13365 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
13366 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
13367 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
13368 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
13369 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
13370 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
13371 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
13372 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
13373 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
13374 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
13375 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
13376 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
13377 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
13378 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
13379 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
13380 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
13381 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
13382 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
13383 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
13384 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
13385 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
13386 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
13387 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
13388 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
13389 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
13390 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
13391 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
13392 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
13393 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
13394 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
13395 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
13396 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
13397 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
13398 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
13399 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
13400 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
13401 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
13402 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
13403 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
13404 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
13405 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
13406 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
13407 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
13408 .rlen = 496,
13409 .also_non_np = 1,
13410 .np = 2,
13411 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080013412 },
13413};
13414
13415static struct cipher_testvec aes_cbc_dec_tv_template[] = {
13416 { /* From RFC 3602 */
13417 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
13418 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
13419 .klen = 16,
13420 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
13421 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
13422 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
13423 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
13424 .ilen = 16,
13425 .result = "Single block msg",
13426 .rlen = 16,
13427 }, {
13428 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
13429 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
13430 .klen = 16,
13431 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
13432 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
13433 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
13434 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
13435 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
13436 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
13437 .ilen = 32,
13438 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
13439 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13440 "\x10\x11\x12\x13\x14\x15\x16\x17"
13441 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13442 .rlen = 32,
13443 }, { /* From NIST SP800-38A */
13444 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
13445 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
13446 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
13447 .klen = 24,
13448 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13449 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13450 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
13451 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
13452 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
13453 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
13454 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
13455 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
13456 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
13457 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
13458 .ilen = 64,
13459 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13460 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13461 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13462 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13463 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13464 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13465 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13466 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13467 .rlen = 64,
13468 }, {
13469 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
13470 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
13471 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
13472 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
13473 .klen = 32,
13474 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13475 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13476 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
13477 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
13478 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
13479 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
13480 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
13481 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
13482 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
13483 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
13484 .ilen = 64,
13485 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13486 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13487 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13488 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13489 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13490 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13491 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13492 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13493 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030013494 }, { /* Generated with Crypto++ */
13495 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
13496 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
13497 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
13498 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
13499 .klen = 32,
13500 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
13501 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
13502 .input = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
13503 "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
13504 "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
13505 "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
13506 "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
13507 "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
13508 "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
13509 "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
13510 "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
13511 "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
13512 "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
13513 "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
13514 "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
13515 "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
13516 "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
13517 "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
13518 "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
13519 "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
13520 "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
13521 "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
13522 "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
13523 "\x16\x24\x02\x07\x48\xAE\xF2\x31"
13524 "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
13525 "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
13526 "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
13527 "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
13528 "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
13529 "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
13530 "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
13531 "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
13532 "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
13533 "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
13534 "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
13535 "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
13536 "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
13537 "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
13538 "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
13539 "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
13540 "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
13541 "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
13542 "\x22\x39\x7B\x16\x03\x01\x69\xAF"
13543 "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
13544 "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
13545 "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
13546 "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
13547 "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
13548 "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
13549 "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
13550 "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
13551 "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
13552 "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
13553 "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
13554 "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
13555 "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
13556 "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
13557 "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
13558 "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
13559 "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
13560 "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
13561 "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
13562 "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
13563 "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
13564 .ilen = 496,
13565 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
13566 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
13567 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
13568 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
13569 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
13570 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
13571 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
13572 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
13573 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
13574 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
13575 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
13576 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
13577 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
13578 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
13579 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
13580 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
13581 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
13582 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
13583 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
13584 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
13585 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
13586 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
13587 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
13588 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
13589 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
13590 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
13591 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
13592 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
13593 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
13594 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
13595 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
13596 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
13597 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
13598 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
13599 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
13600 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
13601 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
13602 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
13603 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
13604 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
13605 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
13606 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
13607 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
13608 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
13609 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
13610 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
13611 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
13612 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
13613 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
13614 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
13615 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
13616 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
13617 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
13618 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
13619 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
13620 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
13621 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
13622 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
13623 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
13624 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
13625 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
13626 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
13627 .rlen = 496,
13628 .also_non_np = 1,
13629 .np = 2,
13630 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080013631 },
13632};
13633
Horia Geantabca4feb2014-03-14 17:46:51 +020013634static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = {
13635 { /* Input data from RFC 2410 Case 1 */
13636#ifdef __LITTLE_ENDIAN
13637 .key = "\x08\x00" /* rta length */
13638 "\x01\x00" /* rta type */
13639#else
13640 .key = "\x00\x08" /* rta length */
13641 "\x00\x01" /* rta type */
13642#endif
13643 "\x00\x00\x00\x00" /* enc key length */
13644 "\x00\x00\x00\x00\x00\x00\x00\x00"
13645 "\x00\x00\x00\x00\x00\x00\x00\x00",
13646 .klen = 8 + 16 + 0,
13647 .iv = "",
13648 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
13649 .ilen = 8,
13650 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
13651 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
13652 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
13653 .rlen = 8 + 16,
13654 }, { /* Input data from RFC 2410 Case 2 */
13655#ifdef __LITTLE_ENDIAN
13656 .key = "\x08\x00" /* rta length */
13657 "\x01\x00" /* rta type */
13658#else
13659 .key = "\x00\x08" /* rta length */
13660 "\x00\x01" /* rta type */
13661#endif
13662 "\x00\x00\x00\x00" /* enc key length */
13663 "\x00\x00\x00\x00\x00\x00\x00\x00"
13664 "\x00\x00\x00\x00\x00\x00\x00\x00",
13665 .klen = 8 + 16 + 0,
13666 .iv = "",
13667 .input = "Network Security People Have A Strange Sense Of Humor",
13668 .ilen = 53,
13669 .result = "Network Security People Have A Strange Sense Of Humor"
13670 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
13671 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
13672 .rlen = 53 + 16,
13673 },
13674};
13675
13676static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = {
13677 {
13678#ifdef __LITTLE_ENDIAN
13679 .key = "\x08\x00" /* rta length */
13680 "\x01\x00" /* rta type */
13681#else
13682 .key = "\x00\x08" /* rta length */
13683 "\x00\x01" /* rta type */
13684#endif
13685 "\x00\x00\x00\x00" /* enc key length */
13686 "\x00\x00\x00\x00\x00\x00\x00\x00"
13687 "\x00\x00\x00\x00\x00\x00\x00\x00",
13688 .klen = 8 + 16 + 0,
13689 .iv = "",
13690 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
13691 "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
13692 "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
13693 .ilen = 8 + 16,
13694 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
13695 .rlen = 8,
13696 }, {
13697#ifdef __LITTLE_ENDIAN
13698 .key = "\x08\x00" /* rta length */
13699 "\x01\x00" /* rta type */
13700#else
13701 .key = "\x00\x08" /* rta length */
13702 "\x00\x01" /* rta type */
13703#endif
13704 "\x00\x00\x00\x00" /* enc key length */
13705 "\x00\x00\x00\x00\x00\x00\x00\x00"
13706 "\x00\x00\x00\x00\x00\x00\x00\x00",
13707 .klen = 8 + 16 + 0,
13708 .iv = "",
13709 .input = "Network Security People Have A Strange Sense Of Humor"
13710 "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
13711 "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
13712 .ilen = 53 + 16,
13713 .result = "Network Security People Have A Strange Sense Of Humor",
13714 .rlen = 53,
13715 },
13716};
13717
Horia Geantae46e9a42012-07-03 19:16:54 +030013718static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_template[] = {
13719 { /* RFC 3602 Case 1 */
13720#ifdef __LITTLE_ENDIAN
13721 .key = "\x08\x00" /* rta length */
13722 "\x01\x00" /* rta type */
13723#else
13724 .key = "\x00\x08" /* rta length */
13725 "\x00\x01" /* rta type */
13726#endif
13727 "\x00\x00\x00\x10" /* enc key length */
13728 "\x00\x00\x00\x00\x00\x00\x00\x00"
13729 "\x00\x00\x00\x00\x00\x00\x00\x00"
13730 "\x00\x00\x00\x00"
13731 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
13732 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
13733 .klen = 8 + 20 + 16,
13734 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
13735 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
13736 .input = "Single block msg",
13737 .ilen = 16,
13738 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
13739 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
13740 "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
13741 "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
13742 "\x03\x71\xa2\x06",
13743 .rlen = 16 + 20,
13744 }, { /* RFC 3602 Case 2 */
13745#ifdef __LITTLE_ENDIAN
13746 .key = "\x08\x00" /* rta length */
13747 "\x01\x00" /* rta type */
13748#else
13749 .key = "\x00\x08" /* rta length */
13750 "\x00\x01" /* rta type */
13751#endif
13752 "\x00\x00\x00\x10" /* enc key length */
13753 "\x20\x21\x22\x23\x24\x25\x26\x27"
13754 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13755 "\x30\x31\x32\x33"
13756 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
13757 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
13758 .klen = 8 + 20 + 16,
13759 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
13760 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
13761 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
13762 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13763 "\x10\x11\x12\x13\x14\x15\x16\x17"
13764 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13765 .ilen = 32,
13766 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
13767 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
13768 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
13769 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
13770 "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
13771 "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
13772 "\x65\x39\xf8\xde",
13773 .rlen = 32 + 20,
13774 }, { /* RFC 3602 Case 3 */
13775#ifdef __LITTLE_ENDIAN
13776 .key = "\x08\x00" /* rta length */
13777 "\x01\x00" /* rta type */
13778#else
13779 .key = "\x00\x08" /* rta length */
13780 "\x00\x01" /* rta type */
13781#endif
13782 "\x00\x00\x00\x10" /* enc key length */
13783 "\x11\x22\x33\x44\x55\x66\x77\x88"
13784 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13785 "\x22\x33\x44\x55"
13786 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
13787 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
13788 .klen = 8 + 20 + 16,
13789 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
13790 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
13791 .input = "This is a 48-byte message (exactly 3 AES blocks)",
13792 .ilen = 48,
13793 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
13794 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
13795 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
13796 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
13797 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
13798 "\x85\x79\x69\x5d\x83\xba\x26\x84"
13799 "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
13800 "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
13801 "\x8d\x62\xf2\x1e",
13802 .rlen = 48 + 20,
13803 }, { /* RFC 3602 Case 4 */
13804#ifdef __LITTLE_ENDIAN
13805 .key = "\x08\x00" /* rta length */
13806 "\x01\x00" /* rta type */
13807#else
13808 .key = "\x00\x08" /* rta length */
13809 "\x00\x01" /* rta type */
13810#endif
13811 "\x00\x00\x00\x10" /* enc key length */
13812 "\x11\x22\x33\x44\x55\x66\x77\x88"
13813 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13814 "\x22\x33\x44\x55"
13815 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
13816 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
13817 .klen = 8 + 20 + 16,
13818 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
13819 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
13820 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13821 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13822 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13823 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13824 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13825 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13826 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13827 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
13828 .ilen = 64,
13829 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
13830 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
13831 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
13832 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
13833 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
13834 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
13835 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
13836 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
13837 "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
13838 "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
13839 "\x1d\xbe\xc6\xe9",
13840 .rlen = 64 + 20,
13841 }, { /* RFC 3602 Case 5 */
13842#ifdef __LITTLE_ENDIAN
13843 .key = "\x08\x00" /* rta length */
13844 "\x01\x00" /* rta type */
13845#else
13846 .key = "\x00\x08" /* rta length */
13847 "\x00\x01" /* rta type */
13848#endif
13849 "\x00\x00\x00\x10" /* enc key length */
13850 "\x11\x22\x33\x44\x55\x66\x77\x88"
13851 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13852 "\x22\x33\x44\x55"
13853 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
13854 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
13855 .klen = 8 + 20 + 16,
13856 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
13857 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
13858 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
13859 .alen = 8,
13860 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
13861 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
13862 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13863 "\x10\x11\x12\x13\x14\x15\x16\x17"
13864 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13865 "\x20\x21\x22\x23\x24\x25\x26\x27"
13866 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13867 "\x30\x31\x32\x33\x34\x35\x36\x37"
13868 "\x01\x02\x03\x04\x05\x06\x07\x08"
13869 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
13870 .ilen = 80,
13871 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
13872 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
13873 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
13874 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
13875 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
13876 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
13877 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
13878 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
13879 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
13880 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
13881 "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
13882 "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
13883 "\x85\xe1\x59\xf7",
13884 .rlen = 80 + 20,
13885 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
13886#ifdef __LITTLE_ENDIAN
13887 .key = "\x08\x00" /* rta length */
13888 "\x01\x00" /* rta type */
13889#else
13890 .key = "\x00\x08" /* rta length */
13891 "\x00\x01" /* rta type */
13892#endif
13893 "\x00\x00\x00\x18" /* enc key length */
13894 "\x11\x22\x33\x44\x55\x66\x77\x88"
13895 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13896 "\x22\x33\x44\x55"
13897 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
13898 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
13899 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
13900 .klen = 8 + 20 + 24,
13901 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13902 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13903 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13904 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13905 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13906 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13907 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13908 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13909 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13910 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13911 .ilen = 64,
13912 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
13913 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
13914 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
13915 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
13916 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
13917 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
13918 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
13919 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
13920 "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
13921 "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
13922 "\x47\x4c\xfc\x36",
13923 .rlen = 64 + 20,
13924 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
13925#ifdef __LITTLE_ENDIAN
13926 .key = "\x08\x00" /* rta length */
13927 "\x01\x00" /* rta type */
13928#else
13929 .key = "\x00\x08" /* rta length */
13930 "\x00\x01" /* rta type */
13931#endif
13932 "\x00\x00\x00\x20" /* enc key length */
13933 "\x11\x22\x33\x44\x55\x66\x77\x88"
13934 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
13935 "\x22\x33\x44\x55"
13936 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
13937 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
13938 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
13939 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
13940 .klen = 8 + 20 + 32,
13941 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
13942 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13943 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13944 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13945 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13946 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13947 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13948 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13949 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13950 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13951 .ilen = 64,
13952 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
13953 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
13954 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
13955 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
13956 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
13957 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
13958 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
13959 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
13960 "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
13961 "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
13962 "\x51\xee\xd6\x4e",
13963 .rlen = 64 + 20,
13964 },
13965};
13966
Horia Geantabca4feb2014-03-14 17:46:51 +020013967static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_template[] = {
13968 { /* Input data from RFC 2410 Case 1 */
13969#ifdef __LITTLE_ENDIAN
13970 .key = "\x08\x00" /* rta length */
13971 "\x01\x00" /* rta type */
13972#else
13973 .key = "\x00\x08" /* rta length */
13974 "\x00\x01" /* rta type */
13975#endif
13976 "\x00\x00\x00\x00" /* enc key length */
13977 "\x00\x00\x00\x00\x00\x00\x00\x00"
13978 "\x00\x00\x00\x00\x00\x00\x00\x00"
13979 "\x00\x00\x00\x00",
13980 .klen = 8 + 20 + 0,
13981 .iv = "",
13982 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
13983 .ilen = 8,
13984 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
13985 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
13986 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
13987 "\x8c\x5e\xe4\x08",
13988 .rlen = 8 + 20,
13989 }, { /* Input data from RFC 2410 Case 2 */
13990#ifdef __LITTLE_ENDIAN
13991 .key = "\x08\x00" /* rta length */
13992 "\x01\x00" /* rta type */
13993#else
13994 .key = "\x00\x08" /* rta length */
13995 "\x00\x01" /* rta type */
13996#endif
13997 "\x00\x00\x00\x00" /* enc key length */
13998 "\x00\x00\x00\x00\x00\x00\x00\x00"
13999 "\x00\x00\x00\x00\x00\x00\x00\x00"
14000 "\x00\x00\x00\x00",
14001 .klen = 8 + 20 + 0,
14002 .iv = "",
14003 .input = "Network Security People Have A Strange Sense Of Humor",
14004 .ilen = 53,
14005 .result = "Network Security People Have A Strange Sense Of Humor"
14006 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
14007 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
14008 "\x91\x56\xe4\xd6",
14009 .rlen = 53 + 20,
14010 },
14011};
14012
14013static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_template[] = {
14014 {
14015#ifdef __LITTLE_ENDIAN
14016 .key = "\x08\x00" /* rta length */
14017 "\x01\x00" /* rta type */
14018#else
14019 .key = "\x00\x08" /* rta length */
14020 "\x00\x01" /* rta type */
14021#endif
14022 "\x00\x00\x00\x00" /* enc key length */
14023 "\x00\x00\x00\x00\x00\x00\x00\x00"
14024 "\x00\x00\x00\x00\x00\x00\x00\x00"
14025 "\x00\x00\x00\x00",
14026 .klen = 8 + 20 + 0,
14027 .iv = "",
14028 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14029 "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
14030 "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
14031 "\x8c\x5e\xe4\x08",
14032 .ilen = 8 + 20,
14033 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14034 .rlen = 8,
14035 }, {
14036#ifdef __LITTLE_ENDIAN
14037 .key = "\x08\x00" /* rta length */
14038 "\x01\x00" /* rta type */
14039#else
14040 .key = "\x00\x08" /* rta length */
14041 "\x00\x01" /* rta type */
14042#endif
14043 "\x00\x00\x00\x00" /* enc key length */
14044 "\x00\x00\x00\x00\x00\x00\x00\x00"
14045 "\x00\x00\x00\x00\x00\x00\x00\x00"
14046 "\x00\x00\x00\x00",
14047 .klen = 8 + 20 + 0,
14048 .iv = "",
14049 .input = "Network Security People Have A Strange Sense Of Humor"
14050 "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
14051 "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
14052 "\x91\x56\xe4\xd6",
14053 .ilen = 53 + 20,
14054 .result = "Network Security People Have A Strange Sense Of Humor",
14055 .rlen = 53,
14056 },
14057};
14058
Horia Geantae46e9a42012-07-03 19:16:54 +030014059static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_template[] = {
14060 { /* RFC 3602 Case 1 */
14061#ifdef __LITTLE_ENDIAN
14062 .key = "\x08\x00" /* rta length */
14063 "\x01\x00" /* rta type */
14064#else
14065 .key = "\x00\x08" /* rta length */
14066 "\x00\x01" /* rta type */
14067#endif
14068 "\x00\x00\x00\x10" /* enc key length */
14069 "\x00\x00\x00\x00\x00\x00\x00\x00"
14070 "\x00\x00\x00\x00\x00\x00\x00\x00"
14071 "\x00\x00\x00\x00\x00\x00\x00\x00"
14072 "\x00\x00\x00\x00\x00\x00\x00\x00"
14073 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14074 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14075 .klen = 8 + 32 + 16,
14076 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14077 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14078 .input = "Single block msg",
14079 .ilen = 16,
14080 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14081 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
14082 "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
14083 "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
14084 "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
14085 "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
14086 .rlen = 16 + 32,
14087 }, { /* RFC 3602 Case 2 */
14088#ifdef __LITTLE_ENDIAN
14089 .key = "\x08\x00" /* rta length */
14090 "\x01\x00" /* rta type */
14091#else
14092 .key = "\x00\x08" /* rta length */
14093 "\x00\x01" /* rta type */
14094#endif
14095 "\x00\x00\x00\x10" /* enc key length */
14096 "\x20\x21\x22\x23\x24\x25\x26\x27"
14097 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14098 "\x30\x31\x32\x33\x34\x35\x36\x37"
14099 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14100 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14101 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14102 .klen = 8 + 32 + 16,
14103 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14104 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14105 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14106 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14107 "\x10\x11\x12\x13\x14\x15\x16\x17"
14108 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14109 .ilen = 32,
14110 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14111 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14112 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14113 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
14114 "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
14115 "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
14116 "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
14117 "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
14118 .rlen = 32 + 32,
14119 }, { /* RFC 3602 Case 3 */
14120#ifdef __LITTLE_ENDIAN
14121 .key = "\x08\x00" /* rta length */
14122 "\x01\x00" /* rta type */
14123#else
14124 .key = "\x00\x08" /* rta length */
14125 "\x00\x01" /* rta type */
14126#endif
14127 "\x00\x00\x00\x10" /* enc key length */
14128 "\x11\x22\x33\x44\x55\x66\x77\x88"
14129 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14130 "\x22\x33\x44\x55\x66\x77\x88\x99"
14131 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14132 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
14133 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
14134 .klen = 8 + 32 + 16,
14135 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
14136 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
14137 .input = "This is a 48-byte message (exactly 3 AES blocks)",
14138 .ilen = 48,
14139 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
14140 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
14141 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
14142 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
14143 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
14144 "\x85\x79\x69\x5d\x83\xba\x26\x84"
14145 "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
14146 "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
14147 "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
14148 "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
14149 .rlen = 48 + 32,
14150 }, { /* RFC 3602 Case 4 */
14151#ifdef __LITTLE_ENDIAN
14152 .key = "\x08\x00" /* rta length */
14153 "\x01\x00" /* rta type */
14154#else
14155 .key = "\x00\x08" /* rta length */
14156 "\x00\x01" /* rta type */
14157#endif
14158 "\x00\x00\x00\x10" /* enc key length */
14159 "\x11\x22\x33\x44\x55\x66\x77\x88"
14160 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14161 "\x22\x33\x44\x55\x66\x77\x88\x99"
14162 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14163 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
14164 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
14165 .klen = 8 + 32 + 16,
14166 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
14167 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
14168 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14169 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14170 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14171 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14172 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14173 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14174 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14175 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
14176 .ilen = 64,
14177 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
14178 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
14179 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
14180 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
14181 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
14182 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
14183 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
14184 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
14185 "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
14186 "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
14187 "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
14188 "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
14189 .rlen = 64 + 32,
14190 }, { /* RFC 3602 Case 5 */
14191#ifdef __LITTLE_ENDIAN
14192 .key = "\x08\x00" /* rta length */
14193 "\x01\x00" /* rta type */
14194#else
14195 .key = "\x00\x08" /* rta length */
14196 "\x00\x01" /* rta type */
14197#endif
14198 "\x00\x00\x00\x10" /* enc key length */
14199 "\x11\x22\x33\x44\x55\x66\x77\x88"
14200 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14201 "\x22\x33\x44\x55\x66\x77\x88\x99"
14202 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14203 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
14204 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
14205 .klen = 8 + 32 + 16,
14206 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
14207 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
14208 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
14209 .alen = 8,
14210 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
14211 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
14212 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14213 "\x10\x11\x12\x13\x14\x15\x16\x17"
14214 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14215 "\x20\x21\x22\x23\x24\x25\x26\x27"
14216 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14217 "\x30\x31\x32\x33\x34\x35\x36\x37"
14218 "\x01\x02\x03\x04\x05\x06\x07\x08"
14219 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
14220 .ilen = 80,
14221 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
14222 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
14223 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
14224 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
14225 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
14226 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
14227 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
14228 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
14229 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
14230 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
14231 "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
14232 "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
14233 "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
14234 "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
14235 .rlen = 80 + 32,
14236 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
14237#ifdef __LITTLE_ENDIAN
14238 .key = "\x08\x00" /* rta length */
14239 "\x01\x00" /* rta type */
14240#else
14241 .key = "\x00\x08" /* rta length */
14242 "\x00\x01" /* rta type */
14243#endif
14244 "\x00\x00\x00\x18" /* enc key length */
14245 "\x11\x22\x33\x44\x55\x66\x77\x88"
14246 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14247 "\x22\x33\x44\x55\x66\x77\x88\x99"
14248 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14249 "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14250 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14251 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14252 .klen = 8 + 32 + 24,
14253 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14254 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14255 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14256 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14257 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14258 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14259 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14260 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14261 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14262 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14263 .ilen = 64,
14264 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14265 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14266 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14267 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14268 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14269 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14270 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14271 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
14272 "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
14273 "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
14274 "\xca\x71\x85\x93\xf7\x85\x55\x8b"
14275 "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
14276 .rlen = 64 + 32,
14277 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
14278#ifdef __LITTLE_ENDIAN
14279 .key = "\x08\x00" /* rta length */
14280 "\x01\x00" /* rta type */
14281#else
14282 .key = "\x00\x08" /* rta length */
14283 "\x00\x01" /* rta type */
14284#endif
14285 "\x00\x00\x00\x20" /* enc key length */
14286 "\x11\x22\x33\x44\x55\x66\x77\x88"
14287 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14288 "\x22\x33\x44\x55\x66\x77\x88\x99"
14289 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14290 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14291 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14292 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14293 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14294 .klen = 8 + 32 + 32,
14295 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14296 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14297 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14298 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14299 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14300 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14301 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14302 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14303 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14304 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14305 .ilen = 64,
14306 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14307 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14308 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14309 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14310 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14311 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14312 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14313 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
14314 "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
14315 "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
14316 "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
14317 "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
14318 .rlen = 64 + 32,
14319 },
14320};
14321
14322static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_template[] = {
14323 { /* RFC 3602 Case 1 */
14324#ifdef __LITTLE_ENDIAN
14325 .key = "\x08\x00" /* rta length */
14326 "\x01\x00" /* rta type */
14327#else
14328 .key = "\x00\x08" /* rta length */
14329 "\x00\x01" /* rta type */
14330#endif
14331 "\x00\x00\x00\x10" /* enc key length */
14332 "\x00\x00\x00\x00\x00\x00\x00\x00"
14333 "\x00\x00\x00\x00\x00\x00\x00\x00"
14334 "\x00\x00\x00\x00\x00\x00\x00\x00"
14335 "\x00\x00\x00\x00\x00\x00\x00\x00"
14336 "\x00\x00\x00\x00\x00\x00\x00\x00"
14337 "\x00\x00\x00\x00\x00\x00\x00\x00"
14338 "\x00\x00\x00\x00\x00\x00\x00\x00"
14339 "\x00\x00\x00\x00\x00\x00\x00\x00"
14340 "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14341 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14342 .klen = 8 + 64 + 16,
14343 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14344 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14345 .input = "Single block msg",
14346 .ilen = 16,
14347 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14348 "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
14349 "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
14350 "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
14351 "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
14352 "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
14353 "\xec\xbd\x50\x08\x07\x64\x1a\x49"
14354 "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
14355 "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
14356 "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
14357 .rlen = 16 + 64,
14358 }, { /* RFC 3602 Case 2 */
14359#ifdef __LITTLE_ENDIAN
14360 .key = "\x08\x00" /* rta length */
14361 "\x01\x00" /* rta type */
14362#else
14363 .key = "\x00\x08" /* rta length */
14364 "\x00\x01" /* rta type */
14365#endif
14366 "\x00\x00\x00\x10" /* enc key length */
14367 "\x20\x21\x22\x23\x24\x25\x26\x27"
14368 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14369 "\x30\x31\x32\x33\x34\x35\x36\x37"
14370 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14371 "\x40\x41\x42\x43\x44\x45\x46\x47"
14372 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14373 "\x50\x51\x52\x53\x54\x55\x56\x57"
14374 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14375 "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14376 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14377 .klen = 8 + 64 + 16,
14378 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14379 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14380 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
14381 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14382 "\x10\x11\x12\x13\x14\x15\x16\x17"
14383 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14384 .ilen = 32,
14385 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14386 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14387 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14388 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
14389 "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
14390 "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
14391 "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
14392 "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
14393 "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
14394 "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
14395 "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
14396 "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
14397 .rlen = 32 + 64,
14398 }, { /* RFC 3602 Case 3 */
14399#ifdef __LITTLE_ENDIAN
14400 .key = "\x08\x00" /* rta length */
14401 "\x01\x00" /* rta type */
14402#else
14403 .key = "\x00\x08" /* rta length */
14404 "\x00\x01" /* rta type */
14405#endif
14406 "\x00\x00\x00\x10" /* enc key length */
14407 "\x11\x22\x33\x44\x55\x66\x77\x88"
14408 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14409 "\x22\x33\x44\x55\x66\x77\x88\x99"
14410 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14411 "\x33\x44\x55\x66\x77\x88\x99\xaa"
14412 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
14413 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
14414 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
14415 "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
14416 "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
14417 .klen = 8 + 64 + 16,
14418 .iv = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
14419 "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
14420 .input = "This is a 48-byte message (exactly 3 AES blocks)",
14421 .ilen = 48,
14422 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
14423 "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
14424 "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
14425 "\x50\x69\x39\x27\x67\x72\xf8\xd5"
14426 "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
14427 "\x85\x79\x69\x5d\x83\xba\x26\x84"
14428 "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
14429 "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
14430 "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
14431 "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
14432 "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
14433 "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
14434 "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
14435 "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
14436 .rlen = 48 + 64,
14437 }, { /* RFC 3602 Case 4 */
14438#ifdef __LITTLE_ENDIAN
14439 .key = "\x08\x00" /* rta length */
14440 "\x01\x00" /* rta type */
14441#else
14442 .key = "\x00\x08" /* rta length */
14443 "\x00\x01" /* rta type */
14444#endif
14445 "\x00\x00\x00\x10" /* enc key length */
14446 "\x11\x22\x33\x44\x55\x66\x77\x88"
14447 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14448 "\x22\x33\x44\x55\x66\x77\x88\x99"
14449 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14450 "\x33\x44\x55\x66\x77\x88\x99\xaa"
14451 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
14452 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
14453 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
14454 "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
14455 "\xbc\x46\x90\x3d\xba\x29\x03\x49",
14456 .klen = 8 + 64 + 16,
14457 .iv = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
14458 "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
14459 .input = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14460 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14461 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14462 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14463 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14464 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14465 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14466 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
14467 .ilen = 64,
14468 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
14469 "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
14470 "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
14471 "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
14472 "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
14473 "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
14474 "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
14475 "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
14476 "\x82\xcd\x42\x28\x21\x20\x15\xcc"
14477 "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
14478 "\x61\x32\x82\x85\xcf\x27\xed\xb4"
14479 "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
14480 "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
14481 "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
14482 "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
14483 "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
14484 .rlen = 64 + 64,
14485 }, { /* RFC 3602 Case 5 */
14486#ifdef __LITTLE_ENDIAN
14487 .key = "\x08\x00" /* rta length */
14488 "\x01\x00" /* rta type */
14489#else
14490 .key = "\x00\x08" /* rta length */
14491 "\x00\x01" /* rta type */
14492#endif
14493 "\x00\x00\x00\x10" /* enc key length */
14494 "\x11\x22\x33\x44\x55\x66\x77\x88"
14495 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14496 "\x22\x33\x44\x55\x66\x77\x88\x99"
14497 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14498 "\x33\x44\x55\x66\x77\x88\x99\xaa"
14499 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
14500 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
14501 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
14502 "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
14503 "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
14504 .klen = 8 + 64 + 16,
14505 .iv = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
14506 "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
14507 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x01",
14508 .alen = 8,
14509 .input = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
14510 "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
14511 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14512 "\x10\x11\x12\x13\x14\x15\x16\x17"
14513 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14514 "\x20\x21\x22\x23\x24\x25\x26\x27"
14515 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14516 "\x30\x31\x32\x33\x34\x35\x36\x37"
14517 "\x01\x02\x03\x04\x05\x06\x07\x08"
14518 "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
14519 .ilen = 80,
14520 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
14521 "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
14522 "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
14523 "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
14524 "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
14525 "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
14526 "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
14527 "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
14528 "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
14529 "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
14530 "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
14531 "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
14532 "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
14533 "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
14534 "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
14535 "\x92\x26\xc1\x76\x20\x11\xeb\xba"
14536 "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
14537 "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
14538 .rlen = 80 + 64,
14539 }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
14540#ifdef __LITTLE_ENDIAN
14541 .key = "\x08\x00" /* rta length */
14542 "\x01\x00" /* rta type */
14543#else
14544 .key = "\x00\x08" /* rta length */
14545 "\x00\x01" /* rta type */
14546#endif
14547 "\x00\x00\x00\x18" /* enc key length */
14548 "\x11\x22\x33\x44\x55\x66\x77\x88"
14549 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14550 "\x22\x33\x44\x55\x66\x77\x88\x99"
14551 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14552 "\x33\x44\x55\x66\x77\x88\x99\xaa"
14553 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
14554 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
14555 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
14556 "\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 = 8 + 64 + 24,
14560 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14561 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14562 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14563 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14564 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14565 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14566 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14567 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14568 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14569 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14570 .ilen = 64,
14571 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14572 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14573 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14574 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14575 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14576 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14577 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14578 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
14579 "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
14580 "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
14581 "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
14582 "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
14583 "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
14584 "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
14585 "\x8d\x43\x98\xa7\x94\x16\x07\x02"
14586 "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
14587 .rlen = 64 + 64,
14588 }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
14589#ifdef __LITTLE_ENDIAN
14590 .key = "\x08\x00" /* rta length */
14591 "\x01\x00" /* rta type */
14592#else
14593 .key = "\x00\x08" /* rta length */
14594 "\x00\x01" /* rta type */
14595#endif
14596 "\x00\x00\x00\x20" /* enc key length */
14597 "\x11\x22\x33\x44\x55\x66\x77\x88"
14598 "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
14599 "\x22\x33\x44\x55\x66\x77\x88\x99"
14600 "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
14601 "\x33\x44\x55\x66\x77\x88\x99\xaa"
14602 "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
14603 "\x44\x55\x66\x77\x88\x99\xaa\xbb"
14604 "\xcc\xdd\xee\xff\x11\x22\x33\x44"
14605 "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14606 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14607 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14608 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14609 .klen = 8 + 64 + 32,
14610 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
14611 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14612 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14613 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14614 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14615 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14616 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14617 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14618 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14619 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14620 .ilen = 64,
14621 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14622 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14623 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14624 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14625 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14626 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14627 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14628 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
14629 "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
14630 "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
14631 "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
14632 "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
14633 "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
14634 "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
14635 "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
14636 "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
14637 .rlen = 64 + 64,
14638 },
14639};
14640
Herbert Xuda7f0332008-07-31 17:08:25 +080014641static struct cipher_testvec aes_lrw_enc_tv_template[] = {
14642 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
14643 { /* LRW-32-AES 1 */
14644 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
14645 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
14646 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
14647 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
14648 .klen = 32,
14649 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14650 "\x00\x00\x00\x00\x00\x00\x00\x01",
14651 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14652 "\x38\x39\x41\x42\x43\x44\x45\x46",
14653 .ilen = 16,
14654 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
14655 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
14656 .rlen = 16,
14657 }, { /* LRW-32-AES 2 */
14658 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
14659 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
14660 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
14661 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
14662 .klen = 32,
14663 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14664 "\x00\x00\x00\x00\x00\x00\x00\x02",
14665 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14666 "\x38\x39\x41\x42\x43\x44\x45\x46",
14667 .ilen = 16,
14668 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
14669 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
14670 .rlen = 16,
14671 }, { /* LRW-32-AES 3 */
14672 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
14673 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
14674 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
14675 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
14676 .klen = 32,
14677 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14678 "\x00\x00\x00\x02\x00\x00\x00\x00",
14679 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14680 "\x38\x39\x41\x42\x43\x44\x45\x46",
14681 .ilen = 16,
14682 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
14683 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
14684 .rlen = 16,
14685 }, { /* LRW-32-AES 4 */
14686 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
14687 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
14688 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
14689 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
14690 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
14691 .klen = 40,
14692 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14693 "\x00\x00\x00\x00\x00\x00\x00\x01",
14694 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14695 "\x38\x39\x41\x42\x43\x44\x45\x46",
14696 .ilen = 16,
14697 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
14698 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
14699 .rlen = 16,
14700 }, { /* LRW-32-AES 5 */
14701 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
14702 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
14703 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
14704 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
14705 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
14706 .klen = 40,
14707 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14708 "\x00\x00\x00\x02\x00\x00\x00\x00",
14709 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14710 "\x38\x39\x41\x42\x43\x44\x45\x46",
14711 .ilen = 16,
14712 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
14713 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
14714 .rlen = 16,
14715 }, { /* LRW-32-AES 6 */
14716 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
14717 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
14718 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
14719 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
14720 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
14721 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
14722 .klen = 48,
14723 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14724 "\x00\x00\x00\x00\x00\x00\x00\x01",
14725 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14726 "\x38\x39\x41\x42\x43\x44\x45\x46",
14727 .ilen = 16,
14728 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
14729 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
14730 .rlen = 16,
14731 }, { /* LRW-32-AES 7 */
14732 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
14733 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
14734 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
14735 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
14736 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
14737 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
14738 .klen = 48,
14739 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14740 "\x00\x00\x00\x02\x00\x00\x00\x00",
14741 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
14742 "\x38\x39\x41\x42\x43\x44\x45\x46",
14743 .ilen = 16,
14744 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
14745 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
14746 .rlen = 16,
14747 }, {
14748/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
14749 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
14750 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
14751 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
14752 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
14753 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
14754 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
14755 .klen = 48,
14756 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14757 "\x00\x00\x00\x00\x00\x00\x00\x01",
14758 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
14759 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
14760 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
14761 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
14762 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
14763 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
14764 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
14765 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
14766 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
14767 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
14768 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
14769 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
14770 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
14771 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
14772 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
14773 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
14774 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
14775 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
14776 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
14777 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
14778 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
14779 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
14780 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
14781 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
14782 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
14783 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
14784 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
14785 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
14786 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
14787 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
14788 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
14789 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
14790 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
14791 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
14792 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
14793 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
14794 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
14795 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
14796 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
14797 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
14798 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
14799 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
14800 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
14801 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
14802 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
14803 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
14804 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
14805 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
14806 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
14807 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
14808 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
14809 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
14810 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
14811 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
14812 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
14813 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
14814 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
14815 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
14816 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
14817 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
14818 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
14819 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
14820 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
14821 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
14822 .ilen = 512,
14823 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
14824 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
14825 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
14826 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
14827 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
14828 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
14829 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
14830 "\xe8\x58\x46\x97\x39\x51\x07\xde"
14831 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
14832 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
14833 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
14834 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
14835 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
14836 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
14837 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
14838 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
14839 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
14840 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
14841 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
14842 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
14843 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
14844 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
14845 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
14846 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
14847 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
14848 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
14849 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
14850 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
14851 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
14852 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
14853 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
14854 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
14855 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
14856 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
14857 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
14858 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
14859 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
14860 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
14861 "\xb8\x79\x78\x97\x94\xff\x72\x13"
14862 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
14863 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
14864 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
14865 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
14866 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
14867 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
14868 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
14869 "\x1e\x86\x53\x11\x53\x94\x00\xee"
14870 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
14871 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
14872 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
14873 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
14874 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
14875 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
14876 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
14877 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
14878 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
14879 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
14880 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
14881 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
14882 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
14883 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
14884 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
14885 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
14886 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
14887 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030014888 .also_non_np = 1,
14889 .np = 2,
14890 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080014891 }
14892};
14893
14894static struct cipher_testvec aes_lrw_dec_tv_template[] = {
14895 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
14896 /* same as enc vectors with input and result reversed */
14897 { /* LRW-32-AES 1 */
14898 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
14899 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
14900 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
14901 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
14902 .klen = 32,
14903 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14904 "\x00\x00\x00\x00\x00\x00\x00\x01",
14905 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
14906 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
14907 .ilen = 16,
14908 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14909 "\x38\x39\x41\x42\x43\x44\x45\x46",
14910 .rlen = 16,
14911 }, { /* LRW-32-AES 2 */
14912 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
14913 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
14914 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
14915 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
14916 .klen = 32,
14917 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14918 "\x00\x00\x00\x00\x00\x00\x00\x02",
14919 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
14920 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
14921 .ilen = 16,
14922 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14923 "\x38\x39\x41\x42\x43\x44\x45\x46",
14924 .rlen = 16,
14925 }, { /* LRW-32-AES 3 */
14926 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
14927 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
14928 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
14929 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
14930 .klen = 32,
14931 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14932 "\x00\x00\x00\x02\x00\x00\x00\x00",
14933 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
14934 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
14935 .ilen = 16,
14936 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14937 "\x38\x39\x41\x42\x43\x44\x45\x46",
14938 .rlen = 16,
14939 }, { /* LRW-32-AES 4 */
14940 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
14941 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
14942 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
14943 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
14944 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
14945 .klen = 40,
14946 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14947 "\x00\x00\x00\x00\x00\x00\x00\x01",
14948 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
14949 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
14950 .ilen = 16,
14951 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14952 "\x38\x39\x41\x42\x43\x44\x45\x46",
14953 .rlen = 16,
14954 }, { /* LRW-32-AES 5 */
14955 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
14956 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
14957 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
14958 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
14959 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
14960 .klen = 40,
14961 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14962 "\x00\x00\x00\x02\x00\x00\x00\x00",
14963 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
14964 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
14965 .ilen = 16,
14966 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14967 "\x38\x39\x41\x42\x43\x44\x45\x46",
14968 .rlen = 16,
14969 }, { /* LRW-32-AES 6 */
14970 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
14971 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
14972 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
14973 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
14974 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
14975 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
14976 .klen = 48,
14977 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14978 "\x00\x00\x00\x00\x00\x00\x00\x01",
14979 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
14980 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
14981 .ilen = 16,
14982 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14983 "\x38\x39\x41\x42\x43\x44\x45\x46",
14984 .rlen = 16,
14985 }, { /* LRW-32-AES 7 */
14986 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
14987 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
14988 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
14989 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
14990 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
14991 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
14992 .klen = 48,
14993 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
14994 "\x00\x00\x00\x02\x00\x00\x00\x00",
14995 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
14996 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
14997 .ilen = 16,
14998 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
14999 "\x38\x39\x41\x42\x43\x44\x45\x46",
15000 .rlen = 16,
15001 }, {
15002/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
15003 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
15004 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
15005 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
15006 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
15007 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
15008 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
15009 .klen = 48,
15010 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15011 "\x00\x00\x00\x00\x00\x00\x00\x01",
15012 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
15013 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
15014 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
15015 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
15016 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
15017 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
15018 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
15019 "\xe8\x58\x46\x97\x39\x51\x07\xde"
15020 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
15021 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
15022 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
15023 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
15024 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
15025 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
15026 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
15027 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
15028 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
15029 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
15030 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
15031 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
15032 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
15033 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
15034 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
15035 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
15036 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
15037 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
15038 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
15039 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
15040 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
15041 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
15042 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
15043 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
15044 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
15045 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
15046 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
15047 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
15048 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
15049 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
15050 "\xb8\x79\x78\x97\x94\xff\x72\x13"
15051 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
15052 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
15053 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
15054 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
15055 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
15056 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
15057 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
15058 "\x1e\x86\x53\x11\x53\x94\x00\xee"
15059 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
15060 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
15061 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
15062 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
15063 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
15064 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
15065 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
15066 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
15067 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
15068 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
15069 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
15070 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
15071 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
15072 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
15073 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
15074 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
15075 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
15076 .ilen = 512,
15077 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
15078 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
15079 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
15080 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
15081 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
15082 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
15083 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
15084 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
15085 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
15086 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
15087 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
15088 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
15089 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
15090 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
15091 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
15092 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
15093 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
15094 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
15095 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
15096 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
15097 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
15098 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
15099 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
15100 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
15101 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
15102 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
15103 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
15104 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
15105 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
15106 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
15107 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
15108 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
15109 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
15110 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
15111 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
15112 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
15113 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
15114 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
15115 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
15116 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
15117 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
15118 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
15119 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
15120 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
15121 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
15122 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
15123 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
15124 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
15125 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
15126 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
15127 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
15128 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
15129 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
15130 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
15131 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
15132 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
15133 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
15134 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
15135 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
15136 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
15137 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
15138 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
15139 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
15140 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
15141 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030015142 .also_non_np = 1,
15143 .np = 2,
15144 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080015145 }
15146};
15147
15148static struct cipher_testvec aes_xts_enc_tv_template[] = {
15149 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
15150 { /* XTS-AES 1 */
15151 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
15152 "\x00\x00\x00\x00\x00\x00\x00\x00"
15153 "\x00\x00\x00\x00\x00\x00\x00\x00"
15154 "\x00\x00\x00\x00\x00\x00\x00\x00",
15155 .klen = 32,
15156 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15157 "\x00\x00\x00\x00\x00\x00\x00\x00",
15158 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
15159 "\x00\x00\x00\x00\x00\x00\x00\x00"
15160 "\x00\x00\x00\x00\x00\x00\x00\x00"
15161 "\x00\x00\x00\x00\x00\x00\x00\x00",
15162 .ilen = 32,
15163 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
15164 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
15165 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
15166 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
15167 .rlen = 32,
15168 }, { /* XTS-AES 2 */
15169 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
15170 "\x11\x11\x11\x11\x11\x11\x11\x11"
15171 "\x22\x22\x22\x22\x22\x22\x22\x22"
15172 "\x22\x22\x22\x22\x22\x22\x22\x22",
15173 .klen = 32,
15174 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
15175 "\x00\x00\x00\x00\x00\x00\x00\x00",
15176 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
15177 "\x44\x44\x44\x44\x44\x44\x44\x44"
15178 "\x44\x44\x44\x44\x44\x44\x44\x44"
15179 "\x44\x44\x44\x44\x44\x44\x44\x44",
15180 .ilen = 32,
15181 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
15182 "\x39\x33\x40\x38\xac\xef\x83\x8b"
15183 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
15184 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
15185 .rlen = 32,
15186 }, { /* XTS-AES 3 */
15187 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
15188 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
15189 "\x22\x22\x22\x22\x22\x22\x22\x22"
15190 "\x22\x22\x22\x22\x22\x22\x22\x22",
15191 .klen = 32,
15192 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
15193 "\x00\x00\x00\x00\x00\x00\x00\x00",
15194 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
15195 "\x44\x44\x44\x44\x44\x44\x44\x44"
15196 "\x44\x44\x44\x44\x44\x44\x44\x44"
15197 "\x44\x44\x44\x44\x44\x44\x44\x44",
15198 .ilen = 32,
15199 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
15200 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
15201 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
15202 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
15203 .rlen = 32,
15204 }, { /* XTS-AES 4 */
15205 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
15206 "\x23\x53\x60\x28\x74\x71\x35\x26"
15207 "\x31\x41\x59\x26\x53\x58\x97\x93"
15208 "\x23\x84\x62\x64\x33\x83\x27\x95",
15209 .klen = 32,
15210 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15211 "\x00\x00\x00\x00\x00\x00\x00\x00",
15212 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15213 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15214 "\x10\x11\x12\x13\x14\x15\x16\x17"
15215 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15216 "\x20\x21\x22\x23\x24\x25\x26\x27"
15217 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15218 "\x30\x31\x32\x33\x34\x35\x36\x37"
15219 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15220 "\x40\x41\x42\x43\x44\x45\x46\x47"
15221 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15222 "\x50\x51\x52\x53\x54\x55\x56\x57"
15223 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15224 "\x60\x61\x62\x63\x64\x65\x66\x67"
15225 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15226 "\x70\x71\x72\x73\x74\x75\x76\x77"
15227 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15228 "\x80\x81\x82\x83\x84\x85\x86\x87"
15229 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15230 "\x90\x91\x92\x93\x94\x95\x96\x97"
15231 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15232 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15233 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15234 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15235 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15236 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15237 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15238 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15239 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15240 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15241 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15242 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15243 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
15244 "\x00\x01\x02\x03\x04\x05\x06\x07"
15245 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15246 "\x10\x11\x12\x13\x14\x15\x16\x17"
15247 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15248 "\x20\x21\x22\x23\x24\x25\x26\x27"
15249 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15250 "\x30\x31\x32\x33\x34\x35\x36\x37"
15251 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15252 "\x40\x41\x42\x43\x44\x45\x46\x47"
15253 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15254 "\x50\x51\x52\x53\x54\x55\x56\x57"
15255 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15256 "\x60\x61\x62\x63\x64\x65\x66\x67"
15257 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15258 "\x70\x71\x72\x73\x74\x75\x76\x77"
15259 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15260 "\x80\x81\x82\x83\x84\x85\x86\x87"
15261 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15262 "\x90\x91\x92\x93\x94\x95\x96\x97"
15263 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15264 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15265 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15266 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15267 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15268 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15269 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15270 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15271 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15272 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15273 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15274 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15275 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15276 .ilen = 512,
15277 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
15278 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
15279 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
15280 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
15281 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
15282 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
15283 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
15284 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
15285 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
15286 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
15287 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
15288 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
15289 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
15290 "\x22\x97\x61\x46\xae\x20\xce\x84"
15291 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
15292 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
15293 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
15294 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
15295 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
15296 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
15297 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
15298 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
15299 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
15300 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
15301 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
15302 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
15303 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
15304 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
15305 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
15306 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
15307 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
15308 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
15309 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
15310 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
15311 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
15312 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
15313 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
15314 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
15315 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
15316 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
15317 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
15318 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
15319 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
15320 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
15321 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
15322 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
15323 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
15324 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
15325 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
15326 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
15327 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
15328 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
15329 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
15330 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
15331 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
15332 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
15333 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
15334 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
15335 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
15336 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
15337 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
15338 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
15339 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
15340 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
15341 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100015342 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
15343 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
15344 "\x23\x53\x60\x28\x74\x71\x35\x26"
15345 "\x62\x49\x77\x57\x24\x70\x93\x69"
15346 "\x99\x59\x57\x49\x66\x96\x76\x27"
15347 "\x31\x41\x59\x26\x53\x58\x97\x93"
15348 "\x23\x84\x62\x64\x33\x83\x27\x95"
15349 "\x02\x88\x41\x97\x16\x93\x99\x37"
15350 "\x51\x05\x82\x09\x74\x94\x45\x92",
15351 .klen = 64,
15352 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
15353 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100015354 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
15355 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15356 "\x10\x11\x12\x13\x14\x15\x16\x17"
15357 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15358 "\x20\x21\x22\x23\x24\x25\x26\x27"
15359 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15360 "\x30\x31\x32\x33\x34\x35\x36\x37"
15361 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15362 "\x40\x41\x42\x43\x44\x45\x46\x47"
15363 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15364 "\x50\x51\x52\x53\x54\x55\x56\x57"
15365 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15366 "\x60\x61\x62\x63\x64\x65\x66\x67"
15367 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15368 "\x70\x71\x72\x73\x74\x75\x76\x77"
15369 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15370 "\x80\x81\x82\x83\x84\x85\x86\x87"
15371 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15372 "\x90\x91\x92\x93\x94\x95\x96\x97"
15373 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15374 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15375 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15376 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15377 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15378 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15379 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15380 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15381 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15382 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15383 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15384 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15385 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
15386 "\x00\x01\x02\x03\x04\x05\x06\x07"
15387 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15388 "\x10\x11\x12\x13\x14\x15\x16\x17"
15389 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15390 "\x20\x21\x22\x23\x24\x25\x26\x27"
15391 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15392 "\x30\x31\x32\x33\x34\x35\x36\x37"
15393 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15394 "\x40\x41\x42\x43\x44\x45\x46\x47"
15395 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15396 "\x50\x51\x52\x53\x54\x55\x56\x57"
15397 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15398 "\x60\x61\x62\x63\x64\x65\x66\x67"
15399 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15400 "\x70\x71\x72\x73\x74\x75\x76\x77"
15401 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15402 "\x80\x81\x82\x83\x84\x85\x86\x87"
15403 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15404 "\x90\x91\x92\x93\x94\x95\x96\x97"
15405 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15406 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15407 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15408 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15409 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15410 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15411 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15412 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15413 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15414 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15415 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15416 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15417 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15418 .ilen = 512,
15419 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
15420 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
15421 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
15422 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
15423 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
15424 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
15425 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
15426 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
15427 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
15428 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
15429 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
15430 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
15431 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
15432 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
15433 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
15434 "\x00\x02\x08\x87\x89\x14\x29\xca"
15435 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
15436 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
15437 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
15438 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
15439 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
15440 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
15441 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
15442 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
15443 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
15444 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
15445 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
15446 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
15447 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
15448 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
15449 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
15450 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
15451 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
15452 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
15453 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
15454 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
15455 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
15456 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
15457 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
15458 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
15459 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
15460 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
15461 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
15462 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
15463 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
15464 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
15465 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
15466 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
15467 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
15468 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
15469 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
15470 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
15471 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
15472 "\x94\x30\x54\xff\x84\x01\x14\x93"
15473 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
15474 "\x53\x76\x44\x1a\x77\xed\x43\x85"
15475 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
15476 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
15477 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
15478 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
15479 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
15480 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
15481 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
15482 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
15483 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030015484 .also_non_np = 1,
15485 .np = 2,
15486 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080015487 }
15488};
15489
15490static struct cipher_testvec aes_xts_dec_tv_template[] = {
15491 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
15492 { /* XTS-AES 1 */
15493 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
15494 "\x00\x00\x00\x00\x00\x00\x00\x00"
15495 "\x00\x00\x00\x00\x00\x00\x00\x00"
15496 "\x00\x00\x00\x00\x00\x00\x00\x00",
15497 .klen = 32,
15498 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15499 "\x00\x00\x00\x00\x00\x00\x00\x00",
15500 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
15501 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
15502 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
15503 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
15504 .ilen = 32,
15505 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
15506 "\x00\x00\x00\x00\x00\x00\x00\x00"
15507 "\x00\x00\x00\x00\x00\x00\x00\x00"
15508 "\x00\x00\x00\x00\x00\x00\x00\x00",
15509 .rlen = 32,
15510 }, { /* XTS-AES 2 */
15511 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
15512 "\x11\x11\x11\x11\x11\x11\x11\x11"
15513 "\x22\x22\x22\x22\x22\x22\x22\x22"
15514 "\x22\x22\x22\x22\x22\x22\x22\x22",
15515 .klen = 32,
15516 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
15517 "\x00\x00\x00\x00\x00\x00\x00\x00",
15518 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
15519 "\x39\x33\x40\x38\xac\xef\x83\x8b"
15520 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
15521 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
15522 .ilen = 32,
15523 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
15524 "\x44\x44\x44\x44\x44\x44\x44\x44"
15525 "\x44\x44\x44\x44\x44\x44\x44\x44"
15526 "\x44\x44\x44\x44\x44\x44\x44\x44",
15527 .rlen = 32,
15528 }, { /* XTS-AES 3 */
15529 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
15530 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
15531 "\x22\x22\x22\x22\x22\x22\x22\x22"
15532 "\x22\x22\x22\x22\x22\x22\x22\x22",
15533 .klen = 32,
15534 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
15535 "\x00\x00\x00\x00\x00\x00\x00\x00",
15536 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
15537 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
15538 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
15539 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
15540 .ilen = 32,
15541 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
15542 "\x44\x44\x44\x44\x44\x44\x44\x44"
15543 "\x44\x44\x44\x44\x44\x44\x44\x44"
15544 "\x44\x44\x44\x44\x44\x44\x44\x44",
15545 .rlen = 32,
15546 }, { /* XTS-AES 4 */
15547 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
15548 "\x23\x53\x60\x28\x74\x71\x35\x26"
15549 "\x31\x41\x59\x26\x53\x58\x97\x93"
15550 "\x23\x84\x62\x64\x33\x83\x27\x95",
15551 .klen = 32,
15552 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
15553 "\x00\x00\x00\x00\x00\x00\x00\x00",
15554 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
15555 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
15556 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
15557 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
15558 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
15559 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
15560 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
15561 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
15562 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
15563 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
15564 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
15565 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
15566 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
15567 "\x22\x97\x61\x46\xae\x20\xce\x84"
15568 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
15569 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
15570 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
15571 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
15572 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
15573 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
15574 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
15575 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
15576 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
15577 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
15578 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
15579 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
15580 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
15581 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
15582 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
15583 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
15584 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
15585 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
15586 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
15587 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
15588 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
15589 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
15590 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
15591 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
15592 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
15593 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
15594 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
15595 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
15596 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
15597 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
15598 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
15599 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
15600 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
15601 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
15602 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
15603 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
15604 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
15605 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
15606 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
15607 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
15608 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
15609 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
15610 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
15611 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
15612 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
15613 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
15614 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
15615 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
15616 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
15617 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
15618 .ilen = 512,
15619 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
15620 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15621 "\x10\x11\x12\x13\x14\x15\x16\x17"
15622 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15623 "\x20\x21\x22\x23\x24\x25\x26\x27"
15624 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15625 "\x30\x31\x32\x33\x34\x35\x36\x37"
15626 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15627 "\x40\x41\x42\x43\x44\x45\x46\x47"
15628 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15629 "\x50\x51\x52\x53\x54\x55\x56\x57"
15630 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15631 "\x60\x61\x62\x63\x64\x65\x66\x67"
15632 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15633 "\x70\x71\x72\x73\x74\x75\x76\x77"
15634 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15635 "\x80\x81\x82\x83\x84\x85\x86\x87"
15636 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15637 "\x90\x91\x92\x93\x94\x95\x96\x97"
15638 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15639 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15640 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15641 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15642 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15643 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15644 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15645 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15646 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15647 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15648 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15649 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15650 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
15651 "\x00\x01\x02\x03\x04\x05\x06\x07"
15652 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15653 "\x10\x11\x12\x13\x14\x15\x16\x17"
15654 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15655 "\x20\x21\x22\x23\x24\x25\x26\x27"
15656 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15657 "\x30\x31\x32\x33\x34\x35\x36\x37"
15658 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15659 "\x40\x41\x42\x43\x44\x45\x46\x47"
15660 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15661 "\x50\x51\x52\x53\x54\x55\x56\x57"
15662 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15663 "\x60\x61\x62\x63\x64\x65\x66\x67"
15664 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15665 "\x70\x71\x72\x73\x74\x75\x76\x77"
15666 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15667 "\x80\x81\x82\x83\x84\x85\x86\x87"
15668 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15669 "\x90\x91\x92\x93\x94\x95\x96\x97"
15670 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15671 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15672 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15673 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15674 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15675 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15676 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15677 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15678 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15679 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15680 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15681 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15682 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15683 .rlen = 512,
Jarod Wilson5165e5b2011-05-31 15:23:57 +100015684 }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
15685 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
15686 "\x23\x53\x60\x28\x74\x71\x35\x26"
15687 "\x62\x49\x77\x57\x24\x70\x93\x69"
15688 "\x99\x59\x57\x49\x66\x96\x76\x27"
15689 "\x31\x41\x59\x26\x53\x58\x97\x93"
15690 "\x23\x84\x62\x64\x33\x83\x27\x95"
15691 "\x02\x88\x41\x97\x16\x93\x99\x37"
15692 "\x51\x05\x82\x09\x74\x94\x45\x92",
15693 .klen = 64,
15694 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
15695 "\x00\x00\x00\x00\x00\x00\x00\x00",
Jarod Wilson5165e5b2011-05-31 15:23:57 +100015696 .input = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
15697 "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
15698 "\xea\x00\x80\x3f\x5e\x48\x23\x57"
15699 "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
15700 "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
15701 "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
15702 "\x68\x0a\x86\xac\x35\xad\xfc\x33"
15703 "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
15704 "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
15705 "\xb1\x08\xfd\x10\x98\xba\xec\x70"
15706 "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
15707 "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
15708 "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
15709 "\xae\xba\x12\x29\x61\xd0\x3a\x75"
15710 "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
15711 "\x00\x02\x08\x87\x89\x14\x29\xca"
15712 "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
15713 "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
15714 "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
15715 "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
15716 "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
15717 "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
15718 "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
15719 "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
15720 "\x93\xec\x05\xc5\x2e\x04\x93\xef"
15721 "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
15722 "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
15723 "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
15724 "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
15725 "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
15726 "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
15727 "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
15728 "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
15729 "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
15730 "\xbc\x48\x14\x57\x77\x8f\x61\x60"
15731 "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
15732 "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
15733 "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
15734 "\xf4\xc3\x33\xec\x44\x23\x88\x51"
15735 "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
15736 "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
15737 "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
15738 "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
15739 "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
15740 "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
15741 "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
15742 "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
15743 "\x92\x5f\xed\xc4\xae\x74\xff\xac"
15744 "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
15745 "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
15746 "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
15747 "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
15748 "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
15749 "\x94\x30\x54\xff\x84\x01\x14\x93"
15750 "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
15751 "\x53\x76\x44\x1a\x77\xed\x43\x85"
15752 "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
15753 "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
15754 "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
15755 "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
15756 "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
15757 "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
15758 "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
15759 "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
15760 .ilen = 512,
15761 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
15762 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15763 "\x10\x11\x12\x13\x14\x15\x16\x17"
15764 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15765 "\x20\x21\x22\x23\x24\x25\x26\x27"
15766 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15767 "\x30\x31\x32\x33\x34\x35\x36\x37"
15768 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15769 "\x40\x41\x42\x43\x44\x45\x46\x47"
15770 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15771 "\x50\x51\x52\x53\x54\x55\x56\x57"
15772 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15773 "\x60\x61\x62\x63\x64\x65\x66\x67"
15774 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15775 "\x70\x71\x72\x73\x74\x75\x76\x77"
15776 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15777 "\x80\x81\x82\x83\x84\x85\x86\x87"
15778 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15779 "\x90\x91\x92\x93\x94\x95\x96\x97"
15780 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15781 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15782 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15783 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15784 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15785 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15786 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15787 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15788 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15789 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15790 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15791 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15792 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
15793 "\x00\x01\x02\x03\x04\x05\x06\x07"
15794 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15795 "\x10\x11\x12\x13\x14\x15\x16\x17"
15796 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15797 "\x20\x21\x22\x23\x24\x25\x26\x27"
15798 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15799 "\x30\x31\x32\x33\x34\x35\x36\x37"
15800 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15801 "\x40\x41\x42\x43\x44\x45\x46\x47"
15802 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15803 "\x50\x51\x52\x53\x54\x55\x56\x57"
15804 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15805 "\x60\x61\x62\x63\x64\x65\x66\x67"
15806 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
15807 "\x70\x71\x72\x73\x74\x75\x76\x77"
15808 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
15809 "\x80\x81\x82\x83\x84\x85\x86\x87"
15810 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
15811 "\x90\x91\x92\x93\x94\x95\x96\x97"
15812 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
15813 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15814 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15815 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15816 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15817 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15818 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15819 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15820 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
15821 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
15822 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
15823 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15824 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15825 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030015826 .also_non_np = 1,
15827 .np = 2,
15828 .tap = { 512 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080015829 }
15830};
15831
15832
15833static struct cipher_testvec aes_ctr_enc_tv_template[] = {
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080015834 { /* From NIST Special Publication 800-38A, Appendix F.5 */
15835 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
15836 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
15837 .klen = 16,
15838 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15839 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15840 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15841 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15842 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15843 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15844 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15845 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15846 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15847 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15848 .ilen = 64,
15849 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
15850 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
15851 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
15852 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
15853 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
15854 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
15855 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
15856 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
15857 .rlen = 64,
15858 }, {
15859 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15860 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15861 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15862 .klen = 24,
15863 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15864 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15865 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15866 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15867 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15868 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15869 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15870 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15871 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15872 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15873 .ilen = 64,
15874 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
15875 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
15876 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
15877 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
15878 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
15879 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
15880 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
15881 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
15882 .rlen = 64,
15883 }, {
15884 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15885 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15886 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15887 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15888 .klen = 32,
15889 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
15890 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
15891 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15892 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15893 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15894 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15895 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15896 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15897 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15898 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15899 .ilen = 64,
15900 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
15901 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
15902 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
15903 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
15904 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
15905 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
15906 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
15907 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
15908 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030015909 }, { /* Generated with Crypto++ */
15910 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
15911 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
15912 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
15913 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
15914 .klen = 32,
15915 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
15916 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
15917 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
15918 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
15919 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
15920 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
15921 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
15922 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
15923 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
15924 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
15925 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
15926 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
15927 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
15928 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
15929 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
15930 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
15931 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
15932 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
15933 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
15934 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
15935 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
15936 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
15937 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
15938 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
15939 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
15940 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
15941 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
15942 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
15943 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
15944 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
15945 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
15946 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
15947 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
15948 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
15949 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
15950 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
15951 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
15952 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
15953 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
15954 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
15955 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
15956 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
15957 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
15958 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
15959 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
15960 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
15961 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
15962 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
15963 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
15964 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
15965 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
15966 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
15967 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
15968 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
15969 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
15970 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
15971 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
15972 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
15973 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
15974 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
15975 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
15976 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
15977 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
15978 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
15979 .ilen = 496,
15980 .result = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
15981 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
15982 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
15983 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
15984 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
15985 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
15986 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
15987 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
15988 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
15989 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
15990 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
15991 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
15992 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
15993 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
15994 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
15995 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
15996 "\x34\x4B\x31\x69\x84\x66\x96\x44"
15997 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
15998 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
15999 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
16000 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
16001 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
16002 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
16003 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
16004 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
16005 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
16006 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
16007 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
16008 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
16009 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
16010 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
16011 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
16012 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
16013 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
16014 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
16015 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
16016 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
16017 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
16018 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
16019 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
16020 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
16021 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
16022 "\x85\x99\x22\xE8\x91\x38\x70\x83"
16023 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
16024 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
16025 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
16026 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
16027 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
16028 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
16029 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
16030 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
16031 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
16032 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
16033 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
16034 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
16035 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
16036 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
16037 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
16038 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
16039 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
16040 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
16041 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
16042 .rlen = 496,
16043 .also_non_np = 1,
16044 .np = 2,
16045 .tap = { 496 - 16, 16 },
16046 }, { /* Generated with Crypto++ */
16047 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
16048 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
16049 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
16050 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
16051 .klen = 32,
16052 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
16053 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
16054 .input = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
16055 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
16056 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
16057 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
16058 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
16059 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
16060 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
16061 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
16062 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
16063 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
16064 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
16065 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
16066 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
16067 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
16068 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
16069 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
16070 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
16071 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
16072 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
16073 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
16074 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
16075 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
16076 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
16077 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
16078 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
16079 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
16080 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
16081 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
16082 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
16083 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
16084 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
16085 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
16086 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
16087 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
16088 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
16089 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
16090 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
16091 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
16092 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
16093 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
16094 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
16095 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
16096 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
16097 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
16098 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
16099 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
16100 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
16101 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
16102 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
16103 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
16104 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
16105 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
16106 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
16107 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
16108 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
16109 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
16110 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
16111 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
16112 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
16113 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
16114 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
16115 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
16116 "\x7B\xE4\x4D",
16117 .ilen = 499,
16118 .result = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
16119 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
16120 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
16121 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
16122 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
16123 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
16124 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
16125 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
16126 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
16127 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
16128 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
16129 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
16130 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
16131 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
16132 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
16133 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
16134 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
16135 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
16136 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
16137 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
16138 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
16139 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
16140 "\x45\x18\x18\x74\x19\xAD\x71\x01"
16141 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
16142 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
16143 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
16144 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
16145 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
16146 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
16147 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
16148 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
16149 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
16150 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
16151 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
16152 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
16153 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
16154 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
16155 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
16156 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
16157 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
16158 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
16159 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
16160 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
16161 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
16162 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
16163 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
16164 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
16165 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
16166 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
16167 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
16168 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
16169 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
16170 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
16171 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
16172 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
16173 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
16174 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
16175 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
16176 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
16177 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
16178 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
16179 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
16180 "\xFB\xF2\x3F",
16181 .rlen = 499,
16182 .also_non_np = 1,
16183 .np = 2,
16184 .tap = { 499 - 16, 16 },
16185 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080016186};
16187
16188static struct cipher_testvec aes_ctr_dec_tv_template[] = {
16189 { /* From NIST Special Publication 800-38A, Appendix F.5 */
16190 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
16191 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
16192 .klen = 16,
16193 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16194 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
16195 .input = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
16196 "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
16197 "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
16198 "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
16199 "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
16200 "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
16201 "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
16202 "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
16203 .ilen = 64,
16204 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
16205 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
16206 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
16207 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
16208 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
16209 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
16210 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
16211 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
16212 .rlen = 64,
16213 }, {
16214 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
16215 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
16216 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
16217 .klen = 24,
16218 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16219 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
16220 .input = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
16221 "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
16222 "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
16223 "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
16224 "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
16225 "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
16226 "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
16227 "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
16228 .ilen = 64,
16229 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
16230 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
16231 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
16232 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
16233 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
16234 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
16235 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
16236 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
16237 .rlen = 64,
16238 }, {
16239 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
16240 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
16241 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
16242 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
16243 .klen = 32,
16244 .iv = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16245 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
16246 .input = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
16247 "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
16248 "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
16249 "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
16250 "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
16251 "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
16252 "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
16253 "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
16254 .ilen = 64,
16255 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
16256 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
16257 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
16258 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
16259 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
16260 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
16261 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
16262 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
16263 .rlen = 64,
Jussi Kivilinnac3b9e8f2012-10-20 14:53:02 +030016264 }, { /* Generated with Crypto++ */
16265 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
16266 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
16267 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
16268 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
16269 .klen = 32,
16270 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
16271 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
16272 .input = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
16273 "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
16274 "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
16275 "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
16276 "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
16277 "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
16278 "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
16279 "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
16280 "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
16281 "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
16282 "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
16283 "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
16284 "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
16285 "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
16286 "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
16287 "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
16288 "\x34\x4B\x31\x69\x84\x66\x96\x44"
16289 "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
16290 "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
16291 "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
16292 "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
16293 "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
16294 "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
16295 "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
16296 "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
16297 "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
16298 "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
16299 "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
16300 "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
16301 "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
16302 "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
16303 "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
16304 "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
16305 "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
16306 "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
16307 "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
16308 "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
16309 "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
16310 "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
16311 "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
16312 "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
16313 "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
16314 "\x85\x99\x22\xE8\x91\x38\x70\x83"
16315 "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
16316 "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
16317 "\x2F\x69\xEE\x84\x36\x44\x76\x98"
16318 "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
16319 "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
16320 "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
16321 "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
16322 "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
16323 "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
16324 "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
16325 "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
16326 "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
16327 "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
16328 "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
16329 "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
16330 "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
16331 "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
16332 "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
16333 "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
16334 .ilen = 496,
16335 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
16336 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
16337 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
16338 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
16339 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
16340 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
16341 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
16342 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
16343 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
16344 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
16345 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
16346 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
16347 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
16348 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
16349 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
16350 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
16351 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
16352 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
16353 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
16354 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
16355 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
16356 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
16357 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
16358 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
16359 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
16360 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
16361 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
16362 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
16363 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
16364 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
16365 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
16366 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
16367 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
16368 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
16369 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
16370 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
16371 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
16372 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
16373 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
16374 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
16375 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
16376 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
16377 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
16378 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
16379 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
16380 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
16381 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
16382 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
16383 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
16384 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
16385 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
16386 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
16387 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
16388 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
16389 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
16390 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
16391 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
16392 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
16393 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
16394 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
16395 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
16396 "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
16397 .rlen = 496,
16398 .also_non_np = 1,
16399 .np = 2,
16400 .tap = { 496 - 16, 16 },
16401 }, { /* Generated with Crypto++ */
16402 .key = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
16403 "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
16404 "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
16405 "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
16406 .klen = 32,
16407 .iv = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
16408 "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
16409 .input = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
16410 "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
16411 "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
16412 "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
16413 "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
16414 "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
16415 "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
16416 "\x75\xDE\x71\x86\x3C\x98\x23\x44"
16417 "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
16418 "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
16419 "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
16420 "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
16421 "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
16422 "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
16423 "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
16424 "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
16425 "\xA8\x28\x69\x65\x31\xE1\x45\x83"
16426 "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
16427 "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
16428 "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
16429 "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
16430 "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
16431 "\x45\x18\x18\x74\x19\xAD\x71\x01"
16432 "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
16433 "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
16434 "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
16435 "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
16436 "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
16437 "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
16438 "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
16439 "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
16440 "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
16441 "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
16442 "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
16443 "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
16444 "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
16445 "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
16446 "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
16447 "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
16448 "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
16449 "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
16450 "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
16451 "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
16452 "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
16453 "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
16454 "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
16455 "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
16456 "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
16457 "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
16458 "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
16459 "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
16460 "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
16461 "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
16462 "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
16463 "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
16464 "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
16465 "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
16466 "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
16467 "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
16468 "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
16469 "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
16470 "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
16471 "\xFB\xF2\x3F",
16472 .ilen = 499,
16473 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
16474 "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
16475 "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
16476 "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
16477 "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
16478 "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
16479 "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
16480 "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
16481 "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
16482 "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
16483 "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
16484 "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
16485 "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
16486 "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
16487 "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
16488 "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
16489 "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
16490 "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
16491 "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
16492 "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
16493 "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
16494 "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
16495 "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
16496 "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
16497 "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
16498 "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
16499 "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
16500 "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
16501 "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
16502 "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
16503 "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
16504 "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
16505 "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
16506 "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
16507 "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
16508 "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
16509 "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
16510 "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
16511 "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
16512 "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
16513 "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
16514 "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
16515 "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
16516 "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
16517 "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
16518 "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
16519 "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
16520 "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
16521 "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
16522 "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
16523 "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
16524 "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
16525 "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
16526 "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
16527 "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
16528 "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
16529 "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
16530 "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
16531 "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
16532 "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
16533 "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
16534 "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
16535 "\x7B\xE4\x4D",
16536 .rlen = 499,
16537 .also_non_np = 1,
16538 .np = 2,
16539 .tap = { 499 - 16, 16 },
16540 },
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080016541};
16542
16543static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080016544 { /* From RFC 3686 */
16545 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
16546 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
16547 "\x00\x00\x00\x30",
16548 .klen = 20,
16549 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
16550 .input = "Single block msg",
16551 .ilen = 16,
16552 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
16553 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
16554 .rlen = 16,
16555 }, {
16556 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
16557 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
16558 "\x00\x6c\xb6\xdb",
16559 .klen = 20,
16560 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
16561 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16562 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16563 "\x10\x11\x12\x13\x14\x15\x16\x17"
16564 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
16565 .ilen = 32,
16566 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
16567 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
16568 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
16569 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
16570 .rlen = 32,
16571 }, {
16572 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
16573 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
16574 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
16575 "\x00\x00\x00\x48",
16576 .klen = 28,
16577 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
16578 .input = "Single block msg",
16579 .ilen = 16,
16580 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
16581 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
16582 .rlen = 16,
16583 }, {
16584 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
16585 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
16586 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
16587 "\x00\x96\xb0\x3b",
16588 .klen = 28,
16589 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
16590 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16591 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16592 "\x10\x11\x12\x13\x14\x15\x16\x17"
16593 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
16594 .ilen = 32,
16595 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
16596 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
16597 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
16598 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
16599 .rlen = 32,
16600 }, {
16601 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
16602 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
16603 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
16604 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
16605 "\x00\x00\x00\x60",
16606 .klen = 36,
16607 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
16608 .input = "Single block msg",
16609 .ilen = 16,
16610 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
16611 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
16612 .rlen = 16,
16613 }, {
16614 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
16615 "\x07\x96\x36\x58\x79\xef\xf8\x86"
16616 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
16617 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
16618 "\x00\xfa\xac\x24",
16619 .klen = 36,
16620 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
16621 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
16622 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16623 "\x10\x11\x12\x13\x14\x15\x16\x17"
16624 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
16625 .ilen = 32,
16626 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
16627 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
16628 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
16629 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
16630 .rlen = 32,
16631 }, {
16632 // generated using Crypto++
16633 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
16634 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16635 "\x10\x11\x12\x13\x14\x15\x16\x17"
16636 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16637 "\x00\x00\x00\x00",
16638 .klen = 32 + 4,
16639 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
16640 .input =
16641 "\x00\x01\x02\x03\x04\x05\x06\x07"
16642 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16643 "\x10\x11\x12\x13\x14\x15\x16\x17"
16644 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
16645 "\x20\x21\x22\x23\x24\x25\x26\x27"
16646 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
16647 "\x30\x31\x32\x33\x34\x35\x36\x37"
16648 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
16649 "\x40\x41\x42\x43\x44\x45\x46\x47"
16650 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
16651 "\x50\x51\x52\x53\x54\x55\x56\x57"
16652 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
16653 "\x60\x61\x62\x63\x64\x65\x66\x67"
16654 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
16655 "\x70\x71\x72\x73\x74\x75\x76\x77"
16656 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
16657 "\x80\x81\x82\x83\x84\x85\x86\x87"
16658 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
16659 "\x90\x91\x92\x93\x94\x95\x96\x97"
16660 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
16661 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
16662 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
16663 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
16664 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
16665 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
16666 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
16667 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
16668 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
16669 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
16670 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
16671 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
16672 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
16673 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
16674 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
16675 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
16676 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
16677 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
16678 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
16679 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
16680 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
16681 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
16682 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
16683 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
16684 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
16685 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
16686 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
16687 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
16688 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
16689 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
16690 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
16691 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
16692 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
16693 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
16694 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
16695 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
16696 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
16697 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
16698 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
16699 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
16700 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
16701 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
16702 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
16703 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
16704 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
16705 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
16706 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
16707 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
16708 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
16709 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
16710 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
16711 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
16712 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
16713 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
16714 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
16715 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
16716 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
16717 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
16718 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
16719 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
16720 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
16721 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
16722 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
16723 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
16724 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
16725 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
16726 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
16727 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
16728 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
16729 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
16730 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
16731 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
16732 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
16733 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
16734 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
16735 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
16736 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
16737 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
16738 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
16739 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
16740 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
16741 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
16742 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
16743 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
16744 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
16745 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
16746 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
16747 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
16748 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
16749 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
16750 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
16751 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
16752 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
16753 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
16754 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
16755 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
16756 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
16757 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
16758 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
16759 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
16760 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
16761 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
16762 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
16763 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
16764 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
16765 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
16766 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
16767 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
16768 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
16769 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
16770 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
16771 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
16772 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
16773 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
16774 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
16775 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
16776 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
16777 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
16778 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
16779 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
16780 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
16781 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
16782 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
16783 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
16784 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
16785 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
16786 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
16787 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
16788 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
16789 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
16790 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
16791 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
16792 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
16793 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
16794 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
16795 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
16796 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
16797 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
16798 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
16799 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
16800 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
16801 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
16802 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
16803 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
16804 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
16805 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
16806 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
16807 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
16808 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
16809 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
16810 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
16811 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
16812 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
16813 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
16814 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
16815 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
16816 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
16817 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
16818 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
16819 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
16820 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
16821 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
16822 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
16823 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
16824 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
16825 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
16826 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
16827 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
16828 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
16829 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
16830 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
16831 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
16832 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
16833 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
16834 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
16835 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
16836 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
16837 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
16838 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
16839 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
16840 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
16841 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
16842 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
16843 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
16844 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
16845 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
16846 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
16847 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
16848 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
16849 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
16850 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
16851 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
16852 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
16853 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
16854 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
16855 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
16856 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
16857 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
16858 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
16859 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
16860 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
16861 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
16862 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
16863 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
16864 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
16865 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
16866 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
16867 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
16868 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
16869 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
16870 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
16871 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
16872 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
16873 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
16874 "\x38\x47\x56\x65\x74\x83\x92\xa1"
16875 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
16876 "\x28\x37\x46\x55\x64\x73\x82\x91"
16877 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
16878 "\x18\x27\x36\x45\x54\x63\x72\x81"
16879 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
16880 "\x08\x17\x26\x35\x44\x53\x62\x71"
16881 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
16882 "\xf8\x07\x16\x25\x34\x43\x52\x61"
16883 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
16884 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
16885 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
16886 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
16887 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
16888 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
16889 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
16890 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
16891 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
16892 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
16893 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
16894 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
16895 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
16896 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
16897 "\x00\x11\x22\x33\x44\x55\x66\x77"
16898 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
16899 "\x10\x21\x32\x43\x54\x65\x76\x87"
16900 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
16901 "\x20\x31\x42\x53\x64\x75\x86\x97"
16902 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
16903 "\x30\x41\x52\x63\x74\x85\x96\xa7"
16904 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
16905 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
16906 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
16907 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
16908 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
16909 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
16910 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
16911 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
16912 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
16913 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
16914 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
16915 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
16916 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
16917 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
16918 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
16919 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
16920 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
16921 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
16922 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
16923 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
16924 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
16925 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
16926 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
16927 "\xf0\x01\x12\x23\x34\x45\x56\x67"
16928 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
16929 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
16930 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
16931 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
16932 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
16933 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
16934 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
16935 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
16936 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
16937 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
16938 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
16939 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
16940 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
16941 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
16942 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
16943 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
16944 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
16945 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
16946 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
16947 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
16948 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
16949 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
16950 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
16951 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
16952 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
16953 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
16954 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
16955 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
16956 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
16957 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
16958 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
16959 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
16960 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
16961 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
16962 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
16963 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
16964 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
16965 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
16966 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
16967 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
16968 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
16969 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
16970 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
16971 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
16972 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
16973 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
16974 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
16975 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
16976 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
16977 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
16978 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
16979 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
16980 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
16981 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
16982 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
16983 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
16984 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
16985 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
16986 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
16987 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
16988 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
16989 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
16990 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
16991 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
16992 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
16993 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
16994 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
16995 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
16996 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
16997 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
16998 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
16999 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
17000 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
17001 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
17002 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
17003 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
17004 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
17005 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
17006 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
17007 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
17008 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
17009 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
17010 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
17011 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
17012 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
17013 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
17014 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
17015 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
17016 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
17017 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
17018 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
17019 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
17020 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
17021 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
17022 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
17023 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
17024 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
17025 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
17026 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
17027 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
17028 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
17029 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
17030 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
17031 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
17032 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
17033 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
17034 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
17035 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
17036 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
17037 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
17038 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
17039 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
17040 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
17041 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
17042 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
17043 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
17044 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
17045 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
17046 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
17047 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
17048 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
17049 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
17050 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
17051 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
17052 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
17053 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
17054 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
17055 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
17056 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
17057 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
17058 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
17059 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
17060 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
17061 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
17062 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
17063 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
17064 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
17065 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
17066 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
17067 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
17068 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
17069 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
17070 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
17071 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
17072 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
17073 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
17074 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
17075 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
17076 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
17077 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
17078 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
17079 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
17080 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
17081 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
17082 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
17083 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
17084 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
17085 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
17086 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
17087 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
17088 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
17089 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
17090 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
17091 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
17092 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
17093 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
17094 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
17095 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
17096 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
17097 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
17098 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
17099 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
17100 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
17101 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
17102 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
17103 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
17104 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
17105 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
17106 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
17107 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
17108 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
17109 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
17110 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
17111 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
17112 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
17113 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
17114 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
17115 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
17116 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
17117 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
17118 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
17119 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
17120 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
17121 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
17122 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
17123 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
17124 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
17125 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
17126 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
17127 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
17128 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
17129 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
17130 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
17131 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
17132 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
17133 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
17134 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
17135 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
17136 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
17137 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
17138 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
17139 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
17140 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
17141 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
17142 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
17143 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
17144 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
17145 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
17146 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
17147 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
17148 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
17149 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
17150 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
17151 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
17152 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
17153 "\x00\x21\x42\x63",
17154 .ilen = 4100,
17155 .result =
17156 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
17157 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
17158 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
17159 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
17160 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
17161 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
17162 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
17163 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
17164 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
17165 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
17166 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
17167 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
17168 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
17169 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
17170 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
17171 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
17172 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
17173 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
17174 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
17175 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
17176 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
17177 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
17178 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
17179 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
17180 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
17181 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
17182 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
17183 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
17184 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
17185 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
17186 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
17187 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
17188 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
17189 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
17190 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
17191 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
17192 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
17193 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
17194 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
17195 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
17196 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
17197 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
17198 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
17199 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
17200 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
17201 "\x04\x02\xef\xd3\x44\xde\x76\x31"
17202 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
17203 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
17204 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
17205 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
17206 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
17207 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
17208 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
17209 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
17210 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
17211 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
17212 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
17213 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
17214 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
17215 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
17216 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
17217 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
17218 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
17219 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
17220 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
17221 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
17222 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
17223 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
17224 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
17225 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
17226 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
17227 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
17228 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
17229 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
17230 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
17231 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
17232 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
17233 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
17234 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
17235 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
17236 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
17237 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
17238 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
17239 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
17240 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
17241 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
17242 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
17243 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
17244 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
17245 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
17246 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
17247 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
17248 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
17249 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
17250 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
17251 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
17252 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
17253 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
17254 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
17255 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
17256 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
17257 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
17258 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
17259 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
17260 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
17261 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
17262 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
17263 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
17264 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
17265 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
17266 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
17267 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
17268 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
17269 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
17270 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
17271 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
17272 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
17273 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
17274 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
17275 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
17276 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
17277 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
17278 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
17279 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
17280 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
17281 "\x26\x39\x83\x94\xef\x27\xd8\x53"
17282 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
17283 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
17284 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
17285 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
17286 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
17287 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
17288 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
17289 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
17290 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
17291 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
17292 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
17293 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
17294 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
17295 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
17296 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
17297 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
17298 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
17299 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
17300 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
17301 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
17302 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
17303 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
17304 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
17305 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
17306 "\x35\x12\xe3\x36\x28\x27\x36\x58"
17307 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
17308 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
17309 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
17310 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
17311 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
17312 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
17313 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
17314 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
17315 "\x89\xf3\x78\x35\x44\x62\x78\x72"
17316 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
17317 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
17318 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
17319 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
17320 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
17321 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
17322 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
17323 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
17324 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
17325 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
17326 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
17327 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
17328 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
17329 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
17330 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
17331 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
17332 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
17333 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
17334 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
17335 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
17336 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
17337 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
17338 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
17339 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
17340 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
17341 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
17342 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
17343 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
17344 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
17345 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
17346 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
17347 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
17348 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
17349 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
17350 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
17351 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
17352 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
17353 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
17354 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
17355 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
17356 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
17357 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
17358 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
17359 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
17360 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
17361 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
17362 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
17363 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
17364 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
17365 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
17366 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
17367 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
17368 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
17369 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
17370 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
17371 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
17372 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
17373 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
17374 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
17375 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
17376 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
17377 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
17378 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
17379 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
17380 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
17381 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
17382 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
17383 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
17384 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
17385 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
17386 "\x29\x90\x46\x30\x92\x69\x7d\x13"
17387 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
17388 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
17389 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
17390 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
17391 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
17392 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
17393 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
17394 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
17395 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
17396 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
17397 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
17398 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
17399 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
17400 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
17401 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
17402 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
17403 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
17404 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
17405 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
17406 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
17407 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
17408 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
17409 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
17410 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
17411 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
17412 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
17413 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
17414 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
17415 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
17416 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
17417 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
17418 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
17419 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
17420 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
17421 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
17422 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
17423 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
17424 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
17425 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
17426 "\x73\x02\x3b\x78\x21\x72\x43\x00"
17427 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
17428 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
17429 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
17430 "\x11\x94\x13\x69\x51\x09\x28\xde"
17431 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
17432 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
17433 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
17434 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
17435 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
17436 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
17437 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
17438 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
17439 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
17440 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
17441 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
17442 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
17443 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
17444 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
17445 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
17446 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
17447 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
17448 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
17449 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
17450 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
17451 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
17452 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
17453 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
17454 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
17455 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
17456 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
17457 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
17458 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
17459 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
17460 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
17461 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
17462 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
17463 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
17464 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
17465 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
17466 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
17467 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
17468 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
17469 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
17470 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
17471 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
17472 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
17473 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
17474 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
17475 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
17476 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
17477 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
17478 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
17479 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
17480 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
17481 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
17482 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
17483 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
17484 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
17485 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
17486 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
17487 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
17488 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
17489 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
17490 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
17491 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
17492 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
17493 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
17494 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
17495 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
17496 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
17497 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
17498 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
17499 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
17500 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
17501 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
17502 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
17503 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
17504 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
17505 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
17506 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
17507 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
17508 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
17509 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
17510 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
17511 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
17512 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
17513 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
17514 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
17515 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
17516 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
17517 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
17518 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
17519 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
17520 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
17521 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
17522 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
17523 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
17524 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
17525 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
17526 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
17527 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
17528 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
17529 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
17530 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
17531 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
17532 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
17533 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
17534 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
17535 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
17536 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
17537 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
17538 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
17539 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
17540 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
17541 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
17542 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
17543 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
17544 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
17545 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
17546 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
17547 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
17548 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
17549 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
17550 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
17551 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
17552 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
17553 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
17554 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
17555 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
17556 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
17557 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
17558 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
17559 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
17560 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
17561 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
17562 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
17563 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
17564 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
17565 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
17566 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
17567 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
17568 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
17569 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
17570 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
17571 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
17572 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
17573 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
17574 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
17575 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
17576 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
17577 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
17578 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
17579 "\xae\xed\x39\x88\x42\x11\x3c\xed"
17580 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
17581 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
17582 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
17583 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
17584 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
17585 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
17586 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
17587 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
17588 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
17589 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
17590 "\x34\x17\xde\xba\x47\xf1\x06\x18"
17591 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
17592 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
17593 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
17594 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
17595 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
17596 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
17597 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
17598 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
17599 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
17600 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
17601 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
17602 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
17603 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
17604 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
17605 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
17606 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
17607 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
17608 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
17609 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
17610 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
17611 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
17612 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
17613 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
17614 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
17615 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
17616 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
17617 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
17618 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
17619 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
17620 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
17621 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
17622 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
17623 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
17624 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
17625 "\x74\x56\x58\x40\x02\x37\x52\x2c"
17626 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
17627 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
17628 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
17629 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
17630 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
17631 "\xed\x38\x80\x36\x72\x43\x27\x49"
17632 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
17633 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
17634 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
17635 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
17636 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
17637 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
17638 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
17639 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
17640 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
17641 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
17642 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
17643 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
17644 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
17645 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
17646 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
17647 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
17648 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
17649 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
17650 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
17651 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
17652 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
17653 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
17654 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
17655 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
17656 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
17657 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
17658 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
17659 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
17660 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
17661 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
17662 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
17663 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
17664 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
17665 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
17666 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
17667 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
17668 "\x21\xed\xda\x86",
17669 .rlen = 4100,
17670 .np = 2,
17671 .tap = { 4064, 36 },
17672 },
17673};
17674
Jarod Wilsonf7cb80f2009-05-06 17:29:17 +080017675static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
Herbert Xuda7f0332008-07-31 17:08:25 +080017676 { /* From RFC 3686 */
17677 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
17678 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
17679 "\x00\x00\x00\x30",
17680 .klen = 20,
17681 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
17682 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
17683 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
17684 .ilen = 16,
17685 .result = "Single block msg",
17686 .rlen = 16,
17687 }, {
17688 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
17689 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
17690 "\x00\x6c\xb6\xdb",
17691 .klen = 20,
17692 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
17693 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
17694 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
17695 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
17696 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
17697 .ilen = 32,
17698 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17699 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17700 "\x10\x11\x12\x13\x14\x15\x16\x17"
17701 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
17702 .rlen = 32,
17703 }, {
17704 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
17705 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
17706 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
17707 "\x00\x00\x00\x48",
17708 .klen = 28,
17709 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
17710 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
17711 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
17712 .ilen = 16,
17713 .result = "Single block msg",
17714 .rlen = 16,
17715 }, {
17716 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
17717 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
17718 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
17719 "\x00\x96\xb0\x3b",
17720 .klen = 28,
17721 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
17722 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
17723 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
17724 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
17725 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
17726 .ilen = 32,
17727 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17728 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17729 "\x10\x11\x12\x13\x14\x15\x16\x17"
17730 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
17731 .rlen = 32,
17732 }, {
17733 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
17734 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
17735 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
17736 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
17737 "\x00\x00\x00\x60",
17738 .klen = 36,
17739 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
17740 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
17741 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
17742 .ilen = 16,
17743 .result = "Single block msg",
17744 .rlen = 16,
17745 }, {
17746 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
17747 "\x07\x96\x36\x58\x79\xef\xf8\x86"
17748 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
17749 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
17750 "\x00\xfa\xac\x24",
17751 .klen = 36,
17752 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
17753 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
17754 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
17755 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
17756 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
17757 .ilen = 32,
17758 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17759 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17760 "\x10\x11\x12\x13\x14\x15\x16\x17"
17761 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
17762 .rlen = 32,
17763 },
17764};
17765
Puneet Saxenaba0e14a2011-05-04 15:04:10 +100017766static struct cipher_testvec aes_ofb_enc_tv_template[] = {
17767 /* From NIST Special Publication 800-38A, Appendix F.5 */
17768 {
17769 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17770 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17771 .klen = 16,
17772 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
17773 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
17774 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17775 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17776 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17777 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17778 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17779 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17780 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17781 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17782 .ilen = 64,
17783 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
17784 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
17785 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
17786 "\x3c\x52\xda\xc5\x4e\xd8\x25"
17787 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
17788 "\x44\xf7\xa8\x22\x60\xed\xcc"
17789 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
17790 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
17791 .rlen = 64,
17792 }
17793};
17794
17795static struct cipher_testvec aes_ofb_dec_tv_template[] = {
17796 /* From NIST Special Publication 800-38A, Appendix F.5 */
17797 {
17798 .key = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17799 "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17800 .klen = 16,
17801 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
17802 "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
17803 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
17804 "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
17805 "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
17806 "\x3c\x52\xda\xc5\x4e\xd8\x25"
17807 "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
17808 "\x44\xf7\xa8\x22\x60\xed\xcc"
17809 "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
17810 "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
17811 .ilen = 64,
17812 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17813 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17814 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17815 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17816 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17817 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17818 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17819 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17820 .rlen = 64,
17821 }
17822};
17823
Herbert Xuda7f0332008-07-31 17:08:25 +080017824static struct aead_testvec aes_gcm_enc_tv_template[] = {
17825 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
17826 .key = zeroed_string,
17827 .klen = 16,
17828 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
17829 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
17830 .rlen = 16,
17831 }, {
17832 .key = zeroed_string,
17833 .klen = 16,
17834 .input = zeroed_string,
17835 .ilen = 16,
17836 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
17837 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
17838 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
17839 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
17840 .rlen = 32,
17841 }, {
17842 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17843 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
17844 .klen = 16,
17845 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17846 "\xde\xca\xf8\x88",
17847 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17848 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17849 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17850 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17851 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17852 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17853 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17854 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
17855 .ilen = 64,
17856 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
17857 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
17858 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
17859 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
17860 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
17861 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
17862 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
17863 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
17864 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
17865 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
17866 .rlen = 80,
17867 }, {
17868 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17869 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
17870 .klen = 16,
17871 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17872 "\xde\xca\xf8\x88",
17873 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17874 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17875 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17876 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17877 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17878 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17879 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17880 "\xba\x63\x7b\x39",
17881 .ilen = 60,
17882 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17883 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17884 "\xab\xad\xda\xd2",
17885 .alen = 20,
17886 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
17887 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
17888 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
17889 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
17890 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
17891 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
17892 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
17893 "\x3d\x58\xe0\x91"
17894 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
17895 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
17896 .rlen = 76,
17897 }, {
17898 .key = zeroed_string,
17899 .klen = 24,
17900 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
17901 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
17902 .rlen = 16,
17903 }, {
17904 .key = zeroed_string,
17905 .klen = 24,
17906 .input = zeroed_string,
17907 .ilen = 16,
17908 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
17909 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
17910 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
17911 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
17912 .rlen = 32,
17913 }, {
17914 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17915 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17916 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
17917 .klen = 24,
17918 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17919 "\xde\xca\xf8\x88",
17920 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17921 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17922 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17923 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17924 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17925 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17926 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17927 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
17928 .ilen = 64,
17929 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
17930 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
17931 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
17932 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
17933 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
17934 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
17935 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
17936 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
17937 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
17938 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
17939 .rlen = 80,
17940 }, {
17941 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17942 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17943 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
17944 .klen = 24,
17945 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
17946 "\xde\xca\xf8\x88",
17947 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
17948 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
17949 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
17950 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
17951 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
17952 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
17953 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
17954 "\xba\x63\x7b\x39",
17955 .ilen = 60,
17956 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17957 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
17958 "\xab\xad\xda\xd2",
17959 .alen = 20,
17960 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
17961 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
17962 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
17963 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
17964 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
17965 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
17966 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
17967 "\xcc\xda\x27\x10"
17968 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
17969 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
17970 .rlen = 76,
17971 .np = 2,
17972 .tap = { 32, 28 },
17973 .anp = 2,
17974 .atap = { 8, 12 }
17975 }, {
17976 .key = zeroed_string,
17977 .klen = 32,
17978 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
17979 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
17980 .rlen = 16,
17981 }
17982};
17983
17984static struct aead_testvec aes_gcm_dec_tv_template[] = {
17985 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
17986 .key = zeroed_string,
17987 .klen = 32,
17988 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
17989 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
17990 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
17991 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
17992 .ilen = 32,
17993 .result = zeroed_string,
17994 .rlen = 16,
17995 }, {
17996 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17997 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
17998 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
17999 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
18000 .klen = 32,
18001 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
18002 "\xde\xca\xf8\x88",
18003 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
18004 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
18005 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
18006 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
18007 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
18008 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
18009 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
18010 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
18011 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
18012 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
18013 .ilen = 80,
18014 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
18015 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
18016 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
18017 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
18018 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
18019 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
18020 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
18021 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
18022 .rlen = 64,
18023 }, {
18024 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18025 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18026 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18027 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
18028 .klen = 32,
18029 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
18030 "\xde\xca\xf8\x88",
18031 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
18032 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
18033 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
18034 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
18035 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
18036 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
18037 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
18038 "\xbc\xc9\xf6\x62"
18039 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
18040 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
18041 .ilen = 76,
18042 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
18043 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
18044 "\xab\xad\xda\xd2",
18045 .alen = 20,
18046 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
18047 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
18048 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
18049 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
18050 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
18051 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
18052 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
18053 "\xba\x63\x7b\x39",
18054 .rlen = 60,
18055 .np = 2,
18056 .tap = { 48, 28 },
18057 .anp = 3,
18058 .atap = { 8, 8, 4 }
18059 }, {
18060 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18061 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
18062 .klen = 16,
18063 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
18064 "\xde\xca\xf8\x88",
18065 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
18066 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
18067 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
18068 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
18069 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
18070 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
18071 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
18072 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
18073 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
18074 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
18075 .ilen = 80,
18076 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
18077 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
18078 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
18079 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
18080 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
18081 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
18082 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
18083 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
18084 .rlen = 64,
18085 }, {
18086 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18087 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
18088 .klen = 16,
18089 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
18090 "\xde\xca\xf8\x88",
18091 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
18092 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
18093 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
18094 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
18095 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
18096 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
18097 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
18098 "\x3d\x58\xe0\x91"
18099 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
18100 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
18101 .ilen = 76,
18102 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
18103 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
18104 "\xab\xad\xda\xd2",
18105 .alen = 20,
18106 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
18107 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
18108 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
18109 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
18110 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
18111 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
18112 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
18113 "\xba\x63\x7b\x39",
18114 .rlen = 60,
18115 }, {
18116 .key = zeroed_string,
18117 .klen = 24,
18118 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
18119 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
18120 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
18121 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
18122 .ilen = 32,
18123 .result = zeroed_string,
18124 .rlen = 16,
18125 }, {
18126 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18127 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18128 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
18129 .klen = 24,
18130 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
18131 "\xde\xca\xf8\x88",
18132 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
18133 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
18134 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
18135 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
18136 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
18137 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
18138 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
18139 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
18140 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
18141 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
18142 .ilen = 80,
18143 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
18144 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
18145 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
18146 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
18147 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
18148 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
18149 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
18150 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
18151 .rlen = 64,
18152 }, {
18153 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18154 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18155 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
18156 .klen = 24,
18157 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
18158 "\xde\xca\xf8\x88",
18159 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
18160 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
18161 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
18162 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
18163 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
18164 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
18165 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
18166 "\xcc\xda\x27\x10"
18167 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
18168 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
18169 .ilen = 76,
18170 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
18171 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
18172 "\xab\xad\xda\xd2",
18173 .alen = 20,
18174 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
18175 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
18176 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
18177 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
18178 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
18179 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
18180 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
18181 "\xba\x63\x7b\x39",
18182 .rlen = 60,
18183 }
18184};
18185
Adrian Hoban69435b92010-11-04 15:02:04 -040018186static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
18187 { /* Generated using Crypto++ */
18188 .key = zeroed_string,
18189 .klen = 20,
18190 .iv = zeroed_string,
18191 .input = zeroed_string,
18192 .ilen = 16,
18193 .assoc = zeroed_string,
18194 .alen = 8,
18195 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
18196 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
18197 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
18198 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
18199 .rlen = 32,
18200 },{
18201 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18202 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18203 "\x00\x00\x00\x00",
18204 .klen = 20,
18205 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
18206 "\x00\x00\x00\x00",
18207 .input = zeroed_string,
18208 .ilen = 16,
18209 .assoc = zeroed_string,
18210 .alen = 8,
18211 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
18212 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
18213 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
18214 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
18215 .rlen = 32,
18216
18217 }, {
18218 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18219 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18220 "\x00\x00\x00\x00",
18221 .klen = 20,
18222 .iv = zeroed_string,
18223 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
18224 "\x01\x01\x01\x01\x01\x01\x01\x01",
18225 .ilen = 16,
18226 .assoc = zeroed_string,
18227 .alen = 8,
18228 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
18229 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
18230 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
18231 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
18232 .rlen = 32,
18233 }, {
18234 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18235 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18236 "\x00\x00\x00\x00",
18237 .klen = 20,
18238 .iv = zeroed_string,
18239 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
18240 "\x01\x01\x01\x01\x01\x01\x01\x01",
18241 .ilen = 16,
18242 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
18243 .alen = 8,
18244 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
18245 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
18246 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
18247 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
18248 .rlen = 32,
18249 }, {
18250 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18251 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18252 "\x00\x00\x00\x00",
18253 .klen = 20,
18254 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
18255 "\x00\x00\x00\x00",
18256 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
18257 "\x01\x01\x01\x01\x01\x01\x01\x01",
18258 .ilen = 16,
18259 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
18260 .alen = 8,
18261 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
18262 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
18263 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
18264 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
18265 .rlen = 32,
18266 }, {
18267 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18268 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18269 "\x00\x00\x00\x00",
18270 .klen = 20,
18271 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
18272 "\x00\x00\x00\x00",
18273 .input = "\x01\x01\x01\x01\x01\x01\x01\x01"
18274 "\x01\x01\x01\x01\x01\x01\x01\x01"
18275 "\x01\x01\x01\x01\x01\x01\x01\x01"
18276 "\x01\x01\x01\x01\x01\x01\x01\x01"
18277 "\x01\x01\x01\x01\x01\x01\x01\x01"
18278 "\x01\x01\x01\x01\x01\x01\x01\x01"
18279 "\x01\x01\x01\x01\x01\x01\x01\x01"
18280 "\x01\x01\x01\x01\x01\x01\x01\x01",
18281 .ilen = 64,
18282 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
18283 .alen = 8,
18284 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
18285 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
18286 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
18287 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
18288 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
18289 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
18290 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
18291 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
18292 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
18293 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
18294 .rlen = 80,
18295 }, {
18296 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
18297 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18298 "\x00\x00\x00\x00",
18299 .klen = 20,
18300 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
18301 "\x00\x00\x00\x00",
18302 .input = "\xff\xff\xff\xff\xff\xff\xff\xff"
18303 "\xff\xff\xff\xff\xff\xff\xff\xff"
18304 "\xff\xff\xff\xff\xff\xff\xff\xff"
18305 "\xff\xff\xff\xff\xff\xff\xff\xff"
18306 "\xff\xff\xff\xff\xff\xff\xff\xff"
18307 "\xff\xff\xff\xff\xff\xff\xff\xff"
18308 "\xff\xff\xff\xff\xff\xff\xff\xff"
18309 "\xff\xff\xff\xff\xff\xff\xff\xff"
18310 "\xff\xff\xff\xff\xff\xff\xff\xff"
18311 "\xff\xff\xff\xff\xff\xff\xff\xff"
18312 "\xff\xff\xff\xff\xff\xff\xff\xff"
18313 "\xff\xff\xff\xff\xff\xff\xff\xff"
18314 "\xff\xff\xff\xff\xff\xff\xff\xff"
18315 "\xff\xff\xff\xff\xff\xff\xff\xff"
18316 "\xff\xff\xff\xff\xff\xff\xff\xff"
18317 "\xff\xff\xff\xff\xff\xff\xff\xff"
18318 "\xff\xff\xff\xff\xff\xff\xff\xff"
18319 "\xff\xff\xff\xff\xff\xff\xff\xff"
18320 "\xff\xff\xff\xff\xff\xff\xff\xff"
18321 "\xff\xff\xff\xff\xff\xff\xff\xff"
18322 "\xff\xff\xff\xff\xff\xff\xff\xff"
18323 "\xff\xff\xff\xff\xff\xff\xff\xff"
18324 "\xff\xff\xff\xff\xff\xff\xff\xff"
18325 "\xff\xff\xff\xff\xff\xff\xff\xff",
18326 .ilen = 192,
18327 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
18328 "\xaa\xaa\xaa\xaa",
18329 .alen = 12,
18330 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
18331 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
18332 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
18333 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
18334 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
18335 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
18336 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
18337 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
18338 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
18339 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
18340 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
18341 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
18342 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
18343 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
18344 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
18345 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
18346 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
18347 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
18348 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
18349 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
18350 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
18351 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
18352 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
18353 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
18354 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
18355 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
18356 .rlen = 208,
18357 }
18358};
18359
18360static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
18361 { /* Generated using Crypto++ */
18362 .key = zeroed_string,
18363 .klen = 20,
18364 .iv = zeroed_string,
18365 .input = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
18366 "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
18367 "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
18368 "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
18369 .ilen = 32,
18370 .assoc = zeroed_string,
18371 .alen = 8,
18372 .result = zeroed_string,
18373 .rlen = 16,
18374
18375 },{
18376 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18377 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18378 "\x00\x00\x00\x00",
18379 .klen = 20,
18380 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
18381 "\x00\x00\x00\x00",
18382 .input = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
18383 "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
18384 "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
18385 "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
18386 .ilen = 32,
18387 .assoc = zeroed_string,
18388 .alen = 8,
18389 .result = zeroed_string,
18390 .rlen = 16,
18391 }, {
18392 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18393 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18394 "\x00\x00\x00\x00",
18395 .klen = 20,
18396 .iv = zeroed_string,
18397 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
18398 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
18399 "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
18400 "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
18401 .ilen = 32,
18402 .assoc = zeroed_string,
18403 .alen = 8,
18404 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
18405 "\x01\x01\x01\x01\x01\x01\x01\x01",
18406 .rlen = 16,
18407 }, {
18408 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18409 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18410 "\x00\x00\x00\x00",
18411 .klen = 20,
18412 .iv = zeroed_string,
18413 .input = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
18414 "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
18415 "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
18416 "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
18417 .ilen = 32,
18418 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
18419 .alen = 8,
18420 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
18421 "\x01\x01\x01\x01\x01\x01\x01\x01",
18422 .rlen = 16,
18423
18424 }, {
18425 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18426 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18427 "\x00\x00\x00\x00",
18428 .klen = 20,
18429 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
18430 "\x00\x00\x00\x00",
18431 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
18432 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
18433 "\x64\x50\xF9\x32\x13\xFB\x74\x61"
18434 "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
18435 .ilen = 32,
18436 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
18437 .alen = 8,
18438 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
18439 "\x01\x01\x01\x01\x01\x01\x01\x01",
18440 .rlen = 16,
18441 }, {
18442 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
18443 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
18444 "\x00\x00\x00\x00",
18445 .klen = 20,
18446 .iv = "\x00\x00\x00\x00\x00\x00\x00\x01"
18447 "\x00\x00\x00\x00",
18448 .input = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
18449 "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
18450 "\x98\x14\xA1\x42\x37\x80\xFD\x90"
18451 "\x68\x12\x01\xA8\x91\x89\xB9\x83"
18452 "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
18453 "\x94\x5F\x18\x12\xBA\x27\x09\x39"
18454 "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
18455 "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
18456 "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
18457 "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
18458 .ilen = 80,
18459 .assoc = "\x01\x01\x01\x01\x01\x01\x01\x01",
18460 .alen = 8,
18461 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
18462 "\x01\x01\x01\x01\x01\x01\x01\x01"
18463 "\x01\x01\x01\x01\x01\x01\x01\x01"
18464 "\x01\x01\x01\x01\x01\x01\x01\x01"
18465 "\x01\x01\x01\x01\x01\x01\x01\x01"
18466 "\x01\x01\x01\x01\x01\x01\x01\x01"
18467 "\x01\x01\x01\x01\x01\x01\x01\x01"
18468 "\x01\x01\x01\x01\x01\x01\x01\x01",
18469 .rlen = 64,
18470 }, {
18471 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
18472 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18473 "\x00\x00\x00\x00",
18474 .klen = 20,
18475 .iv = "\x00\x00\x45\x67\x89\xab\xcd\xef"
18476 "\x00\x00\x00\x00",
18477 .input = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
18478 "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
18479 "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
18480 "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
18481 "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
18482 "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
18483 "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
18484 "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
18485 "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
18486 "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
18487 "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
18488 "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
18489 "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
18490 "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
18491 "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
18492 "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
18493 "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
18494 "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
18495 "\x7E\x13\x06\x82\x08\x17\xA4\x35"
18496 "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
18497 "\xA3\x05\x38\x95\x20\x1A\x47\x04"
18498 "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
18499 "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
18500 "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
18501 "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
18502 "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
18503 .ilen = 208,
18504 .assoc = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
18505 "\xaa\xaa\xaa\xaa",
18506 .alen = 12,
18507 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
18508 "\xff\xff\xff\xff\xff\xff\xff\xff"
18509 "\xff\xff\xff\xff\xff\xff\xff\xff"
18510 "\xff\xff\xff\xff\xff\xff\xff\xff"
18511 "\xff\xff\xff\xff\xff\xff\xff\xff"
18512 "\xff\xff\xff\xff\xff\xff\xff\xff"
18513 "\xff\xff\xff\xff\xff\xff\xff\xff"
18514 "\xff\xff\xff\xff\xff\xff\xff\xff"
18515 "\xff\xff\xff\xff\xff\xff\xff\xff"
18516 "\xff\xff\xff\xff\xff\xff\xff\xff"
18517 "\xff\xff\xff\xff\xff\xff\xff\xff"
18518 "\xff\xff\xff\xff\xff\xff\xff\xff"
18519 "\xff\xff\xff\xff\xff\xff\xff\xff"
18520 "\xff\xff\xff\xff\xff\xff\xff\xff"
18521 "\xff\xff\xff\xff\xff\xff\xff\xff"
18522 "\xff\xff\xff\xff\xff\xff\xff\xff"
18523 "\xff\xff\xff\xff\xff\xff\xff\xff"
18524 "\xff\xff\xff\xff\xff\xff\xff\xff"
18525 "\xff\xff\xff\xff\xff\xff\xff\xff"
18526 "\xff\xff\xff\xff\xff\xff\xff\xff"
18527 "\xff\xff\xff\xff\xff\xff\xff\xff"
18528 "\xff\xff\xff\xff\xff\xff\xff\xff"
18529 "\xff\xff\xff\xff\xff\xff\xff\xff"
18530 "\xff\xff\xff\xff\xff\xff\xff\xff",
18531 .rlen = 192,
18532
18533 }
18534};
18535
Jussi Kivilinnae9b74412013-04-07 16:43:51 +030018536static struct aead_testvec aes_gcm_rfc4543_enc_tv_template[] = {
18537 { /* From draft-mcgrew-gcm-test-01 */
18538 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
18539 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
18540 "\x22\x43\x3c\x64",
18541 .klen = 20,
18542 .iv = zeroed_string,
18543 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07",
18544 .alen = 8,
18545 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
18546 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
18547 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
18548 "\x02\x00\x07\x00\x61\x62\x63\x64"
18549 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
18550 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
18551 "\x01\x02\x02\x01",
18552 .ilen = 52,
18553 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
18554 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
18555 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
18556 "\x02\x00\x07\x00\x61\x62\x63\x64"
18557 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
18558 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
18559 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
18560 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
18561 "\xe4\x09\x9a\xaa",
18562 .rlen = 68,
18563 }
18564};
18565
18566static struct aead_testvec aes_gcm_rfc4543_dec_tv_template[] = {
18567 { /* From draft-mcgrew-gcm-test-01 */
18568 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
18569 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
18570 "\x22\x43\x3c\x64",
18571 .klen = 20,
18572 .iv = zeroed_string,
18573 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07",
18574 .alen = 8,
18575 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
18576 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
18577 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
18578 "\x02\x00\x07\x00\x61\x62\x63\x64"
18579 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
18580 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
18581 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
18582 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
18583 "\xe4\x09\x9a\xaa",
18584 .ilen = 68,
18585 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
18586 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
18587 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
18588 "\x02\x00\x07\x00\x61\x62\x63\x64"
18589 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
18590 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
18591 "\x01\x02\x02\x01",
18592 .rlen = 52,
18593 }, { /* nearly same as previous, but should fail */
18594 .key = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
18595 "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
18596 "\x22\x43\x3c\x64",
18597 .klen = 20,
18598 .iv = zeroed_string,
18599 .assoc = "\x00\x00\x43\x21\x00\x00\x00\x07",
18600 .alen = 8,
18601 .input = "\x45\x00\x00\x30\xda\x3a\x00\x00"
18602 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
18603 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
18604 "\x02\x00\x07\x00\x61\x62\x63\x64"
18605 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
18606 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
18607 "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
18608 "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
18609 "\x00\x00\x00\x00",
18610 .ilen = 68,
18611 .novrfy = 1,
18612 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
18613 "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
18614 "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
18615 "\x02\x00\x07\x00\x61\x62\x63\x64"
18616 "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
18617 "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
18618 "\x01\x02\x02\x01",
18619 .rlen = 52,
18620 },
18621};
18622
Herbert Xuda7f0332008-07-31 17:08:25 +080018623static struct aead_testvec aes_ccm_enc_tv_template[] = {
18624 { /* From RFC 3610 */
18625 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18626 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18627 .klen = 16,
18628 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
18629 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18630 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
18631 .alen = 8,
18632 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18633 "\x10\x11\x12\x13\x14\x15\x16\x17"
18634 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
18635 .ilen = 23,
18636 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
18637 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
18638 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
18639 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
18640 .rlen = 31,
18641 }, {
18642 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18643 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18644 .klen = 16,
18645 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
18646 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18647 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
18648 "\x08\x09\x0a\x0b",
18649 .alen = 12,
18650 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
18651 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
18652 "\x1c\x1d\x1e\x1f",
18653 .ilen = 20,
18654 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
18655 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
18656 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
18657 "\x7d\x9c\x2d\x93",
18658 .rlen = 28,
18659 }, {
18660 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18661 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18662 .klen = 16,
18663 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
18664 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18665 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
18666 .alen = 8,
18667 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18668 "\x10\x11\x12\x13\x14\x15\x16\x17"
18669 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18670 "\x20",
18671 .ilen = 25,
18672 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
18673 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
18674 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
18675 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
18676 "\x7e\x5f\x4e",
18677 .rlen = 35,
18678 }, {
18679 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18680 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18681 .klen = 16,
18682 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
18683 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18684 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
18685 "\x08\x09\x0a\x0b",
18686 .alen = 12,
18687 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
18688 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
18689 "\x1c\x1d\x1e",
18690 .ilen = 19,
18691 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
18692 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
18693 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
18694 "\x4d\x99\x99\x88\xdd",
18695 .rlen = 29,
18696 }, {
18697 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
18698 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
18699 .klen = 16,
18700 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
18701 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
18702 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
18703 .alen = 8,
18704 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
18705 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
18706 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
18707 .ilen = 24,
18708 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
18709 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
18710 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
18711 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
18712 .rlen = 32,
18713 }, {
18714 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
18715 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
18716 .klen = 16,
18717 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
18718 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
18719 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
18720 "\x20\xea\x60\xc0",
18721 .alen = 12,
18722 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
18723 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
18724 "\x3a\x80\x3b\xa8\x7f",
18725 .ilen = 21,
18726 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
18727 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
18728 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
18729 "\x5a\xe0\x70\x45\x51",
18730 .rlen = 29,
18731 }, {
18732 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
18733 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
18734 .klen = 16,
18735 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
18736 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
18737 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
18738 .alen = 8,
18739 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
18740 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
18741 "\x98\x09\xd6\x7d\xbe\xdd\x18",
18742 .ilen = 23,
18743 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
18744 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
18745 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
18746 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
18747 "\xba",
18748 .rlen = 33,
18749 },
18750};
18751
18752static struct aead_testvec aes_ccm_dec_tv_template[] = {
18753 { /* From RFC 3610 */
18754 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18755 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18756 .klen = 16,
18757 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
18758 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18759 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
18760 .alen = 8,
18761 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
18762 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
18763 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
18764 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
18765 .ilen = 31,
18766 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18767 "\x10\x11\x12\x13\x14\x15\x16\x17"
18768 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
18769 .rlen = 23,
18770 }, {
18771 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18772 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18773 .klen = 16,
18774 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
18775 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18776 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
18777 "\x08\x09\x0a\x0b",
18778 .alen = 12,
18779 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
18780 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
18781 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
18782 "\x7d\x9c\x2d\x93",
18783 .ilen = 28,
18784 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
18785 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
18786 "\x1c\x1d\x1e\x1f",
18787 .rlen = 20,
18788 }, {
18789 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18790 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18791 .klen = 16,
18792 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
18793 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18794 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
18795 .alen = 8,
18796 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
18797 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
18798 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
18799 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
18800 "\x7e\x5f\x4e",
18801 .ilen = 35,
18802 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18803 "\x10\x11\x12\x13\x14\x15\x16\x17"
18804 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18805 "\x20",
18806 .rlen = 25,
18807 }, {
18808 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18809 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
18810 .klen = 16,
18811 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
18812 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
18813 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
18814 "\x08\x09\x0a\x0b",
18815 .alen = 12,
18816 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
18817 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
18818 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
18819 "\x4d\x99\x99\x88\xdd",
18820 .ilen = 29,
18821 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
18822 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
18823 "\x1c\x1d\x1e",
18824 .rlen = 19,
18825 }, {
18826 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
18827 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
18828 .klen = 16,
18829 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
18830 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
18831 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
18832 .alen = 8,
18833 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
18834 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
18835 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
18836 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
18837 .ilen = 32,
18838 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
18839 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
18840 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
18841 .rlen = 24,
18842 }, {
18843 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
18844 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
18845 .klen = 16,
18846 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
18847 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
18848 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
18849 "\x20\xea\x60\xc0",
18850 .alen = 12,
18851 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
18852 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
18853 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
18854 "\x5a\xe0\x70\x45\x51",
18855 .ilen = 29,
18856 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
18857 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
18858 "\x3a\x80\x3b\xa8\x7f",
18859 .rlen = 21,
18860 }, {
18861 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
18862 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
18863 .klen = 16,
18864 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
18865 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
18866 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
18867 .alen = 8,
18868 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
18869 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
18870 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
18871 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
18872 "\xba",
18873 .ilen = 33,
18874 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
18875 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
18876 "\x98\x09\xd6\x7d\xbe\xdd\x18",
18877 .rlen = 23,
18878 },
18879};
18880
Jarod Wilson5d667322009-05-04 19:23:40 +080018881/*
18882 * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
18883 * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
18884 * Special Publication 800-38C's test vectors also use nonce lengths our
18885 * implementation doesn't support. The following are taken from fips cavs
18886 * fax files on hand at Red Hat.
18887 *
18888 * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
18889 * part of the nonce which combine w/the iv, but need to be input this way.
18890 */
18891static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
18892 {
18893 .key = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
18894 "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
18895 "\x96\xac\x59",
18896 .klen = 19,
18897 .iv = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
18898 .alen = 0,
18899 .input = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
18900 "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
18901 "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
18902 "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
18903 .ilen = 32,
18904 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
18905 "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
18906 "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
18907 "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
18908 "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
18909 "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
18910 .rlen = 48,
18911 }, {
18912 .key = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
18913 "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
18914 "\x4f\xa3\x19",
18915 .klen = 19,
18916 .iv = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
18917 .assoc = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
18918 "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
18919 "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
18920 "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
18921 .alen = 32,
18922 .input = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
18923 "\xa9\x28\x63\xba\x12\xa3\x14\x85"
18924 "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
18925 "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
18926 .ilen = 32,
18927 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
18928 "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
18929 "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
18930 "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
18931 "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
18932 "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
18933 .rlen = 48,
18934 }, {
18935 .key = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
18936 "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
18937 "\x53\x14\x73\x66\x8d\x88\xf6\x80"
18938 "\xa0\x20\x35",
18939 .klen = 27,
18940 .iv = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
18941 .assoc = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
18942 "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
18943 "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
18944 "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
18945 .alen = 32,
18946 .ilen = 0,
18947 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
18948 "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
18949 .rlen = 16,
18950 }, {
18951 .key = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
18952 "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
18953 "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
18954 "\xd6\x3c\x8c",
18955 .klen = 27,
18956 .iv = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
18957 .assoc = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
18958 "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
18959 "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
18960 "\xe3\x00\x73\x69\x84\x69\x87\x79",
18961 .alen = 32,
18962 .input = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
18963 "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
18964 "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
18965 "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
18966 .ilen = 32,
18967 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
18968 "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
18969 "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
18970 "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
18971 "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
18972 "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
18973 .rlen = 48,
18974 }, {
18975 .key = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
18976 "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
18977 "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
18978 "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
18979 "\x1e\x29\x91",
18980 .klen = 35,
18981 .iv = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
18982 .assoc = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
18983 "\x78\x2b\x94\x02\x29\x0f\x42\x27"
18984 "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
18985 "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
18986 .alen = 32,
18987 .input = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
18988 "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
18989 "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
18990 "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
18991 .ilen = 32,
18992 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
18993 "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
18994 "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
18995 "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
18996 "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
18997 .rlen = 40,
18998 }, {
18999 .key = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
19000 "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
19001 "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
19002 "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
19003 "\xf9\xd9\x4e",
19004 .klen = 35,
19005 .iv = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
19006 .assoc = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
19007 "\x13\x02\x01\x0c\x83\x4c\x96\x35"
19008 "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
19009 "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
19010 .alen = 32,
19011 .input = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
19012 "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
19013 "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
19014 "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
19015 .ilen = 32,
19016 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
19017 "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
19018 "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
19019 "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
19020 "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
19021 "\x7b\x72\x8a\xf7",
19022 .rlen = 44,
19023 }, {
19024 .key = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
19025 "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
19026 "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
19027 "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
19028 "\x24\xa7\x8b",
19029 .klen = 35,
19030 .iv = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
19031 .assoc = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
19032 "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
19033 "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
19034 "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
19035 .alen = 32,
19036 .input = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
19037 "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
19038 "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
19039 "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
19040 .ilen = 32,
19041 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
19042 "\xef\xbb\x80\x21\x04\x6c\x58\x09"
19043 "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
19044 "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
19045 "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
19046 "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
19047 .rlen = 48,
19048 },
19049};
19050
19051static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
19052 {
19053 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
19054 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
19055 "\xc6\xfb\x7d",
19056 .klen = 19,
19057 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
19058 .alen = 0,
19059 .input = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
19060 .ilen = 8,
19061 .result = "\x00",
19062 .rlen = 0,
19063 .novrfy = 1,
19064 }, {
19065 .key = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
19066 "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
19067 "\xaf\x94\x87",
19068 .klen = 19,
19069 .iv = "\x78\x35\x82\x81\x7f\x88\x94\x68",
19070 .alen = 0,
19071 .input = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
19072 .ilen = 8,
19073 .result = "\x00",
19074 .rlen = 0,
19075 }, {
19076 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
19077 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
19078 "\xc6\xfb\x7d",
19079 .klen = 19,
19080 .iv = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
19081 .assoc = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
19082 "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
19083 "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
19084 "\xd8\x94\x99\x91\x81\x54\x62\x57",
19085 .alen = 32,
19086 .input = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
19087 "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
19088 "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
19089 "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
19090 "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
19091 "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
19092 .ilen = 48,
19093 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
19094 "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
19095 "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
19096 "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
19097 .rlen = 32,
19098 .novrfy = 1,
19099 }, {
19100 .key = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
19101 "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
19102 "\x05\xe0\xc9",
19103 .klen = 19,
19104 .iv = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
19105 .assoc = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
19106 "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
19107 "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
19108 "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
19109 .alen = 32,
19110 .input = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
19111 "\xad\x83\x52\x6d\x71\x03\x25\x1c"
19112 "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
19113 "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
19114 "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
19115 "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
19116 .ilen = 48,
19117 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
19118 "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
19119 "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
19120 "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
19121 .rlen = 32,
19122 }, {
19123 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
19124 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
19125 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
19126 "\xee\x49\x83",
19127 .klen = 27,
19128 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
19129 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
19130 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
19131 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
19132 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
19133 .alen = 32,
19134 .input = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
19135 .ilen = 8,
19136 .result = "\x00",
19137 .rlen = 0,
19138 }, {
19139 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
19140 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
19141 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
19142 "\xee\x49\x83",
19143 .klen = 27,
19144 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
19145 .assoc = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
19146 "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
19147 "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
19148 "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
19149 .alen = 32,
19150 .input = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
19151 "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
19152 "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
19153 "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
19154 "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
19155 .ilen = 40,
19156 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
19157 "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
19158 "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
19159 "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
19160 .rlen = 32,
19161 }, {
19162 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
19163 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
19164 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
19165 "\xd1\xfc\x57",
19166 .klen = 27,
19167 .iv = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
19168 .assoc = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
19169 "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
19170 "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
19171 "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
19172 .alen = 32,
19173 .input = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
19174 "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
19175 "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
19176 "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
19177 "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
19178 "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
19179 .ilen = 48,
19180 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
19181 "\x99\x2a\xa8\xca\x04\x25\x45\x90"
19182 "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
19183 "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
19184 .rlen = 32,
19185 .novrfy = 1,
19186 }, {
19187 .key = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
19188 "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
19189 "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
19190 "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
19191 "\xee\x49\x83",
19192 .klen = 35,
19193 .iv = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
19194 .alen = 0,
19195 .input = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
19196 .ilen = 8,
19197 .result = "\x00",
19198 .rlen = 0,
19199 }, {
19200 .key = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
19201 "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
19202 "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
19203 "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
19204 "\x85\x34\x66",
19205 .klen = 35,
19206 .iv = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
19207 .alen = 0,
19208 .input = "\x48\x01\x5e\x02\x24\x04\x66\x47"
19209 "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
19210 "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
19211 "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
19212 "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
19213 "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
19214 .ilen = 48,
19215 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
19216 "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
19217 "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
19218 "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
19219 .rlen = 32,
19220 .novrfy = 1,
19221 }, {
19222 .key = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
19223 "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
19224 "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
19225 "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
19226 "\xcf\x76\x3f",
19227 .klen = 35,
19228 .iv = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
19229 .assoc = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
19230 "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
19231 "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
19232 "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
19233 .alen = 32,
19234 .input = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
19235 "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
19236 "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
19237 "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
19238 "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
19239 "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
19240 .ilen = 48,
19241 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
19242 "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
19243 "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
19244 "\x04\x49\x3b\x19\x93\x57\x25\x5d",
19245 .rlen = 32,
19246 },
19247};
19248
Jarod Wilsone08ca2d2009-05-04 19:46:29 +080019249/*
19250 * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
19251 * test vectors, taken from Appendix B.2.9 and B.2.10:
19252 * http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
19253 * Only AES-128 is supported at this time.
19254 */
19255#define ANSI_CPRNG_AES_TEST_VECTORS 6
19256
19257static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
19258 {
19259 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
19260 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
19261 .klen = 16,
19262 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
19263 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
19264 .dtlen = 16,
19265 .v = "\x80\x00\x00\x00\x00\x00\x00\x00"
19266 "\x00\x00\x00\x00\x00\x00\x00\x00",
19267 .vlen = 16,
19268 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
19269 "\x84\x79\x66\x85\xc1\x2f\x76\x41",
19270 .rlen = 16,
19271 .loops = 1,
19272 }, {
19273 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
19274 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
19275 .klen = 16,
19276 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
19277 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
19278 .dtlen = 16,
19279 .v = "\xc0\x00\x00\x00\x00\x00\x00\x00"
19280 "\x00\x00\x00\x00\x00\x00\x00\x00",
19281 .vlen = 16,
19282 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
19283 "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
19284 .rlen = 16,
19285 .loops = 1,
19286 }, {
19287 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
19288 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
19289 .klen = 16,
19290 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
19291 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
19292 .dtlen = 16,
19293 .v = "\xe0\x00\x00\x00\x00\x00\x00\x00"
19294 "\x00\x00\x00\x00\x00\x00\x00\x00",
19295 .vlen = 16,
19296 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
19297 "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
19298 .rlen = 16,
19299 .loops = 1,
19300 }, {
19301 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
19302 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
19303 .klen = 16,
19304 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
19305 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
19306 .dtlen = 16,
19307 .v = "\xf0\x00\x00\x00\x00\x00\x00\x00"
19308 "\x00\x00\x00\x00\x00\x00\x00\x00",
19309 .vlen = 16,
19310 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
19311 "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
19312 .rlen = 16,
19313 .loops = 1,
19314 }, {
19315 .key = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
19316 "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
19317 .klen = 16,
19318 .dt = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
19319 "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
19320 .dtlen = 16,
19321 .v = "\xf8\x00\x00\x00\x00\x00\x00\x00"
19322 "\x00\x00\x00\x00\x00\x00\x00\x00",
19323 .vlen = 16,
19324 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
19325 "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
19326 .rlen = 16,
19327 .loops = 1,
19328 }, { /* Monte Carlo Test */
19329 .key = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
19330 "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
19331 .klen = 16,
19332 .dt = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
19333 "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
19334 .dtlen = 16,
19335 .v = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
19336 "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
19337 .vlen = 16,
19338 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
19339 "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
19340 .rlen = 16,
19341 .loops = 10000,
19342 },
19343};
19344
Herbert Xuda7f0332008-07-31 17:08:25 +080019345/* Cast5 test vectors from RFC 2144 */
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019346#define CAST5_ENC_TEST_VECTORS 4
19347#define CAST5_DEC_TEST_VECTORS 4
19348#define CAST5_CBC_ENC_TEST_VECTORS 1
19349#define CAST5_CBC_DEC_TEST_VECTORS 1
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030019350#define CAST5_CTR_ENC_TEST_VECTORS 2
19351#define CAST5_CTR_DEC_TEST_VECTORS 2
Herbert Xuda7f0332008-07-31 17:08:25 +080019352
19353static struct cipher_testvec cast5_enc_tv_template[] = {
19354 {
19355 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
19356 "\x23\x45\x67\x89\x34\x56\x78\x9a",
19357 .klen = 16,
19358 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19359 .ilen = 8,
19360 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
19361 .rlen = 8,
19362 }, {
19363 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
19364 "\x23\x45",
19365 .klen = 10,
19366 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19367 .ilen = 8,
19368 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
19369 .rlen = 8,
19370 }, {
19371 .key = "\x01\x23\x45\x67\x12",
19372 .klen = 5,
19373 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19374 .ilen = 8,
19375 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
19376 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019377 }, { /* Generated from TF test vectors */
19378 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19379 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19380 .klen = 16,
19381 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19382 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19383 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
19384 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
19385 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
19386 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
19387 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
19388 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
19389 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
19390 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
19391 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
19392 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
19393 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
19394 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
19395 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
19396 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
19397 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
19398 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
19399 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
19400 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
19401 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
19402 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
19403 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
19404 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
19405 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
19406 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
19407 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
19408 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
19409 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
19410 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
19411 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
19412 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
19413 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
19414 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
19415 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
19416 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
19417 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
19418 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
19419 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
19420 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
19421 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
19422 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
19423 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
19424 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
19425 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
19426 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
19427 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
19428 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
19429 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
19430 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
19431 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
19432 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
19433 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
19434 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
19435 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
19436 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
19437 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
19438 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
19439 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
19440 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
19441 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
19442 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
19443 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
19444 .ilen = 496,
19445 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
19446 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
19447 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
19448 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
19449 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
19450 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
19451 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
19452 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
19453 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
19454 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
19455 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
19456 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
19457 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
19458 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
19459 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
19460 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
19461 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
19462 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
19463 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
19464 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
19465 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
19466 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
19467 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
19468 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
19469 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
19470 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
19471 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
19472 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
19473 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
19474 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
19475 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
19476 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
19477 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
19478 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
19479 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
19480 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
19481 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
19482 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
19483 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
19484 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
19485 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
19486 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
19487 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
19488 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
19489 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
19490 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
19491 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
19492 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
19493 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
19494 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
19495 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
19496 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
19497 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
19498 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
19499 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
19500 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
19501 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
19502 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
19503 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
19504 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
19505 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
19506 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
19507 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019508 .also_non_np = 1,
19509 .np = 2,
19510 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080019511 },
19512};
19513
19514static struct cipher_testvec cast5_dec_tv_template[] = {
19515 {
19516 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
19517 "\x23\x45\x67\x89\x34\x56\x78\x9a",
19518 .klen = 16,
19519 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
19520 .ilen = 8,
19521 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19522 .rlen = 8,
19523 }, {
19524 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
19525 "\x23\x45",
19526 .klen = 10,
19527 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
19528 .ilen = 8,
19529 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19530 .rlen = 8,
19531 }, {
19532 .key = "\x01\x23\x45\x67\x12",
19533 .klen = 5,
19534 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
19535 .ilen = 8,
19536 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
19537 .rlen = 8,
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019538 }, { /* Generated from TF test vectors */
19539 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19540 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19541 .klen = 16,
19542 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19543 .input = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
19544 "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
19545 "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
19546 "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
19547 "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
19548 "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
19549 "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
19550 "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
19551 "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
19552 "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
19553 "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
19554 "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
19555 "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
19556 "\xED\x34\x35\x78\x6B\x91\xC9\x32"
19557 "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
19558 "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
19559 "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
19560 "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
19561 "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
19562 "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
19563 "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
19564 "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
19565 "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
19566 "\x78\x75\x37\x55\xC1\xF5\x90\x40"
19567 "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
19568 "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
19569 "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
19570 "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
19571 "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
19572 "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
19573 "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
19574 "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
19575 "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
19576 "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
19577 "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
19578 "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
19579 "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
19580 "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
19581 "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
19582 "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
19583 "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
19584 "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
19585 "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
19586 "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
19587 "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
19588 "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
19589 "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
19590 "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
19591 "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
19592 "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
19593 "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
19594 "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
19595 "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
19596 "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
19597 "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
19598 "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
19599 "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
19600 "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
19601 "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
19602 "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
19603 "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
19604 "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
19605 .ilen = 496,
19606 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19607 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
19608 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
19609 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
19610 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
19611 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
19612 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
19613 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
19614 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
19615 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
19616 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
19617 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
19618 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
19619 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
19620 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
19621 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
19622 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
19623 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
19624 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
19625 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
19626 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
19627 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
19628 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
19629 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
19630 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
19631 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
19632 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
19633 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
19634 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
19635 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
19636 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
19637 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
19638 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
19639 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
19640 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
19641 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
19642 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
19643 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
19644 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
19645 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
19646 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
19647 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
19648 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
19649 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
19650 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
19651 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
19652 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
19653 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
19654 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
19655 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
19656 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
19657 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
19658 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
19659 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
19660 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
19661 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
19662 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
19663 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
19664 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
19665 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
19666 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
19667 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
19668 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019669 .also_non_np = 1,
19670 .np = 2,
19671 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019672 },
19673};
19674
19675static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
19676 { /* Generated from TF test vectors */
19677 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19678 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19679 .klen = 16,
19680 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19681 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19682 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
19683 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
19684 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
19685 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
19686 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
19687 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
19688 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
19689 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
19690 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
19691 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
19692 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
19693 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
19694 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
19695 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
19696 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
19697 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
19698 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
19699 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
19700 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
19701 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
19702 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
19703 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
19704 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
19705 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
19706 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
19707 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
19708 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
19709 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
19710 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
19711 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
19712 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
19713 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
19714 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
19715 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
19716 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
19717 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
19718 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
19719 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
19720 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
19721 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
19722 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
19723 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
19724 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
19725 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
19726 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
19727 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
19728 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
19729 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
19730 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
19731 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
19732 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
19733 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
19734 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
19735 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
19736 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
19737 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
19738 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
19739 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
19740 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
19741 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
19742 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
19743 .ilen = 496,
19744 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
19745 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
19746 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
19747 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
19748 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
19749 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
19750 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
19751 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
19752 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
19753 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
19754 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
19755 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
19756 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
19757 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
19758 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
19759 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
19760 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
19761 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
19762 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
19763 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
19764 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
19765 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
19766 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
19767 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
19768 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
19769 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
19770 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
19771 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
19772 "\x90\x12\x37\x49\x27\x98\x69\x18"
19773 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
19774 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
19775 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
19776 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
19777 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
19778 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
19779 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
19780 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
19781 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
19782 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
19783 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
19784 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
19785 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
19786 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
19787 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
19788 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
19789 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
19790 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
19791 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
19792 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
19793 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
19794 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
19795 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
19796 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
19797 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
19798 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
19799 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
19800 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
19801 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
19802 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
19803 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
19804 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
19805 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
19806 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019807 .also_non_np = 1,
19808 .np = 2,
19809 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019810 },
19811};
19812
19813static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
19814 { /* Generated from TF test vectors */
19815 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19816 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19817 .klen = 16,
19818 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19819 .input = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
19820 "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
19821 "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
19822 "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
19823 "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
19824 "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
19825 "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
19826 "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
19827 "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
19828 "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
19829 "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
19830 "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
19831 "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
19832 "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
19833 "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
19834 "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
19835 "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
19836 "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
19837 "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
19838 "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
19839 "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
19840 "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
19841 "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
19842 "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
19843 "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
19844 "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
19845 "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
19846 "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
19847 "\x90\x12\x37\x49\x27\x98\x69\x18"
19848 "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
19849 "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
19850 "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
19851 "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
19852 "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
19853 "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
19854 "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
19855 "\x03\x55\x0E\x02\x41\x4A\x45\x06"
19856 "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
19857 "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
19858 "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
19859 "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
19860 "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
19861 "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
19862 "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
19863 "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
19864 "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
19865 "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
19866 "\x11\xB4\x18\x17\x1A\x65\x92\x56"
19867 "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
19868 "\x1A\x01\x22\x45\x17\x62\x52\x6C"
19869 "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
19870 "\x32\x66\x6F\x23\x7F\x94\x36\x88"
19871 "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
19872 "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
19873 "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
19874 "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
19875 "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
19876 "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
19877 "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
19878 "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
19879 "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
19880 "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
19881 .ilen = 496,
19882 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19883 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
19884 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
19885 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
19886 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
19887 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
19888 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
19889 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
19890 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
19891 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
19892 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
19893 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
19894 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
19895 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
19896 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
19897 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
19898 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
19899 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
19900 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
19901 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
19902 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
19903 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
19904 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
19905 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
19906 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
19907 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
19908 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
19909 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
19910 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
19911 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
19912 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
19913 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
19914 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
19915 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
19916 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
19917 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
19918 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
19919 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
19920 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
19921 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
19922 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
19923 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
19924 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
19925 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
19926 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
19927 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
19928 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
19929 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
19930 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
19931 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
19932 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
19933 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
19934 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
19935 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
19936 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
19937 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
19938 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
19939 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
19940 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
19941 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
19942 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
19943 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
19944 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030019945 .also_non_np = 1,
19946 .np = 2,
19947 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019948 },
19949};
19950
19951static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
19952 { /* Generated from TF test vectors */
19953 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19954 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19955 .klen = 16,
19956 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19957 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19958 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030019959 "\x3A",
19960 .ilen = 17,
19961 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
19962 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
19963 "\x0C",
19964 .rlen = 17,
19965 }, { /* Generated from TF test vectors */
19966 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
19967 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
19968 .klen = 16,
19969 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
19970 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
19971 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020019972 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
19973 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
19974 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
19975 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
19976 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
19977 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
19978 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
19979 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
19980 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
19981 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
19982 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
19983 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
19984 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
19985 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
19986 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
19987 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
19988 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
19989 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
19990 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
19991 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
19992 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
19993 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
19994 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
19995 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
19996 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
19997 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
19998 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
19999 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
20000 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
20001 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
20002 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
20003 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
20004 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
20005 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
20006 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
20007 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
20008 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
20009 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
20010 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
20011 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
20012 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
20013 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
20014 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
20015 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
20016 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
20017 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
20018 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
20019 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
20020 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
20021 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
20022 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
20023 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
20024 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
20025 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
20026 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
20027 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
20028 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
20029 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
20030 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
20031 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
20032 .ilen = 496,
20033 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
20034 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
20035 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
20036 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
20037 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
20038 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
20039 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
20040 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
20041 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
20042 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
20043 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
20044 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
20045 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
20046 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
20047 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
20048 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
20049 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
20050 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
20051 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
20052 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
20053 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
20054 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
20055 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
20056 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
20057 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
20058 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
20059 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
20060 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
20061 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
20062 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
20063 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
20064 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
20065 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
20066 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
20067 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
20068 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
20069 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
20070 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
20071 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
20072 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
20073 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
20074 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
20075 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
20076 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
20077 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
20078 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
20079 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
20080 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
20081 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
20082 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
20083 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
20084 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
20085 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
20086 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
20087 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
20088 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
20089 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
20090 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
20091 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
20092 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
20093 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
20094 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
20095 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030020096 .also_non_np = 1,
20097 .np = 2,
20098 .tap = { 496 - 16, 16 },
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020020099 },
20100};
20101
20102static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
20103 { /* Generated from TF test vectors */
20104 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
20105 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
20106 .klen = 16,
20107 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
20108 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
20109 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Jussi Kivilinna9cac3a22012-09-19 09:42:54 +030020110 "\x0C",
20111 .ilen = 17,
20112 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
20113 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
20114 "\x3A",
20115 .rlen = 17,
20116 }, { /* Generated from TF test vectors */
20117 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
20118 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
20119 .klen = 16,
20120 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
20121 .input = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
20122 "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
Johannes Goetzfrieda2c58262012-07-11 19:37:21 +020020123 "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
20124 "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
20125 "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
20126 "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
20127 "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
20128 "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
20129 "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
20130 "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
20131 "\x88\x18\x52\x56\x48\x58\xD1\x6B"
20132 "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
20133 "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
20134 "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
20135 "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
20136 "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
20137 "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
20138 "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
20139 "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
20140 "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
20141 "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
20142 "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
20143 "\x44\x67\x90\x20\xAC\x41\xDF\x43"
20144 "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
20145 "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
20146 "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
20147 "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
20148 "\xAE\x59\x0F\x07\x88\x79\x53\x26"
20149 "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
20150 "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
20151 "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
20152 "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
20153 "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
20154 "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
20155 "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
20156 "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
20157 "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
20158 "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
20159 "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
20160 "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
20161 "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
20162 "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
20163 "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
20164 "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
20165 "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
20166 "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
20167 "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
20168 "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
20169 "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
20170 "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
20171 "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
20172 "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
20173 "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
20174 "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
20175 "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
20176 "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
20177 "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
20178 "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
20179 "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
20180 "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
20181 "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
20182 "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
20183 .ilen = 496,
20184 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
20185 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
20186 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
20187 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
20188 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
20189 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
20190 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
20191 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
20192 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
20193 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
20194 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
20195 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
20196 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
20197 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
20198 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
20199 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
20200 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
20201 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
20202 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
20203 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
20204 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
20205 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
20206 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
20207 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
20208 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
20209 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
20210 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
20211 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
20212 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
20213 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
20214 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
20215 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
20216 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
20217 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
20218 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
20219 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
20220 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
20221 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
20222 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
20223 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
20224 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
20225 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
20226 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
20227 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
20228 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
20229 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
20230 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
20231 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
20232 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
20233 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
20234 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
20235 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
20236 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
20237 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
20238 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
20239 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
20240 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
20241 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
20242 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
20243 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
20244 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
20245 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
20246 .rlen = 496,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030020247 .also_non_np = 1,
20248 .np = 2,
20249 .tap = { 496 - 16, 16 },
Herbert Xuda7f0332008-07-31 17:08:25 +080020250 },
20251};
20252
20253/*
20254 * ARC4 test vectors from OpenSSL
20255 */
20256#define ARC4_ENC_TEST_VECTORS 7
20257#define ARC4_DEC_TEST_VECTORS 7
20258
20259static struct cipher_testvec arc4_enc_tv_template[] = {
20260 {
20261 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
20262 .klen = 8,
20263 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
20264 .ilen = 8,
20265 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
20266 .rlen = 8,
20267 }, {
20268 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
20269 .klen = 8,
20270 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
20271 .ilen = 8,
20272 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
20273 .rlen = 8,
20274 }, {
20275 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
20276 .klen = 8,
20277 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
20278 .ilen = 8,
20279 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
20280 .rlen = 8,
20281 }, {
20282 .key = "\xef\x01\x23\x45",
20283 .klen = 4,
20284 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
20285 "\x00\x00\x00\x00\x00\x00\x00\x00"
20286 "\x00\x00\x00\x00",
20287 .ilen = 20,
20288 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
20289 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
20290 "\x36\xb6\x78\x58",
20291 .rlen = 20,
20292 }, {
20293 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
20294 .klen = 8,
20295 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
20296 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
20297 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
20298 "\x12\x34\x56\x78",
20299 .ilen = 28,
20300 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
20301 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
20302 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
20303 "\x40\x01\x1e\xcf",
20304 .rlen = 28,
20305 }, {
20306 .key = "\xef\x01\x23\x45",
20307 .klen = 4,
20308 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
20309 "\x00\x00",
20310 .ilen = 10,
20311 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
20312 "\xbd\x61",
20313 .rlen = 10,
20314 }, {
20315 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
20316 "\x00\x00\x00\x00\x00\x00\x00\x00",
20317 .klen = 16,
20318 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
20319 .ilen = 8,
20320 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
20321 .rlen = 8,
20322 },
20323};
20324
20325static struct cipher_testvec arc4_dec_tv_template[] = {
20326 {
20327 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
20328 .klen = 8,
20329 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
20330 .ilen = 8,
20331 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
20332 .rlen = 8,
20333 }, {
20334 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
20335 .klen = 8,
20336 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
20337 .ilen = 8,
20338 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
20339 .rlen = 8,
20340 }, {
20341 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
20342 .klen = 8,
20343 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
20344 .ilen = 8,
20345 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
20346 .rlen = 8,
20347 }, {
20348 .key = "\xef\x01\x23\x45",
20349 .klen = 4,
20350 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
20351 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
20352 "\x36\xb6\x78\x58",
20353 .ilen = 20,
20354 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
20355 "\x00\x00\x00\x00\x00\x00\x00\x00"
20356 "\x00\x00\x00\x00",
20357 .rlen = 20,
20358 }, {
20359 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
20360 .klen = 8,
20361 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
20362 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
20363 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
20364 "\x40\x01\x1e\xcf",
20365 .ilen = 28,
20366 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
20367 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
20368 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
20369 "\x12\x34\x56\x78",
20370 .rlen = 28,
20371 }, {
20372 .key = "\xef\x01\x23\x45",
20373 .klen = 4,
20374 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
20375 "\xbd\x61",
20376 .ilen = 10,
20377 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
20378 "\x00\x00",
20379 .rlen = 10,
20380 }, {
20381 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
20382 "\x00\x00\x00\x00\x00\x00\x00\x00",
20383 .klen = 16,
20384 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
20385 .ilen = 8,
20386 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
20387 .rlen = 8,
20388 },
20389};
20390
20391/*
20392 * TEA test vectors
20393 */
20394#define TEA_ENC_TEST_VECTORS 4
20395#define TEA_DEC_TEST_VECTORS 4
20396
20397static struct cipher_testvec tea_enc_tv_template[] = {
20398 {
20399 .key = zeroed_string,
20400 .klen = 16,
20401 .input = zeroed_string,
20402 .ilen = 8,
20403 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
20404 .rlen = 8,
20405 }, {
20406 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
20407 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
20408 .klen = 16,
20409 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
20410 .ilen = 8,
20411 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
20412 .rlen = 8,
20413 }, {
20414 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
20415 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
20416 .klen = 16,
20417 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
20418 "\x65\x73\x74\x5f\x76\x65\x63\x74",
20419 .ilen = 16,
20420 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
20421 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
20422 .rlen = 16,
20423 }, {
20424 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
20425 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
20426 .klen = 16,
20427 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
20428 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
20429 "\x79\x6f\x75\x21\x21\x21\x20\x72"
20430 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
20431 .ilen = 32,
20432 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
20433 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
20434 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
20435 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
20436 .rlen = 32,
20437 }
20438};
20439
20440static struct cipher_testvec tea_dec_tv_template[] = {
20441 {
20442 .key = zeroed_string,
20443 .klen = 16,
20444 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
20445 .ilen = 8,
20446 .result = zeroed_string,
20447 .rlen = 8,
20448 }, {
20449 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
20450 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
20451 .klen = 16,
20452 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
20453 .ilen = 8,
20454 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
20455 .rlen = 8,
20456 }, {
20457 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
20458 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
20459 .klen = 16,
20460 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
20461 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
20462 .ilen = 16,
20463 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
20464 "\x65\x73\x74\x5f\x76\x65\x63\x74",
20465 .rlen = 16,
20466 }, {
20467 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
20468 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
20469 .klen = 16,
20470 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
20471 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
20472 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
20473 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
20474 .ilen = 32,
20475 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
20476 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
20477 "\x79\x6f\x75\x21\x21\x21\x20\x72"
20478 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
20479 .rlen = 32,
20480 }
20481};
20482
20483/*
20484 * XTEA test vectors
20485 */
20486#define XTEA_ENC_TEST_VECTORS 4
20487#define XTEA_DEC_TEST_VECTORS 4
20488
20489static struct cipher_testvec xtea_enc_tv_template[] = {
20490 {
20491 .key = zeroed_string,
20492 .klen = 16,
20493 .input = zeroed_string,
20494 .ilen = 8,
20495 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
20496 .rlen = 8,
20497 }, {
20498 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
20499 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
20500 .klen = 16,
20501 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
20502 .ilen = 8,
20503 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
20504 .rlen = 8,
20505 }, {
20506 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
20507 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
20508 .klen = 16,
20509 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
20510 "\x65\x73\x74\x5f\x76\x65\x63\x74",
20511 .ilen = 16,
20512 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
20513 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
20514 .rlen = 16,
20515 }, {
20516 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
20517 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
20518 .klen = 16,
20519 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
20520 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
20521 "\x79\x6f\x75\x21\x21\x21\x20\x72"
20522 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
20523 .ilen = 32,
20524 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
20525 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
20526 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
20527 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
20528 .rlen = 32,
20529 }
20530};
20531
20532static struct cipher_testvec xtea_dec_tv_template[] = {
20533 {
20534 .key = zeroed_string,
20535 .klen = 16,
20536 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
20537 .ilen = 8,
20538 .result = zeroed_string,
20539 .rlen = 8,
20540 }, {
20541 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
20542 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
20543 .klen = 16,
20544 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
20545 .ilen = 8,
20546 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
20547 .rlen = 8,
20548 }, {
20549 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
20550 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
20551 .klen = 16,
20552 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
20553 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
20554 .ilen = 16,
20555 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
20556 "\x65\x73\x74\x5f\x76\x65\x63\x74",
20557 .rlen = 16,
20558 }, {
20559 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
20560 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
20561 .klen = 16,
20562 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
20563 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
20564 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
20565 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
20566 .ilen = 32,
20567 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
20568 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
20569 "\x79\x6f\x75\x21\x21\x21\x20\x72"
20570 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
20571 .rlen = 32,
20572 }
20573};
20574
20575/*
20576 * KHAZAD test vectors.
20577 */
20578#define KHAZAD_ENC_TEST_VECTORS 5
20579#define KHAZAD_DEC_TEST_VECTORS 5
20580
20581static struct cipher_testvec khazad_enc_tv_template[] = {
20582 {
20583 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
20584 "\x00\x00\x00\x00\x00\x00\x00\x00",
20585 .klen = 16,
20586 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
20587 .ilen = 8,
20588 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
20589 .rlen = 8,
20590 }, {
20591 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
20592 "\x38\x38\x38\x38\x38\x38\x38\x38",
20593 .klen = 16,
20594 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
20595 .ilen = 8,
20596 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
20597 .rlen = 8,
20598 }, {
20599 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
20600 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
20601 .klen = 16,
20602 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
20603 .ilen = 8,
20604 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
20605 .rlen = 8,
20606 }, {
20607 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
20608 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20609 .klen = 16,
20610 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20611 .ilen = 8,
20612 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
20613 .rlen = 8,
20614 }, {
20615 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
20616 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20617 .klen = 16,
20618 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
20619 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20620 .ilen = 16,
20621 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
20622 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
20623 .rlen = 16,
20624 },
20625};
20626
20627static struct cipher_testvec khazad_dec_tv_template[] = {
20628 {
20629 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
20630 "\x00\x00\x00\x00\x00\x00\x00\x00",
20631 .klen = 16,
20632 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
20633 .ilen = 8,
20634 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
20635 .rlen = 8,
20636 }, {
20637 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
20638 "\x38\x38\x38\x38\x38\x38\x38\x38",
20639 .klen = 16,
20640 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
20641 .ilen = 8,
20642 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
20643 .rlen = 8,
20644 }, {
20645 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
20646 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
20647 .klen = 16,
20648 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
20649 .ilen = 8,
20650 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
20651 .rlen = 8,
20652 }, {
20653 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
20654 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20655 .klen = 16,
20656 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
20657 .ilen = 8,
20658 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20659 .rlen = 8,
20660 }, {
20661 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
20662 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20663 .klen = 16,
20664 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
20665 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
20666 .ilen = 16,
20667 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
20668 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
20669 .rlen = 16,
20670 },
20671};
20672
20673/*
20674 * Anubis test vectors.
20675 */
20676
20677#define ANUBIS_ENC_TEST_VECTORS 5
20678#define ANUBIS_DEC_TEST_VECTORS 5
20679#define ANUBIS_CBC_ENC_TEST_VECTORS 2
20680#define ANUBIS_CBC_DEC_TEST_VECTORS 2
20681
20682static struct cipher_testvec anubis_enc_tv_template[] = {
20683 {
20684 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20685 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20686 .klen = 16,
20687 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20688 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20689 .ilen = 16,
20690 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
20691 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
20692 .rlen = 16,
20693 }, {
20694
20695 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
20696 "\x03\x03\x03\x03\x03\x03\x03\x03"
20697 "\x03\x03\x03\x03",
20698 .klen = 20,
20699 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
20700 "\x03\x03\x03\x03\x03\x03\x03\x03",
20701 .ilen = 16,
20702 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
20703 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
20704 .rlen = 16,
20705 }, {
20706 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
20707 "\x24\x24\x24\x24\x24\x24\x24\x24"
20708 "\x24\x24\x24\x24\x24\x24\x24\x24"
20709 "\x24\x24\x24\x24",
20710 .klen = 28,
20711 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
20712 "\x24\x24\x24\x24\x24\x24\x24\x24",
20713 .ilen = 16,
20714 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
20715 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
20716 .rlen = 16,
20717 }, {
20718 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
20719 "\x25\x25\x25\x25\x25\x25\x25\x25"
20720 "\x25\x25\x25\x25\x25\x25\x25\x25"
20721 "\x25\x25\x25\x25\x25\x25\x25\x25",
20722 .klen = 32,
20723 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
20724 "\x25\x25\x25\x25\x25\x25\x25\x25",
20725 .ilen = 16,
20726 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
20727 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
20728 .rlen = 16,
20729 }, {
20730 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
20731 "\x35\x35\x35\x35\x35\x35\x35\x35"
20732 "\x35\x35\x35\x35\x35\x35\x35\x35"
20733 "\x35\x35\x35\x35\x35\x35\x35\x35"
20734 "\x35\x35\x35\x35\x35\x35\x35\x35",
20735 .klen = 40,
20736 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
20737 "\x35\x35\x35\x35\x35\x35\x35\x35",
20738 .ilen = 16,
20739 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
20740 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
20741 .rlen = 16,
20742 },
20743};
20744
20745static struct cipher_testvec anubis_dec_tv_template[] = {
20746 {
20747 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20748 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20749 .klen = 16,
20750 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
20751 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
20752 .ilen = 16,
20753 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20754 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20755 .rlen = 16,
20756 }, {
20757
20758 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
20759 "\x03\x03\x03\x03\x03\x03\x03\x03"
20760 "\x03\x03\x03\x03",
20761 .klen = 20,
20762 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
20763 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
20764 .ilen = 16,
20765 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
20766 "\x03\x03\x03\x03\x03\x03\x03\x03",
20767 .rlen = 16,
20768 }, {
20769 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
20770 "\x24\x24\x24\x24\x24\x24\x24\x24"
20771 "\x24\x24\x24\x24\x24\x24\x24\x24"
20772 "\x24\x24\x24\x24",
20773 .klen = 28,
20774 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
20775 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
20776 .ilen = 16,
20777 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
20778 "\x24\x24\x24\x24\x24\x24\x24\x24",
20779 .rlen = 16,
20780 }, {
20781 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
20782 "\x25\x25\x25\x25\x25\x25\x25\x25"
20783 "\x25\x25\x25\x25\x25\x25\x25\x25"
20784 "\x25\x25\x25\x25\x25\x25\x25\x25",
20785 .klen = 32,
20786 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
20787 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
20788 .ilen = 16,
20789 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
20790 "\x25\x25\x25\x25\x25\x25\x25\x25",
20791 .rlen = 16,
20792 }, {
20793 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
20794 "\x35\x35\x35\x35\x35\x35\x35\x35"
20795 "\x35\x35\x35\x35\x35\x35\x35\x35"
20796 "\x35\x35\x35\x35\x35\x35\x35\x35"
20797 "\x35\x35\x35\x35\x35\x35\x35\x35",
20798 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
20799 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
20800 .klen = 40,
20801 .ilen = 16,
20802 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
20803 "\x35\x35\x35\x35\x35\x35\x35\x35",
20804 .rlen = 16,
20805 },
20806};
20807
20808static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
20809 {
20810 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20811 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20812 .klen = 16,
20813 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20814 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20815 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20816 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20817 .ilen = 32,
20818 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
20819 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
20820 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
20821 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
20822 .rlen = 32,
20823 }, {
20824 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
20825 "\x35\x35\x35\x35\x35\x35\x35\x35"
20826 "\x35\x35\x35\x35\x35\x35\x35\x35"
20827 "\x35\x35\x35\x35\x35\x35\x35\x35"
20828 "\x35\x35\x35\x35\x35\x35\x35\x35",
20829 .klen = 40,
20830 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
20831 "\x35\x35\x35\x35\x35\x35\x35\x35"
20832 "\x35\x35\x35\x35\x35\x35\x35\x35"
20833 "\x35\x35\x35\x35\x35\x35\x35\x35",
20834 .ilen = 32,
20835 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
20836 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
20837 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
20838 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
20839 .rlen = 32,
20840 },
20841};
20842
20843static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
20844 {
20845 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20846 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20847 .klen = 16,
20848 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
20849 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
20850 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
20851 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
20852 .ilen = 32,
20853 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20854 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20855 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
20856 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
20857 .rlen = 32,
20858 }, {
20859 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
20860 "\x35\x35\x35\x35\x35\x35\x35\x35"
20861 "\x35\x35\x35\x35\x35\x35\x35\x35"
20862 "\x35\x35\x35\x35\x35\x35\x35\x35"
20863 "\x35\x35\x35\x35\x35\x35\x35\x35",
20864 .klen = 40,
20865 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
20866 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
20867 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
20868 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
20869 .ilen = 32,
20870 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
20871 "\x35\x35\x35\x35\x35\x35\x35\x35"
20872 "\x35\x35\x35\x35\x35\x35\x35\x35"
20873 "\x35\x35\x35\x35\x35\x35\x35\x35",
20874 .rlen = 32,
20875 },
20876};
20877
20878/*
20879 * XETA test vectors
20880 */
20881#define XETA_ENC_TEST_VECTORS 4
20882#define XETA_DEC_TEST_VECTORS 4
20883
20884static struct cipher_testvec xeta_enc_tv_template[] = {
20885 {
20886 .key = zeroed_string,
20887 .klen = 16,
20888 .input = zeroed_string,
20889 .ilen = 8,
20890 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
20891 .rlen = 8,
20892 }, {
20893 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
20894 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
20895 .klen = 16,
20896 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
20897 .ilen = 8,
20898 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
20899 .rlen = 8,
20900 }, {
20901 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
20902 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
20903 .klen = 16,
20904 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
20905 "\x65\x73\x74\x5f\x76\x65\x63\x74",
20906 .ilen = 16,
20907 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
20908 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
20909 .rlen = 16,
20910 }, {
20911 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
20912 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
20913 .klen = 16,
20914 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
20915 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
20916 "\x79\x6f\x75\x21\x21\x21\x20\x72"
20917 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
20918 .ilen = 32,
20919 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
20920 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
20921 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
20922 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
20923 .rlen = 32,
20924 }
20925};
20926
20927static struct cipher_testvec xeta_dec_tv_template[] = {
20928 {
20929 .key = zeroed_string,
20930 .klen = 16,
20931 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
20932 .ilen = 8,
20933 .result = zeroed_string,
20934 .rlen = 8,
20935 }, {
20936 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
20937 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
20938 .klen = 16,
20939 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
20940 .ilen = 8,
20941 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
20942 .rlen = 8,
20943 }, {
20944 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
20945 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
20946 .klen = 16,
20947 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
20948 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
20949 .ilen = 16,
20950 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
20951 "\x65\x73\x74\x5f\x76\x65\x63\x74",
20952 .rlen = 16,
20953 }, {
20954 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
20955 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
20956 .klen = 16,
20957 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
20958 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
20959 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
20960 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
20961 .ilen = 32,
20962 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
20963 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
20964 "\x79\x6f\x75\x21\x21\x21\x20\x72"
20965 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
20966 .rlen = 32,
20967 }
20968};
20969
20970/*
20971 * FCrypt test vectors
20972 */
20973#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
20974#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
20975
20976static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
20977 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
20978 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
20979 .klen = 8,
20980 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20981 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
20982 .ilen = 8,
20983 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
20984 .rlen = 8,
20985 }, {
20986 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
20987 .klen = 8,
20988 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
20989 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
20990 .ilen = 8,
20991 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
20992 .rlen = 8,
20993 }, { /* From Arla */
20994 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
20995 .klen = 8,
20996 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
20997 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
20998 .ilen = 48,
20999 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
21000 "\xee\xac\x98\x62\x44\x51\xe4\x84"
21001 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
21002 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
21003 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
21004 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
21005 .rlen = 48,
21006 }, {
21007 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21008 .klen = 8,
21009 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
21010 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
21011 .ilen = 48,
21012 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
21013 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
21014 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
21015 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
21016 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
21017 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
21018 .rlen = 48,
21019 }, { /* split-page version */
21020 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21021 .klen = 8,
21022 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
21023 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
21024 .ilen = 48,
21025 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
21026 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
21027 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
21028 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
21029 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
21030 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
21031 .rlen = 48,
21032 .np = 2,
21033 .tap = { 20, 28 },
21034 }
21035};
21036
21037static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
21038 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
21039 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
21040 .klen = 8,
21041 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
21042 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
21043 .ilen = 8,
21044 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
21045 .rlen = 8,
21046 }, {
21047 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
21048 .klen = 8,
21049 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
21050 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
21051 .ilen = 8,
21052 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
21053 .rlen = 8,
21054 }, { /* From Arla */
21055 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
21056 .klen = 8,
21057 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21058 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
21059 "\xee\xac\x98\x62\x44\x51\xe4\x84"
21060 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
21061 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
21062 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
21063 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
21064 .ilen = 48,
21065 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
21066 .rlen = 48,
21067 }, {
21068 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21069 .klen = 8,
21070 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
21071 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
21072 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
21073 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
21074 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
21075 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
21076 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
21077 .ilen = 48,
21078 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
21079 .rlen = 48,
21080 }, { /* split-page version */
21081 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21082 .klen = 8,
21083 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
21084 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
21085 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
21086 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
21087 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
21088 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
21089 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
21090 .ilen = 48,
21091 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
21092 .rlen = 48,
21093 .np = 2,
21094 .tap = { 20, 28 },
21095 }
21096};
21097
21098/*
21099 * CAMELLIA test vectors.
21100 */
Jussi Kivilinna08406052012-03-05 20:26:21 +020021101#define CAMELLIA_ENC_TEST_VECTORS 4
21102#define CAMELLIA_DEC_TEST_VECTORS 4
21103#define CAMELLIA_CBC_ENC_TEST_VECTORS 3
21104#define CAMELLIA_CBC_DEC_TEST_VECTORS 3
21105#define CAMELLIA_CTR_ENC_TEST_VECTORS 2
21106#define CAMELLIA_CTR_DEC_TEST_VECTORS 2
21107#define CAMELLIA_LRW_ENC_TEST_VECTORS 8
21108#define CAMELLIA_LRW_DEC_TEST_VECTORS 8
21109#define CAMELLIA_XTS_ENC_TEST_VECTORS 5
21110#define CAMELLIA_XTS_DEC_TEST_VECTORS 5
Herbert Xuda7f0332008-07-31 17:08:25 +080021111
21112static struct cipher_testvec camellia_enc_tv_template[] = {
21113 {
21114 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
21115 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21116 .klen = 16,
21117 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
21118 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21119 .ilen = 16,
21120 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
21121 "\x08\x57\x06\x56\x48\xea\xbe\x43",
21122 .rlen = 16,
21123 }, {
21124 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
21125 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
21126 "\x00\x11\x22\x33\x44\x55\x66\x77",
21127 .klen = 24,
21128 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
21129 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21130 .ilen = 16,
21131 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
21132 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
21133 .rlen = 16,
21134 }, {
21135 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
21136 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
21137 "\x00\x11\x22\x33\x44\x55\x66\x77"
21138 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
21139 .klen = 32,
21140 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
21141 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21142 .ilen = 16,
21143 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
21144 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
21145 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021146 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020021147 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
21148 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
21149 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
21150 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
21151 .klen = 32,
21152 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
21153 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
21154 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
21155 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
21156 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021157 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
21158 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
21159 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
21160 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
21161 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
21162 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
21163 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
21164 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
21165 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
21166 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
21167 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
21168 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
21169 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
21170 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
21171 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
21172 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
21173 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
21174 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
21175 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
21176 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
21177 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
21178 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
21179 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
21180 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
21181 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
21182 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
21183 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
21184 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
21185 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
21186 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
21187 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
21188 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
21189 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
21190 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
21191 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
21192 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
21193 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
21194 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
21195 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
21196 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
21197 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
21198 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
21199 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
21200 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
21201 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
21202 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
21203 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
21204 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
21205 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
21206 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
21207 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
21208 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
21209 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
21210 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
21211 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
21212 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030021213 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
21214 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
21215 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
21216 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
21217 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
21218 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
21219 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
21220 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
21221 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
21222 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
21223 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
21224 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
21225 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
21226 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
21227 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
21228 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
21229 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
21230 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
21231 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
21232 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
21233 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
21234 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
21235 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
21236 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
21237 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
21238 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
21239 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
21240 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
21241 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
21242 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
21243 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
21244 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
21245 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
21246 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
21247 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
21248 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
21249 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
21250 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
21251 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
21252 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
21253 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
21254 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
21255 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
21256 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
21257 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
21258 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
21259 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
21260 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
21261 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
21262 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
21263 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
21264 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
21265 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
21266 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
21267 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
21268 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
21269 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
21270 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
21271 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
21272 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
21273 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
21274 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
21275 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
21276 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
21277 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
21278 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020021279 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
21280 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
21281 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
21282 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
21283 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021284 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
21285 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
21286 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
21287 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
21288 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
21289 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
21290 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
21291 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
21292 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
21293 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
21294 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
21295 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
21296 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
21297 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
21298 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
21299 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
21300 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
21301 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
21302 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
21303 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
21304 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
21305 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
21306 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
21307 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
21308 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
21309 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
21310 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
21311 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
21312 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
21313 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
21314 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
21315 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
21316 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
21317 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
21318 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
21319 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
21320 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
21321 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
21322 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
21323 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
21324 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
21325 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
21326 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
21327 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
21328 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
21329 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
21330 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
21331 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
21332 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
21333 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
21334 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
21335 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
21336 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
21337 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
21338 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
21339 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030021340 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
21341 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
21342 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
21343 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
21344 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
21345 "\xED\x28\x39\xE9\x63\xED\x41\x70"
21346 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
21347 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
21348 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
21349 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
21350 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
21351 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
21352 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
21353 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
21354 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
21355 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
21356 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
21357 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
21358 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
21359 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
21360 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
21361 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
21362 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
21363 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
21364 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
21365 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
21366 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
21367 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
21368 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
21369 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
21370 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
21371 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
21372 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
21373 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
21374 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
21375 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
21376 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
21377 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
21378 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
21379 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
21380 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
21381 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
21382 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
21383 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
21384 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
21385 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
21386 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
21387 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
21388 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
21389 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
21390 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
21391 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
21392 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
21393 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
21394 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
21395 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
21396 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
21397 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
21398 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
21399 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
21400 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
21401 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
21402 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
21403 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
21404 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
21405 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030021406 .also_non_np = 1,
21407 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030021408 .tap = { 1008 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020021409 },
Herbert Xuda7f0332008-07-31 17:08:25 +080021410};
21411
21412static struct cipher_testvec camellia_dec_tv_template[] = {
21413 {
21414 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
21415 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21416 .klen = 16,
21417 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
21418 "\x08\x57\x06\x56\x48\xea\xbe\x43",
21419 .ilen = 16,
21420 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
21421 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21422 .rlen = 16,
21423 }, {
21424 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
21425 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
21426 "\x00\x11\x22\x33\x44\x55\x66\x77",
21427 .klen = 24,
21428 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
21429 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
21430 .ilen = 16,
21431 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
21432 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21433 .rlen = 16,
21434 }, {
21435 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
21436 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
21437 "\x00\x11\x22\x33\x44\x55\x66\x77"
21438 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
21439 .klen = 32,
21440 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
21441 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
21442 .ilen = 16,
21443 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
21444 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
21445 .rlen = 16,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021446 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020021447 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
21448 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
21449 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
21450 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
21451 .klen = 32,
21452 .input = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
21453 "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
21454 "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
21455 "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
21456 "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021457 "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
21458 "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
21459 "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
21460 "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
21461 "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
21462 "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
21463 "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
21464 "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
21465 "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
21466 "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
21467 "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
21468 "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
21469 "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
21470 "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
21471 "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
21472 "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
21473 "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
21474 "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
21475 "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
21476 "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
21477 "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
21478 "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
21479 "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
21480 "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
21481 "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
21482 "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
21483 "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
21484 "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
21485 "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
21486 "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
21487 "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
21488 "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
21489 "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
21490 "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
21491 "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
21492 "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
21493 "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
21494 "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
21495 "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
21496 "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
21497 "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
21498 "\x83\x06\xAB\x82\x99\x01\x16\x1A"
21499 "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
21500 "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
21501 "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
21502 "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
21503 "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
21504 "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
21505 "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
21506 "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
21507 "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
21508 "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
21509 "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
21510 "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
21511 "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
21512 "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030021513 "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
21514 "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
21515 "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
21516 "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
21517 "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
21518 "\xED\x28\x39\xE9\x63\xED\x41\x70"
21519 "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
21520 "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
21521 "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
21522 "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
21523 "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
21524 "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
21525 "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
21526 "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
21527 "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
21528 "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
21529 "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
21530 "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
21531 "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
21532 "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
21533 "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
21534 "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
21535 "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
21536 "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
21537 "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
21538 "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
21539 "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
21540 "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
21541 "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
21542 "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
21543 "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
21544 "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
21545 "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
21546 "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
21547 "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
21548 "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
21549 "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
21550 "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
21551 "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
21552 "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
21553 "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
21554 "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
21555 "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
21556 "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
21557 "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
21558 "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
21559 "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
21560 "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
21561 "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
21562 "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
21563 "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
21564 "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
21565 "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
21566 "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
21567 "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
21568 "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
21569 "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
21570 "\x31\x93\x51\x1C\x63\x97\x70\xB0"
21571 "\x99\x78\x83\x13\xFD\xCF\x53\x81"
21572 "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
21573 "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
21574 "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
21575 "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
21576 "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
21577 "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
21578 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020021579 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
21580 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
21581 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
21582 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
21583 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021584 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
21585 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
21586 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
21587 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
21588 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
21589 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
21590 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
21591 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
21592 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
21593 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
21594 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
21595 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
21596 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
21597 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
21598 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
21599 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
21600 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
21601 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
21602 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
21603 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
21604 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
21605 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
21606 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
21607 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
21608 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
21609 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
21610 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
21611 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
21612 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
21613 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
21614 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
21615 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
21616 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
21617 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
21618 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
21619 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
21620 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
21621 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
21622 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
21623 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
21624 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
21625 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
21626 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
21627 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
21628 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
21629 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
21630 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
21631 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
21632 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
21633 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
21634 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
21635 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
21636 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
21637 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
21638 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
21639 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030021640 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
21641 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
21642 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
21643 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
21644 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
21645 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
21646 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
21647 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
21648 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
21649 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
21650 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
21651 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
21652 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
21653 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
21654 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
21655 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
21656 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
21657 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
21658 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
21659 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
21660 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
21661 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
21662 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
21663 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
21664 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
21665 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
21666 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
21667 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
21668 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
21669 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
21670 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
21671 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
21672 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
21673 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
21674 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
21675 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
21676 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
21677 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
21678 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
21679 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
21680 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
21681 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
21682 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
21683 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
21684 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
21685 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
21686 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
21687 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
21688 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
21689 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
21690 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
21691 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
21692 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
21693 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
21694 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
21695 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
21696 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
21697 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
21698 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
21699 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
21700 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
21701 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
21702 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
21703 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
21704 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
21705 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030021706 .also_non_np = 1,
21707 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030021708 .tap = { 1008 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020021709 },
Herbert Xuda7f0332008-07-31 17:08:25 +080021710};
21711
21712static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
21713 {
21714 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
21715 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
21716 .klen = 16,
21717 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
21718 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
21719 .input = "Single block msg",
21720 .ilen = 16,
21721 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
21722 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
21723 .rlen = 16,
21724 }, {
21725 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
21726 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
21727 .klen = 16,
21728 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
21729 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
21730 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
21731 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21732 "\x10\x11\x12\x13\x14\x15\x16\x17"
21733 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
21734 .ilen = 32,
21735 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
21736 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
21737 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
21738 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
21739 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021740 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020021741 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
21742 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
21743 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
21744 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
21745 .klen = 32,
21746 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
21747 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
21748 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
21749 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
21750 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
21751 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
21752 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021753 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
21754 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
21755 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
21756 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
21757 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
21758 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
21759 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
21760 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
21761 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
21762 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
21763 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
21764 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
21765 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
21766 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
21767 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
21768 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
21769 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
21770 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
21771 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
21772 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
21773 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
21774 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
21775 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
21776 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
21777 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
21778 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
21779 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
21780 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
21781 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
21782 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
21783 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
21784 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
21785 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
21786 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
21787 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
21788 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
21789 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
21790 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
21791 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
21792 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
21793 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
21794 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
21795 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
21796 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
21797 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
21798 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
21799 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
21800 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
21801 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
21802 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
21803 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
21804 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
21805 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
21806 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
21807 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
21808 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030021809 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
21810 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
21811 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
21812 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
21813 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
21814 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
21815 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
21816 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
21817 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
21818 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
21819 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
21820 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
21821 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
21822 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
21823 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
21824 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
21825 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
21826 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
21827 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
21828 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
21829 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
21830 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
21831 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
21832 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
21833 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
21834 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
21835 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
21836 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
21837 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
21838 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
21839 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
21840 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
21841 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
21842 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
21843 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
21844 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
21845 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
21846 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
21847 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
21848 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
21849 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
21850 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
21851 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
21852 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
21853 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
21854 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
21855 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
21856 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
21857 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
21858 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
21859 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
21860 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
21861 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
21862 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
21863 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
21864 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
21865 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
21866 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
21867 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
21868 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
21869 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
21870 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
21871 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
21872 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
21873 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
21874 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020021875 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
21876 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
21877 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
21878 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
21879 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030021880 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
21881 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
21882 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
21883 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
21884 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
21885 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
21886 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
21887 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
21888 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
21889 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
21890 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
21891 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
21892 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
21893 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
21894 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
21895 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
21896 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
21897 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
21898 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
21899 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
21900 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
21901 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
21902 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
21903 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
21904 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
21905 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
21906 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
21907 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
21908 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
21909 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
21910 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
21911 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
21912 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
21913 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
21914 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
21915 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
21916 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
21917 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
21918 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
21919 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
21920 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
21921 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
21922 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
21923 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
21924 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
21925 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
21926 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
21927 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
21928 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
21929 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
21930 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
21931 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
21932 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
21933 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
21934 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
21935 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030021936 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
21937 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
21938 "\x21\x41\x56\x72\x13\xE1\x86\x07"
21939 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
21940 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
21941 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
21942 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
21943 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
21944 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
21945 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
21946 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
21947 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
21948 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
21949 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
21950 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
21951 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
21952 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
21953 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
21954 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
21955 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
21956 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
21957 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
21958 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
21959 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
21960 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
21961 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
21962 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
21963 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
21964 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
21965 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
21966 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
21967 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
21968 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
21969 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
21970 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
21971 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
21972 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
21973 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
21974 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
21975 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
21976 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
21977 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
21978 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
21979 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
21980 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
21981 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
21982 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
21983 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
21984 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
21985 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
21986 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
21987 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
21988 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
21989 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
21990 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
21991 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
21992 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
21993 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
21994 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
21995 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
21996 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
21997 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
21998 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
21999 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
22000 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
22001 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022002 .also_non_np = 1,
22003 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030022004 .tap = { 1008 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020022005 },
Herbert Xuda7f0332008-07-31 17:08:25 +080022006};
22007
22008static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
22009 {
22010 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
22011 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
22012 .klen = 16,
22013 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
22014 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
22015 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
22016 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
22017 .ilen = 16,
22018 .result = "Single block msg",
22019 .rlen = 16,
22020 }, {
22021 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
22022 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
22023 .klen = 16,
22024 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
22025 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
22026 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
22027 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
22028 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
22029 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
22030 .ilen = 32,
22031 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
22032 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22033 "\x10\x11\x12\x13\x14\x15\x16\x17"
22034 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
22035 .rlen = 32,
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030022036 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020022037 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22038 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
22039 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
22040 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
22041 .klen = 32,
22042 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
22043 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
22044 .input = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
22045 "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
22046 "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
22047 "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
22048 "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030022049 "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
22050 "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
22051 "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
22052 "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
22053 "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
22054 "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
22055 "\x37\x49\x88\xA4\xEF\x91\x21\x47"
22056 "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
22057 "\x28\x90\x77\x46\xD8\xD2\x35\x16"
22058 "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
22059 "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
22060 "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
22061 "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
22062 "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
22063 "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
22064 "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
22065 "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
22066 "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
22067 "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
22068 "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
22069 "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
22070 "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
22071 "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
22072 "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
22073 "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
22074 "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
22075 "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
22076 "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
22077 "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
22078 "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
22079 "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
22080 "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
22081 "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
22082 "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
22083 "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
22084 "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
22085 "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
22086 "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
22087 "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
22088 "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
22089 "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
22090 "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
22091 "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
22092 "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
22093 "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
22094 "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
22095 "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
22096 "\x38\xB8\x48\x36\x66\x4E\x20\x43"
22097 "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
22098 "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
22099 "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
22100 "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
22101 "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
22102 "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
22103 "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
22104 "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030022105 "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
22106 "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
22107 "\x21\x41\x56\x72\x13\xE1\x86\x07"
22108 "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
22109 "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
22110 "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
22111 "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
22112 "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
22113 "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
22114 "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
22115 "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
22116 "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
22117 "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
22118 "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
22119 "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
22120 "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
22121 "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
22122 "\xBE\x31\x31\x96\x8B\x40\x18\x75"
22123 "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
22124 "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
22125 "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
22126 "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
22127 "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
22128 "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
22129 "\x09\xB0\x43\x96\x4A\x64\x80\x40"
22130 "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
22131 "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
22132 "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
22133 "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
22134 "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
22135 "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
22136 "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
22137 "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
22138 "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
22139 "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
22140 "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
22141 "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
22142 "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
22143 "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
22144 "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
22145 "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
22146 "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
22147 "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
22148 "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
22149 "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
22150 "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
22151 "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
22152 "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
22153 "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
22154 "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
22155 "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
22156 "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
22157 "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
22158 "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
22159 "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
22160 "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
22161 "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
22162 "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
22163 "\x80\xE7\x29\xDC\x23\x55\x98\x54"
22164 "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
22165 "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
22166 "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
22167 "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
22168 "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
22169 "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
22170 .ilen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020022171 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22172 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22173 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22174 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22175 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030022176 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
22177 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22178 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22179 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22180 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22181 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22182 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22183 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22184 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22185 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22186 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22187 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22188 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22189 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22190 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22191 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22192 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22193 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22194 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22195 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22196 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22197 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22198 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22199 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22200 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22201 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22202 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22203 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22204 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22205 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22206 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22207 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22208 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22209 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22210 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22211 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22212 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22213 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22214 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22215 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22216 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22217 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22218 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22219 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22220 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22221 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22222 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22223 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22224 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22225 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22226 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22227 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22228 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22229 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22230 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22231 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030022232 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
22233 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
22234 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
22235 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
22236 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
22237 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
22238 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
22239 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
22240 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
22241 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
22242 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
22243 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
22244 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
22245 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
22246 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
22247 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
22248 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
22249 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
22250 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
22251 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
22252 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
22253 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
22254 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
22255 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
22256 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
22257 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
22258 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
22259 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
22260 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
22261 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
22262 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
22263 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
22264 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
22265 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
22266 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
22267 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
22268 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
22269 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
22270 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
22271 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
22272 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
22273 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
22274 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
22275 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
22276 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
22277 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
22278 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
22279 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
22280 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
22281 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
22282 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
22283 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
22284 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
22285 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
22286 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
22287 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
22288 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
22289 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
22290 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
22291 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
22292 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
22293 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
22294 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
22295 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
22296 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
22297 .rlen = 1008,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022298 .also_non_np = 1,
22299 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030022300 .tap = { 1008 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020022301 },
22302};
22303
22304static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
22305 { /* Generated with Crypto++ */
22306 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22307 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
22308 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
22309 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
22310 .klen = 32,
22311 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
22312 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
22313 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22314 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22315 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22316 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22317 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030022318 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
22319 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22320 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22321 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22322 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22323 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22324 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22325 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22326 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22327 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22328 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22329 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22330 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22331 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22332 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22333 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22334 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22335 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22336 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22337 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22338 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22339 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22340 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22341 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22342 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22343 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22344 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22345 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22346 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22347 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22348 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22349 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22350 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22351 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22352 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22353 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22354 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22355 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22356 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22357 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22358 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22359 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22360 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22361 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22362 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22363 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22364 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22365 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22366 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22367 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22368 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22369 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22370 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22371 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22372 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22373 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
22374 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
22375 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020022376 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
22377 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
22378 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
22379 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
22380 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030022381 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
22382 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
22383 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
22384 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
22385 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
22386 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
22387 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
22388 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
22389 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
22390 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
22391 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
22392 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
22393 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
22394 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
22395 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
22396 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
22397 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
22398 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
22399 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
22400 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
22401 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
22402 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
22403 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
22404 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
22405 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
22406 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
22407 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
22408 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
22409 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
22410 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
22411 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
22412 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
22413 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
22414 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
22415 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
22416 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
22417 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
22418 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
22419 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
22420 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
22421 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
22422 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
22423 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
22424 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
22425 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
22426 "\x76\x44\x45\xF3\x24\x11\x57\x98"
22427 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
22428 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
22429 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
22430 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
22431 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
22432 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
22433 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
22434 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
22435 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
22436 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
22437 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
22438 .rlen = 496,
22439 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020022440 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22441 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
22442 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
22443 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
22444 .klen = 32,
22445 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
22446 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
22447 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22448 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22449 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22450 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22451 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
22452 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030022453 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22454 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22455 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22456 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22457 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22458 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22459 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22460 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22461 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22462 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22463 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22464 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22465 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22466 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22467 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22468 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22469 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22470 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22471 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22472 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22473 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22474 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22475 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22476 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22477 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22478 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22479 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22480 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22481 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22482 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22483 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22484 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22485 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22486 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22487 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22488 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22489 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22490 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22491 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22492 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22493 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22494 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22495 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22496 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22497 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22498 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22499 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22500 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22501 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22502 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22503 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22504 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22505 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22506 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22507 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
22508 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030022509 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
22510 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
22511 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
22512 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
22513 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
22514 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
22515 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
22516 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
22517 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
22518 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
22519 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
22520 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
22521 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
22522 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
22523 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
22524 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
22525 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
22526 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
22527 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
22528 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
22529 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
22530 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
22531 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
22532 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
22533 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
22534 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
22535 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
22536 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
22537 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
22538 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
22539 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
22540 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
22541 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
22542 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
22543 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
22544 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
22545 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
22546 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
22547 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
22548 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
22549 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
22550 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
22551 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
22552 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
22553 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
22554 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
22555 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
22556 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
22557 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
22558 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
22559 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
22560 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
22561 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
22562 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
22563 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
22564 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
22565 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
22566 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
22567 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
22568 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
22569 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
22570 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
22571 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
22572 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
22573 "\xE4\x7B\x12",
22574 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020022575 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
22576 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
22577 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
22578 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
22579 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
22580 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030022581 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
22582 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
22583 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
22584 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
22585 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
22586 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
22587 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
22588 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
22589 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
22590 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
22591 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
22592 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
22593 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
22594 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
22595 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
22596 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
22597 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
22598 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
22599 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
22600 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
22601 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
22602 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
22603 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
22604 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
22605 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
22606 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
22607 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
22608 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
22609 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
22610 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
22611 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
22612 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
22613 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
22614 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
22615 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
22616 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
22617 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
22618 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
22619 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
22620 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
22621 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
22622 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
22623 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
22624 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
22625 "\x76\x44\x45\xF3\x24\x11\x57\x98"
22626 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
22627 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
22628 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
22629 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
22630 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
22631 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
22632 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
22633 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
22634 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
22635 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
22636 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030022637 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
22638 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
22639 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
22640 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
22641 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
22642 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
22643 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
22644 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
22645 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
22646 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
22647 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
22648 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
22649 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
22650 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
22651 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
22652 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
22653 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
22654 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
22655 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
22656 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
22657 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
22658 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
22659 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
22660 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
22661 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
22662 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
22663 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
22664 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
22665 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
22666 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
22667 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
22668 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
22669 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
22670 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
22671 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
22672 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
22673 "\x00\x70\x12\x56\x56\x50\xAD\x14"
22674 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
22675 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
22676 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
22677 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
22678 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
22679 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
22680 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
22681 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
22682 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
22683 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
22684 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
22685 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
22686 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
22687 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
22688 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
22689 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
22690 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
22691 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
22692 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
22693 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
22694 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
22695 "\x74\x28\x9D\x05\x30\x20\x62\x41"
22696 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
22697 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
22698 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
22699 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
22700 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
22701 "\xF1\x6B\xD9",
22702 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030022703 .also_non_np = 1,
22704 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030022705 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030022706 }, { /* Generated with Crypto++ */
22707 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22708 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
22709 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
22710 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
22711 .klen = 32,
22712 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
22713 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
22714 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
22715 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
22716 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
22717 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
22718 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
22719 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
22720 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
22721 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
22722 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
22723 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
22724 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
22725 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
22726 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
22727 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
22728 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
22729 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
22730 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
22731 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
22732 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
22733 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
22734 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
22735 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
22736 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
22737 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
22738 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
22739 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
22740 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
22741 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
22742 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
22743 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
22744 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
22745 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
22746 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
22747 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
22748 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
22749 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
22750 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
22751 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
22752 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
22753 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
22754 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
22755 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
22756 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
22757 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
22758 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
22759 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
22760 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
22761 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
22762 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
22763 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
22764 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
22765 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
22766 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
22767 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
22768 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
22769 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
22770 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
22771 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
22772 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
22773 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
22774 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030022775 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
22776 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
22777 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
22778 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
22779 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
22780 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
22781 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
22782 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
22783 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
22784 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
22785 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
22786 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
22787 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
22788 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
22789 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
22790 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
22791 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
22792 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
22793 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
22794 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
22795 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
22796 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
22797 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
22798 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
22799 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
22800 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
22801 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
22802 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
22803 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
22804 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
22805 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
22806 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
22807 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
22808 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
22809 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
22810 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
22811 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
22812 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
22813 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
22814 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
22815 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
22816 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
22817 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
22818 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
22819 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
22820 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
22821 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
22822 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
22823 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
22824 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
22825 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
22826 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
22827 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
22828 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
22829 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
22830 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
22831 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
22832 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
22833 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
22834 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
22835 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
22836 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
22837 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
22838 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
22839 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
22840 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030022841 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
22842 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
22843 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
22844 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
22845 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
22846 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
22847 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
22848 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
22849 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
22850 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
22851 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
22852 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
22853 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
22854 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
22855 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
22856 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
22857 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
22858 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
22859 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
22860 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
22861 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
22862 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
22863 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
22864 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
22865 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
22866 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
22867 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
22868 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
22869 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
22870 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
22871 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
22872 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
22873 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
22874 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
22875 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
22876 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
22877 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
22878 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
22879 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
22880 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
22881 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
22882 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
22883 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
22884 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
22885 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
22886 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
22887 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
22888 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
22889 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
22890 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
22891 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
22892 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
22893 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
22894 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
22895 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
22896 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
22897 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
22898 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
22899 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
22900 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
22901 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030022902 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
22903 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
22904 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
22905 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
22906 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
22907 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
22908 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
22909 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
22910 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
22911 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
22912 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
22913 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
22914 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
22915 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
22916 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
22917 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
22918 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
22919 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
22920 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
22921 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
22922 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
22923 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
22924 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
22925 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
22926 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
22927 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
22928 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
22929 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
22930 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
22931 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
22932 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
22933 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
22934 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
22935 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
22936 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
22937 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
22938 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
22939 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
22940 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
22941 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
22942 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
22943 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
22944 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
22945 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
22946 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
22947 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
22948 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
22949 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
22950 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
22951 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
22952 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
22953 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
22954 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
22955 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
22956 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
22957 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
22958 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
22959 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
22960 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
22961 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
22962 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
22963 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
22964 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
22965 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
22966 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
22967 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020022968 },
22969};
22970
22971static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
22972 { /* Generated with Crypto++ */
22973 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
22974 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
22975 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
22976 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
22977 .klen = 32,
22978 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
22979 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
22980 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
22981 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
22982 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
22983 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
22984 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030022985 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
22986 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
22987 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
22988 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
22989 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
22990 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
22991 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
22992 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
22993 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
22994 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
22995 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
22996 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
22997 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
22998 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
22999 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
23000 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
23001 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
23002 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
23003 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
23004 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
23005 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
23006 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
23007 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
23008 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
23009 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
23010 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
23011 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
23012 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
23013 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
23014 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
23015 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
23016 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
23017 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
23018 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
23019 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
23020 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
23021 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
23022 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
23023 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
23024 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
23025 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
23026 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
23027 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
23028 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
23029 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
23030 "\x76\x44\x45\xF3\x24\x11\x57\x98"
23031 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
23032 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
23033 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
23034 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
23035 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
23036 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
23037 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
23038 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
23039 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
23040 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
23041 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
23042 .ilen = 496,
Jussi Kivilinna08406052012-03-05 20:26:21 +020023043 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23044 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23045 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23046 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23047 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030023048 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
23049 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23050 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23051 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23052 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23053 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23054 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23055 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23056 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23057 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23058 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23059 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23060 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23061 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23062 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23063 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23064 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23065 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23066 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23067 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23068 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23069 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23070 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23071 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23072 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23073 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23074 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23075 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23076 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23077 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23078 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23079 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23080 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23081 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23082 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23083 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23084 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23085 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23086 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23087 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23088 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23089 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23090 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23091 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23092 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23093 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23094 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23095 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23096 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23097 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23098 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23099 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23100 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23101 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23102 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23103 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23104 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
23105 .rlen = 496,
23106 }, { /* Generated with Crypto++ */
Jussi Kivilinna08406052012-03-05 20:26:21 +020023107 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23108 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
23109 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
23110 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
23111 .klen = 32,
23112 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
23113 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
23114 .input = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
23115 "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
23116 "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
23117 "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
23118 "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
23119 "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030023120 "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
23121 "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
23122 "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
23123 "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
23124 "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
23125 "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
23126 "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
23127 "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
23128 "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
23129 "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
23130 "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
23131 "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
23132 "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
23133 "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
23134 "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
23135 "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
23136 "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
23137 "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
23138 "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
23139 "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
23140 "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
23141 "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
23142 "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
23143 "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
23144 "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
23145 "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
23146 "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
23147 "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
23148 "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
23149 "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
23150 "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
23151 "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
23152 "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
23153 "\x79\xA2\x99\x28\x93\x1B\x00\x57"
23154 "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
23155 "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
23156 "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
23157 "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
23158 "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
23159 "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
23160 "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
23161 "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
23162 "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
23163 "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
23164 "\x76\x44\x45\xF3\x24\x11\x57\x98"
23165 "\x9A\x86\xB4\x12\x80\x28\x86\x20"
23166 "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
23167 "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
23168 "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
23169 "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
23170 "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
23171 "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
23172 "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
23173 "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
23174 "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
23175 "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030023176 "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
23177 "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
23178 "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
23179 "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
23180 "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
23181 "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
23182 "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
23183 "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
23184 "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
23185 "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
23186 "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
23187 "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
23188 "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
23189 "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
23190 "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
23191 "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
23192 "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
23193 "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
23194 "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
23195 "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
23196 "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
23197 "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
23198 "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
23199 "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
23200 "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
23201 "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
23202 "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
23203 "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
23204 "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
23205 "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
23206 "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
23207 "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
23208 "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
23209 "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
23210 "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
23211 "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
23212 "\x00\x70\x12\x56\x56\x50\xAD\x14"
23213 "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
23214 "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
23215 "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
23216 "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
23217 "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
23218 "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
23219 "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
23220 "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
23221 "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
23222 "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
23223 "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
23224 "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
23225 "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
23226 "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
23227 "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
23228 "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
23229 "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
23230 "\x40\x48\x19\x73\x7C\x78\x64\x0B"
23231 "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
23232 "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
23233 "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
23234 "\x74\x28\x9D\x05\x30\x20\x62\x41"
23235 "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
23236 "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
23237 "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
23238 "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
23239 "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
23240 "\xF1\x6B\xD9",
23241 .ilen = 1011,
Jussi Kivilinna08406052012-03-05 20:26:21 +020023242 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
23243 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
23244 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
23245 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
23246 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
23247 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
Jussi Kivilinnabe6314b2012-10-20 14:52:46 +030023248 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
23249 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
23250 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
23251 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
23252 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
23253 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
23254 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
23255 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
23256 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
23257 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
23258 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
23259 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
23260 "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
23261 "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
23262 "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
23263 "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
23264 "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
23265 "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
23266 "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
23267 "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
23268 "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
23269 "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
23270 "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
23271 "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
23272 "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
23273 "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
23274 "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
23275 "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
23276 "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
23277 "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
23278 "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
23279 "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
23280 "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
23281 "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
23282 "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
23283 "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
23284 "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
23285 "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
23286 "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
23287 "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
23288 "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
23289 "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
23290 "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
23291 "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
23292 "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
23293 "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
23294 "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
23295 "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
23296 "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
23297 "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
23298 "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
23299 "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
23300 "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
23301 "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
23302 "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
23303 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030023304 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
23305 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
23306 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
23307 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
23308 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
23309 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
23310 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
23311 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
23312 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
23313 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
23314 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
23315 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
23316 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
23317 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
23318 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
23319 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
23320 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
23321 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
23322 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
23323 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
23324 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
23325 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
23326 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
23327 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
23328 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
23329 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
23330 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
23331 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
23332 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
23333 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
23334 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
23335 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
23336 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
23337 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
23338 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
23339 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
23340 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
23341 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
23342 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
23343 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
23344 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
23345 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
23346 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
23347 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
23348 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
23349 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
23350 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
23351 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
23352 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
23353 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
23354 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
23355 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
23356 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
23357 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
23358 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
23359 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
23360 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
23361 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
23362 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
23363 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
23364 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
23365 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
23366 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
23367 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
23368 "\xE4\x7B\x12",
23369 .rlen = 1011,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023370 .also_non_np = 1,
23371 .np = 2,
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030023372 .tap = { 1011 - 16, 16 },
Jussi Kivilinna549595a2012-09-19 09:42:59 +030023373 }, { /* Generated with Crypto++ */
23374 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
23375 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
23376 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
23377 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
23378 .klen = 32,
23379 .iv = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
23380 "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
23381 .input = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
23382 "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
23383 "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
23384 "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
23385 "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
23386 "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
23387 "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
23388 "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
23389 "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
23390 "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
23391 "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
23392 "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
23393 "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
23394 "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
23395 "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
23396 "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
23397 "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
23398 "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
23399 "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
23400 "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
23401 "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
23402 "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
23403 "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
23404 "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
23405 "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
23406 "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
23407 "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
23408 "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
23409 "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
23410 "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
23411 "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
23412 "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
23413 "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
23414 "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
23415 "\x93\x78\x86\x05\x69\x46\xD0\xC5"
23416 "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
23417 "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
23418 "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
23419 "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
23420 "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
23421 "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
23422 "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
23423 "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
23424 "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
23425 "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
23426 "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
23427 "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
23428 "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
23429 "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
23430 "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
23431 "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
23432 "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
23433 "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
23434 "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
23435 "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
23436 "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
23437 "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
23438 "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
23439 "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
23440 "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
23441 "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030023442 "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
23443 "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
23444 "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
23445 "\x3F\x23\x69\x63\x56\x96\x45\xD6"
23446 "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
23447 "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
23448 "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
23449 "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
23450 "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
23451 "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
23452 "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
23453 "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
23454 "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
23455 "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
23456 "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
23457 "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
23458 "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
23459 "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
23460 "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
23461 "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
23462 "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
23463 "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
23464 "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
23465 "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
23466 "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
23467 "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
23468 "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
23469 "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
23470 "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
23471 "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
23472 "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
23473 "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
23474 "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
23475 "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
23476 "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
23477 "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
23478 "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
23479 "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
23480 "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
23481 "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
23482 "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
23483 "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
23484 "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
23485 "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
23486 "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
23487 "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
23488 "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
23489 "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
23490 "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
23491 "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
23492 "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
23493 "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
23494 "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
23495 "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
23496 "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
23497 "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
23498 "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
23499 "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
23500 "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
23501 "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
23502 "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
23503 "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
23504 "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
23505 "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
23506 "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
23507 .ilen = 1008,
Jussi Kivilinna549595a2012-09-19 09:42:59 +030023508 .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"
Jussi Kivilinna23a836e2013-04-13 13:46:35 +030023569 "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
23570 "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
23571 "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
23572 "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
23573 "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
23574 "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
23575 "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
23576 "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
23577 "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
23578 "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
23579 "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
23580 "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
23581 "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
23582 "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
23583 "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
23584 "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
23585 "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
23586 "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
23587 "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
23588 "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
23589 "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
23590 "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
23591 "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
23592 "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
23593 "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
23594 "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
23595 "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
23596 "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
23597 "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
23598 "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
23599 "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
23600 "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
23601 "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
23602 "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
23603 "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
23604 "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
23605 "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
23606 "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
23607 "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
23608 "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
23609 "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
23610 "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
23611 "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
23612 "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
23613 "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
23614 "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
23615 "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
23616 "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
23617 "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
23618 "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
23619 "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
23620 "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
23621 "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
23622 "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
23623 "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
23624 "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
23625 "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
23626 "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
23627 "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
23628 "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
23629 "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
23630 "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
23631 "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
23632 "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
23633 "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
23634 .rlen = 1008,
Jussi Kivilinna08406052012-03-05 20:26:21 +020023635 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020023636};
23637
23638static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
23639 /* Generated from AES-LRW test vectors */
23640 {
23641 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
23642 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
23643 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
23644 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
23645 .klen = 32,
23646 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23647 "\x00\x00\x00\x00\x00\x00\x00\x01",
23648 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
23649 "\x38\x39\x41\x42\x43\x44\x45\x46",
23650 .ilen = 16,
23651 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
23652 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
23653 .rlen = 16,
23654 }, {
23655 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
23656 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
23657 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
23658 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
23659 .klen = 32,
23660 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23661 "\x00\x00\x00\x00\x00\x00\x00\x02",
23662 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
23663 "\x38\x39\x41\x42\x43\x44\x45\x46",
23664 .ilen = 16,
23665 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
23666 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
23667 .rlen = 16,
23668 }, {
23669 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
23670 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
23671 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
23672 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
23673 .klen = 32,
23674 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23675 "\x00\x00\x00\x02\x00\x00\x00\x00",
23676 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
23677 "\x38\x39\x41\x42\x43\x44\x45\x46",
23678 .ilen = 16,
23679 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
23680 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
23681 .rlen = 16,
23682 }, {
23683 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
23684 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
23685 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
23686 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
23687 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
23688 .klen = 40,
23689 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23690 "\x00\x00\x00\x00\x00\x00\x00\x01",
23691 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
23692 "\x38\x39\x41\x42\x43\x44\x45\x46",
23693 .ilen = 16,
23694 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
23695 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
23696 .rlen = 16,
23697 }, {
23698 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
23699 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
23700 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
23701 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
23702 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
23703 .klen = 40,
23704 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23705 "\x00\x00\x00\x02\x00\x00\x00\x00",
23706 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
23707 "\x38\x39\x41\x42\x43\x44\x45\x46",
23708 .ilen = 16,
23709 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
23710 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
23711 .rlen = 16,
23712 }, {
23713 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
23714 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
23715 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
23716 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
23717 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
23718 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
23719 .klen = 48,
23720 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23721 "\x00\x00\x00\x00\x00\x00\x00\x01",
23722 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
23723 "\x38\x39\x41\x42\x43\x44\x45\x46",
23724 .ilen = 16,
23725 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
23726 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
23727 .rlen = 16,
23728 }, {
23729 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
23730 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
23731 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
23732 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
23733 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
23734 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
23735 .klen = 48,
23736 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23737 "\x00\x00\x00\x02\x00\x00\x00\x00",
23738 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
23739 "\x38\x39\x41\x42\x43\x44\x45\x46",
23740 .ilen = 16,
23741 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
23742 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
23743 .rlen = 16,
23744 }, {
23745 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
23746 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
23747 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
23748 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
23749 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
23750 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
23751 .klen = 48,
23752 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23753 "\x00\x00\x00\x00\x00\x00\x00\x01",
23754 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
23755 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
23756 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
23757 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
23758 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
23759 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
23760 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
23761 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
23762 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
23763 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
23764 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
23765 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
23766 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
23767 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
23768 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
23769 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
23770 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
23771 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
23772 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
23773 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
23774 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
23775 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
23776 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
23777 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
23778 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
23779 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
23780 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
23781 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
23782 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
23783 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
23784 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
23785 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
23786 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
23787 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
23788 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
23789 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
23790 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
23791 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
23792 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
23793 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
23794 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
23795 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
23796 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
23797 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
23798 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
23799 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
23800 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
23801 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
23802 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
23803 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
23804 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
23805 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
23806 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
23807 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
23808 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
23809 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
23810 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
23811 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
23812 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
23813 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
23814 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
23815 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
23816 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
23817 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
23818 .ilen = 512,
23819 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
23820 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
23821 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
23822 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
23823 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
23824 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
23825 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
23826 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
23827 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
23828 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
23829 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
23830 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
23831 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
23832 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
23833 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
23834 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
23835 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
23836 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
23837 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
23838 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
23839 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
23840 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
23841 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
23842 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
23843 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
23844 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
23845 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
23846 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
23847 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
23848 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
23849 "\xed\x14\xa9\x57\x19\x63\x40\x04"
23850 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
23851 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
23852 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
23853 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
23854 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
23855 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
23856 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
23857 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
23858 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
23859 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
23860 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
23861 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
23862 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
23863 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
23864 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
23865 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
23866 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
23867 "\x35\xa5\x83\x04\x84\x01\x99\x56"
23868 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
23869 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
23870 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
23871 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
23872 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
23873 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
23874 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
23875 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
23876 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
23877 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
23878 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
23879 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
23880 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
23881 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
23882 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
23883 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030023884 .also_non_np = 1,
23885 .np = 2,
23886 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020023887 },
23888};
23889
23890static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
23891 /* Generated from AES-LRW test vectors */
23892 /* same as enc vectors with input and result reversed */
23893 {
23894 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
23895 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
23896 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
23897 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
23898 .klen = 32,
23899 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23900 "\x00\x00\x00\x00\x00\x00\x00\x01",
23901 .input = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
23902 "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
23903 .ilen = 16,
23904 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
23905 "\x38\x39\x41\x42\x43\x44\x45\x46",
23906 .rlen = 16,
23907 }, {
23908 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
23909 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
23910 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
23911 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
23912 .klen = 32,
23913 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23914 "\x00\x00\x00\x00\x00\x00\x00\x02",
23915 .input = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
23916 "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
23917 .ilen = 16,
23918 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
23919 "\x38\x39\x41\x42\x43\x44\x45\x46",
23920 .rlen = 16,
23921 }, {
23922 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
23923 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
23924 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
23925 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
23926 .klen = 32,
23927 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23928 "\x00\x00\x00\x02\x00\x00\x00\x00",
23929 .input = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
23930 "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
23931 .ilen = 16,
23932 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
23933 "\x38\x39\x41\x42\x43\x44\x45\x46",
23934 .rlen = 16,
23935 }, {
23936 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
23937 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
23938 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
23939 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
23940 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
23941 .klen = 40,
23942 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23943 "\x00\x00\x00\x00\x00\x00\x00\x01",
23944 .input = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
23945 "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
23946 .ilen = 16,
23947 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
23948 "\x38\x39\x41\x42\x43\x44\x45\x46",
23949 .rlen = 16,
23950 }, {
23951 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
23952 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
23953 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
23954 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
23955 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
23956 .klen = 40,
23957 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23958 "\x00\x00\x00\x02\x00\x00\x00\x00",
23959 .input = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
23960 "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
23961 .ilen = 16,
23962 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
23963 "\x38\x39\x41\x42\x43\x44\x45\x46",
23964 .rlen = 16,
23965 }, {
23966 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
23967 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
23968 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
23969 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
23970 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
23971 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
23972 .klen = 48,
23973 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23974 "\x00\x00\x00\x00\x00\x00\x00\x01",
23975 .input = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
23976 "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
23977 .ilen = 16,
23978 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
23979 "\x38\x39\x41\x42\x43\x44\x45\x46",
23980 .rlen = 16,
23981 }, {
23982 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
23983 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
23984 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
23985 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
23986 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
23987 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
23988 .klen = 48,
23989 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
23990 "\x00\x00\x00\x02\x00\x00\x00\x00",
23991 .input = "\x04\xab\x28\x37\x31\x7a\x26\xab"
23992 "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
23993 .ilen = 16,
23994 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
23995 "\x38\x39\x41\x42\x43\x44\x45\x46",
23996 .rlen = 16,
23997 }, {
23998 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
23999 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
24000 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
24001 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
24002 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
24003 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
24004 .klen = 48,
24005 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
24006 "\x00\x00\x00\x00\x00\x00\x00\x01",
24007 .input = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
24008 "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
24009 "\x67\x76\xac\x2c\xd2\x63\x18\x93"
24010 "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
24011 "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
24012 "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
24013 "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
24014 "\x62\xdd\x78\x81\xea\x1d\xef\x04"
24015 "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
24016 "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
24017 "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
24018 "\x40\x41\x69\xaa\x71\xc0\x37\xec"
24019 "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
24020 "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
24021 "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
24022 "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
24023 "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
24024 "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
24025 "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
24026 "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
24027 "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
24028 "\x42\x08\x40\x82\x06\x1c\x2d\x55"
24029 "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
24030 "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
24031 "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
24032 "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
24033 "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
24034 "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
24035 "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
24036 "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
24037 "\xed\x14\xa9\x57\x19\x63\x40\x04"
24038 "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
24039 "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
24040 "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
24041 "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
24042 "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
24043 "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
24044 "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
24045 "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
24046 "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
24047 "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
24048 "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
24049 "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
24050 "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
24051 "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
24052 "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
24053 "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
24054 "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
24055 "\x35\xa5\x83\x04\x84\x01\x99\x56"
24056 "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
24057 "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
24058 "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
24059 "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
24060 "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
24061 "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
24062 "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
24063 "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
24064 "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
24065 "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
24066 "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
24067 "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
24068 "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
24069 "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
24070 "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
24071 .ilen = 512,
24072 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
24073 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
24074 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
24075 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
24076 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
24077 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
24078 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
24079 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
24080 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
24081 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
24082 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
24083 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
24084 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
24085 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
24086 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
24087 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
24088 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
24089 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
24090 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
24091 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
24092 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
24093 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
24094 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
24095 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
24096 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
24097 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
24098 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
24099 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
24100 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
24101 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
24102 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
24103 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
24104 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
24105 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
24106 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
24107 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
24108 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
24109 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
24110 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
24111 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
24112 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
24113 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
24114 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
24115 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
24116 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
24117 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
24118 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
24119 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
24120 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
24121 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
24122 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
24123 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
24124 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
24125 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
24126 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
24127 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
24128 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
24129 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
24130 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
24131 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
24132 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
24133 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
24134 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
24135 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
24136 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024137 .also_non_np = 1,
24138 .np = 2,
24139 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020024140 },
24141};
24142
24143static struct cipher_testvec camellia_xts_enc_tv_template[] = {
24144 /* Generated from AES-XTS test vectors */
24145 {
24146 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
24147 "\x00\x00\x00\x00\x00\x00\x00\x00"
24148 "\x00\x00\x00\x00\x00\x00\x00\x00"
24149 "\x00\x00\x00\x00\x00\x00\x00\x00",
24150 .klen = 32,
24151 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
24152 "\x00\x00\x00\x00\x00\x00\x00\x00",
24153 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
24154 "\x00\x00\x00\x00\x00\x00\x00\x00"
24155 "\x00\x00\x00\x00\x00\x00\x00\x00"
24156 "\x00\x00\x00\x00\x00\x00\x00\x00",
24157 .ilen = 32,
24158 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
24159 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
24160 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
24161 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
24162 .rlen = 32,
24163 }, {
24164 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
24165 "\x11\x11\x11\x11\x11\x11\x11\x11"
24166 "\x22\x22\x22\x22\x22\x22\x22\x22"
24167 "\x22\x22\x22\x22\x22\x22\x22\x22",
24168 .klen = 32,
24169 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
24170 "\x00\x00\x00\x00\x00\x00\x00\x00",
24171 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
24172 "\x44\x44\x44\x44\x44\x44\x44\x44"
24173 "\x44\x44\x44\x44\x44\x44\x44\x44"
24174 "\x44\x44\x44\x44\x44\x44\x44\x44",
24175 .ilen = 32,
24176 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
24177 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
24178 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
24179 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
24180 .rlen = 32,
24181 }, {
24182 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
24183 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
24184 "\x22\x22\x22\x22\x22\x22\x22\x22"
24185 "\x22\x22\x22\x22\x22\x22\x22\x22",
24186 .klen = 32,
24187 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
24188 "\x00\x00\x00\x00\x00\x00\x00\x00",
24189 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
24190 "\x44\x44\x44\x44\x44\x44\x44\x44"
24191 "\x44\x44\x44\x44\x44\x44\x44\x44"
24192 "\x44\x44\x44\x44\x44\x44\x44\x44",
24193 .ilen = 32,
24194 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
24195 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
24196 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
24197 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
24198 .rlen = 32,
24199 }, {
24200 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
24201 "\x23\x53\x60\x28\x74\x71\x35\x26"
24202 "\x31\x41\x59\x26\x53\x58\x97\x93"
24203 "\x23\x84\x62\x64\x33\x83\x27\x95",
24204 .klen = 32,
24205 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
24206 "\x00\x00\x00\x00\x00\x00\x00\x00",
24207 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
24208 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
24209 "\x10\x11\x12\x13\x14\x15\x16\x17"
24210 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
24211 "\x20\x21\x22\x23\x24\x25\x26\x27"
24212 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
24213 "\x30\x31\x32\x33\x34\x35\x36\x37"
24214 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
24215 "\x40\x41\x42\x43\x44\x45\x46\x47"
24216 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
24217 "\x50\x51\x52\x53\x54\x55\x56\x57"
24218 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
24219 "\x60\x61\x62\x63\x64\x65\x66\x67"
24220 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
24221 "\x70\x71\x72\x73\x74\x75\x76\x77"
24222 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
24223 "\x80\x81\x82\x83\x84\x85\x86\x87"
24224 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
24225 "\x90\x91\x92\x93\x94\x95\x96\x97"
24226 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
24227 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
24228 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
24229 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
24230 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
24231 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
24232 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
24233 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
24234 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
24235 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
24236 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
24237 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
24238 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
24239 "\x00\x01\x02\x03\x04\x05\x06\x07"
24240 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
24241 "\x10\x11\x12\x13\x14\x15\x16\x17"
24242 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
24243 "\x20\x21\x22\x23\x24\x25\x26\x27"
24244 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
24245 "\x30\x31\x32\x33\x34\x35\x36\x37"
24246 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
24247 "\x40\x41\x42\x43\x44\x45\x46\x47"
24248 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
24249 "\x50\x51\x52\x53\x54\x55\x56\x57"
24250 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
24251 "\x60\x61\x62\x63\x64\x65\x66\x67"
24252 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
24253 "\x70\x71\x72\x73\x74\x75\x76\x77"
24254 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
24255 "\x80\x81\x82\x83\x84\x85\x86\x87"
24256 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
24257 "\x90\x91\x92\x93\x94\x95\x96\x97"
24258 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
24259 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
24260 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
24261 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
24262 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
24263 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
24264 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
24265 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
24266 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
24267 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
24268 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
24269 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
24270 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
24271 .ilen = 512,
24272 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
24273 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
24274 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
24275 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
24276 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
24277 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
24278 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
24279 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
24280 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
24281 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
24282 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
24283 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
24284 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
24285 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
24286 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
24287 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
24288 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
24289 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
24290 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
24291 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
24292 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
24293 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
24294 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
24295 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
24296 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
24297 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
24298 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
24299 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
24300 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
24301 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
24302 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
24303 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
24304 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
24305 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
24306 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
24307 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
24308 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
24309 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
24310 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
24311 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
24312 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
24313 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
24314 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
24315 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
24316 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
24317 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
24318 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
24319 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
24320 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
24321 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
24322 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
24323 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
24324 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
24325 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
24326 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
24327 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
24328 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
24329 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
24330 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
24331 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
24332 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
24333 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
24334 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
24335 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
24336 .rlen = 512,
24337 }, {
24338 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
24339 "\x23\x53\x60\x28\x74\x71\x35\x26"
24340 "\x62\x49\x77\x57\x24\x70\x93\x69"
24341 "\x99\x59\x57\x49\x66\x96\x76\x27"
24342 "\x31\x41\x59\x26\x53\x58\x97\x93"
24343 "\x23\x84\x62\x64\x33\x83\x27\x95"
24344 "\x02\x88\x41\x97\x16\x93\x99\x37"
24345 "\x51\x05\x82\x09\x74\x94\x45\x92",
24346 .klen = 64,
24347 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
24348 "\x00\x00\x00\x00\x00\x00\x00\x00",
24349 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
24350 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
24351 "\x10\x11\x12\x13\x14\x15\x16\x17"
24352 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
24353 "\x20\x21\x22\x23\x24\x25\x26\x27"
24354 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
24355 "\x30\x31\x32\x33\x34\x35\x36\x37"
24356 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
24357 "\x40\x41\x42\x43\x44\x45\x46\x47"
24358 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
24359 "\x50\x51\x52\x53\x54\x55\x56\x57"
24360 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
24361 "\x60\x61\x62\x63\x64\x65\x66\x67"
24362 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
24363 "\x70\x71\x72\x73\x74\x75\x76\x77"
24364 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
24365 "\x80\x81\x82\x83\x84\x85\x86\x87"
24366 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
24367 "\x90\x91\x92\x93\x94\x95\x96\x97"
24368 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
24369 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
24370 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
24371 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
24372 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
24373 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
24374 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
24375 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
24376 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
24377 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
24378 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
24379 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
24380 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
24381 "\x00\x01\x02\x03\x04\x05\x06\x07"
24382 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
24383 "\x10\x11\x12\x13\x14\x15\x16\x17"
24384 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
24385 "\x20\x21\x22\x23\x24\x25\x26\x27"
24386 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
24387 "\x30\x31\x32\x33\x34\x35\x36\x37"
24388 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
24389 "\x40\x41\x42\x43\x44\x45\x46\x47"
24390 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
24391 "\x50\x51\x52\x53\x54\x55\x56\x57"
24392 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
24393 "\x60\x61\x62\x63\x64\x65\x66\x67"
24394 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
24395 "\x70\x71\x72\x73\x74\x75\x76\x77"
24396 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
24397 "\x80\x81\x82\x83\x84\x85\x86\x87"
24398 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
24399 "\x90\x91\x92\x93\x94\x95\x96\x97"
24400 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
24401 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
24402 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
24403 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
24404 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
24405 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
24406 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
24407 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
24408 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
24409 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
24410 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
24411 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
24412 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
24413 .ilen = 512,
24414 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
24415 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
24416 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
24417 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
24418 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
24419 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
24420 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
24421 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
24422 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
24423 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
24424 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
24425 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
24426 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
24427 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
24428 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
24429 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
24430 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
24431 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
24432 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
24433 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
24434 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
24435 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
24436 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
24437 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
24438 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
24439 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
24440 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
24441 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
24442 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
24443 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
24444 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
24445 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
24446 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
24447 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
24448 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
24449 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
24450 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
24451 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
24452 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
24453 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
24454 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
24455 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
24456 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
24457 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
24458 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
24459 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
24460 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
24461 "\x21\x17\xf8\x59\x15\x24\x64\x22"
24462 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
24463 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
24464 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
24465 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
24466 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
24467 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
24468 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
24469 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
24470 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
24471 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
24472 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
24473 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
24474 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
24475 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
24476 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
24477 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
24478 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024479 .also_non_np = 1,
24480 .np = 2,
24481 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020024482 },
24483};
24484
24485static struct cipher_testvec camellia_xts_dec_tv_template[] = {
24486 /* Generated from AES-XTS test vectors */
24487 /* same as enc vectors with input and result reversed */
24488 {
24489 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
24490 "\x00\x00\x00\x00\x00\x00\x00\x00"
24491 "\x00\x00\x00\x00\x00\x00\x00\x00"
24492 "\x00\x00\x00\x00\x00\x00\x00\x00",
24493 .klen = 32,
24494 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
24495 "\x00\x00\x00\x00\x00\x00\x00\x00",
24496 .input = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
24497 "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
24498 "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
24499 "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
24500 .ilen = 32,
24501 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
24502 "\x00\x00\x00\x00\x00\x00\x00\x00"
24503 "\x00\x00\x00\x00\x00\x00\x00\x00"
24504 "\x00\x00\x00\x00\x00\x00\x00\x00",
24505 .rlen = 32,
24506 }, {
24507 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
24508 "\x11\x11\x11\x11\x11\x11\x11\x11"
24509 "\x22\x22\x22\x22\x22\x22\x22\x22"
24510 "\x22\x22\x22\x22\x22\x22\x22\x22",
24511 .klen = 32,
24512 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
24513 "\x00\x00\x00\x00\x00\x00\x00\x00",
24514 .input = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
24515 "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
24516 "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
24517 "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
24518 .ilen = 32,
24519 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
24520 "\x44\x44\x44\x44\x44\x44\x44\x44"
24521 "\x44\x44\x44\x44\x44\x44\x44\x44"
24522 "\x44\x44\x44\x44\x44\x44\x44\x44",
24523 .rlen = 32,
24524 }, {
24525 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
24526 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
24527 "\x22\x22\x22\x22\x22\x22\x22\x22"
24528 "\x22\x22\x22\x22\x22\x22\x22\x22",
24529 .klen = 32,
24530 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
24531 "\x00\x00\x00\x00\x00\x00\x00\x00",
24532 .input = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
24533 "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
24534 "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
24535 "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
24536 .ilen = 32,
24537 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
24538 "\x44\x44\x44\x44\x44\x44\x44\x44"
24539 "\x44\x44\x44\x44\x44\x44\x44\x44"
24540 "\x44\x44\x44\x44\x44\x44\x44\x44",
24541 .rlen = 32,
24542 }, {
24543 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
24544 "\x23\x53\x60\x28\x74\x71\x35\x26"
24545 "\x31\x41\x59\x26\x53\x58\x97\x93"
24546 "\x23\x84\x62\x64\x33\x83\x27\x95",
24547 .klen = 32,
24548 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
24549 "\x00\x00\x00\x00\x00\x00\x00\x00",
24550 .input = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
24551 "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
24552 "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
24553 "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
24554 "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
24555 "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
24556 "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
24557 "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
24558 "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
24559 "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
24560 "\x08\xda\x76\x00\x65\xcf\x7b\x31"
24561 "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
24562 "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
24563 "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
24564 "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
24565 "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
24566 "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
24567 "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
24568 "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
24569 "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
24570 "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
24571 "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
24572 "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
24573 "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
24574 "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
24575 "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
24576 "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
24577 "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
24578 "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
24579 "\x16\x31\xb2\x47\x91\x67\xaa\x28"
24580 "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
24581 "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
24582 "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
24583 "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
24584 "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
24585 "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
24586 "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
24587 "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
24588 "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
24589 "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
24590 "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
24591 "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
24592 "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
24593 "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
24594 "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
24595 "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
24596 "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
24597 "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
24598 "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
24599 "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
24600 "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
24601 "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
24602 "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
24603 "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
24604 "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
24605 "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
24606 "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
24607 "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
24608 "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
24609 "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
24610 "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
24611 "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
24612 "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
24613 "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
24614 .ilen = 512,
24615 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
24616 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
24617 "\x10\x11\x12\x13\x14\x15\x16\x17"
24618 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
24619 "\x20\x21\x22\x23\x24\x25\x26\x27"
24620 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
24621 "\x30\x31\x32\x33\x34\x35\x36\x37"
24622 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
24623 "\x40\x41\x42\x43\x44\x45\x46\x47"
24624 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
24625 "\x50\x51\x52\x53\x54\x55\x56\x57"
24626 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
24627 "\x60\x61\x62\x63\x64\x65\x66\x67"
24628 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
24629 "\x70\x71\x72\x73\x74\x75\x76\x77"
24630 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
24631 "\x80\x81\x82\x83\x84\x85\x86\x87"
24632 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
24633 "\x90\x91\x92\x93\x94\x95\x96\x97"
24634 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
24635 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
24636 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
24637 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
24638 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
24639 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
24640 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
24641 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
24642 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
24643 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
24644 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
24645 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
24646 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
24647 "\x00\x01\x02\x03\x04\x05\x06\x07"
24648 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
24649 "\x10\x11\x12\x13\x14\x15\x16\x17"
24650 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
24651 "\x20\x21\x22\x23\x24\x25\x26\x27"
24652 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
24653 "\x30\x31\x32\x33\x34\x35\x36\x37"
24654 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
24655 "\x40\x41\x42\x43\x44\x45\x46\x47"
24656 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
24657 "\x50\x51\x52\x53\x54\x55\x56\x57"
24658 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
24659 "\x60\x61\x62\x63\x64\x65\x66\x67"
24660 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
24661 "\x70\x71\x72\x73\x74\x75\x76\x77"
24662 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
24663 "\x80\x81\x82\x83\x84\x85\x86\x87"
24664 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
24665 "\x90\x91\x92\x93\x94\x95\x96\x97"
24666 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
24667 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
24668 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
24669 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
24670 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
24671 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
24672 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
24673 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
24674 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
24675 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
24676 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
24677 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
24678 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
24679 .rlen = 512,
24680 }, {
24681 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
24682 "\x23\x53\x60\x28\x74\x71\x35\x26"
24683 "\x62\x49\x77\x57\x24\x70\x93\x69"
24684 "\x99\x59\x57\x49\x66\x96\x76\x27"
24685 "\x31\x41\x59\x26\x53\x58\x97\x93"
24686 "\x23\x84\x62\x64\x33\x83\x27\x95"
24687 "\x02\x88\x41\x97\x16\x93\x99\x37"
24688 "\x51\x05\x82\x09\x74\x94\x45\x92",
24689 .klen = 64,
24690 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
24691 "\x00\x00\x00\x00\x00\x00\x00\x00",
24692 .input = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
24693 "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
24694 "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
24695 "\xf1\x74\xac\x96\x05\x7b\x32\xca"
24696 "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
24697 "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
24698 "\x97\x07\x82\xf0\x07\x12\x38\x0a"
24699 "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
24700 "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
24701 "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
24702 "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
24703 "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
24704 "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
24705 "\x41\x82\x0c\x45\x39\x35\xa8\x75"
24706 "\x03\x29\x01\x84\x8c\xab\x48\xbe"
24707 "\x11\x56\x22\x67\xb7\x67\x1a\x09"
24708 "\xa1\x72\x25\x41\x3c\x39\x65\x80"
24709 "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
24710 "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
24711 "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
24712 "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
24713 "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
24714 "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
24715 "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
24716 "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
24717 "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
24718 "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
24719 "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
24720 "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
24721 "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
24722 "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
24723 "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
24724 "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
24725 "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
24726 "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
24727 "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
24728 "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
24729 "\xef\x38\x52\x18\x0e\x29\x7e\xef"
24730 "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
24731 "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
24732 "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
24733 "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
24734 "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
24735 "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
24736 "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
24737 "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
24738 "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
24739 "\x21\x17\xf8\x59\x15\x24\x64\x22"
24740 "\x57\x48\x80\xd5\x3d\x92\x30\x07"
24741 "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
24742 "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
24743 "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
24744 "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
24745 "\x6b\x84\xf3\x00\xba\x52\x05\x02"
24746 "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
24747 "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
24748 "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
24749 "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
24750 "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
24751 "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
24752 "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
24753 "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
24754 "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
24755 "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
24756 .ilen = 512,
24757 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
24758 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
24759 "\x10\x11\x12\x13\x14\x15\x16\x17"
24760 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
24761 "\x20\x21\x22\x23\x24\x25\x26\x27"
24762 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
24763 "\x30\x31\x32\x33\x34\x35\x36\x37"
24764 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
24765 "\x40\x41\x42\x43\x44\x45\x46\x47"
24766 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
24767 "\x50\x51\x52\x53\x54\x55\x56\x57"
24768 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
24769 "\x60\x61\x62\x63\x64\x65\x66\x67"
24770 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
24771 "\x70\x71\x72\x73\x74\x75\x76\x77"
24772 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
24773 "\x80\x81\x82\x83\x84\x85\x86\x87"
24774 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
24775 "\x90\x91\x92\x93\x94\x95\x96\x97"
24776 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
24777 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
24778 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
24779 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
24780 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
24781 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
24782 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
24783 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
24784 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
24785 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
24786 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
24787 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
24788 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
24789 "\x00\x01\x02\x03\x04\x05\x06\x07"
24790 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
24791 "\x10\x11\x12\x13\x14\x15\x16\x17"
24792 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
24793 "\x20\x21\x22\x23\x24\x25\x26\x27"
24794 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
24795 "\x30\x31\x32\x33\x34\x35\x36\x37"
24796 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
24797 "\x40\x41\x42\x43\x44\x45\x46\x47"
24798 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
24799 "\x50\x51\x52\x53\x54\x55\x56\x57"
24800 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
24801 "\x60\x61\x62\x63\x64\x65\x66\x67"
24802 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
24803 "\x70\x71\x72\x73\x74\x75\x76\x77"
24804 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
24805 "\x80\x81\x82\x83\x84\x85\x86\x87"
24806 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
24807 "\x90\x91\x92\x93\x94\x95\x96\x97"
24808 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
24809 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
24810 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
24811 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
24812 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
24813 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
24814 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
24815 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
24816 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
24817 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
24818 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
24819 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
24820 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
24821 .rlen = 512,
Jussi Kivilinnaf44d83d2012-09-19 09:42:49 +030024822 .also_non_np = 1,
24823 .np = 2,
24824 .tap = { 512 - 16, 16 },
Jussi Kivilinna08406052012-03-05 20:26:21 +020024825 },
Herbert Xuda7f0332008-07-31 17:08:25 +080024826};
24827
24828/*
24829 * SEED test vectors
24830 */
24831#define SEED_ENC_TEST_VECTORS 4
24832#define SEED_DEC_TEST_VECTORS 4
24833
24834static struct cipher_testvec seed_enc_tv_template[] = {
24835 {
24836 .key = zeroed_string,
24837 .klen = 16,
24838 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
24839 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
24840 .ilen = 16,
24841 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
24842 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
24843 .rlen = 16,
24844 }, {
24845 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
24846 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
24847 .klen = 16,
24848 .input = zeroed_string,
24849 .ilen = 16,
24850 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
24851 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
24852 .rlen = 16,
24853 }, {
24854 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
24855 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
24856 .klen = 16,
24857 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
24858 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
24859 .ilen = 16,
24860 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
24861 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
24862 .rlen = 16,
24863 }, {
24864 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
24865 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
24866 .klen = 16,
24867 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
24868 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
24869 .ilen = 16,
24870 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
24871 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
24872 .rlen = 16,
24873 }
24874};
24875
24876static struct cipher_testvec seed_dec_tv_template[] = {
24877 {
24878 .key = zeroed_string,
24879 .klen = 16,
24880 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
24881 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
24882 .ilen = 16,
24883 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
24884 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
24885 .rlen = 16,
24886 }, {
24887 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
24888 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
24889 .klen = 16,
24890 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
24891 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
24892 .ilen = 16,
24893 .result = zeroed_string,
24894 .rlen = 16,
24895 }, {
24896 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
24897 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
24898 .klen = 16,
24899 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
24900 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
24901 .ilen = 16,
24902 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
24903 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
24904 .rlen = 16,
24905 }, {
24906 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
24907 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
24908 .klen = 16,
24909 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
24910 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
24911 .ilen = 16,
24912 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
24913 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
24914 .rlen = 16,
24915 }
24916};
24917
24918#define SALSA20_STREAM_ENC_TEST_VECTORS 5
24919static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
24920 /*
24921 * Testvectors from verified.test-vectors submitted to ECRYPT.
24922 * They are truncated to size 39, 64, 111, 129 to test a variety
24923 * of input length.
24924 */
24925 { /* Set 3, vector 0 */
24926 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
24927 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
24928 .klen = 16,
24929 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24930 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
24931 "\x00\x00\x00\x00\x00\x00\x00\x00"
24932 "\x00\x00\x00\x00\x00\x00\x00\x00"
24933 "\x00\x00\x00\x00\x00\x00\x00\x00"
24934 "\x00\x00\x00\x00\x00\x00\x00",
24935 .ilen = 39,
24936 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
24937 "\x68\x02\x41\x0C\x68\x86\x88\x89"
24938 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
24939 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
24940 "\x58\x3F\x52\x79\x70\xEB\xC1",
24941 .rlen = 39,
24942 }, { /* Set 5, vector 0 */
24943 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
24944 "\x00\x00\x00\x00\x00\x00\x00\x00",
24945 .klen = 16,
24946 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
24947 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
24948 "\x00\x00\x00\x00\x00\x00\x00\x00"
24949 "\x00\x00\x00\x00\x00\x00\x00\x00"
24950 "\x00\x00\x00\x00\x00\x00\x00\x00"
24951 "\x00\x00\x00\x00\x00\x00\x00\x00"
24952 "\x00\x00\x00\x00\x00\x00\x00\x00"
24953 "\x00\x00\x00\x00\x00\x00\x00\x00"
24954 "\x00\x00\x00\x00\x00\x00\x00\x00",
24955 .ilen = 64,
24956 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
24957 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
24958 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
24959 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
24960 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
24961 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
24962 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
24963 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
24964 .rlen = 64,
24965 }, { /* Set 3, vector 27 */
24966 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
24967 "\x23\x24\x25\x26\x27\x28\x29\x2A"
24968 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
24969 "\x33\x34\x35\x36\x37\x38\x39\x3A",
24970 .klen = 32,
24971 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
24972 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
24973 "\x00\x00\x00\x00\x00\x00\x00\x00"
24974 "\x00\x00\x00\x00\x00\x00\x00\x00"
24975 "\x00\x00\x00\x00\x00\x00\x00\x00"
24976 "\x00\x00\x00\x00\x00\x00\x00\x00"
24977 "\x00\x00\x00\x00\x00\x00\x00\x00"
24978 "\x00\x00\x00\x00\x00\x00\x00\x00"
24979 "\x00\x00\x00\x00\x00\x00\x00\x00"
24980 "\x00\x00\x00\x00\x00\x00\x00\x00"
24981 "\x00\x00\x00\x00\x00\x00\x00\x00"
24982 "\x00\x00\x00\x00\x00\x00\x00\x00"
24983 "\x00\x00\x00\x00\x00\x00\x00\x00"
24984 "\x00\x00\x00\x00\x00\x00\x00\x00"
24985 "\x00\x00\x00\x00\x00\x00\x00",
24986 .ilen = 111,
24987 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
24988 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
24989 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
24990 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
24991 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
24992 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
24993 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
24994 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
24995 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
24996 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
24997 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
24998 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
24999 "\x95\x46\x45\x54\xE9\x75\x03\x08"
25000 "\x44\xAF\xE5\x8A\x81\x12\x09",
25001 .rlen = 111,
25002 }, { /* Set 5, vector 27 */
25003 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
25004 "\x00\x00\x00\x00\x00\x00\x00\x00"
25005 "\x00\x00\x00\x00\x00\x00\x00\x00"
25006 "\x00\x00\x00\x00\x00\x00\x00\x00",
25007 .klen = 32,
25008 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
25009 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
25010 "\x00\x00\x00\x00\x00\x00\x00\x00"
25011 "\x00\x00\x00\x00\x00\x00\x00\x00"
25012 "\x00\x00\x00\x00\x00\x00\x00\x00"
25013 "\x00\x00\x00\x00\x00\x00\x00\x00"
25014 "\x00\x00\x00\x00\x00\x00\x00\x00"
25015 "\x00\x00\x00\x00\x00\x00\x00\x00"
25016 "\x00\x00\x00\x00\x00\x00\x00\x00"
25017 "\x00\x00\x00\x00\x00\x00\x00\x00"
25018 "\x00\x00\x00\x00\x00\x00\x00\x00"
25019 "\x00\x00\x00\x00\x00\x00\x00\x00"
25020 "\x00\x00\x00\x00\x00\x00\x00\x00"
25021 "\x00\x00\x00\x00\x00\x00\x00\x00"
25022 "\x00\x00\x00\x00\x00\x00\x00\x00"
25023 "\x00\x00\x00\x00\x00\x00\x00\x00"
25024 "\x00\x00\x00\x00\x00\x00\x00\x00"
25025 "\x00",
25026 .ilen = 129,
25027 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
25028 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
25029 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
25030 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
25031 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
25032 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
25033 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
25034 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
25035 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
25036 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
25037 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
25038 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
25039 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
25040 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
25041 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
25042 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
25043 "\x5A",
25044 .rlen = 129,
25045 }, { /* large test vector generated using Crypto++ */
25046 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
25047 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
25048 "\x10\x11\x12\x13\x14\x15\x16\x17"
25049 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
25050 .klen = 32,
25051 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
25052 "\x00\x00\x00\x00\x00\x00\x00\x00",
25053 .input =
25054 "\x00\x01\x02\x03\x04\x05\x06\x07"
25055 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
25056 "\x10\x11\x12\x13\x14\x15\x16\x17"
25057 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
25058 "\x20\x21\x22\x23\x24\x25\x26\x27"
25059 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
25060 "\x30\x31\x32\x33\x34\x35\x36\x37"
25061 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
25062 "\x40\x41\x42\x43\x44\x45\x46\x47"
25063 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
25064 "\x50\x51\x52\x53\x54\x55\x56\x57"
25065 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
25066 "\x60\x61\x62\x63\x64\x65\x66\x67"
25067 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
25068 "\x70\x71\x72\x73\x74\x75\x76\x77"
25069 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
25070 "\x80\x81\x82\x83\x84\x85\x86\x87"
25071 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
25072 "\x90\x91\x92\x93\x94\x95\x96\x97"
25073 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
25074 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
25075 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
25076 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
25077 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
25078 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
25079 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
25080 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
25081 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
25082 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
25083 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
25084 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
25085 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
25086 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
25087 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
25088 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
25089 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
25090 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
25091 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
25092 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
25093 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
25094 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
25095 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
25096 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
25097 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
25098 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
25099 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
25100 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
25101 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
25102 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
25103 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
25104 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
25105 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
25106 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
25107 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
25108 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
25109 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
25110 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
25111 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
25112 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
25113 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
25114 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
25115 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
25116 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
25117 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
25118 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
25119 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
25120 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
25121 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
25122 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
25123 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
25124 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
25125 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
25126 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
25127 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
25128 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
25129 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
25130 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
25131 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
25132 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
25133 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
25134 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
25135 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
25136 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
25137 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
25138 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
25139 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
25140 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
25141 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
25142 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
25143 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
25144 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
25145 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
25146 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
25147 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
25148 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
25149 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
25150 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
25151 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
25152 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
25153 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
25154 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
25155 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
25156 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
25157 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
25158 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
25159 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
25160 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
25161 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
25162 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
25163 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
25164 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
25165 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
25166 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
25167 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
25168 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
25169 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
25170 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
25171 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
25172 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
25173 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
25174 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
25175 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
25176 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
25177 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
25178 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
25179 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
25180 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
25181 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
25182 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
25183 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
25184 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
25185 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
25186 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
25187 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
25188 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
25189 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
25190 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
25191 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
25192 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
25193 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
25194 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
25195 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
25196 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
25197 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
25198 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
25199 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
25200 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
25201 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
25202 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
25203 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
25204 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
25205 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
25206 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
25207 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
25208 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
25209 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
25210 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
25211 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
25212 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
25213 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
25214 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
25215 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
25216 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
25217 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
25218 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
25219 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
25220 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
25221 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
25222 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
25223 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
25224 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
25225 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
25226 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
25227 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
25228 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
25229 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
25230 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
25231 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
25232 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
25233 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
25234 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
25235 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
25236 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
25237 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
25238 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
25239 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
25240 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
25241 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
25242 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
25243 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
25244 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
25245 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
25246 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
25247 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
25248 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
25249 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
25250 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
25251 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
25252 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
25253 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
25254 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
25255 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
25256 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
25257 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
25258 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
25259 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
25260 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
25261 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
25262 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
25263 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
25264 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
25265 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
25266 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
25267 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
25268 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
25269 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
25270 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
25271 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
25272 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
25273 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
25274 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
25275 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
25276 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
25277 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
25278 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
25279 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
25280 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
25281 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
25282 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
25283 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
25284 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
25285 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
25286 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
25287 "\x38\x47\x56\x65\x74\x83\x92\xa1"
25288 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
25289 "\x28\x37\x46\x55\x64\x73\x82\x91"
25290 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
25291 "\x18\x27\x36\x45\x54\x63\x72\x81"
25292 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
25293 "\x08\x17\x26\x35\x44\x53\x62\x71"
25294 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
25295 "\xf8\x07\x16\x25\x34\x43\x52\x61"
25296 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
25297 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
25298 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
25299 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
25300 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
25301 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
25302 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
25303 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
25304 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
25305 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
25306 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
25307 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
25308 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
25309 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
25310 "\x00\x11\x22\x33\x44\x55\x66\x77"
25311 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
25312 "\x10\x21\x32\x43\x54\x65\x76\x87"
25313 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
25314 "\x20\x31\x42\x53\x64\x75\x86\x97"
25315 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
25316 "\x30\x41\x52\x63\x74\x85\x96\xa7"
25317 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
25318 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
25319 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
25320 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
25321 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
25322 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
25323 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
25324 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
25325 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
25326 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
25327 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
25328 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
25329 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
25330 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
25331 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
25332 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
25333 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
25334 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
25335 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
25336 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
25337 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
25338 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
25339 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
25340 "\xf0\x01\x12\x23\x34\x45\x56\x67"
25341 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
25342 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
25343 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
25344 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
25345 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
25346 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
25347 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
25348 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
25349 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
25350 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
25351 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
25352 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
25353 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
25354 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
25355 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
25356 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
25357 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
25358 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
25359 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
25360 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
25361 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
25362 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
25363 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
25364 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
25365 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
25366 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
25367 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
25368 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
25369 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
25370 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
25371 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
25372 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
25373 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
25374 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
25375 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
25376 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
25377 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
25378 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
25379 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
25380 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
25381 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
25382 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
25383 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
25384 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
25385 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
25386 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
25387 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
25388 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
25389 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
25390 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
25391 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
25392 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
25393 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
25394 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
25395 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
25396 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
25397 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
25398 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
25399 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
25400 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
25401 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
25402 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
25403 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
25404 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
25405 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
25406 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
25407 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
25408 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
25409 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
25410 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
25411 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
25412 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
25413 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
25414 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
25415 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
25416 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
25417 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
25418 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
25419 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
25420 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
25421 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
25422 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
25423 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
25424 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
25425 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
25426 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
25427 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
25428 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
25429 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
25430 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
25431 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
25432 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
25433 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
25434 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
25435 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
25436 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
25437 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
25438 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
25439 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
25440 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
25441 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
25442 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
25443 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
25444 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
25445 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
25446 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
25447 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
25448 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
25449 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
25450 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
25451 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
25452 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
25453 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
25454 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
25455 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
25456 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
25457 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
25458 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
25459 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
25460 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
25461 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
25462 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
25463 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
25464 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
25465 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
25466 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
25467 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
25468 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
25469 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
25470 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
25471 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
25472 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
25473 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
25474 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
25475 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
25476 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
25477 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
25478 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
25479 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
25480 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
25481 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
25482 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
25483 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
25484 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
25485 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
25486 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
25487 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
25488 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
25489 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
25490 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
25491 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
25492 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
25493 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
25494 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
25495 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
25496 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
25497 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
25498 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
25499 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
25500 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
25501 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
25502 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
25503 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
25504 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
25505 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
25506 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
25507 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
25508 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
25509 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
25510 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
25511 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
25512 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
25513 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
25514 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
25515 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
25516 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
25517 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
25518 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
25519 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
25520 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
25521 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
25522 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
25523 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
25524 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
25525 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
25526 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
25527 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
25528 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
25529 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
25530 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
25531 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
25532 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
25533 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
25534 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
25535 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
25536 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
25537 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
25538 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
25539 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
25540 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
25541 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
25542 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
25543 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
25544 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
25545 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
25546 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
25547 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
25548 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
25549 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
25550 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
25551 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
25552 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
25553 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
25554 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
25555 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
25556 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
25557 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
25558 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
25559 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
25560 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
25561 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
25562 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
25563 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
25564 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
25565 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
25566 "\x00\x21\x42\x63",
25567 .ilen = 4100,
25568 .result =
25569 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
25570 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
25571 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
25572 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
25573 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
25574 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
25575 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
25576 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
25577 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
25578 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
25579 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
25580 "\xbb\xde\x56\x86\xab\x65\x21\x30"
25581 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
25582 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
25583 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
25584 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
25585 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
25586 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
25587 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
25588 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
25589 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
25590 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
25591 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
25592 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
25593 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
25594 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
25595 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
25596 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
25597 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
25598 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
25599 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
25600 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
25601 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
25602 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
25603 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
25604 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
25605 "\x62\x08\x18\x7a\x25\x49\x28\xac"
25606 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
25607 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
25608 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
25609 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
25610 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
25611 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
25612 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
25613 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
25614 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
25615 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
25616 "\x33\xee\x14\x19\x22\x52\x89\xa7"
25617 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
25618 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
25619 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
25620 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
25621 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
25622 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
25623 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
25624 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
25625 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
25626 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
25627 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
25628 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
25629 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
25630 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
25631 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
25632 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
25633 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
25634 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
25635 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
25636 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
25637 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
25638 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
25639 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
25640 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
25641 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
25642 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
25643 "\x49\x97\x33\xab\x36\x14\x0a\x70"
25644 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
25645 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
25646 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
25647 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
25648 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
25649 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
25650 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
25651 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
25652 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
25653 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
25654 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
25655 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
25656 "\xad\x04\x07\xae\x22\x90\x4a\x93"
25657 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
25658 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
25659 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
25660 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
25661 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
25662 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
25663 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
25664 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
25665 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
25666 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
25667 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
25668 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
25669 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
25670 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
25671 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
25672 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
25673 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
25674 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
25675 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
25676 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
25677 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
25678 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
25679 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
25680 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
25681 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
25682 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
25683 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
25684 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
25685 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
25686 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
25687 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
25688 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
25689 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
25690 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
25691 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
25692 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
25693 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
25694 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
25695 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
25696 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
25697 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
25698 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
25699 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
25700 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
25701 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
25702 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
25703 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
25704 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
25705 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
25706 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
25707 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
25708 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
25709 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
25710 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
25711 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
25712 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
25713 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
25714 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
25715 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
25716 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
25717 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
25718 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
25719 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
25720 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
25721 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
25722 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
25723 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
25724 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
25725 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
25726 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
25727 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
25728 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
25729 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
25730 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
25731 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
25732 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
25733 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
25734 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
25735 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
25736 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
25737 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
25738 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
25739 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
25740 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
25741 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
25742 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
25743 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
25744 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
25745 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
25746 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
25747 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
25748 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
25749 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
25750 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
25751 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
25752 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
25753 "\x2e\x53\x49\x97\x94\x33\xae\x40"
25754 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
25755 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
25756 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
25757 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
25758 "\xce\x87\xad\xcc\x72\x05\x00\x29"
25759 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
25760 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
25761 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
25762 "\xac\xc0\x79\x50\x69\xca\x59\x32"
25763 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
25764 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
25765 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
25766 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
25767 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
25768 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
25769 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
25770 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
25771 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
25772 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
25773 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
25774 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
25775 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
25776 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
25777 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
25778 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
25779 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
25780 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
25781 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
25782 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
25783 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
25784 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
25785 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
25786 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
25787 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
25788 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
25789 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
25790 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
25791 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
25792 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
25793 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
25794 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
25795 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
25796 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
25797 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
25798 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
25799 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
25800 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
25801 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
25802 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
25803 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
25804 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
25805 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
25806 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
25807 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
25808 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
25809 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
25810 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
25811 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
25812 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
25813 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
25814 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
25815 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
25816 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
25817 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
25818 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
25819 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
25820 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
25821 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
25822 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
25823 "\x38\x55\xab\x33\x26\xef\x9f\x43"
25824 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
25825 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
25826 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
25827 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
25828 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
25829 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
25830 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
25831 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
25832 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
25833 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
25834 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
25835 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
25836 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
25837 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
25838 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
25839 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
25840 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
25841 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
25842 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
25843 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
25844 "\x62\x36\x43\xb2\x82\x15\x75\x50"
25845 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
25846 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
25847 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
25848 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
25849 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
25850 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
25851 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
25852 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
25853 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
25854 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
25855 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
25856 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
25857 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
25858 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
25859 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
25860 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
25861 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
25862 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
25863 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
25864 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
25865 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
25866 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
25867 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
25868 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
25869 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
25870 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
25871 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
25872 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
25873 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
25874 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
25875 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
25876 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
25877 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
25878 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
25879 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
25880 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
25881 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
25882 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
25883 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
25884 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
25885 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
25886 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
25887 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
25888 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
25889 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
25890 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
25891 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
25892 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
25893 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
25894 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
25895 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
25896 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
25897 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
25898 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
25899 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
25900 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
25901 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
25902 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
25903 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
25904 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
25905 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
25906 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
25907 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
25908 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
25909 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
25910 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
25911 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
25912 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
25913 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
25914 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
25915 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
25916 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
25917 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
25918 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
25919 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
25920 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
25921 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
25922 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
25923 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
25924 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
25925 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
25926 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
25927 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
25928 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
25929 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
25930 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
25931 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
25932 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
25933 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
25934 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
25935 "\x73\x2e\x71\x79\x16\x06\x63\x28"
25936 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
25937 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
25938 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
25939 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
25940 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
25941 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
25942 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
25943 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
25944 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
25945 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
25946 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
25947 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
25948 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
25949 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
25950 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
25951 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
25952 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
25953 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
25954 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
25955 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
25956 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
25957 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
25958 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
25959 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
25960 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
25961 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
25962 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
25963 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
25964 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
25965 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
25966 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
25967 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
25968 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
25969 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
25970 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
25971 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
25972 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
25973 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
25974 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
25975 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
25976 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
25977 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
25978 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
25979 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
25980 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
25981 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
25982 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
25983 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
25984 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
25985 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
25986 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
25987 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
25988 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
25989 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
25990 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
25991 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
25992 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
25993 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
25994 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
25995 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
25996 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
25997 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
25998 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
25999 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
26000 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
26001 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
26002 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
26003 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
26004 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
26005 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
26006 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
26007 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
26008 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
26009 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
26010 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
26011 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
26012 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
26013 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
26014 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
26015 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
26016 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
26017 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
26018 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
26019 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
26020 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
26021 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
26022 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
26023 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
26024 "\x85\x73\x78\x45\x20\x7f\xae\x13"
26025 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
26026 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
26027 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
26028 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
26029 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
26030 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
26031 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
26032 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
26033 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
26034 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
26035 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
26036 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
26037 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
26038 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
26039 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
26040 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
26041 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
26042 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
26043 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
26044 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
26045 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
26046 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
26047 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
26048 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
26049 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
26050 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
26051 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
26052 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
26053 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
26054 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
26055 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
26056 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
26057 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
26058 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
26059 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
26060 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
26061 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
26062 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
26063 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
26064 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
26065 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
26066 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
26067 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
26068 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
26069 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
26070 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
26071 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
26072 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
26073 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
26074 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
26075 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
26076 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
26077 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
26078 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
26079 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
26080 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
26081 "\xaf\xdf\x11\x95",
26082 .rlen = 4100,
26083 .np = 2,
26084 .tap = { 4064, 36 },
26085 },
26086};
26087
26088/*
26089 * CTS (Cipher Text Stealing) mode tests
26090 */
26091#define CTS_MODE_ENC_TEST_VECTORS 6
26092#define CTS_MODE_DEC_TEST_VECTORS 6
26093static struct cipher_testvec cts_mode_enc_tv_template[] = {
26094 { /* from rfc3962 */
26095 .klen = 16,
26096 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
26097 "\x74\x65\x72\x69\x79\x61\x6b\x69",
26098 .ilen = 17,
26099 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
26100 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
26101 "\x20",
26102 .rlen = 17,
26103 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
26104 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
26105 "\x97",
26106 }, {
26107 .klen = 16,
26108 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
26109 "\x74\x65\x72\x69\x79\x61\x6b\x69",
26110 .ilen = 31,
26111 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
26112 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
26113 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
26114 "\x20\x47\x61\x75\x27\x73\x20",
26115 .rlen = 31,
26116 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
26117 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
26118 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
26119 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
26120 }, {
26121 .klen = 16,
26122 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
26123 "\x74\x65\x72\x69\x79\x61\x6b\x69",
26124 .ilen = 32,
26125 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
26126 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
26127 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
26128 "\x20\x47\x61\x75\x27\x73\x20\x43",
26129 .rlen = 32,
26130 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
26131 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
26132 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
26133 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
26134 }, {
26135 .klen = 16,
26136 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
26137 "\x74\x65\x72\x69\x79\x61\x6b\x69",
26138 .ilen = 47,
26139 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
26140 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
26141 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
26142 "\x20\x47\x61\x75\x27\x73\x20\x43"
26143 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
26144 "\x70\x6c\x65\x61\x73\x65\x2c",
26145 .rlen = 47,
26146 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
26147 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
26148 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
26149 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
26150 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
26151 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
26152 }, {
26153 .klen = 16,
26154 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
26155 "\x74\x65\x72\x69\x79\x61\x6b\x69",
26156 .ilen = 48,
26157 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
26158 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
26159 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
26160 "\x20\x47\x61\x75\x27\x73\x20\x43"
26161 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
26162 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
26163 .rlen = 48,
26164 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
26165 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
26166 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
26167 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
26168 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
26169 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
26170 }, {
26171 .klen = 16,
26172 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
26173 "\x74\x65\x72\x69\x79\x61\x6b\x69",
26174 .ilen = 64,
26175 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
26176 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
26177 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
26178 "\x20\x47\x61\x75\x27\x73\x20\x43"
26179 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
26180 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
26181 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
26182 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
26183 .rlen = 64,
26184 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
26185 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
26186 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
26187 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
26188 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
26189 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
26190 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
26191 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
26192 }
26193};
26194
26195static struct cipher_testvec cts_mode_dec_tv_template[] = {
26196 { /* from rfc3962 */
26197 .klen = 16,
26198 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
26199 "\x74\x65\x72\x69\x79\x61\x6b\x69",
26200 .rlen = 17,
26201 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
26202 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
26203 "\x20",
26204 .ilen = 17,
26205 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
26206 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
26207 "\x97",
26208 }, {
26209 .klen = 16,
26210 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
26211 "\x74\x65\x72\x69\x79\x61\x6b\x69",
26212 .rlen = 31,
26213 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
26214 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
26215 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
26216 "\x20\x47\x61\x75\x27\x73\x20",
26217 .ilen = 31,
26218 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
26219 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
26220 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
26221 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
26222 }, {
26223 .klen = 16,
26224 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
26225 "\x74\x65\x72\x69\x79\x61\x6b\x69",
26226 .rlen = 32,
26227 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
26228 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
26229 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
26230 "\x20\x47\x61\x75\x27\x73\x20\x43",
26231 .ilen = 32,
26232 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
26233 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
26234 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
26235 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
26236 }, {
26237 .klen = 16,
26238 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
26239 "\x74\x65\x72\x69\x79\x61\x6b\x69",
26240 .rlen = 47,
26241 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
26242 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
26243 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
26244 "\x20\x47\x61\x75\x27\x73\x20\x43"
26245 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
26246 "\x70\x6c\x65\x61\x73\x65\x2c",
26247 .ilen = 47,
26248 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
26249 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
26250 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
26251 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
26252 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
26253 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
26254 }, {
26255 .klen = 16,
26256 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
26257 "\x74\x65\x72\x69\x79\x61\x6b\x69",
26258 .rlen = 48,
26259 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
26260 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
26261 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
26262 "\x20\x47\x61\x75\x27\x73\x20\x43"
26263 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
26264 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
26265 .ilen = 48,
26266 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
26267 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
26268 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
26269 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
26270 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
26271 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
26272 }, {
26273 .klen = 16,
26274 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
26275 "\x74\x65\x72\x69\x79\x61\x6b\x69",
26276 .rlen = 64,
26277 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
26278 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
26279 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
26280 "\x20\x47\x61\x75\x27\x73\x20\x43"
26281 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
26282 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
26283 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
26284 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
26285 .ilen = 64,
26286 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
26287 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
26288 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
26289 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
26290 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
26291 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
26292 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
26293 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
26294 }
26295};
26296
26297/*
26298 * Compression stuff.
26299 */
26300#define COMP_BUF_SIZE 512
26301
26302struct comp_testvec {
26303 int inlen, outlen;
26304 char input[COMP_BUF_SIZE];
26305 char output[COMP_BUF_SIZE];
26306};
26307
Geert Uytterhoeven8064efb2009-03-04 15:08:03 +080026308struct pcomp_testvec {
26309 void *params;
26310 unsigned int paramsize;
26311 int inlen, outlen;
26312 char input[COMP_BUF_SIZE];
26313 char output[COMP_BUF_SIZE];
26314};
26315
Herbert Xuda7f0332008-07-31 17:08:25 +080026316/*
26317 * Deflate test vectors (null-terminated strings).
Geert Uytterhoevenbcf84a32008-12-18 17:17:46 +110026318 * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
Herbert Xuda7f0332008-07-31 17:08:25 +080026319 */
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080026320
Herbert Xuda7f0332008-07-31 17:08:25 +080026321#define DEFLATE_COMP_TEST_VECTORS 2
26322#define DEFLATE_DECOMP_TEST_VECTORS 2
26323
26324static struct comp_testvec deflate_comp_tv_template[] = {
26325 {
26326 .inlen = 70,
26327 .outlen = 38,
26328 .input = "Join us now and share the software "
26329 "Join us now and share the software ",
26330 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
26331 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
26332 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
26333 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
26334 "\x71\xbc\x08\x2b\x01\x00",
26335 }, {
26336 .inlen = 191,
26337 .outlen = 122,
26338 .input = "This document describes a compression method based on the DEFLATE"
26339 "compression algorithm. This document defines the application of "
26340 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
26341 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
26342 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
26343 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
26344 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
26345 "\x68\x12\x51\xae\x76\x67\xd6\x27"
26346 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
26347 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
26348 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
26349 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
26350 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
26351 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
26352 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
26353 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
26354 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
26355 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
26356 "\xfa\x02",
26357 },
26358};
26359
26360static struct comp_testvec deflate_decomp_tv_template[] = {
26361 {
26362 .inlen = 122,
26363 .outlen = 191,
26364 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
26365 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
26366 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
26367 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
26368 "\x68\x12\x51\xae\x76\x67\xd6\x27"
26369 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
26370 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
26371 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
26372 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
26373 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
26374 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
26375 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
26376 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
26377 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
26378 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
26379 "\xfa\x02",
26380 .output = "This document describes a compression method based on the DEFLATE"
26381 "compression algorithm. This document defines the application of "
26382 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
26383 }, {
26384 .inlen = 38,
26385 .outlen = 70,
26386 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
26387 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
26388 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
26389 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
26390 "\x71\xbc\x08\x2b\x01\x00",
26391 .output = "Join us now and share the software "
26392 "Join us now and share the software ",
26393 },
26394};
26395
Geert Uytterhoeven0c01aed2009-03-04 15:42:15 +080026396#define ZLIB_COMP_TEST_VECTORS 2
26397#define ZLIB_DECOMP_TEST_VECTORS 2
26398
26399static const struct {
26400 struct nlattr nla;
26401 int val;
26402} deflate_comp_params[] = {
26403 {
26404 .nla = {
26405 .nla_len = NLA_HDRLEN + sizeof(int),
26406 .nla_type = ZLIB_COMP_LEVEL,
26407 },
26408 .val = Z_DEFAULT_COMPRESSION,
26409 }, {
26410 .nla = {
26411 .nla_len = NLA_HDRLEN + sizeof(int),
26412 .nla_type = ZLIB_COMP_METHOD,
26413 },
26414 .val = Z_DEFLATED,
26415 }, {
26416 .nla = {
26417 .nla_len = NLA_HDRLEN + sizeof(int),
26418 .nla_type = ZLIB_COMP_WINDOWBITS,
26419 },
26420 .val = -11,
26421 }, {
26422 .nla = {
26423 .nla_len = NLA_HDRLEN + sizeof(int),
26424 .nla_type = ZLIB_COMP_MEMLEVEL,
26425 },
26426 .val = MAX_MEM_LEVEL,
26427 }, {
26428 .nla = {
26429 .nla_len = NLA_HDRLEN + sizeof(int),
26430 .nla_type = ZLIB_COMP_STRATEGY,
26431 },
26432 .val = Z_DEFAULT_STRATEGY,
26433 }
26434};
26435
26436static const struct {
26437 struct nlattr nla;
26438 int val;
26439} deflate_decomp_params[] = {
26440 {
26441 .nla = {
26442 .nla_len = NLA_HDRLEN + sizeof(int),
26443 .nla_type = ZLIB_DECOMP_WINDOWBITS,
26444 },
26445 .val = -11,
26446 }
26447};
26448
26449static struct pcomp_testvec zlib_comp_tv_template[] = {
26450 {
26451 .params = &deflate_comp_params,
26452 .paramsize = sizeof(deflate_comp_params),
26453 .inlen = 70,
26454 .outlen = 38,
26455 .input = "Join us now and share the software "
26456 "Join us now and share the software ",
26457 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
26458 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
26459 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
26460 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
26461 "\x71\xbc\x08\x2b\x01\x00",
26462 }, {
26463 .params = &deflate_comp_params,
26464 .paramsize = sizeof(deflate_comp_params),
26465 .inlen = 191,
26466 .outlen = 122,
26467 .input = "This document describes a compression method based on the DEFLATE"
26468 "compression algorithm. This document defines the application of "
26469 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
26470 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
26471 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
26472 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
26473 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
26474 "\x68\x12\x51\xae\x76\x67\xd6\x27"
26475 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
26476 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
26477 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
26478 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
26479 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
26480 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
26481 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
26482 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
26483 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
26484 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
26485 "\xfa\x02",
26486 },
26487};
26488
26489static struct pcomp_testvec zlib_decomp_tv_template[] = {
26490 {
26491 .params = &deflate_decomp_params,
26492 .paramsize = sizeof(deflate_decomp_params),
26493 .inlen = 122,
26494 .outlen = 191,
26495 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
26496 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
26497 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
26498 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
26499 "\x68\x12\x51\xae\x76\x67\xd6\x27"
26500 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
26501 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
26502 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
26503 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
26504 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
26505 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
26506 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
26507 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
26508 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
26509 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
26510 "\xfa\x02",
26511 .output = "This document describes a compression method based on the DEFLATE"
26512 "compression algorithm. This document defines the application of "
26513 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
26514 }, {
26515 .params = &deflate_decomp_params,
26516 .paramsize = sizeof(deflate_decomp_params),
26517 .inlen = 38,
26518 .outlen = 70,
26519 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
26520 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
26521 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
26522 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
26523 "\x71\xbc\x08\x2b\x01\x00",
26524 .output = "Join us now and share the software "
26525 "Join us now and share the software ",
26526 },
26527};
26528
Herbert Xuda7f0332008-07-31 17:08:25 +080026529/*
26530 * LZO test vectors (null-terminated strings).
26531 */
26532#define LZO_COMP_TEST_VECTORS 2
26533#define LZO_DECOMP_TEST_VECTORS 2
26534
26535static struct comp_testvec lzo_comp_tv_template[] = {
26536 {
26537 .inlen = 70,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020026538 .outlen = 57,
Herbert Xuda7f0332008-07-31 17:08:25 +080026539 .input = "Join us now and share the software "
26540 "Join us now and share the software ",
26541 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020026542 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
26543 "\x64\x20\x73\x68\x61\x72\x65\x20"
26544 "\x74\x68\x65\x20\x73\x6f\x66\x74"
26545 "\x77\x70\x01\x32\x88\x00\x0c\x65"
26546 "\x20\x74\x68\x65\x20\x73\x6f\x66"
26547 "\x74\x77\x61\x72\x65\x20\x11\x00"
26548 "\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080026549 }, {
26550 .inlen = 159,
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020026551 .outlen = 131,
Herbert Xuda7f0332008-07-31 17:08:25 +080026552 .input = "This document describes a compression method based on the LZO "
26553 "compression algorithm. This document defines the application of "
26554 "the LZO algorithm used in UBIFS.",
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020026555 .output = "\x00\x2c\x54\x68\x69\x73\x20\x64"
Herbert Xuda7f0332008-07-31 17:08:25 +080026556 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
26557 "\x64\x65\x73\x63\x72\x69\x62\x65"
26558 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
26559 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
26560 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
26561 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
Markus F.X.J. Oberhumer0ec73822012-10-14 15:39:04 +020026562 "\x74\x68\x65\x20\x4c\x5a\x4f\x20"
26563 "\x2a\x8c\x00\x09\x61\x6c\x67\x6f"
26564 "\x72\x69\x74\x68\x6d\x2e\x20\x20"
26565 "\x2e\x54\x01\x03\x66\x69\x6e\x65"
26566 "\x73\x20\x74\x06\x05\x61\x70\x70"
26567 "\x6c\x69\x63\x61\x74\x76\x0a\x6f"
26568 "\x66\x88\x02\x60\x09\x27\xf0\x00"
26569 "\x0c\x20\x75\x73\x65\x64\x20\x69"
26570 "\x6e\x20\x55\x42\x49\x46\x53\x2e"
26571 "\x11\x00\x00",
Herbert Xuda7f0332008-07-31 17:08:25 +080026572 },
26573};
26574
26575static struct comp_testvec lzo_decomp_tv_template[] = {
26576 {
26577 .inlen = 133,
26578 .outlen = 159,
26579 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
26580 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
26581 "\x64\x65\x73\x63\x72\x69\x62\x65"
26582 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
26583 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
26584 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
26585 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
26586 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
26587 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
26588 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
26589 "\x68\x69\x73\x2a\x54\x01\x02\x66"
26590 "\x69\x6e\x65\x73\x94\x06\x05\x61"
26591 "\x70\x70\x6c\x69\x63\x61\x74\x76"
26592 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
26593 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
26594 "\x20\x69\x6e\x20\x55\x42\x49\x46"
26595 "\x53\x2e\x11\x00\x00",
26596 .output = "This document describes a compression method based on the LZO "
26597 "compression algorithm. This document defines the application of "
26598 "the LZO algorithm used in UBIFS.",
26599 }, {
26600 .inlen = 46,
26601 .outlen = 70,
26602 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
26603 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
26604 "\x64\x20\x73\x68\x61\x72\x65\x20"
26605 "\x74\x68\x65\x20\x73\x6f\x66\x74"
26606 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
26607 "\x3d\x88\x00\x11\x00\x00",
26608 .output = "Join us now and share the software "
26609 "Join us now and share the software ",
26610 },
26611};
26612
26613/*
26614 * Michael MIC test vectors from IEEE 802.11i
26615 */
26616#define MICHAEL_MIC_TEST_VECTORS 6
26617
26618static struct hash_testvec michael_mic_tv_template[] = {
26619 {
26620 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
26621 .ksize = 8,
26622 .plaintext = zeroed_string,
26623 .psize = 0,
26624 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
26625 },
26626 {
26627 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
26628 .ksize = 8,
26629 .plaintext = "M",
26630 .psize = 1,
26631 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
26632 },
26633 {
26634 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
26635 .ksize = 8,
26636 .plaintext = "Mi",
26637 .psize = 2,
26638 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
26639 },
26640 {
26641 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
26642 .ksize = 8,
26643 .plaintext = "Mic",
26644 .psize = 3,
26645 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
26646 },
26647 {
26648 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
26649 .ksize = 8,
26650 .plaintext = "Mich",
26651 .psize = 4,
26652 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
26653 },
26654 {
26655 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
26656 .ksize = 8,
26657 .plaintext = "Michael",
26658 .psize = 7,
26659 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
26660 }
26661};
26662
26663/*
26664 * CRC32C test vectors
26665 */
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020026666#define CRC32C_TEST_VECTORS 15
Herbert Xuda7f0332008-07-31 17:08:25 +080026667
26668static struct hash_testvec crc32c_tv_template[] = {
26669 {
26670 .psize = 0,
26671 .digest = "\x00\x00\x00\x00",
26672 },
26673 {
26674 .key = "\x87\xa9\xcb\xed",
26675 .ksize = 4,
26676 .psize = 0,
26677 .digest = "\x78\x56\x34\x12",
26678 },
26679 {
26680 .key = "\xff\xff\xff\xff",
26681 .ksize = 4,
26682 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
26683 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
26684 "\x11\x12\x13\x14\x15\x16\x17\x18"
26685 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
26686 "\x21\x22\x23\x24\x25\x26\x27\x28",
26687 .psize = 40,
26688 .digest = "\x7f\x15\x2c\x0e",
26689 },
26690 {
26691 .key = "\xff\xff\xff\xff",
26692 .ksize = 4,
26693 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
26694 "\x31\x32\x33\x34\x35\x36\x37\x38"
26695 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
26696 "\x41\x42\x43\x44\x45\x46\x47\x48"
26697 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
26698 .psize = 40,
26699 .digest = "\xf6\xeb\x80\xe9",
26700 },
26701 {
26702 .key = "\xff\xff\xff\xff",
26703 .ksize = 4,
26704 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
26705 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
26706 "\x61\x62\x63\x64\x65\x66\x67\x68"
26707 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
26708 "\x71\x72\x73\x74\x75\x76\x77\x78",
26709 .psize = 40,
26710 .digest = "\xed\xbd\x74\xde",
26711 },
26712 {
26713 .key = "\xff\xff\xff\xff",
26714 .ksize = 4,
26715 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
26716 "\x81\x82\x83\x84\x85\x86\x87\x88"
26717 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
26718 "\x91\x92\x93\x94\x95\x96\x97\x98"
26719 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
26720 .psize = 40,
26721 .digest = "\x62\xc8\x79\xd5",
26722 },
26723 {
26724 .key = "\xff\xff\xff\xff",
26725 .ksize = 4,
26726 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
26727 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
26728 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
26729 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
26730 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
26731 .psize = 40,
26732 .digest = "\xd0\x9a\x97\xba",
26733 },
26734 {
26735 .key = "\xff\xff\xff\xff",
26736 .ksize = 4,
26737 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
26738 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
26739 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
26740 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
26741 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
26742 .psize = 40,
26743 .digest = "\x13\xd9\x29\x2b",
26744 },
26745 {
26746 .key = "\x80\xea\xd3\xf1",
26747 .ksize = 4,
26748 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
26749 "\x31\x32\x33\x34\x35\x36\x37\x38"
26750 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
26751 "\x41\x42\x43\x44\x45\x46\x47\x48"
26752 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
26753 .psize = 40,
26754 .digest = "\x0c\xb5\xe2\xa2",
26755 },
26756 {
26757 .key = "\xf3\x4a\x1d\x5d",
26758 .ksize = 4,
26759 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
26760 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
26761 "\x61\x62\x63\x64\x65\x66\x67\x68"
26762 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
26763 "\x71\x72\x73\x74\x75\x76\x77\x78",
26764 .psize = 40,
26765 .digest = "\xd1\x7f\xfb\xa6",
26766 },
26767 {
26768 .key = "\x2e\x80\x04\x59",
26769 .ksize = 4,
26770 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
26771 "\x81\x82\x83\x84\x85\x86\x87\x88"
26772 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
26773 "\x91\x92\x93\x94\x95\x96\x97\x98"
26774 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
26775 .psize = 40,
26776 .digest = "\x59\x33\xe6\x7a",
26777 },
26778 {
26779 .key = "\xa6\xcc\x19\x85",
26780 .ksize = 4,
26781 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
26782 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
26783 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
26784 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
26785 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
26786 .psize = 40,
26787 .digest = "\xbe\x03\x01\xd2",
26788 },
26789 {
26790 .key = "\x41\xfc\xfe\x2d",
26791 .ksize = 4,
26792 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
26793 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
26794 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
26795 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
26796 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
26797 .psize = 40,
26798 .digest = "\x75\xd3\xc5\x24",
26799 },
26800 {
26801 .key = "\xff\xff\xff\xff",
26802 .ksize = 4,
26803 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
26804 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
26805 "\x11\x12\x13\x14\x15\x16\x17\x18"
26806 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
26807 "\x21\x22\x23\x24\x25\x26\x27\x28"
26808 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
26809 "\x31\x32\x33\x34\x35\x36\x37\x38"
26810 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
26811 "\x41\x42\x43\x44\x45\x46\x47\x48"
26812 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
26813 "\x51\x52\x53\x54\x55\x56\x57\x58"
26814 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
26815 "\x61\x62\x63\x64\x65\x66\x67\x68"
26816 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
26817 "\x71\x72\x73\x74\x75\x76\x77\x78"
26818 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
26819 "\x81\x82\x83\x84\x85\x86\x87\x88"
26820 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
26821 "\x91\x92\x93\x94\x95\x96\x97\x98"
26822 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
26823 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
26824 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
26825 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
26826 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
26827 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
26828 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
26829 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
26830 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
26831 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
26832 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
26833 .psize = 240,
26834 .digest = "\x75\xd3\xc5\x24",
26835 .np = 2,
26836 .tap = { 31, 209 }
Jussi Kivilinna6726ec42012-11-13 12:02:30 +020026837 }, {
26838 .key = "\xff\xff\xff\xff",
26839 .ksize = 4,
26840 .plaintext = "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
26841 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
26842 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
26843 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
26844 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
26845 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
26846 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
26847 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
26848 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
26849 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
26850 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
26851 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
26852 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
26853 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
26854 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
26855 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
26856 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
26857 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
26858 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
26859 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
26860 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
26861 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
26862 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
26863 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
26864 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
26865 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
26866 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
26867 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
26868 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
26869 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
26870 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
26871 "\x47\xde\x75\x0c\x80\x17\xae\x22"
26872 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
26873 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
26874 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
26875 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
26876 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
26877 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
26878 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
26879 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
26880 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
26881 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
26882 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
26883 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
26884 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
26885 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
26886 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
26887 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
26888 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
26889 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
26890 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
26891 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
26892 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
26893 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
26894 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
26895 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
26896 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
26897 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
26898 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
26899 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
26900 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
26901 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
26902 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
26903 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
26904 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
26905 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
26906 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
26907 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
26908 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
26909 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
26910 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
26911 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
26912 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
26913 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
26914 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
26915 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
26916 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
26917 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
26918 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
26919 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
26920 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
26921 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
26922 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
26923 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
26924 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
26925 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
26926 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
26927 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
26928 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
26929 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
26930 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
26931 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
26932 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
26933 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
26934 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
26935 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
26936 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
26937 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
26938 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
26939 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
26940 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
26941 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
26942 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
26943 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
26944 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
26945 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
26946 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
26947 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
26948 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
26949 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
26950 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
26951 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
26952 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
26953 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
26954 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
26955 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
26956 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
26957 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
26958 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
26959 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
26960 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
26961 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
26962 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
26963 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
26964 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
26965 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
26966 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
26967 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
26968 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
26969 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
26970 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
26971 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
26972 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
26973 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
26974 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
26975 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
26976 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
26977 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
26978 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
26979 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
26980 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
26981 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
26982 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
26983 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
26984 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
26985 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
26986 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
26987 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
26988 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
26989 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
26990 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
26991 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
26992 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
26993 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
26994 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
26995 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
26996 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
26997 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
26998 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
26999 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
27000 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
27001 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
27002 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
27003 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
27004 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
27005 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
27006 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
27007 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
27008 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
27009 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
27010 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
27011 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
27012 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
27013 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
27014 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
27015 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
27016 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
27017 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
27018 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
27019 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
27020 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
27021 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
27022 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
27023 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
27024 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
27025 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
27026 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
27027 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
27028 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
27029 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
27030 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
27031 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
27032 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
27033 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
27034 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
27035 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
27036 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
27037 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
27038 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
27039 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
27040 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
27041 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
27042 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
27043 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
27044 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
27045 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
27046 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
27047 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
27048 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
27049 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
27050 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
27051 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
27052 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
27053 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
27054 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
27055 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
27056 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
27057 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
27058 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
27059 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
27060 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
27061 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
27062 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
27063 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
27064 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
27065 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
27066 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
27067 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
27068 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
27069 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
27070 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
27071 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
27072 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
27073 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
27074 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
27075 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
27076 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
27077 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
27078 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
27079 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
27080 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
27081 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
27082 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
27083 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
27084 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
27085 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
27086 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
27087 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
27088 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
27089 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
27090 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
27091 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
27092 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
27093 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
27094 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
27095 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
27096 .psize = 2048,
27097 .digest = "\xec\x26\x4d\x95",
27098 }
Herbert Xuda7f0332008-07-31 17:08:25 +080027099};
27100
Sonic Zhanga482b082012-05-25 17:54:13 +080027101/*
27102 * Blakcifn CRC test vectors
27103 */
27104#define BFIN_CRC_TEST_VECTORS 6
27105
27106static struct hash_testvec bfin_crc_tv_template[] = {
27107 {
27108 .psize = 0,
27109 .digest = "\x00\x00\x00\x00",
27110 },
27111 {
27112 .key = "\x87\xa9\xcb\xed",
27113 .ksize = 4,
27114 .psize = 0,
27115 .digest = "\x87\xa9\xcb\xed",
27116 },
27117 {
27118 .key = "\xff\xff\xff\xff",
27119 .ksize = 4,
27120 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
27121 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
27122 "\x11\x12\x13\x14\x15\x16\x17\x18"
27123 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
27124 "\x21\x22\x23\x24\x25\x26\x27\x28",
27125 .psize = 40,
27126 .digest = "\x84\x0c\x8d\xa2",
27127 },
27128 {
27129 .key = "\xff\xff\xff\xff",
27130 .ksize = 4,
27131 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
27132 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
27133 "\x11\x12\x13\x14\x15\x16\x17\x18"
27134 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
27135 "\x21\x22\x23\x24\x25\x26",
27136 .psize = 38,
27137 .digest = "\x8c\x58\xec\xb7",
27138 },
27139 {
27140 .key = "\xff\xff\xff\xff",
27141 .ksize = 4,
27142 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
27143 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
27144 "\x11\x12\x13\x14\x15\x16\x17\x18"
27145 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
27146 "\x21\x22\x23\x24\x25\x26\x27",
27147 .psize = 39,
27148 .digest = "\xdc\x50\x28\x7b",
27149 },
27150 {
27151 .key = "\xff\xff\xff\xff",
27152 .ksize = 4,
27153 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
27154 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
27155 "\x11\x12\x13\x14\x15\x16\x17\x18"
27156 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
27157 "\x21\x22\x23\x24\x25\x26\x27\x28"
27158 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
27159 "\x31\x32\x33\x34\x35\x36\x37\x38"
27160 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
27161 "\x41\x42\x43\x44\x45\x46\x47\x48"
27162 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
27163 "\x51\x52\x53\x54\x55\x56\x57\x58"
27164 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
27165 "\x61\x62\x63\x64\x65\x66\x67\x68"
27166 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
27167 "\x71\x72\x73\x74\x75\x76\x77\x78"
27168 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
27169 "\x81\x82\x83\x84\x85\x86\x87\x88"
27170 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
27171 "\x91\x92\x93\x94\x95\x96\x97\x98"
27172 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
27173 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
27174 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
27175 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
27176 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
27177 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
27178 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
27179 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
27180 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
27181 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
27182 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
27183 .psize = 240,
27184 .digest = "\x10\x19\x4a\x5c",
27185 .np = 2,
27186 .tap = { 31, 209 }
27187 },
27188
27189};
27190
Herbert Xuda7f0332008-07-31 17:08:25 +080027191#endif /* _CRYPTO_TESTMGR_H */