blob: af91f0cd15a53d3915946c9d86a324d9794d480c [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * Quick & dirty crypto testing module.
3 *
4 * This will only exist until we have a better testing mechanism
5 * (e.g. a char device).
6 *
7 * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
8 * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
Mikko Herranene3a4ea42007-11-26 22:12:07 +08009 * Copyright (c) 2007 Nokia Siemens Networks
Linus Torvalds1da177e2005-04-16 15:20:36 -070010 *
11 * This program is free software; you can redistribute it and/or modify it
12 * under the terms of the GNU General Public License as published by the Free
Herbert Xuef2736f2005-06-22 13:26:03 -070013 * Software Foundation; either version 2 of the License, or (at your option)
Linus Torvalds1da177e2005-04-16 15:20:36 -070014 * any later version.
15 *
Linus Torvalds1da177e2005-04-16 15:20:36 -070016 */
17#ifndef _CRYPTO_TCRYPT_H
18#define _CRYPTO_TCRYPT_H
19
20#define MAX_DIGEST_SIZE 64
21#define MAX_TAP 8
22
23#define MAX_KEYLEN 56
24#define MAX_IVLEN 32
25
26struct hash_testvec {
Atsushi Nemoto06b42aa2006-03-13 21:39:23 +110027 /* only used with keyed hash algorithms */
Sebastian Siewiorde224c32008-03-13 20:21:51 +080028 char *key;
29 char *plaintext;
30 char *digest;
Herbert Xuef2736f2005-06-22 13:26:03 -070031 unsigned char tap[MAX_TAP];
Atsushi Nemoto06b42aa2006-03-13 21:39:23 +110032 unsigned char psize;
33 unsigned char np;
Linus Torvalds1da177e2005-04-16 15:20:36 -070034 unsigned char ksize;
35};
36
Linus Torvalds1da177e2005-04-16 15:20:36 -070037struct cipher_testvec {
Sebastian Siewiorde224c32008-03-13 20:21:51 +080038 char *key;
39 char *iv;
40 char *input;
41 char *result;
Herbert Xuef2736f2005-06-22 13:26:03 -070042 unsigned char tap[MAX_TAP];
Atsushi Nemoto06b42aa2006-03-13 21:39:23 +110043 int np;
44 unsigned char fail;
45 unsigned char wk; /* weak key flag */
46 unsigned char klen;
Rik Snelf3d10442006-11-29 19:01:41 +110047 unsigned short ilen;
48 unsigned short rlen;
Linus Torvalds1da177e2005-04-16 15:20:36 -070049};
50
Mikko Herranene3a4ea42007-11-26 22:12:07 +080051struct aead_testvec {
Sebastian Siewiorde224c32008-03-13 20:21:51 +080052 char *key;
53 char *iv;
54 char *input;
55 char *assoc;
56 char *result;
Mikko Herranene3a4ea42007-11-26 22:12:07 +080057 unsigned char tap[MAX_TAP];
58 unsigned char atap[MAX_TAP];
59 int np;
60 int anp;
61 unsigned char fail;
62 unsigned char wk; /* weak key flag */
63 unsigned char klen;
64 unsigned short ilen;
65 unsigned short alen;
66 unsigned short rlen;
Mikko Herranene3a4ea42007-11-26 22:12:07 +080067};
68
Herbert Xue9d41162006-08-19 21:38:49 +100069struct hash_speed {
Michal Ludvige8057922006-05-30 22:04:19 +100070 unsigned int blen; /* buffer length */
71 unsigned int plen; /* per-update length */
72};
73
Sebastian Siewiorde224c32008-03-13 20:21:51 +080074static char zeroed_string[48];
75
Linus Torvalds1da177e2005-04-16 15:20:36 -070076/*
77 * MD4 test vectors from RFC1320
78 */
79#define MD4_TEST_VECTORS 7
80
81static struct hash_testvec md4_tv_template [] = {
82 {
83 .plaintext = "",
Sebastian Siewiorde224c32008-03-13 20:21:51 +080084 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
85 "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
Linus Torvalds1da177e2005-04-16 15:20:36 -070086 }, {
87 .plaintext = "a",
88 .psize = 1,
Sebastian Siewiorde224c32008-03-13 20:21:51 +080089 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
90 "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
Linus Torvalds1da177e2005-04-16 15:20:36 -070091 }, {
92 .plaintext = "abc",
93 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +080094 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
95 "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
Linus Torvalds1da177e2005-04-16 15:20:36 -070096 }, {
97 .plaintext = "message digest",
98 .psize = 14,
Sebastian Siewiorde224c32008-03-13 20:21:51 +080099 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
100 "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700101 }, {
102 .plaintext = "abcdefghijklmnopqrstuvwxyz",
103 .psize = 26,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800104 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
105 "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700106 .np = 2,
107 .tap = { 13, 13 },
108 }, {
109 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
110 .psize = 62,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800111 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
112 "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700113 }, {
114 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800115 "45678901234567890",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700116 .psize = 80,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800117 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
118 "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119 },
120};
121
122/*
123 * MD5 test vectors from RFC1321
124 */
125#define MD5_TEST_VECTORS 7
126
127static struct hash_testvec md5_tv_template[] = {
128 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800129 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
130 "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700131 }, {
132 .plaintext = "a",
133 .psize = 1,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800134 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
135 "\x31\xc3\x99\xe2\x69\x77\x26\x61",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700136 }, {
137 .plaintext = "abc",
138 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800139 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
140 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700141 }, {
142 .plaintext = "message digest",
143 .psize = 14,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800144 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
145 "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700146 }, {
147 .plaintext = "abcdefghijklmnopqrstuvwxyz",
148 .psize = 26,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800149 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
150 "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700151 .np = 2,
152 .tap = {13, 13}
153 }, {
154 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
155 .psize = 62,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800156 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
157 "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700158 }, {
159 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800160 "345678901234567890",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700161 .psize = 80,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800162 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
163 "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700164 }
Adrian-Ken Rueegseggerfd4adf12008-05-07 22:16:36 +0800165
166};
167
168/*
169 * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
170 */
171#define RMD128_TEST_VECTORS 10
172
173static struct hash_testvec rmd128_tv_template[] = {
174 {
175 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
176 "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
177 }, {
178 .plaintext = "a",
179 .psize = 1,
180 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
181 "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
182 }, {
183 .plaintext = "abc",
184 .psize = 3,
185 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
186 "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
187 }, {
188 .plaintext = "message digest",
189 .psize = 14,
190 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
191 "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
192 }, {
193 .plaintext = "abcdefghijklmnopqrstuvwxyz",
194 .psize = 26,
195 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
196 "\x10\x71\x49\x22\xb3\x71\x83\x4e",
197 }, {
198 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
199 "fghijklmnopqrstuvwxyz0123456789",
200 .psize = 62,
201 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
202 "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
203 }, {
204 .plaintext = "1234567890123456789012345678901234567890"
205 "1234567890123456789012345678901234567890",
206 .psize = 80,
207 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
208 "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
209 }, {
210 .plaintext = "abcdbcdecdefdefgefghfghighij"
211 "hijkijkljklmklmnlmnomnopnopq",
212 .psize = 56,
213 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
214 "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
215 .np = 2,
216 .tap = { 28, 28 },
217 }, {
218 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
219 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
220 "lmnopqrsmnopqrstnopqrstu",
221 .psize = 112,
222 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
223 "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
224 }, {
225 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
226 .psize = 32,
227 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
228 "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
229 }
230};
231
232/*
233 * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
234 */
235#define RMD160_TEST_VECTORS 10
236
237static struct hash_testvec rmd160_tv_template[] = {
238 {
239 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
240 "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
241 }, {
242 .plaintext = "a",
243 .psize = 1,
244 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
245 "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
246 }, {
247 .plaintext = "abc",
248 .psize = 3,
249 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
250 "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
251 }, {
252 .plaintext = "message digest",
253 .psize = 14,
254 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
255 "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
256 }, {
257 .plaintext = "abcdefghijklmnopqrstuvwxyz",
258 .psize = 26,
259 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
260 "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
261 }, {
262 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
263 "fghijklmnopqrstuvwxyz0123456789",
264 .psize = 62,
265 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
266 "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
267 }, {
268 .plaintext = "1234567890123456789012345678901234567890"
269 "1234567890123456789012345678901234567890",
270 .psize = 80,
271 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
272 "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
273 }, {
274 .plaintext = "abcdbcdecdefdefgefghfghighij"
275 "hijkijkljklmklmnlmnomnopnopq",
276 .psize = 56,
277 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
278 "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
279 .np = 2,
280 .tap = { 28, 28 },
281 }, {
282 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
283 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
284 "lmnopqrsmnopqrstnopqrstu",
285 .psize = 112,
286 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
287 "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
288 }, {
289 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
290 .psize = 32,
291 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
292 "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
293 }
Linus Torvalds1da177e2005-04-16 15:20:36 -0700294};
295
296/*
297 * SHA1 test vectors from from FIPS PUB 180-1
298 */
299#define SHA1_TEST_VECTORS 2
300
301static struct hash_testvec sha1_tv_template[] = {
Herbert Xuef2736f2005-06-22 13:26:03 -0700302 {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700303 .plaintext = "abc",
304 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800305 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
306 "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700307 }, {
308 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
309 .psize = 56,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800310 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
311 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700312 .np = 2,
313 .tap = { 28, 28 }
314 }
315};
316
Jonathan Lynchcd12fb92007-11-10 20:08:25 +0800317
318/*
319 * SHA224 test vectors from from FIPS PUB 180-2
320 */
321#define SHA224_TEST_VECTORS 2
322
323static struct hash_testvec sha224_tv_template[] = {
324 {
325 .plaintext = "abc",
326 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800327 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
328 "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
329 "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
330 "\xE3\x6C\x9D\xA7",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +0800331 }, {
332 .plaintext =
333 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
334 .psize = 56,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800335 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
336 "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
337 "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
338 "\x52\x52\x25\x25",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +0800339 .np = 2,
340 .tap = { 28, 28 }
341 }
342};
343
Linus Torvalds1da177e2005-04-16 15:20:36 -0700344/*
345 * SHA256 test vectors from from NIST
346 */
347#define SHA256_TEST_VECTORS 2
348
Herbert Xuef2736f2005-06-22 13:26:03 -0700349static struct hash_testvec sha256_tv_template[] = {
350 {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700351 .plaintext = "abc",
352 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800353 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
354 "\x41\x41\x40\xde\x5d\xae\x22\x23"
355 "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
356 "\xb4\x10\xff\x61\xf2\x00\x15\xad",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700357 }, {
358 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
359 .psize = 56,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800360 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
361 "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
362 "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
363 "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700364 .np = 2,
365 .tap = { 28, 28 }
366 },
367};
368
369/*
370 * SHA384 test vectors from from NIST and kerneli
371 */
372#define SHA384_TEST_VECTORS 4
373
374static struct hash_testvec sha384_tv_template[] = {
Herbert Xuef2736f2005-06-22 13:26:03 -0700375 {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700376 .plaintext= "abc",
377 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800378 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
379 "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
380 "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
381 "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
382 "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
383 "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700384 }, {
385 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
386 .psize = 56,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800387 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
388 "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
389 "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
390 "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
391 "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
392 "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700393 }, {
394 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800395 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700396 .psize = 112,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800397 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
398 "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
399 "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
400 "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
401 "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
402 "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700403 }, {
404 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800405 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700406 .psize = 104,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800407 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
408 "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
409 "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
410 "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
411 "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
412 "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700413 .np = 4,
414 .tap = { 26, 26, 26, 26 }
415 },
416};
417
418/*
419 * SHA512 test vectors from from NIST and kerneli
420 */
421#define SHA512_TEST_VECTORS 4
422
423static struct hash_testvec sha512_tv_template[] = {
Herbert Xuef2736f2005-06-22 13:26:03 -0700424 {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700425 .plaintext = "abc",
426 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800427 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
428 "\xcc\x41\x73\x49\xae\x20\x41\x31"
429 "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
430 "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
431 "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
432 "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
433 "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
434 "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700435 }, {
436 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
437 .psize = 56,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800438 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
439 "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
440 "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
441 "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
442 "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
443 "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
444 "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
445 "\x54\xec\x63\x12\x38\xca\x34\x45",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700446 }, {
447 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800448 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700449 .psize = 112,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800450 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
451 "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
452 "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
453 "\x72\x99\xae\xad\xb6\x88\x90\x18"
454 "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
455 "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
456 "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
457 "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700458 }, {
459 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800460 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700461 .psize = 104,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800462 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
463 "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
464 "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
465 "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
466 "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
467 "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
468 "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
469 "\xed\xb4\x19\x87\x23\x28\x50\xc9",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700470 .np = 4,
471 .tap = { 26, 26, 26, 26 }
472 },
473};
474
475
476/*
Herbert Xuef2736f2005-06-22 13:26:03 -0700477 * WHIRLPOOL test vectors from Whirlpool package
Linus Torvalds1da177e2005-04-16 15:20:36 -0700478 * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
479 * submission
480 */
481#define WP512_TEST_VECTORS 8
482
483static struct hash_testvec wp512_tv_template[] = {
Herbert Xuef2736f2005-06-22 13:26:03 -0700484 {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700485 .plaintext = "",
486 .psize = 0,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800487 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
488 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
489 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
490 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
491 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
492 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
493 "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
494 "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700495
496
497 }, {
498 .plaintext = "a",
499 .psize = 1,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800500 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
501 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
502 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
503 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
504 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
505 "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
506 "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
507 "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700508 }, {
509 .plaintext = "abc",
510 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800511 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
512 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
513 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
514 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
515 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
516 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
517 "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
518 "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700519 }, {
520 .plaintext = "message digest",
521 .psize = 14,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800522 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
523 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
524 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
525 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
526 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
527 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
528 "\x92\xED\x92\x00\x52\x83\x8F\x33"
529 "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700530 }, {
531 .plaintext = "abcdefghijklmnopqrstuvwxyz",
532 .psize = 26,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800533 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
534 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
535 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
536 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
537 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
538 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
539 "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
540 "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700541 }, {
542 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800543 "abcdefghijklmnopqrstuvwxyz0123456789",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700544 .psize = 62,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800545 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
546 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
547 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
548 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
549 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
550 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
551 "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
552 "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700553 }, {
554 .plaintext = "1234567890123456789012345678901234567890"
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800555 "1234567890123456789012345678901234567890",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700556 .psize = 80,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800557 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
558 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
559 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
560 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
561 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
562 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
563 "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
564 "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700565 }, {
566 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
567 .psize = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800568 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
569 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
570 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
571 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
572 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
573 "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
574 "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
575 "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700576 },
577};
578
579#define WP384_TEST_VECTORS 8
580
581static struct hash_testvec wp384_tv_template[] = {
Herbert Xuef2736f2005-06-22 13:26:03 -0700582 {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700583 .plaintext = "",
584 .psize = 0,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800585 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
586 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
587 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
588 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
589 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
590 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700591
592
593 }, {
594 .plaintext = "a",
595 .psize = 1,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800596 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
597 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
598 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
599 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
600 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
601 "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700602 }, {
603 .plaintext = "abc",
604 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800605 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
606 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
607 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
608 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
609 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
610 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700611 }, {
612 .plaintext = "message digest",
613 .psize = 14,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800614 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
615 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
616 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
617 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
618 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
619 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700620 }, {
621 .plaintext = "abcdefghijklmnopqrstuvwxyz",
622 .psize = 26,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800623 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
624 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
625 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
626 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
627 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
628 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629 }, {
630 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800631 "abcdefghijklmnopqrstuvwxyz0123456789",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700632 .psize = 62,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800633 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
634 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
635 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
636 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
637 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
638 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700639 }, {
640 .plaintext = "1234567890123456789012345678901234567890"
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800641 "1234567890123456789012345678901234567890",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700642 .psize = 80,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800643 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
644 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
645 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
646 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
647 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
648 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700649 }, {
650 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
651 .psize = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800652 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
653 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
654 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
655 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
656 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
657 "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700658 },
659};
660
661#define WP256_TEST_VECTORS 8
662
663static struct hash_testvec wp256_tv_template[] = {
Herbert Xuef2736f2005-06-22 13:26:03 -0700664 {
Linus Torvalds1da177e2005-04-16 15:20:36 -0700665 .plaintext = "",
666 .psize = 0,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800667 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
668 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
669 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
670 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700671
672
673 }, {
674 .plaintext = "a",
675 .psize = 1,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800676 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
677 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
678 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
679 "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700680 }, {
681 .plaintext = "abc",
682 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800683 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
684 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
685 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
686 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700687 }, {
688 .plaintext = "message digest",
689 .psize = 14,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800690 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
691 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
692 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
693 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700694 }, {
695 .plaintext = "abcdefghijklmnopqrstuvwxyz",
696 .psize = 26,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800697 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
698 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
699 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
700 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700701 }, {
702 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800703 "abcdefghijklmnopqrstuvwxyz0123456789",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700704 .psize = 62,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800705 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
706 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
707 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
708 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700709 }, {
710 .plaintext = "1234567890123456789012345678901234567890"
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800711 "1234567890123456789012345678901234567890",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700712 .psize = 80,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800713 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
714 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
715 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
716 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700717 }, {
718 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
719 .psize = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800720 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
721 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
722 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
723 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700724 },
725};
726
727/*
Herbert Xuef2736f2005-06-22 13:26:03 -0700728 * TIGER test vectors from Tiger website
Linus Torvalds1da177e2005-04-16 15:20:36 -0700729 */
730#define TGR192_TEST_VECTORS 6
731
732static struct hash_testvec tgr192_tv_template[] = {
733 {
734 .plaintext = "",
735 .psize = 0,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800736 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
737 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
738 "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700739 }, {
740 .plaintext = "abc",
741 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800742 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
743 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
744 "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700745 }, {
746 .plaintext = "Tiger",
747 .psize = 5,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800748 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
749 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
750 "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700751 }, {
752 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
753 .psize = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800754 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
755 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
756 "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700757 }, {
758 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
759 .psize = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800760 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
761 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
762 "\x57\x89\x65\x65\x97\x5f\x91\x97",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700763 }, {
764 .plaintext = "Tiger - A Fast New Hash Function, "
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800765 "by Ross Anderson and Eli Biham, "
766 "proceedings of Fast Software Encryption 3, "
767 "Cambridge, 1996.",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700768 .psize = 125,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800769 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
770 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
771 "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700772 },
773};
774
775#define TGR160_TEST_VECTORS 6
776
777static struct hash_testvec tgr160_tv_template[] = {
778 {
779 .plaintext = "",
780 .psize = 0,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800781 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
782 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
783 "\xf3\x73\xde\x2d",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700784 }, {
785 .plaintext = "abc",
786 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800787 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
788 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
789 "\x93\x5f\x7b\x95",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700790 }, {
791 .plaintext = "Tiger",
792 .psize = 5,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800793 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
794 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
795 "\x37\x79\x0c\x11",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700796 }, {
797 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
798 .psize = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800799 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
800 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
801 "\xb5\x86\x44\x50",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700802 }, {
803 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
804 .psize = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800805 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
806 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
807 "\x57\x89\x65\x65",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700808 }, {
809 .plaintext = "Tiger - A Fast New Hash Function, "
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800810 "by Ross Anderson and Eli Biham, "
811 "proceedings of Fast Software Encryption 3, "
812 "Cambridge, 1996.",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700813 .psize = 125,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800814 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
815 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
816 "\xdd\x68\x15\x1d",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700817 },
818};
819
820#define TGR128_TEST_VECTORS 6
821
822static struct hash_testvec tgr128_tv_template[] = {
823 {
824 .plaintext = "",
825 .psize = 0,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800826 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
827 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700828 }, {
829 .plaintext = "abc",
830 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800831 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
832 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700833 }, {
834 .plaintext = "Tiger",
835 .psize = 5,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800836 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
837 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700838 }, {
839 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
840 .psize = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800841 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
842 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700843 }, {
844 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
845 .psize = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800846 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
847 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700848 }, {
849 .plaintext = "Tiger - A Fast New Hash Function, "
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800850 "by Ross Anderson and Eli Biham, "
851 "proceedings of Fast Software Encryption 3, "
852 "Cambridge, 1996.",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700853 .psize = 125,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800854 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
855 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700856 },
857};
858
Linus Torvalds1da177e2005-04-16 15:20:36 -0700859/*
860 * HMAC-MD5 test vectors from RFC2202
861 * (These need to be fixed to not use strlen).
862 */
863#define HMAC_MD5_TEST_VECTORS 7
864
Herbert Xue9d41162006-08-19 21:38:49 +1000865static struct hash_testvec hmac_md5_tv_template[] =
Herbert Xuef2736f2005-06-22 13:26:03 -0700866{
Linus Torvalds1da177e2005-04-16 15:20:36 -0700867 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800868 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700869 .ksize = 16,
870 .plaintext = "Hi There",
871 .psize = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800872 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
873 "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700874 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800875 .key = "Jefe",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700876 .ksize = 4,
877 .plaintext = "what do ya want for nothing?",
878 .psize = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800879 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
880 "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700881 .np = 2,
882 .tap = {14, 14}
883 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800884 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700885 .ksize = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800886 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
887 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
888 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
889 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700890 .psize = 50,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800891 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
892 "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700893 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800894 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
895 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
896 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700897 .ksize = 25,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800898 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
899 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
900 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
901 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700902 .psize = 50,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800903 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
904 "\x3a\x75\x16\x47\x46\xff\xaa\x79",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700905 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800906 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700907 .ksize = 16,
908 .plaintext = "Test With Truncation",
909 .psize = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800910 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
911 "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700912 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800913 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
914 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
915 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
916 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
917 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
918 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
919 "\xaa\xaa",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700920 .ksize = 80,
921 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
922 .psize = 54,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800923 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
924 "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700925 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800926 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
927 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
928 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
929 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
930 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
931 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
932 "\xaa\xaa",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700933 .ksize = 80,
934 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800935 "Block-Size Data",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700936 .psize = 73,
Sebastian Siewiorde224c32008-03-13 20:21:51 +0800937 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
938 "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
Linus Torvalds1da177e2005-04-16 15:20:36 -0700939 },
940};
941
942/*
Adrian-Ken Rueegseggerfd4adf12008-05-07 22:16:36 +0800943 * HMAC-RIPEMD128 test vectors from RFC2286
944 */
945#define HMAC_RMD128_TEST_VECTORS 7
946
947static struct hash_testvec hmac_rmd128_tv_template[] = {
948 {
949 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
950 .ksize = 16,
951 .plaintext = "Hi There",
952 .psize = 8,
953 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
954 "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
955 }, {
956 .key = "Jefe",
957 .ksize = 4,
958 .plaintext = "what do ya want for nothing?",
959 .psize = 28,
960 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
961 "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
962 .np = 2,
963 .tap = { 14, 14 },
964 }, {
965 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
966 .ksize = 16,
967 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
968 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
969 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
970 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
971 .psize = 50,
972 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
973 "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
974 }, {
975 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
976 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
977 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
978 .ksize = 25,
979 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
980 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
981 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
982 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
983 .psize = 50,
984 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
985 "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
986 }, {
987 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
988 .ksize = 16,
989 .plaintext = "Test With Truncation",
990 .psize = 20,
991 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
992 "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
993 }, {
994 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
995 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
996 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
997 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
998 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
999 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1000 "\xaa\xaa",
1001 .ksize = 80,
1002 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1003 .psize = 54,
1004 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
1005 "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
1006 }, {
1007 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1008 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1009 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1010 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1011 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1012 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1013 "\xaa\xaa",
1014 .ksize = 80,
1015 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1016 "Block-Size Data",
1017 .psize = 73,
1018 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
1019 "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
1020 },
1021};
1022
1023/*
1024 * HMAC-RIPEMD160 test vectors from RFC2286
1025 */
1026#define HMAC_RMD160_TEST_VECTORS 7
1027
1028static struct hash_testvec hmac_rmd160_tv_template[] = {
1029 {
1030 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1031 .ksize = 20,
1032 .plaintext = "Hi There",
1033 .psize = 8,
1034 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
1035 "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
1036 }, {
1037 .key = "Jefe",
1038 .ksize = 4,
1039 .plaintext = "what do ya want for nothing?",
1040 .psize = 28,
1041 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
1042 "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
1043 .np = 2,
1044 .tap = { 14, 14 },
1045 }, {
1046 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1047 .ksize = 20,
1048 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1049 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1050 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1051 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1052 .psize = 50,
1053 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
1054 "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
1055 }, {
1056 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1057 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1058 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1059 .ksize = 25,
1060 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1061 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1062 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1063 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1064 .psize = 50,
1065 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
1066 "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
1067 }, {
1068 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1069 .ksize = 20,
1070 .plaintext = "Test With Truncation",
1071 .psize = 20,
1072 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
1073 "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
1074 }, {
1075 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1076 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1077 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1078 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1079 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1080 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1081 "\xaa\xaa",
1082 .ksize = 80,
1083 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1084 .psize = 54,
1085 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
1086 "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
1087 }, {
1088 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1089 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1090 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1091 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1092 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1093 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1094 "\xaa\xaa",
1095 .ksize = 80,
1096 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1097 "Block-Size Data",
1098 .psize = 73,
1099 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
1100 "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
1101 },
1102};
1103
1104/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07001105 * HMAC-SHA1 test vectors from RFC2202
1106 */
1107#define HMAC_SHA1_TEST_VECTORS 7
1108
Herbert Xue9d41162006-08-19 21:38:49 +10001109static struct hash_testvec hmac_sha1_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07001110 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001111 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001112 .ksize = 20,
1113 .plaintext = "Hi There",
1114 .psize = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001115 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
1116 "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
1117 "\x46\xbe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001118 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001119 .key = "Jefe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001120 .ksize = 4,
1121 .plaintext = "what do ya want for nothing?",
1122 .psize = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001123 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
1124 "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001125 .np = 2,
1126 .tap = { 14, 14 }
1127 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001128 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001129 .ksize = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001130 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1131 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1132 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1133 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001134 .psize = 50,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001135 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
1136 "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001137 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001138 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1139 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1140 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001141 .ksize = 25,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001142 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1143 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1144 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1145 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001146 .psize = 50,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001147 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
1148 "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001149 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001150 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001151 .ksize = 20,
1152 .plaintext = "Test With Truncation",
1153 .psize = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001154 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
1155 "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001156 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001157 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1158 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1159 "\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",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001164 .ksize = 80,
1165 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1166 .psize = 54,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001167 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
1168 "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001169 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001170 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1171 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1172 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1173 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1174 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1175 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1176 "\xaa\xaa",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001177 .ksize = 80,
1178 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001179 "Block-Size Data",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001180 .psize = 73,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001181 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
1182 "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001183 },
1184};
1185
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001186
1187/*
1188 * SHA224 HMAC test vectors from RFC4231
1189 */
1190#define HMAC_SHA224_TEST_VECTORS 4
1191
1192static struct hash_testvec hmac_sha224_tv_template[] = {
1193 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001194 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1195 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1196 "\x0b\x0b\x0b\x0b",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001197 .ksize = 20,
1198 /* ("Hi There") */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001199 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001200 .psize = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001201 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
1202 "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
1203 "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
1204 "\x53\x68\x4b\x22",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001205 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001206 .key = "Jefe",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001207 .ksize = 4,
1208 /* ("what do ya want for nothing?") */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001209 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
1210 "\x79\x61\x20\x77\x61\x6e\x74\x20"
1211 "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
1212 "\x69\x6e\x67\x3f",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001213 .psize = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001214 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
1215 "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
1216 "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
1217 "\x8f\xd0\x5e\x44",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001218 .np = 4,
1219 .tap = { 7, 7, 7, 7 }
1220 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001221 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1222 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1223 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1224 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1225 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1226 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1227 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1228 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1229 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1230 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1231 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1232 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1233 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1234 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1235 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1236 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1237 "\xaa\xaa\xaa",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001238 .ksize = 131,
1239 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001240 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
1241 "\x6e\x67\x20\x4c\x61\x72\x67\x65"
1242 "\x72\x20\x54\x68\x61\x6e\x20\x42"
1243 "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
1244 "\x65\x20\x4b\x65\x79\x20\x2d\x20"
1245 "\x48\x61\x73\x68\x20\x4b\x65\x79"
1246 "\x20\x46\x69\x72\x73\x74",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001247 .psize = 54,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001248 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
1249 "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
1250 "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
1251 "\x3f\xa6\x87\x0e",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001252 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001253 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1254 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1255 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1256 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1257 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1258 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1259 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1260 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1261 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1262 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1263 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1264 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1265 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1266 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1267 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1268 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1269 "\xaa\xaa\xaa",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001270 .ksize = 131,
1271 /* ("This is a test using a larger than block-size key and a")
1272 (" larger than block-size data. The key needs to be")
1273 (" hashed before being used by the HMAC algorithm.") */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001274 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
1275 "\x61\x20\x74\x65\x73\x74\x20\x75"
1276 "\x73\x69\x6e\x67\x20\x61\x20\x6c"
1277 "\x61\x72\x67\x65\x72\x20\x74\x68"
1278 "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
1279 "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
1280 "\x79\x20\x61\x6e\x64\x20\x61\x20"
1281 "\x6c\x61\x72\x67\x65\x72\x20\x74"
1282 "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
1283 "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
1284 "\x61\x74\x61\x2e\x20\x54\x68\x65"
1285 "\x20\x6b\x65\x79\x20\x6e\x65\x65"
1286 "\x64\x73\x20\x74\x6f\x20\x62\x65"
1287 "\x20\x68\x61\x73\x68\x65\x64\x20"
1288 "\x62\x65\x66\x6f\x72\x65\x20\x62"
1289 "\x65\x69\x6e\x67\x20\x75\x73\x65"
1290 "\x64\x20\x62\x79\x20\x74\x68\x65"
1291 "\x20\x48\x4d\x41\x43\x20\x61\x6c"
1292 "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001293 .psize = 152,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001294 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
1295 "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
1296 "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
1297 "\xf6\xf5\x65\xd1",
Jonathan Lynchcd12fb92007-11-10 20:08:25 +08001298 },
1299};
1300
Linus Torvalds1da177e2005-04-16 15:20:36 -07001301/*
1302 * HMAC-SHA256 test vectors from
1303 * draft-ietf-ipsec-ciph-sha-256-01.txt
1304 */
1305#define HMAC_SHA256_TEST_VECTORS 10
1306
Herbert Xue9d41162006-08-19 21:38:49 +10001307static struct hash_testvec hmac_sha256_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07001308 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001309 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1310 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1311 "\x11\x12\x13\x14\x15\x16\x17\x18"
1312 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001313 .ksize = 32,
1314 .plaintext = "abc",
1315 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001316 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
1317 "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
1318 "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
1319 "\x92\x75\x90\x21\xcf\xab\x81\x81",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001320 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001321 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1322 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1323 "\x11\x12\x13\x14\x15\x16\x17\x18"
1324 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001325 .ksize = 32,
1326 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1327 .psize = 56,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001328 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
1329 "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
1330 "\xe6\x98\xe3\x61\x19\x42\x11\x49"
1331 "\xea\x8c\x71\x24\x56\x69\x7d\x30",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001332 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001333 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1334 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1335 "\x11\x12\x13\x14\x15\x16\x17\x18"
1336 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001337 .ksize = 32,
1338 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001339 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001340 .psize = 112,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001341 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
1342 "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
1343 "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
1344 "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001345 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001346 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1347 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1348 "\x0b\x0b\x0b\x0b\x0b\x0b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001349 .ksize = 32,
1350 .plaintext = "Hi There",
1351 .psize = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001352 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
1353 "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
1354 "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
1355 "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001356 }, {
1357 .key = "Jefe",
1358 .ksize = 4,
1359 .plaintext = "what do ya want for nothing?",
1360 .psize = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001361 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
1362 "\x6a\x04\x24\x26\x08\x95\x75\xc7"
1363 "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
1364 "\x9d\xec\x58\xb9\x64\xec\x38\x43",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001365 .np = 2,
1366 .tap = { 14, 14 }
1367 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001368 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1369 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1370 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001371 .ksize = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001372 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1373 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1374 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1375 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001376 .psize = 50,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001377 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
1378 "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
1379 "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
1380 "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001381 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001382 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1383 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1384 "\x11\x12\x13\x14\x15\x16\x17\x18"
1385 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
1386 "\x21\x22\x23\x24\x25",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001387 .ksize = 37,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001388 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1389 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1390 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1391 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001392 .psize = 50,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001393 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
1394 "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
1395 "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
1396 "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001397 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001398 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1399 "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1400 "\x0c\x0c\x0c\x0c\x0c\x0c",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001401 .ksize = 32,
1402 .plaintext = "Test With Truncation",
1403 .psize = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001404 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
1405 "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
1406 "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
1407 "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001408 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001409 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1410 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1411 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1412 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1413 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1414 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1415 "\xaa\xaa",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001416 .ksize = 80,
1417 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1418 .psize = 54,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001419 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
1420 "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
1421 "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
1422 "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001423 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001424 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1425 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1426 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1427 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1428 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1429 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1430 "\xaa\xaa",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001431 .ksize = 80,
1432 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001433 "One Block-Size Data",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001434 .psize = 73,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001435 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
1436 "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
1437 "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
1438 "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001439 },
1440};
1441
Kazunori MIYAZAWA5b2becf2006-10-28 13:18:53 +10001442#define XCBC_AES_TEST_VECTORS 6
1443
1444static struct hash_testvec aes_xcbc128_tv_template[] = {
1445 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001446 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1447 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1448 .plaintext = zeroed_string,
1449 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
1450 "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
Kazunori MIYAZAWA5b2becf2006-10-28 13:18:53 +10001451 .psize = 0,
1452 .ksize = 16,
1453 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001454 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1455 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1456 .plaintext = "\x00\x01\x02",
1457 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
1458 "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
Kazunori MIYAZAWA5b2becf2006-10-28 13:18:53 +10001459 .psize = 3,
1460 .ksize = 16,
1461 } , {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001462 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1463 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1464 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1465 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1466 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
1467 "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
Kazunori MIYAZAWA5b2becf2006-10-28 13:18:53 +10001468 .psize = 16,
1469 .ksize = 16,
1470 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001471 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1472 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1473 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1474 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1475 "\x10\x11\x12\x13",
1476 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
1477 "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
Kazunori MIYAZAWA5b2becf2006-10-28 13:18:53 +10001478 .tap = { 10, 10 },
1479 .psize = 20,
1480 .np = 2,
1481 .ksize = 16,
1482 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001483 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1484 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1485 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1486 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1487 "\x10\x11\x12\x13\x14\x15\x16\x17"
1488 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
1489 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
1490 "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
Kazunori MIYAZAWA5b2becf2006-10-28 13:18:53 +10001491 .psize = 32,
1492 .ksize = 16,
1493 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001494 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1495 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1496 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1497 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1498 "\x10\x11\x12\x13\x14\x15\x16\x17"
1499 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
1500 "\x20\x21",
1501 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
1502 "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
Kazunori MIYAZAWA5b2becf2006-10-28 13:18:53 +10001503 .tap = { 17, 17 },
1504 .psize = 34,
1505 .np = 2,
1506 .ksize = 16,
1507 }
1508};
1509
Linus Torvalds1da177e2005-04-16 15:20:36 -07001510/*
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001511 * SHA384 HMAC test vectors from RFC4231
1512 */
1513
1514#define HMAC_SHA384_TEST_VECTORS 4
1515
1516static struct hash_testvec hmac_sha384_tv_template[] = {
1517 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001518 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1519 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1520 "\x0b\x0b\x0b\x0b",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001521 .ksize = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001522 .plaintext = "Hi There",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001523 .psize = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001524 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
1525 "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
1526 "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
1527 "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
1528 "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
1529 "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001530 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001531 .key = "Jefe",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001532 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001533 .plaintext = "what do ya want for nothing?",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001534 .psize = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001535 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
1536 "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
1537 "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
1538 "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
1539 "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
1540 "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001541 .np = 4,
1542 .tap = { 7, 7, 7, 7 }
1543 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001544 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1545 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1546 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1547 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1548 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1549 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1550 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1551 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1552 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1553 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1554 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1555 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1556 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1557 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1558 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1559 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1560 "\xaa\xaa\xaa",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001561 .ksize = 131,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001562 .plaintext = "Test Using Larger Than Block-Siz"
1563 "e Key - Hash Key First",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001564 .psize = 54,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001565 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
1566 "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
1567 "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
1568 "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
1569 "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
1570 "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001571 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001572 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1573 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1574 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1575 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1576 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1577 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1578 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1579 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1580 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1581 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1582 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1583 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1584 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1585 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1586 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1587 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1588 "\xaa\xaa\xaa",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001589 .ksize = 131,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001590 .plaintext = "This is a test u"
1591 "sing a larger th"
1592 "an block-size ke"
1593 "y and a larger t"
1594 "han block-size d"
1595 "ata. The key nee"
1596 "ds to be hashed "
1597 "before being use"
1598 "d by the HMAC al"
1599 "gorithm.",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001600 .psize = 152,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001601 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
1602 "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
1603 "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
1604 "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
1605 "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
1606 "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001607 },
1608};
1609
1610/*
1611 * SHA512 HMAC test vectors from RFC4231
1612 */
1613
1614#define HMAC_SHA512_TEST_VECTORS 4
1615
1616static struct hash_testvec hmac_sha512_tv_template[] = {
1617 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001618 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1619 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1620 "\x0b\x0b\x0b\x0b",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001621 .ksize = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001622 .plaintext = "Hi There",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001623 .psize = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001624 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
1625 "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
1626 "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
1627 "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
1628 "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
1629 "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
1630 "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
1631 "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001632 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001633 .key = "Jefe",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001634 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001635 .plaintext = "what do ya want for nothing?",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001636 .psize = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001637 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
1638 "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
1639 "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
1640 "\x10\x27\x0c\xd7\xea\x25\x05\x54"
1641 "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
1642 "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
1643 "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
1644 "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001645 .np = 4,
1646 .tap = { 7, 7, 7, 7 }
1647 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001648 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1649 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1650 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1651 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1652 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1653 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1654 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1655 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1656 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1657 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1658 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1659 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1660 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1661 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1662 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1663 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1664 "\xaa\xaa\xaa",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001665 .ksize = 131,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001666 .plaintext = "Test Using Large"
1667 "r Than Block-Siz"
1668 "e Key - Hash Key"
1669 " First",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001670 .psize = 54,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001671 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
1672 "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
1673 "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
1674 "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
1675 "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
1676 "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
1677 "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
1678 "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001679 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001680 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1681 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1682 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1683 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1684 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1685 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1686 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1687 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1688 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1689 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1690 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1691 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1692 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1693 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1694 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1695 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1696 "\xaa\xaa\xaa",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001697 .ksize = 131,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001698 .plaintext =
1699 "This is a test u"
1700 "sing a larger th"
1701 "an block-size ke"
1702 "y and a larger t"
1703 "han block-size d"
1704 "ata. The key nee"
1705 "ds to be hashed "
1706 "before being use"
1707 "d by the HMAC al"
1708 "gorithm.",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001709 .psize = 152,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001710 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
1711 "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
1712 "\xde\xbd\x71\xf8\x86\x72\x89\x86"
1713 "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
1714 "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
1715 "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
1716 "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
1717 "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
Andrew Donofrioa28091a2006-12-10 12:10:20 +11001718 },
1719};
1720
1721/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07001722 * DES test vectors.
1723 */
1724#define DES_ENC_TEST_VECTORS 10
1725#define DES_DEC_TEST_VECTORS 4
1726#define DES_CBC_ENC_TEST_VECTORS 5
1727#define DES_CBC_DEC_TEST_VECTORS 4
1728#define DES3_EDE_ENC_TEST_VECTORS 3
1729#define DES3_EDE_DEC_TEST_VECTORS 3
1730
1731static struct cipher_testvec des_enc_tv_template[] = {
1732 { /* From Applied Cryptography */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001733 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001734 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001735 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001736 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001737 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001738 .rlen = 8,
1739 }, { /* Same key, different plaintext block */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001740 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001741 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001742 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001743 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001744 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001745 .rlen = 8,
1746 }, { /* Sbox test from NBS */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001747 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001748 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001749 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001750 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001751 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001752 .rlen = 8,
1753 }, { /* Three blocks */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001754 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001755 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001756 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
1757 "\x22\x33\x44\x55\x66\x77\x88\x99"
1758 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001759 .ilen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001760 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
1761 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
1762 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001763 .rlen = 24,
1764 }, { /* Weak key */
1765 .fail = 1,
1766 .wk = 1,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001767 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001768 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001769 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001770 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001771 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001772 .rlen = 8,
1773 }, { /* Two blocks -- for testing encryption across pages */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001774 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001775 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001776 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
1777 "\x22\x33\x44\x55\x66\x77\x88\x99",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001778 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001779 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
1780 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001781 .rlen = 16,
1782 .np = 2,
1783 .tap = { 8, 8 }
1784 }, { /* Four blocks -- for testing encryption with chunking */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001785 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001786 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001787 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
1788 "\x22\x33\x44\x55\x66\x77\x88\x99"
1789 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
1790 "\x22\x33\x44\x55\x66\x77\x88\x99",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001791 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001792 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
1793 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
1794 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
1795 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001796 .rlen = 32,
1797 .np = 3,
Herbert Xuef2736f2005-06-22 13:26:03 -07001798 .tap = { 14, 10, 8 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001799 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001800 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001801 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001802 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
1803 "\x22\x33\x44\x55\x66\x77\x88\x99"
1804 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001805 .ilen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001806 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
1807 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
1808 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001809 .rlen = 24,
1810 .np = 4,
Herbert Xuef2736f2005-06-22 13:26:03 -07001811 .tap = { 2, 1, 3, 18 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001812 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001813 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001814 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001815 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
1816 "\x22\x33\x44\x55\x66\x77\x88\x99",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001817 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001818 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
1819 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001820 .rlen = 16,
1821 .np = 5,
Herbert Xuef2736f2005-06-22 13:26:03 -07001822 .tap = { 2, 2, 2, 2, 8 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001823 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001824 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001825 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001826 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001827 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001828 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001829 .rlen = 8,
1830 .np = 8,
Herbert Xuef2736f2005-06-22 13:26:03 -07001831 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
Linus Torvalds1da177e2005-04-16 15:20:36 -07001832 },
1833};
1834
1835static struct cipher_testvec des_dec_tv_template[] = {
1836 { /* From Applied Cryptography */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001837 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001838 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001839 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001840 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001841 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001842 .rlen = 8,
1843 }, { /* Sbox test from NBS */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001844 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001845 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001846 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001847 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001848 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001849 .rlen = 8,
1850 }, { /* Two blocks, for chunking test */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001851 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001852 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001853 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
1854 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001855 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001856 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
1857 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001858 .rlen = 16,
1859 .np = 2,
1860 .tap = { 8, 8 }
1861 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001862 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001863 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001864 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
1865 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001866 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001867 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
1868 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001869 .rlen = 16,
1870 .np = 3,
1871 .tap = { 3, 12, 1 }
1872 },
1873};
1874
1875static struct cipher_testvec des_cbc_enc_tv_template[] = {
1876 { /* From OpenSSL */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001877 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001878 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001879 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
1880 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
1881 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
1882 "\x68\x65\x20\x74\x69\x6d\x65\x20",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001883 .ilen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001884 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
1885 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
1886 "\x46\x8e\x91\x15\x78\x88\xba\x68",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001887 .rlen = 24,
1888 }, { /* FIPS Pub 81 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001889 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001890 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001891 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
1892 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001893 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001894 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001895 .rlen = 8,
1896 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001897 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001898 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001899 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
1900 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001901 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001902 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001903 .rlen = 8,
Herbert Xuef2736f2005-06-22 13:26:03 -07001904 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001905 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001906 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001907 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
1908 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001909 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001910 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001911 .rlen = 8,
Herbert Xuef2736f2005-06-22 13:26:03 -07001912 }, { /* Copy of openssl vector for chunk testing */
Linus Torvalds1da177e2005-04-16 15:20:36 -07001913 /* From OpenSSL */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001914 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001915 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001916 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
1917 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
1918 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
1919 "\x68\x65\x20\x74\x69\x6d\x65\x20",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001920 .ilen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001921 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
1922 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
1923 "\x46\x8e\x91\x15\x78\x88\xba\x68",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001924 .rlen = 24,
1925 .np = 2,
1926 .tap = { 13, 11 }
1927 },
1928};
1929
1930static struct cipher_testvec des_cbc_dec_tv_template[] = {
1931 { /* FIPS Pub 81 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001932 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001933 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001934 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
1935 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001936 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001937 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001938 .rlen = 8,
1939 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001940 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001941 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001942 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
1943 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001944 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001945 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001946 .rlen = 8,
1947 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001948 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001949 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001950 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
1951 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001952 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001953 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001954 .rlen = 8,
Herbert Xuef2736f2005-06-22 13:26:03 -07001955 }, { /* Copy of above, for chunk testing */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001956 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001957 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001958 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
1959 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001960 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001961 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001962 .rlen = 8,
1963 .np = 2,
1964 .tap = { 4, 4 }
1965 },
1966};
1967
1968/*
1969 * We really need some more test vectors, especially for DES3 CBC.
1970 */
1971static struct cipher_testvec des3_ede_enc_tv_template[] = {
1972 { /* These are from openssl */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001973 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
1974 "\x55\x55\x55\x55\x55\x55\x55\x55"
1975 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001976 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001977 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001978 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001979 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001980 .rlen = 8,
1981 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001982 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
1983 "\x86\x02\x87\x66\x59\x08\x21\x98"
1984 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001985 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001986 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001987 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001988 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001989 .rlen = 8,
1990 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001991 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
1992 "\x91\x07\xd0\x15\x89\x19\x01\x01"
1993 "\x19\x07\x92\x10\x98\x1a\x01\x01",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001994 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001995 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001996 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08001997 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07001998 .rlen = 8,
1999 },
2000};
2001
2002static struct cipher_testvec des3_ede_dec_tv_template[] = {
2003 { /* These are from openssl */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002004 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2005 "\x55\x55\x55\x55\x55\x55\x55\x55"
2006 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002007 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002008 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002009 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002010 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002011 .rlen = 8,
2012 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002013 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
2014 "\x86\x02\x87\x66\x59\x08\x21\x98"
2015 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002016 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002017 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002018 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002019 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002020 .rlen = 8,
2021 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002022 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
2023 "\x91\x07\xd0\x15\x89\x19\x01\x01"
2024 "\x19\x07\x92\x10\x98\x1a\x01\x01",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002025 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002026 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002027 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002028 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002029 .rlen = 8,
2030 },
2031};
2032
2033/*
2034 * Blowfish test vectors.
2035 */
2036#define BF_ENC_TEST_VECTORS 6
2037#define BF_DEC_TEST_VECTORS 6
2038#define BF_CBC_ENC_TEST_VECTORS 1
2039#define BF_CBC_DEC_TEST_VECTORS 1
2040
2041static struct cipher_testvec bf_enc_tv_template[] = {
2042 { /* DES test vectors from OpenSSL */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002043 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002044 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002045 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002046 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002047 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002048 .rlen = 8,
2049 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002050 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002051 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002052 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002053 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002054 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002055 .rlen = 8,
2056 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002057 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002058 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002059 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002060 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002061 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002062 .rlen = 8,
Herbert Xuef2736f2005-06-22 13:26:03 -07002063 }, { /* Vary the keylength... */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002064 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2065 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002066 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002067 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002068 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002069 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002070 .rlen = 8,
2071 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002072 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2073 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2074 "\x00\x11\x22\x33\x44",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002075 .klen = 21,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002076 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002077 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002078 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002079 .rlen = 8,
2080 }, { /* Generated with bf488 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002081 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2082 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2083 "\x00\x11\x22\x33\x44\x55\x66\x77"
2084 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2085 "\x58\x40\x23\x64\x1a\xba\x61\x76"
2086 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2087 "\xff\xff\xff\xff\xff\xff\xff\xff",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002088 .klen = 56,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002089 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002090 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002091 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002092 .rlen = 8,
2093 },
2094};
2095
2096static struct cipher_testvec bf_dec_tv_template[] = {
2097 { /* DES test vectors from OpenSSL */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002098 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002099 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002100 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002101 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002102 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002103 .rlen = 8,
2104 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002105 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002106 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002107 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002108 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002109 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002110 .rlen = 8,
2111 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002112 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002113 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002114 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002115 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002116 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002117 .rlen = 8,
Herbert Xuef2736f2005-06-22 13:26:03 -07002118 }, { /* Vary the keylength... */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002119 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2120 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002121 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002122 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002123 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002124 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002125 .rlen = 8,
2126 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002127 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2128 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2129 "\x00\x11\x22\x33\x44",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002130 .klen = 21,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002131 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002132 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002133 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002134 .rlen = 8,
2135 }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002136 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2137 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2138 "\x00\x11\x22\x33\x44\x55\x66\x77"
2139 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2140 "\x58\x40\x23\x64\x1a\xba\x61\x76"
2141 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2142 "\xff\xff\xff\xff\xff\xff\xff\xff",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002143 .klen = 56,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002144 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002145 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002146 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002147 .rlen = 8,
2148 },
2149};
2150
2151static struct cipher_testvec bf_cbc_enc_tv_template[] = {
2152 { /* From OpenSSL */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002153 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2154 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002155 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002156 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2157 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2158 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2159 "\x68\x65\x20\x74\x69\x6d\x65\x20"
2160 "\x66\x6f\x72\x20\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002161 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002162 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2163 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2164 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2165 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002166 .rlen = 32,
2167 },
2168};
2169
2170static struct cipher_testvec bf_cbc_dec_tv_template[] = {
2171 { /* From OpenSSL */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002172 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2173 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002174 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002175 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2176 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2177 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2178 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2179 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002180 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002181 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
2182 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2183 "\x68\x65\x20\x74\x69\x6d\x65\x20"
2184 "\x66\x6f\x72\x20\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002185 .rlen = 32,
2186 },
2187};
2188
2189/*
2190 * Twofish test vectors.
2191 */
2192#define TF_ENC_TEST_VECTORS 3
2193#define TF_DEC_TEST_VECTORS 3
2194#define TF_CBC_ENC_TEST_VECTORS 4
2195#define TF_CBC_DEC_TEST_VECTORS 4
2196
2197static struct cipher_testvec tf_enc_tv_template[] = {
2198 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002199 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002200 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002201 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002202 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002203 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2204 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002205 .rlen = 16,
2206 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002207 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2208 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2209 "\x00\x11\x22\x33\x44\x55\x66\x77",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002210 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002211 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002212 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002213 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
2214 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002215 .rlen = 16,
2216 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002217 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2218 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2219 "\x00\x11\x22\x33\x44\x55\x66\x77"
2220 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002221 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002222 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002223 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002224 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
2225 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002226 .rlen = 16,
2227 },
2228};
2229
2230static struct cipher_testvec tf_dec_tv_template[] = {
2231 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002232 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002233 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002234 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2235 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002236 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002237 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002238 .rlen = 16,
2239 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002240 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2241 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2242 "\x00\x11\x22\x33\x44\x55\x66\x77",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002243 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002244 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
2245 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002246 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002247 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002248 .rlen = 16,
2249 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002250 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2251 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2252 "\x00\x11\x22\x33\x44\x55\x66\x77"
2253 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002254 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002255 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
2256 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002257 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002258 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002259 .rlen = 16,
2260 },
2261};
2262
2263static struct cipher_testvec tf_cbc_enc_tv_template[] = {
2264 { /* Generated with Nettle */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002265 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002266 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002267 .iv = zeroed_string,
2268 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002269 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002270 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2271 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002272 .rlen = 16,
2273 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002274 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002275 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002276 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2277 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2278 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002279 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002280 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2281 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002282 .rlen = 16,
2283 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002284 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002285 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002286 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2287 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
2288 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002289 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002290 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
2291 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002292 .rlen = 16,
2293 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002294 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002295 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002296 .iv = zeroed_string,
2297 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002298 .ilen = 48,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002299 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2300 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
2301 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2302 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
2303 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
2304 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002305 .rlen = 48,
2306 },
2307};
2308
2309static struct cipher_testvec tf_cbc_dec_tv_template[] = {
2310 { /* Reverse of the first four above */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002311 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002312 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002313 .iv = zeroed_string,
2314 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2315 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002316 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002317 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002318 .rlen = 16,
2319 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002320 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002321 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002322 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2323 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2324 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2325 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002326 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002327 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002328 .rlen = 16,
2329 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002330 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002331 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002332 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2333 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
2334 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
2335 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002336 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002337 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002338 .rlen = 16,
2339 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002340 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002341 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002342 .iv = zeroed_string,
2343 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2344 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
2345 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2346 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
2347 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
2348 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002349 .ilen = 48,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002350 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002351 .rlen = 48,
2352 },
2353};
2354
2355/*
2356 * Serpent test vectors. These are backwards because Serpent writes
2357 * octet sequences in right-to-left mode.
2358 */
2359#define SERPENT_ENC_TEST_VECTORS 4
2360#define SERPENT_DEC_TEST_VECTORS 4
2361
2362#define TNEPRES_ENC_TEST_VECTORS 4
2363#define TNEPRES_DEC_TEST_VECTORS 4
2364
Herbert Xuef2736f2005-06-22 13:26:03 -07002365static struct cipher_testvec serpent_enc_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002366 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002367 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
2368 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002369 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002370 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
2371 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002372 .rlen = 16,
2373 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002374 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2375 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002376 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002377 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
2378 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002379 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002380 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
2381 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002382 .rlen = 16,
2383 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002384 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2385 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2386 "\x10\x11\x12\x13\x14\x15\x16\x17"
2387 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002388 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002389 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
2390 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002391 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002392 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
2393 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002394 .rlen = 16,
2395 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002396 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002397 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002398 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002399 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002400 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
2401 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002402 .rlen = 16,
2403 },
2404};
2405
Herbert Xuef2736f2005-06-22 13:26:03 -07002406static struct cipher_testvec tnepres_enc_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002407 { /* KeySize=128, PT=0, I=1 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002408 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
2409 "\x00\x00\x00\x00\x00\x00\x00\x00",
2410 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
2411 "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002412 .klen = 16,
2413 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002414 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
2415 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002416 .rlen = 16,
2417 }, { /* KeySize=192, PT=0, I=1 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002418 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
2419 "\x00\x00\x00\x00\x00\x00\x00\x00"
2420 "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002421 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002422 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
2423 "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002424 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002425 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
2426 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002427 .rlen = 16,
2428 }, { /* KeySize=256, PT=0, I=1 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002429 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
2430 "\x00\x00\x00\x00\x00\x00\x00\x00"
2431 "\x00\x00\x00\x00\x00\x00\x00\x00"
2432 "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002433 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002434 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
2435 "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002436 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002437 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
2438 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002439 .rlen = 16,
2440 }, { /* KeySize=256, I=257 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002441 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
2442 "\x17\x16\x15\x14\x13\x12\x11\x10"
2443 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
2444 "\x07\x06\x05\x04\x03\x02\x01\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002445 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002446 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
2447 "\x07\x06\x05\x04\x03\x02\x01\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002448 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002449 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
2450 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002451 .rlen = 16,
2452 },
2453};
2454
2455
Herbert Xuef2736f2005-06-22 13:26:03 -07002456static struct cipher_testvec serpent_dec_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002457 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002458 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
2459 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002460 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002461 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
2462 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002463 .rlen = 16,
2464 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002465 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2466 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002467 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002468 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
2469 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002470 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002471 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
2472 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002473 .rlen = 16,
2474 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002475 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2476 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2477 "\x10\x11\x12\x13\x14\x15\x16\x17"
2478 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002479 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002480 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
2481 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002482 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002483 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
2484 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002485 .rlen = 16,
2486 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002487 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002488 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002489 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
2490 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002491 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002492 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002493 .rlen = 16,
2494 },
2495};
2496
Herbert Xuef2736f2005-06-22 13:26:03 -07002497static struct cipher_testvec tnepres_dec_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002498 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002499 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
2500 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002501 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002502 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
2503 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002504 .rlen = 16,
2505 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002506 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2507 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002508 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002509 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
2510 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002511 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002512 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
2513 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002514 .rlen = 16,
2515 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002516 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2517 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2518 "\x10\x11\x12\x13\x14\x15\x16\x17"
2519 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002520 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002521 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
2522 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002523 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002524 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
2525 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002526 .rlen = 16,
2527 }, { /* KeySize=128, I=121 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002528 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002529 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002530 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
2531 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002532 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002533 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002534 .rlen = 16,
2535 },
2536};
2537
2538
2539/* Cast6 test vectors from RFC 2612 */
2540#define CAST6_ENC_TEST_VECTORS 3
2541#define CAST6_DEC_TEST_VECTORS 3
2542
Herbert Xuef2736f2005-06-22 13:26:03 -07002543static struct cipher_testvec cast6_enc_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002544 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002545 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
2546 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002547 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002548 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002549 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002550 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
2551 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002552 .rlen = 16,
2553 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002554 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
2555 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
2556 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002557 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002558 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002559 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002560 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
2561 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002562 .rlen = 16,
2563 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002564 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
2565 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
2566 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
2567 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002568 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002569 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002570 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002571 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
2572 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002573 .rlen = 16,
2574 },
2575};
2576
Herbert Xuef2736f2005-06-22 13:26:03 -07002577static struct cipher_testvec cast6_dec_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002578 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002579 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
2580 "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002581 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002582 .input = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
2583 "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002584 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002585 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002586 .rlen = 16,
2587 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002588 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
2589 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
2590 "\xba\xc7\x7a\x77\x17\x94\x28\x63",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002591 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002592 .input = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
2593 "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002594 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002595 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002596 .rlen = 16,
2597 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002598 .key = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
2599 "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
2600 "\x8d\x7c\x47\xce\x26\x49\x08\x46"
2601 "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002602 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002603 .input = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
2604 "\xc9\x87\x01\x36\x55\x33\x17\xfa",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002605 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002606 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07002607 .rlen = 16,
2608 },
2609};
2610
2611
2612/*
2613 * AES test vectors.
2614 */
2615#define AES_ENC_TEST_VECTORS 3
2616#define AES_DEC_TEST_VECTORS 3
Jan Glauber9617d6e2007-11-30 15:57:05 +11002617#define AES_CBC_ENC_TEST_VECTORS 4
2618#define AES_CBC_DEC_TEST_VECTORS 4
Rik Snelf3d10442006-11-29 19:01:41 +11002619#define AES_LRW_ENC_TEST_VECTORS 8
2620#define AES_LRW_DEC_TEST_VECTORS 8
Rik Snelf19f5112007-09-19 20:23:13 +08002621#define AES_XTS_ENC_TEST_VECTORS 4
2622#define AES_XTS_DEC_TEST_VECTORS 4
Tan Swee Henga773edb2007-11-30 00:36:07 +11002623#define AES_CTR_ENC_TEST_VECTORS 7
Joy Latten23e353c2007-10-23 08:50:32 +08002624#define AES_CTR_DEC_TEST_VECTORS 6
Mikko Herranen28db8e32007-11-26 22:24:11 +08002625#define AES_GCM_ENC_TEST_VECTORS 9
2626#define AES_GCM_DEC_TEST_VECTORS 8
Joy Latten93cc74e2007-12-12 20:24:22 +08002627#define AES_CCM_ENC_TEST_VECTORS 7
2628#define AES_CCM_DEC_TEST_VECTORS 7
Linus Torvalds1da177e2005-04-16 15:20:36 -07002629
Herbert Xuef2736f2005-06-22 13:26:03 -07002630static struct cipher_testvec aes_enc_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002631 { /* From FIPS-197 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002632 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2633 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002634 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002635 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
2636 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002637 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002638 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
2639 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002640 .rlen = 16,
2641 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002642 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2643 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2644 "\x10\x11\x12\x13\x14\x15\x16\x17",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002645 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002646 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
2647 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002648 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002649 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
2650 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002651 .rlen = 16,
2652 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002653 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2654 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2655 "\x10\x11\x12\x13\x14\x15\x16\x17"
2656 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002657 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002658 .input = "\x00\x11\x22\x33\x44\x55\x66\x77"
2659 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002660 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002661 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
2662 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002663 .rlen = 16,
2664 },
2665};
2666
Herbert Xuef2736f2005-06-22 13:26:03 -07002667static struct cipher_testvec aes_dec_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07002668 { /* From FIPS-197 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002669 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2670 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002671 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002672 .input = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
2673 "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002674 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002675 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
2676 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002677 .rlen = 16,
2678 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002679 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2680 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2681 "\x10\x11\x12\x13\x14\x15\x16\x17",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002682 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002683 .input = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
2684 "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002685 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002686 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
2687 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002688 .rlen = 16,
2689 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002690 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
2691 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2692 "\x10\x11\x12\x13\x14\x15\x16\x17"
2693 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002694 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002695 .input = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
2696 "\xea\xfc\x49\x90\x4b\x49\x60\x89",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002697 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002698 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
2699 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
Linus Torvalds1da177e2005-04-16 15:20:36 -07002700 .rlen = 16,
2701 },
2702};
2703
Jan Glauber05f29fc2006-01-06 00:19:19 -08002704static struct cipher_testvec aes_cbc_enc_tv_template[] = {
2705 { /* From RFC 3602 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002706 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
2707 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
Jan Glauber05f29fc2006-01-06 00:19:19 -08002708 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002709 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
2710 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
2711 .input = "Single block msg",
Jan Glauber05f29fc2006-01-06 00:19:19 -08002712 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002713 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
2714 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
Jan Glauber05f29fc2006-01-06 00:19:19 -08002715 .rlen = 16,
2716 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002717 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
2718 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
Jan Glauber05f29fc2006-01-06 00:19:19 -08002719 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002720 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
2721 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
2722 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
2723 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2724 "\x10\x11\x12\x13\x14\x15\x16\x17"
2725 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Jan Glauber05f29fc2006-01-06 00:19:19 -08002726 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002727 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
2728 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
2729 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
2730 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
Jan Glauber05f29fc2006-01-06 00:19:19 -08002731 .rlen = 32,
Jan Glauber9617d6e2007-11-30 15:57:05 +11002732 }, { /* From NIST SP800-38A */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002733 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
2734 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
2735 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
Jan Glauber9617d6e2007-11-30 15:57:05 +11002736 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002737 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
2738 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2739 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2740 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2741 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2742 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2743 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2744 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2745 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2746 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
Jan Glauber9617d6e2007-11-30 15:57:05 +11002747 .ilen = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002748 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
2749 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
2750 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
2751 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
2752 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
2753 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
2754 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
2755 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
Jan Glauber9617d6e2007-11-30 15:57:05 +11002756 .rlen = 64,
2757 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002758 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2759 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2760 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2761 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
Jan Glauber9617d6e2007-11-30 15:57:05 +11002762 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002763 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
2764 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2765 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2766 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2767 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2768 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2769 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2770 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2771 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2772 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
Jan Glauber9617d6e2007-11-30 15:57:05 +11002773 .ilen = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002774 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
2775 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
2776 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
2777 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
2778 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
2779 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
2780 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
2781 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
Jan Glauber9617d6e2007-11-30 15:57:05 +11002782 .rlen = 64,
Jan Glauber05f29fc2006-01-06 00:19:19 -08002783 },
2784};
2785
2786static struct cipher_testvec aes_cbc_dec_tv_template[] = {
2787 { /* From RFC 3602 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002788 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
2789 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
Jan Glauber05f29fc2006-01-06 00:19:19 -08002790 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002791 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
2792 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
2793 .input = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
2794 "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
Jan Glauber05f29fc2006-01-06 00:19:19 -08002795 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002796 .result = "Single block msg",
Jan Glauber05f29fc2006-01-06 00:19:19 -08002797 .rlen = 16,
2798 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002799 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
2800 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
Jan Glauber05f29fc2006-01-06 00:19:19 -08002801 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002802 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
2803 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
2804 .input = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
2805 "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
2806 "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
2807 "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
Jan Glauber05f29fc2006-01-06 00:19:19 -08002808 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002809 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
2810 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2811 "\x10\x11\x12\x13\x14\x15\x16\x17"
2812 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Jan Glauber05f29fc2006-01-06 00:19:19 -08002813 .rlen = 32,
Jan Glauber9617d6e2007-11-30 15:57:05 +11002814 }, { /* From NIST SP800-38A */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002815 .key = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
2816 "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
2817 "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
Jan Glauber9617d6e2007-11-30 15:57:05 +11002818 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002819 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
2820 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2821 .input = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
2822 "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
2823 "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
2824 "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
2825 "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
2826 "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
2827 "\x08\xb0\xe2\x79\x88\x59\x88\x81"
2828 "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
Jan Glauber9617d6e2007-11-30 15:57:05 +11002829 .ilen = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002830 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2831 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2832 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2833 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2834 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2835 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2836 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2837 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
Jan Glauber9617d6e2007-11-30 15:57:05 +11002838 .rlen = 64,
2839 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002840 .key = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2841 "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2842 "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2843 "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
Jan Glauber9617d6e2007-11-30 15:57:05 +11002844 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002845 .iv = "\x00\x01\x02\x03\x04\x05\x06\x07"
2846 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2847 .input = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
2848 "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
2849 "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
2850 "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
2851 "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
2852 "\xa5\x30\xe2\x63\x04\x23\x14\x61"
2853 "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
2854 "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
Jan Glauber9617d6e2007-11-30 15:57:05 +11002855 .ilen = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002856 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2857 "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2858 "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2859 "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2860 "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2861 "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2862 "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2863 "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
Jan Glauber9617d6e2007-11-30 15:57:05 +11002864 .rlen = 64,
Jan Glauber05f29fc2006-01-06 00:19:19 -08002865 },
2866};
2867
Rik Snelf3d10442006-11-29 19:01:41 +11002868static struct cipher_testvec aes_lrw_enc_tv_template[] = {
2869 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
2870 { /* LRW-32-AES 1 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002871 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
2872 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
2873 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
2874 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
Rik Snelf3d10442006-11-29 19:01:41 +11002875 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002876 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
2877 "\x00\x00\x00\x00\x00\x00\x00\x01",
2878 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
2879 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11002880 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002881 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
2882 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
Rik Snelf3d10442006-11-29 19:01:41 +11002883 .rlen = 16,
2884 }, { /* LRW-32-AES 2 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002885 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
2886 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
2887 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
2888 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
Rik Snelf3d10442006-11-29 19:01:41 +11002889 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002890 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
2891 "\x00\x00\x00\x00\x00\x00\x00\x02",
2892 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
2893 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11002894 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002895 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
2896 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
Rik Snelf3d10442006-11-29 19:01:41 +11002897 .rlen = 16,
2898 }, { /* LRW-32-AES 3 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002899 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
2900 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
2901 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
2902 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
Rik Snelf3d10442006-11-29 19:01:41 +11002903 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002904 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
2905 "\x00\x00\x00\x02\x00\x00\x00\x00",
2906 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
2907 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11002908 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002909 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
2910 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
Rik Snelf3d10442006-11-29 19:01:41 +11002911 .rlen = 16,
2912 }, { /* LRW-32-AES 4 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002913 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
2914 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
2915 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
2916 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
2917 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
Rik Snelf3d10442006-11-29 19:01:41 +11002918 .klen = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002919 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
2920 "\x00\x00\x00\x00\x00\x00\x00\x01",
2921 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
2922 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11002923 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002924 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
2925 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
Rik Snelf3d10442006-11-29 19:01:41 +11002926 .rlen = 16,
2927 }, { /* LRW-32-AES 5 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002928 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
2929 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
2930 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
2931 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
2932 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
Rik Snelf3d10442006-11-29 19:01:41 +11002933 .klen = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002934 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
2935 "\x00\x00\x00\x02\x00\x00\x00\x00",
2936 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
2937 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11002938 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002939 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
2940 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
Rik Snelf3d10442006-11-29 19:01:41 +11002941 .rlen = 16,
2942 }, { /* LRW-32-AES 6 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002943 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
2944 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
2945 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
2946 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
2947 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
2948 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
Rik Snelf3d10442006-11-29 19:01:41 +11002949 .klen = 48,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002950 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
2951 "\x00\x00\x00\x00\x00\x00\x00\x01",
2952 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
2953 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11002954 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002955 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
2956 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
Rik Snelf3d10442006-11-29 19:01:41 +11002957 .rlen = 16,
2958 }, { /* LRW-32-AES 7 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002959 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
2960 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
2961 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
2962 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
2963 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
2964 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
Rik Snelf3d10442006-11-29 19:01:41 +11002965 .klen = 48,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002966 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
2967 "\x00\x00\x00\x02\x00\x00\x00\x00",
2968 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
2969 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11002970 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002971 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
2972 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
Rik Snelf3d10442006-11-29 19:01:41 +11002973 .rlen = 16,
2974 }, {
2975/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002976 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
2977 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
2978 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
2979 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
2980 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
2981 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
Rik Snelf3d10442006-11-29 19:01:41 +11002982 .klen = 48,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08002983 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
2984 "\x00\x00\x00\x00\x00\x00\x00\x01",
2985 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
2986 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
2987 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
2988 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
2989 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
2990 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
2991 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
2992 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
2993 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
2994 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
2995 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
2996 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
2997 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
2998 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
2999 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
3000 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
3001 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
3002 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
3003 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
3004 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
3005 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
3006 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
3007 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
3008 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
3009 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
3010 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
3011 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
3012 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
3013 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
3014 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
3015 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
3016 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
3017 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
3018 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
3019 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
3020 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
3021 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
3022 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
3023 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
3024 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
3025 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
3026 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
3027 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
3028 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
3029 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
3030 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
3031 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
3032 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
3033 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
3034 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
3035 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
3036 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
3037 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
3038 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
3039 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
3040 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
3041 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
3042 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
3043 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
3044 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
3045 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
3046 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
3047 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
3048 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
Rik Snelf3d10442006-11-29 19:01:41 +11003049 .ilen = 512,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003050 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
3051 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
3052 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
3053 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
3054 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
3055 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
3056 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
3057 "\xe8\x58\x46\x97\x39\x51\x07\xde"
3058 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
3059 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
3060 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
3061 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
3062 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
3063 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
3064 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
3065 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
3066 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
3067 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
3068 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
3069 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
3070 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
3071 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
3072 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
3073 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
3074 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
3075 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
3076 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
3077 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
3078 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
3079 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
3080 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
3081 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
3082 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
3083 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
3084 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
3085 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
3086 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
3087 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
3088 "\xb8\x79\x78\x97\x94\xff\x72\x13"
3089 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
3090 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
3091 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
3092 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
3093 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
3094 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
3095 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
3096 "\x1e\x86\x53\x11\x53\x94\x00\xee"
3097 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
3098 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
3099 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
3100 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
3101 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
3102 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
3103 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
3104 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
3105 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
3106 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
3107 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
3108 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
3109 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
3110 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
3111 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
3112 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
3113 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
Rik Snelf3d10442006-11-29 19:01:41 +11003114 .rlen = 512,
3115 }
3116};
3117
3118static struct cipher_testvec aes_lrw_dec_tv_template[] = {
3119 /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
3120 /* same as enc vectors with input and result reversed */
3121 { /* LRW-32-AES 1 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003122 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
3123 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
3124 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
3125 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
Rik Snelf3d10442006-11-29 19:01:41 +11003126 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003127 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3128 "\x00\x00\x00\x00\x00\x00\x00\x01",
3129 .input = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
3130 "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
Rik Snelf3d10442006-11-29 19:01:41 +11003131 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003132 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3133 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11003134 .rlen = 16,
3135 }, { /* LRW-32-AES 2 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003136 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
3137 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
3138 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
3139 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
Rik Snelf3d10442006-11-29 19:01:41 +11003140 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003141 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3142 "\x00\x00\x00\x00\x00\x00\x00\x02",
3143 .input = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
3144 "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
Rik Snelf3d10442006-11-29 19:01:41 +11003145 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003146 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3147 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11003148 .rlen = 16,
3149 }, { /* LRW-32-AES 3 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003150 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
3151 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
3152 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
3153 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
Rik Snelf3d10442006-11-29 19:01:41 +11003154 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003155 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3156 "\x00\x00\x00\x02\x00\x00\x00\x00",
3157 .input = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
3158 "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
Rik Snelf3d10442006-11-29 19:01:41 +11003159 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003160 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3161 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11003162 .rlen = 16,
3163 }, { /* LRW-32-AES 4 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003164 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
3165 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
3166 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
3167 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
3168 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
Rik Snelf3d10442006-11-29 19:01:41 +11003169 .klen = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003170 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3171 "\x00\x00\x00\x00\x00\x00\x00\x01",
3172 .input = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
3173 "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
Rik Snelf3d10442006-11-29 19:01:41 +11003174 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003175 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3176 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11003177 .rlen = 16,
3178 }, { /* LRW-32-AES 5 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003179 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
3180 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
3181 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
3182 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
3183 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
Rik Snelf3d10442006-11-29 19:01:41 +11003184 .klen = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003185 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3186 "\x00\x00\x00\x02\x00\x00\x00\x00",
3187 .input = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
3188 "\xc8\x60\x48\x02\x87\xe3\x34\x06",
Rik Snelf3d10442006-11-29 19:01:41 +11003189 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003190 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3191 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11003192 .rlen = 16,
3193 }, { /* LRW-32-AES 6 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003194 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
3195 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
3196 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
3197 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
3198 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
3199 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
Rik Snelf3d10442006-11-29 19:01:41 +11003200 .klen = 48,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003201 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3202 "\x00\x00\x00\x00\x00\x00\x00\x01",
3203 .input = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
3204 "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
Rik Snelf3d10442006-11-29 19:01:41 +11003205 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003206 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3207 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11003208 .rlen = 16,
3209 }, { /* LRW-32-AES 7 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003210 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
3211 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
3212 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
3213 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
3214 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
3215 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
Rik Snelf3d10442006-11-29 19:01:41 +11003216 .klen = 48,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003217 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3218 "\x00\x00\x00\x02\x00\x00\x00\x00",
3219 .input = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
3220 "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
Rik Snelf3d10442006-11-29 19:01:41 +11003221 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003222 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3223 "\x38\x39\x41\x42\x43\x44\x45\x46",
Rik Snelf3d10442006-11-29 19:01:41 +11003224 .rlen = 16,
3225 }, {
3226/* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003227 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
3228 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
3229 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
3230 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
3231 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
3232 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
Rik Snelf3d10442006-11-29 19:01:41 +11003233 .klen = 48,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003234 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3235 "\x00\x00\x00\x00\x00\x00\x00\x01",
3236 .input = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
3237 "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
3238 "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
3239 "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
3240 "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
3241 "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
3242 "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
3243 "\xe8\x58\x46\x97\x39\x51\x07\xde"
3244 "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
3245 "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
3246 "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
3247 "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
3248 "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
3249 "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
3250 "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
3251 "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
3252 "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
3253 "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
3254 "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
3255 "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
3256 "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
3257 "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
3258 "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
3259 "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
3260 "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
3261 "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
3262 "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
3263 "\x41\x30\x58\xc5\x62\x74\x52\x1d"
3264 "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
3265 "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
3266 "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
3267 "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
3268 "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
3269 "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
3270 "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
3271 "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
3272 "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
3273 "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
3274 "\xb8\x79\x78\x97\x94\xff\x72\x13"
3275 "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
3276 "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
3277 "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
3278 "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
3279 "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
3280 "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
3281 "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
3282 "\x1e\x86\x53\x11\x53\x94\x00\xee"
3283 "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
3284 "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
3285 "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
3286 "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
3287 "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
3288 "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
3289 "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
3290 "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
3291 "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
3292 "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
3293 "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
3294 "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
3295 "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
3296 "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
3297 "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
3298 "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
3299 "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
Rik Snelf3d10442006-11-29 19:01:41 +11003300 .ilen = 512,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003301 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
3302 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
3303 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
3304 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
3305 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
3306 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
3307 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
3308 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
3309 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
3310 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
3311 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
3312 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
3313 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
3314 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
3315 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
3316 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
3317 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
3318 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
3319 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
3320 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
3321 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
3322 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
3323 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
3324 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
3325 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
3326 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
3327 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
3328 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
3329 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
3330 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
3331 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
3332 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
3333 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
3334 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
3335 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
3336 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
3337 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
3338 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
3339 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
3340 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
3341 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
3342 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
3343 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
3344 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
3345 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
3346 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
3347 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
3348 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
3349 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
3350 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
3351 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
3352 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
3353 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
3354 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
3355 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
3356 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
3357 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
3358 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
3359 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
3360 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
3361 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
3362 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
3363 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
3364 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
Rik Snelf3d10442006-11-29 19:01:41 +11003365 .rlen = 512,
3366 }
3367};
3368
Rik Snelf19f5112007-09-19 20:23:13 +08003369static struct cipher_testvec aes_xts_enc_tv_template[] = {
3370 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
3371 { /* XTS-AES 1 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003372 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
3373 "\x00\x00\x00\x00\x00\x00\x00\x00"
3374 "\x00\x00\x00\x00\x00\x00\x00\x00"
3375 "\x00\x00\x00\x00\x00\x00\x00\x00",
Rik Snelf19f5112007-09-19 20:23:13 +08003376 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003377 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3378 "\x00\x00\x00\x00\x00\x00\x00\x00",
3379 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
3380 "\x00\x00\x00\x00\x00\x00\x00\x00"
3381 "\x00\x00\x00\x00\x00\x00\x00\x00"
3382 "\x00\x00\x00\x00\x00\x00\x00\x00",
Rik Snelf19f5112007-09-19 20:23:13 +08003383 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003384 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
3385 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
3386 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
3387 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
Rik Snelf19f5112007-09-19 20:23:13 +08003388 .rlen = 32,
3389 }, { /* XTS-AES 2 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003390 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
3391 "\x11\x11\x11\x11\x11\x11\x11\x11"
3392 "\x22\x22\x22\x22\x22\x22\x22\x22"
3393 "\x22\x22\x22\x22\x22\x22\x22\x22",
Rik Snelf19f5112007-09-19 20:23:13 +08003394 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003395 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
3396 "\x00\x00\x00\x00\x00\x00\x00\x00",
3397 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
3398 "\x44\x44\x44\x44\x44\x44\x44\x44"
3399 "\x44\x44\x44\x44\x44\x44\x44\x44"
3400 "\x44\x44\x44\x44\x44\x44\x44\x44",
Rik Snelf19f5112007-09-19 20:23:13 +08003401 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003402 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
3403 "\x39\x33\x40\x38\xac\xef\x83\x8b"
3404 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
3405 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
Rik Snelf19f5112007-09-19 20:23:13 +08003406 .rlen = 32,
3407 }, { /* XTS-AES 3 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003408 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
3409 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
3410 "\x22\x22\x22\x22\x22\x22\x22\x22"
3411 "\x22\x22\x22\x22\x22\x22\x22\x22",
Rik Snelf19f5112007-09-19 20:23:13 +08003412 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003413 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
3414 "\x00\x00\x00\x00\x00\x00\x00\x00",
3415 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
3416 "\x44\x44\x44\x44\x44\x44\x44\x44"
3417 "\x44\x44\x44\x44\x44\x44\x44\x44"
3418 "\x44\x44\x44\x44\x44\x44\x44\x44",
Rik Snelf19f5112007-09-19 20:23:13 +08003419 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003420 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
3421 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
3422 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
3423 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
Rik Snelf19f5112007-09-19 20:23:13 +08003424 .rlen = 32,
3425 }, { /* XTS-AES 4 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003426 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
3427 "\x23\x53\x60\x28\x74\x71\x35\x26"
3428 "\x31\x41\x59\x26\x53\x58\x97\x93"
3429 "\x23\x84\x62\x64\x33\x83\x27\x95",
Rik Snelf19f5112007-09-19 20:23:13 +08003430 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003431 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3432 "\x00\x00\x00\x00\x00\x00\x00\x00",
3433 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
3434 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3435 "\x10\x11\x12\x13\x14\x15\x16\x17"
3436 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
3437 "\x20\x21\x22\x23\x24\x25\x26\x27"
3438 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
3439 "\x30\x31\x32\x33\x34\x35\x36\x37"
3440 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
3441 "\x40\x41\x42\x43\x44\x45\x46\x47"
3442 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
3443 "\x50\x51\x52\x53\x54\x55\x56\x57"
3444 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
3445 "\x60\x61\x62\x63\x64\x65\x66\x67"
3446 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
3447 "\x70\x71\x72\x73\x74\x75\x76\x77"
3448 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
3449 "\x80\x81\x82\x83\x84\x85\x86\x87"
3450 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
3451 "\x90\x91\x92\x93\x94\x95\x96\x97"
3452 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
3453 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
3454 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
3455 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
3456 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
3457 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
3458 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
3459 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
3460 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
3461 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
3462 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
3463 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
3464 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
3465 "\x00\x01\x02\x03\x04\x05\x06\x07"
3466 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3467 "\x10\x11\x12\x13\x14\x15\x16\x17"
3468 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
3469 "\x20\x21\x22\x23\x24\x25\x26\x27"
3470 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
3471 "\x30\x31\x32\x33\x34\x35\x36\x37"
3472 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
3473 "\x40\x41\x42\x43\x44\x45\x46\x47"
3474 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
3475 "\x50\x51\x52\x53\x54\x55\x56\x57"
3476 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
3477 "\x60\x61\x62\x63\x64\x65\x66\x67"
3478 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
3479 "\x70\x71\x72\x73\x74\x75\x76\x77"
3480 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
3481 "\x80\x81\x82\x83\x84\x85\x86\x87"
3482 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
3483 "\x90\x91\x92\x93\x94\x95\x96\x97"
3484 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
3485 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
3486 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
3487 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
3488 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
3489 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
3490 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
3491 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
3492 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
3493 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
3494 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
3495 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
3496 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
Rik Snelf19f5112007-09-19 20:23:13 +08003497 .ilen = 512,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003498 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
3499 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
3500 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
3501 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
3502 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
3503 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
3504 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
3505 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
3506 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
3507 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
3508 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
3509 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
3510 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
3511 "\x22\x97\x61\x46\xae\x20\xce\x84"
3512 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
3513 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
3514 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
3515 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
3516 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
3517 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
3518 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
3519 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
3520 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
3521 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
3522 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
3523 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
3524 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
3525 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
3526 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
3527 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
3528 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
3529 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
3530 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
3531 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
3532 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
3533 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
3534 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
3535 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
3536 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
3537 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
3538 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
3539 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
3540 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
3541 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
3542 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
3543 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
3544 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
3545 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
3546 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
3547 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
3548 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
3549 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
3550 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
3551 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
3552 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
3553 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
3554 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
3555 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
3556 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
3557 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
3558 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
3559 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
3560 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
3561 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
Rik Snelf19f5112007-09-19 20:23:13 +08003562 .rlen = 512,
3563 }
3564};
3565
3566static struct cipher_testvec aes_xts_dec_tv_template[] = {
3567 /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
3568 { /* XTS-AES 1 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003569 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
3570 "\x00\x00\x00\x00\x00\x00\x00\x00"
3571 "\x00\x00\x00\x00\x00\x00\x00\x00"
3572 "\x00\x00\x00\x00\x00\x00\x00\x00",
Rik Snelf19f5112007-09-19 20:23:13 +08003573 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003574 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3575 "\x00\x00\x00\x00\x00\x00\x00\x00",
3576 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
3577 "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
3578 "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
3579 "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
Rik Snelf19f5112007-09-19 20:23:13 +08003580 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003581 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
3582 "\x00\x00\x00\x00\x00\x00\x00\x00"
3583 "\x00\x00\x00\x00\x00\x00\x00\x00"
3584 "\x00\x00\x00\x00\x00\x00\x00\x00",
Rik Snelf19f5112007-09-19 20:23:13 +08003585 .rlen = 32,
3586 }, { /* XTS-AES 2 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003587 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
3588 "\x11\x11\x11\x11\x11\x11\x11\x11"
3589 "\x22\x22\x22\x22\x22\x22\x22\x22"
3590 "\x22\x22\x22\x22\x22\x22\x22\x22",
Rik Snelf19f5112007-09-19 20:23:13 +08003591 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003592 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
3593 "\x00\x00\x00\x00\x00\x00\x00\x00",
3594 .input = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
3595 "\x39\x33\x40\x38\xac\xef\x83\x8b"
3596 "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
3597 "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
Rik Snelf19f5112007-09-19 20:23:13 +08003598 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003599 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
3600 "\x44\x44\x44\x44\x44\x44\x44\x44"
3601 "\x44\x44\x44\x44\x44\x44\x44\x44"
3602 "\x44\x44\x44\x44\x44\x44\x44\x44",
Rik Snelf19f5112007-09-19 20:23:13 +08003603 .rlen = 32,
3604 }, { /* XTS-AES 3 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003605 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
3606 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
3607 "\x22\x22\x22\x22\x22\x22\x22\x22"
3608 "\x22\x22\x22\x22\x22\x22\x22\x22",
Rik Snelf19f5112007-09-19 20:23:13 +08003609 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003610 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
3611 "\x00\x00\x00\x00\x00\x00\x00\x00",
3612 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
3613 "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
3614 "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
3615 "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
Rik Snelf19f5112007-09-19 20:23:13 +08003616 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003617 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
3618 "\x44\x44\x44\x44\x44\x44\x44\x44"
3619 "\x44\x44\x44\x44\x44\x44\x44\x44"
3620 "\x44\x44\x44\x44\x44\x44\x44\x44",
Rik Snelf19f5112007-09-19 20:23:13 +08003621 .rlen = 32,
3622 }, { /* XTS-AES 4 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003623 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
3624 "\x23\x53\x60\x28\x74\x71\x35\x26"
3625 "\x31\x41\x59\x26\x53\x58\x97\x93"
3626 "\x23\x84\x62\x64\x33\x83\x27\x95",
Rik Snelf19f5112007-09-19 20:23:13 +08003627 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003628 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3629 "\x00\x00\x00\x00\x00\x00\x00\x00",
3630 .input = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
3631 "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
3632 "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
3633 "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
3634 "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
3635 "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
3636 "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
3637 "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
3638 "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
3639 "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
3640 "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
3641 "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
3642 "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
3643 "\x22\x97\x61\x46\xae\x20\xce\x84"
3644 "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
3645 "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
3646 "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
3647 "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
3648 "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
3649 "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
3650 "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
3651 "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
3652 "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
3653 "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
3654 "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
3655 "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
3656 "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
3657 "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
3658 "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
3659 "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
3660 "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
3661 "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
3662 "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
3663 "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
3664 "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
3665 "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
3666 "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
3667 "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
3668 "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
3669 "\x55\xef\x52\x97\xca\x67\xe9\xf3"
3670 "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
3671 "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
3672 "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
3673 "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
3674 "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
3675 "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
3676 "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
3677 "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
3678 "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
3679 "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
3680 "\x18\x84\x69\x77\xae\x11\x9f\x7a"
3681 "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
3682 "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
3683 "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
3684 "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
3685 "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
3686 "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
3687 "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
3688 "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
3689 "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
3690 "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
3691 "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
3692 "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
3693 "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
Rik Snelf19f5112007-09-19 20:23:13 +08003694 .ilen = 512,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003695 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
3696 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3697 "\x10\x11\x12\x13\x14\x15\x16\x17"
3698 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
3699 "\x20\x21\x22\x23\x24\x25\x26\x27"
3700 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
3701 "\x30\x31\x32\x33\x34\x35\x36\x37"
3702 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
3703 "\x40\x41\x42\x43\x44\x45\x46\x47"
3704 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
3705 "\x50\x51\x52\x53\x54\x55\x56\x57"
3706 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
3707 "\x60\x61\x62\x63\x64\x65\x66\x67"
3708 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
3709 "\x70\x71\x72\x73\x74\x75\x76\x77"
3710 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
3711 "\x80\x81\x82\x83\x84\x85\x86\x87"
3712 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
3713 "\x90\x91\x92\x93\x94\x95\x96\x97"
3714 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
3715 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
3716 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
3717 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
3718 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
3719 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
3720 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
3721 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
3722 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
3723 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
3724 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
3725 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
3726 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
3727 "\x00\x01\x02\x03\x04\x05\x06\x07"
3728 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3729 "\x10\x11\x12\x13\x14\x15\x16\x17"
3730 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
3731 "\x20\x21\x22\x23\x24\x25\x26\x27"
3732 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
3733 "\x30\x31\x32\x33\x34\x35\x36\x37"
3734 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
3735 "\x40\x41\x42\x43\x44\x45\x46\x47"
3736 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
3737 "\x50\x51\x52\x53\x54\x55\x56\x57"
3738 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
3739 "\x60\x61\x62\x63\x64\x65\x66\x67"
3740 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
3741 "\x70\x71\x72\x73\x74\x75\x76\x77"
3742 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
3743 "\x80\x81\x82\x83\x84\x85\x86\x87"
3744 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
3745 "\x90\x91\x92\x93\x94\x95\x96\x97"
3746 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
3747 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
3748 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
3749 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
3750 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
3751 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
3752 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
3753 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
3754 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
3755 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
3756 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
3757 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
3758 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
Rik Snelf19f5112007-09-19 20:23:13 +08003759 .rlen = 512,
3760 }
3761};
3762
Joy Latten23e353c2007-10-23 08:50:32 +08003763
3764static struct cipher_testvec aes_ctr_enc_tv_template[] = {
3765 { /* From RFC 3686 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003766 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
3767 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
3768 "\x00\x00\x00\x30",
Joy Latten23e353c2007-10-23 08:50:32 +08003769 .klen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003770 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
3771 .input = "Single block msg",
Joy Latten23e353c2007-10-23 08:50:32 +08003772 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003773 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
3774 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
Joy Latten23e353c2007-10-23 08:50:32 +08003775 .rlen = 16,
3776 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003777 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
3778 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
3779 "\x00\x6c\xb6\xdb",
Joy Latten23e353c2007-10-23 08:50:32 +08003780 .klen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003781 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
3782 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
3783 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3784 "\x10\x11\x12\x13\x14\x15\x16\x17"
3785 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
3786 .ilen = 32,
3787 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
3788 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
3789 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
3790 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
Joy Latten23e353c2007-10-23 08:50:32 +08003791 .rlen = 32,
3792 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003793 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
3794 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
3795 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
3796 "\x00\x00\x00\x48",
3797 .klen = 28,
3798 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
3799 .input = "Single block msg",
3800 .ilen = 16,
3801 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
3802 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
Joy Latten23e353c2007-10-23 08:50:32 +08003803 .rlen = 16,
3804 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003805 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
3806 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
3807 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
3808 "\x00\x96\xb0\x3b",
Joy Latten23e353c2007-10-23 08:50:32 +08003809 .klen = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003810 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
3811 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
3812 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3813 "\x10\x11\x12\x13\x14\x15\x16\x17"
3814 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Joy Latten23e353c2007-10-23 08:50:32 +08003815 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003816 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
3817 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
3818 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
3819 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
3820 .rlen = 32,
Joy Latten23e353c2007-10-23 08:50:32 +08003821 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003822 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
3823 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
3824 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
3825 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
3826 "\x00\x00\x00\x60",
Joy Latten23e353c2007-10-23 08:50:32 +08003827 .klen = 36,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003828 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
3829 .input = "Single block msg",
Joy Latten23e353c2007-10-23 08:50:32 +08003830 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003831 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
3832 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
3833 .rlen = 16,
Joy Latten23e353c2007-10-23 08:50:32 +08003834 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003835 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
3836 "\x07\x96\x36\x58\x79\xef\xf8\x86"
3837 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
3838 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
3839 "\x00\xfa\xac\x24",
3840 .klen = 36,
3841 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
3842 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
3843 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3844 "\x10\x11\x12\x13\x14\x15\x16\x17"
3845 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Joy Latten23e353c2007-10-23 08:50:32 +08003846 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003847 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
3848 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
3849 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
3850 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
Joy Latten23e353c2007-10-23 08:50:32 +08003851 .rlen = 32,
Tan Swee Henga773edb2007-11-30 00:36:07 +11003852 }, {
3853 // generated using Crypto++
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003854 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
3855 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3856 "\x10\x11\x12\x13\x14\x15\x16\x17"
3857 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
3858 "\x00\x00\x00\x00",
Tan Swee Henga773edb2007-11-30 00:36:07 +11003859 .klen = 32 + 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08003860 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
3861 .input =
3862 "\x00\x01\x02\x03\x04\x05\x06\x07"
3863 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3864 "\x10\x11\x12\x13\x14\x15\x16\x17"
3865 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
3866 "\x20\x21\x22\x23\x24\x25\x26\x27"
3867 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
3868 "\x30\x31\x32\x33\x34\x35\x36\x37"
3869 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
3870 "\x40\x41\x42\x43\x44\x45\x46\x47"
3871 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
3872 "\x50\x51\x52\x53\x54\x55\x56\x57"
3873 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
3874 "\x60\x61\x62\x63\x64\x65\x66\x67"
3875 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
3876 "\x70\x71\x72\x73\x74\x75\x76\x77"
3877 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
3878 "\x80\x81\x82\x83\x84\x85\x86\x87"
3879 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
3880 "\x90\x91\x92\x93\x94\x95\x96\x97"
3881 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
3882 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
3883 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
3884 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
3885 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
3886 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
3887 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
3888 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
3889 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
3890 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
3891 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
3892 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
3893 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
3894 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
3895 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
3896 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
3897 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
3898 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
3899 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
3900 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
3901 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
3902 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
3903 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
3904 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
3905 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
3906 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
3907 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
3908 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
3909 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
3910 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
3911 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
3912 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
3913 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
3914 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
3915 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
3916 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
3917 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
3918 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
3919 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
3920 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
3921 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
3922 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
3923 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
3924 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
3925 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
3926 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
3927 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
3928 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
3929 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
3930 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
3931 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
3932 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
3933 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
3934 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
3935 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
3936 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
3937 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
3938 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
3939 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
3940 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
3941 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
3942 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
3943 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
3944 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
3945 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
3946 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
3947 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
3948 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
3949 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
3950 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
3951 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
3952 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
3953 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
3954 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
3955 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
3956 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
3957 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
3958 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
3959 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
3960 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
3961 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
3962 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
3963 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
3964 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
3965 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
3966 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
3967 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
3968 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
3969 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
3970 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
3971 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
3972 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
3973 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
3974 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
3975 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
3976 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
3977 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
3978 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
3979 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
3980 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
3981 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
3982 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
3983 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
3984 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
3985 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
3986 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
3987 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
3988 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
3989 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
3990 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
3991 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
3992 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
3993 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
3994 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
3995 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
3996 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
3997 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
3998 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
3999 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
4000 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
4001 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
4002 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
4003 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
4004 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
4005 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
4006 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
4007 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
4008 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
4009 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
4010 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
4011 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
4012 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
4013 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
4014 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
4015 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
4016 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
4017 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
4018 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
4019 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
4020 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
4021 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
4022 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
4023 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
4024 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
4025 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
4026 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
4027 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
4028 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
4029 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
4030 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
4031 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
4032 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
4033 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
4034 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
4035 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
4036 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
4037 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
4038 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
4039 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
4040 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
4041 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
4042 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
4043 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
4044 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
4045 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
4046 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
4047 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
4048 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
4049 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
4050 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
4051 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
4052 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
4053 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
4054 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
4055 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
4056 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
4057 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
4058 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
4059 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
4060 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
4061 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
4062 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
4063 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
4064 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
4065 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
4066 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
4067 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
4068 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
4069 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
4070 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
4071 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
4072 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
4073 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
4074 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
4075 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
4076 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
4077 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
4078 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
4079 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
4080 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
4081 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
4082 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
4083 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
4084 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
4085 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
4086 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
4087 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
4088 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
4089 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
4090 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
4091 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
4092 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
4093 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
4094 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
4095 "\x38\x47\x56\x65\x74\x83\x92\xa1"
4096 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
4097 "\x28\x37\x46\x55\x64\x73\x82\x91"
4098 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
4099 "\x18\x27\x36\x45\x54\x63\x72\x81"
4100 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
4101 "\x08\x17\x26\x35\x44\x53\x62\x71"
4102 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
4103 "\xf8\x07\x16\x25\x34\x43\x52\x61"
4104 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
4105 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
4106 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
4107 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
4108 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
4109 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
4110 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
4111 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
4112 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
4113 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
4114 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
4115 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
4116 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
4117 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
4118 "\x00\x11\x22\x33\x44\x55\x66\x77"
4119 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
4120 "\x10\x21\x32\x43\x54\x65\x76\x87"
4121 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
4122 "\x20\x31\x42\x53\x64\x75\x86\x97"
4123 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
4124 "\x30\x41\x52\x63\x74\x85\x96\xa7"
4125 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
4126 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
4127 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
4128 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
4129 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
4130 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
4131 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
4132 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
4133 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
4134 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
4135 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
4136 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
4137 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
4138 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
4139 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
4140 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
4141 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
4142 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
4143 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
4144 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
4145 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
4146 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
4147 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
4148 "\xf0\x01\x12\x23\x34\x45\x56\x67"
4149 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
4150 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
4151 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
4152 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
4153 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
4154 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
4155 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
4156 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
4157 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
4158 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
4159 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
4160 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
4161 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
4162 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
4163 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
4164 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
4165 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
4166 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
4167 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
4168 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
4169 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
4170 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
4171 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
4172 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
4173 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
4174 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
4175 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
4176 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
4177 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
4178 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
4179 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
4180 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
4181 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
4182 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
4183 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
4184 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
4185 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
4186 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
4187 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
4188 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
4189 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
4190 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
4191 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
4192 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
4193 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
4194 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
4195 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
4196 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
4197 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
4198 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
4199 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
4200 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
4201 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
4202 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
4203 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
4204 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
4205 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
4206 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
4207 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
4208 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
4209 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
4210 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
4211 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
4212 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
4213 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
4214 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
4215 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
4216 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
4217 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
4218 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
4219 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
4220 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
4221 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
4222 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
4223 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
4224 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
4225 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
4226 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
4227 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
4228 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
4229 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
4230 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
4231 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
4232 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
4233 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
4234 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
4235 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
4236 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
4237 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
4238 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
4239 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
4240 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
4241 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
4242 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
4243 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
4244 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
4245 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
4246 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
4247 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
4248 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
4249 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
4250 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
4251 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
4252 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
4253 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
4254 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
4255 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
4256 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
4257 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
4258 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
4259 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
4260 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
4261 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
4262 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
4263 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
4264 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
4265 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
4266 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
4267 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
4268 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
4269 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
4270 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
4271 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
4272 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
4273 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
4274 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
4275 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
4276 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
4277 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
4278 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
4279 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
4280 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
4281 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
4282 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
4283 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
4284 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
4285 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
4286 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
4287 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
4288 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
4289 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
4290 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
4291 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
4292 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
4293 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
4294 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
4295 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
4296 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
4297 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
4298 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
4299 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
4300 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
4301 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
4302 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
4303 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
4304 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
4305 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
4306 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
4307 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
4308 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
4309 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
4310 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
4311 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
4312 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
4313 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
4314 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
4315 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
4316 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
4317 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
4318 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
4319 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
4320 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
4321 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
4322 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
4323 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
4324 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
4325 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
4326 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
4327 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
4328 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
4329 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
4330 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
4331 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
4332 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
4333 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
4334 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
4335 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
4336 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
4337 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
4338 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
4339 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
4340 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
4341 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
4342 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
4343 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
4344 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
4345 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
4346 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
4347 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
4348 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
4349 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
4350 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
4351 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
4352 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
4353 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
4354 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
4355 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
4356 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
4357 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
4358 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
4359 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
4360 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
4361 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
4362 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
4363 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
4364 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
4365 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
4366 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
4367 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
4368 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
4369 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
4370 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
4371 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
4372 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
4373 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
4374 "\x00\x21\x42\x63",
Tan Swee Henga773edb2007-11-30 00:36:07 +11004375 .ilen = 4100,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004376 .result =
4377 "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
4378 "\xae\xff\x91\x3a\x44\xcf\x38\x32"
4379 "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
4380 "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
4381 "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
4382 "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
4383 "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
4384 "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
4385 "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
4386 "\x18\xff\x75\x6d\x06\x2d\x00\xab"
4387 "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
4388 "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
4389 "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
4390 "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
4391 "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
4392 "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
4393 "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
4394 "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
4395 "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
4396 "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
4397 "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
4398 "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
4399 "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
4400 "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
4401 "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
4402 "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
4403 "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
4404 "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
4405 "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
4406 "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
4407 "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
4408 "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
4409 "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
4410 "\x6a\x25\x15\x33\x4e\x45\x08\xec"
4411 "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
4412 "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
4413 "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
4414 "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
4415 "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
4416 "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
4417 "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
4418 "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
4419 "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
4420 "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
4421 "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
4422 "\x04\x02\xef\xd3\x44\xde\x76\x31"
4423 "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
4424 "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
4425 "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
4426 "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
4427 "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
4428 "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
4429 "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
4430 "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
4431 "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
4432 "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
4433 "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
4434 "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
4435 "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
4436 "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
4437 "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
4438 "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
4439 "\x32\x03\xed\xf0\x50\x1c\x56\x39"
4440 "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
4441 "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
4442 "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
4443 "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
4444 "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
4445 "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
4446 "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
4447 "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
4448 "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
4449 "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
4450 "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
4451 "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
4452 "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
4453 "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
4454 "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
4455 "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
4456 "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
4457 "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
4458 "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
4459 "\x69\x3a\x29\x23\xac\x86\x32\xa5"
4460 "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
4461 "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
4462 "\x59\x6a\xd3\x50\x59\x43\x59\xde"
4463 "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
4464 "\x18\x34\x0d\x1a\x63\x33\xed\x10"
4465 "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
4466 "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
4467 "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
4468 "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
4469 "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
4470 "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
4471 "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
4472 "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
4473 "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
4474 "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
4475 "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
4476 "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
4477 "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
4478 "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
4479 "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
4480 "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
4481 "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
4482 "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
4483 "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
4484 "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
4485 "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
4486 "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
4487 "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
4488 "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
4489 "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
4490 "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
4491 "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
4492 "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
4493 "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
4494 "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
4495 "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
4496 "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
4497 "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
4498 "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
4499 "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
4500 "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
4501 "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
4502 "\x26\x39\x83\x94\xef\x27\xd8\x53"
4503 "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
4504 "\x43\x7c\x95\x0a\x53\xef\x66\xda"
4505 "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
4506 "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
4507 "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
4508 "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
4509 "\x88\xee\x73\xcf\x66\x2f\x52\x56"
4510 "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
4511 "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
4512 "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
4513 "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
4514 "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
4515 "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
4516 "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
4517 "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
4518 "\xba\x61\x34\x38\x7c\xda\x48\x3e"
4519 "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
4520 "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
4521 "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
4522 "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
4523 "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
4524 "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
4525 "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
4526 "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
4527 "\x35\x12\xe3\x36\x28\x27\x36\x58"
4528 "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
4529 "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
4530 "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
4531 "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
4532 "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
4533 "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
4534 "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
4535 "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
4536 "\x89\xf3\x78\x35\x44\x62\x78\x72"
4537 "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
4538 "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
4539 "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
4540 "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
4541 "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
4542 "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
4543 "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
4544 "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
4545 "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
4546 "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
4547 "\xd2\x49\x77\x81\x6d\x90\x70\xae"
4548 "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
4549 "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
4550 "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
4551 "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
4552 "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
4553 "\x45\x42\x27\x75\x50\xe5\xee\xb8"
4554 "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
4555 "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
4556 "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
4557 "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
4558 "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
4559 "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
4560 "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
4561 "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
4562 "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
4563 "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
4564 "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
4565 "\xa9\x21\x2b\x92\x94\x87\x62\x57"
4566 "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
4567 "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
4568 "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
4569 "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
4570 "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
4571 "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
4572 "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
4573 "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
4574 "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
4575 "\x69\x34\x78\x61\x24\x21\x9c\x8a"
4576 "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
4577 "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
4578 "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
4579 "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
4580 "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
4581 "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
4582 "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
4583 "\xb1\x95\x28\x86\x20\xe9\x17\x49"
4584 "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
4585 "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
4586 "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
4587 "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
4588 "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
4589 "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
4590 "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
4591 "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
4592 "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
4593 "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
4594 "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
4595 "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
4596 "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
4597 "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
4598 "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
4599 "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
4600 "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
4601 "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
4602 "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
4603 "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
4604 "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
4605 "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
4606 "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
4607 "\x29\x90\x46\x30\x92\x69\x7d\x13"
4608 "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
4609 "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
4610 "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
4611 "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
4612 "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
4613 "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
4614 "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
4615 "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
4616 "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
4617 "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
4618 "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
4619 "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
4620 "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
4621 "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
4622 "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
4623 "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
4624 "\x77\x65\x08\x60\x11\x76\x4c\x8d"
4625 "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
4626 "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
4627 "\x03\xd1\x24\x95\xec\x6d\xab\x38"
4628 "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
4629 "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
4630 "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
4631 "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
4632 "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
4633 "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
4634 "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
4635 "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
4636 "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
4637 "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
4638 "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
4639 "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
4640 "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
4641 "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
4642 "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
4643 "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
4644 "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
4645 "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
4646 "\xe5\x79\x81\x73\xcd\x43\x59\x68"
4647 "\x73\x02\x3b\x78\x21\x72\x43\x00"
4648 "\x49\x17\xf7\x00\xaf\x68\x24\x53"
4649 "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
4650 "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
4651 "\x11\x94\x13\x69\x51\x09\x28\xde"
4652 "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
4653 "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
4654 "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
4655 "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
4656 "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
4657 "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
4658 "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
4659 "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
4660 "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
4661 "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
4662 "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
4663 "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
4664 "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
4665 "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
4666 "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
4667 "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
4668 "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
4669 "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
4670 "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
4671 "\x69\xdc\xab\x24\x57\x60\x47\xc1"
4672 "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
4673 "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
4674 "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
4675 "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
4676 "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
4677 "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
4678 "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
4679 "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
4680 "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
4681 "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
4682 "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
4683 "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
4684 "\x85\x62\x82\x70\x18\xe2\x9a\x78"
4685 "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
4686 "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
4687 "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
4688 "\x35\xf3\x61\x06\x72\x84\xc4\x32"
4689 "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
4690 "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
4691 "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
4692 "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
4693 "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
4694 "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
4695 "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
4696 "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
4697 "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
4698 "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
4699 "\x4f\x73\x38\x09\x75\x64\x48\xe0"
4700 "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
4701 "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
4702 "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
4703 "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
4704 "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
4705 "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
4706 "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
4707 "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
4708 "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
4709 "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
4710 "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
4711 "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
4712 "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
4713 "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
4714 "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
4715 "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
4716 "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
4717 "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
4718 "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
4719 "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
4720 "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
4721 "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
4722 "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
4723 "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
4724 "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
4725 "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
4726 "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
4727 "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
4728 "\xce\x4d\x5f\x18\x60\xce\x87\x22"
4729 "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
4730 "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
4731 "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
4732 "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
4733 "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
4734 "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
4735 "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
4736 "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
4737 "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
4738 "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
4739 "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
4740 "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
4741 "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
4742 "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
4743 "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
4744 "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
4745 "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
4746 "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
4747 "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
4748 "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
4749 "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
4750 "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
4751 "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
4752 "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
4753 "\xce\x54\xf9\x18\x58\xb5\xff\x44"
4754 "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
4755 "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
4756 "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
4757 "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
4758 "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
4759 "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
4760 "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
4761 "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
4762 "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
4763 "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
4764 "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
4765 "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
4766 "\x0c\xd6\x04\x14\xde\x51\x74\x75"
4767 "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
4768 "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
4769 "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
4770 "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
4771 "\x75\x46\x65\x4e\x07\x34\x37\xa3"
4772 "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
4773 "\x69\x24\x0e\x38\x67\x43\x8c\xde"
4774 "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
4775 "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
4776 "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
4777 "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
4778 "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
4779 "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
4780 "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
4781 "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
4782 "\x91\x7d\x62\x64\x96\x72\xde\xfc"
4783 "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
4784 "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
4785 "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
4786 "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
4787 "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
4788 "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
4789 "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
4790 "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
4791 "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
4792 "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
4793 "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
4794 "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
4795 "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
4796 "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
4797 "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
4798 "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
4799 "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
4800 "\xae\xed\x39\x88\x42\x11\x3c\xed"
4801 "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
4802 "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
4803 "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
4804 "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
4805 "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
4806 "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
4807 "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
4808 "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
4809 "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
4810 "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
4811 "\x34\x17\xde\xba\x47\xf1\x06\x18"
4812 "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
4813 "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
4814 "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
4815 "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
4816 "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
4817 "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
4818 "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
4819 "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
4820 "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
4821 "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
4822 "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
4823 "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
4824 "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
4825 "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
4826 "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
4827 "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
4828 "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
4829 "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
4830 "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
4831 "\x2c\x56\x39\x79\x0f\x69\x44\x75"
4832 "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
4833 "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
4834 "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
4835 "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
4836 "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
4837 "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
4838 "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
4839 "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
4840 "\x63\x9b\xce\x61\x24\x79\xc0\x70"
4841 "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
4842 "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
4843 "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
4844 "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
4845 "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
4846 "\x74\x56\x58\x40\x02\x37\x52\x2c"
4847 "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
4848 "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
4849 "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
4850 "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
4851 "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
4852 "\xed\x38\x80\x36\x72\x43\x27\x49"
4853 "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
4854 "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
4855 "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
4856 "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
4857 "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
4858 "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
4859 "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
4860 "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
4861 "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
4862 "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
4863 "\x12\xee\x30\xfe\xd8\x30\xef\x34"
4864 "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
4865 "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
4866 "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
4867 "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
4868 "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
4869 "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
4870 "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
4871 "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
4872 "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
4873 "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
4874 "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
4875 "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
4876 "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
4877 "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
4878 "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
4879 "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
4880 "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
4881 "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
4882 "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
4883 "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
4884 "\x44\x12\xfb\x73\x77\xd4\x13\x39"
4885 "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
4886 "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
4887 "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
4888 "\x4b\xef\x31\x18\xea\xac\xb1\x84"
4889 "\x21\xed\xda\x86",
Tan Swee Henga773edb2007-11-30 00:36:07 +11004890 .rlen = 4100,
Joy Latten23e353c2007-10-23 08:50:32 +08004891 },
4892};
4893
4894static struct cipher_testvec aes_ctr_dec_tv_template[] = {
4895 { /* From RFC 3686 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004896 .key = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
4897 "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
4898 "\x00\x00\x00\x30",
Joy Latten23e353c2007-10-23 08:50:32 +08004899 .klen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004900 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
4901 .input = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
4902 "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
Joy Latten23e353c2007-10-23 08:50:32 +08004903 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004904 .result = "Single block msg",
Joy Latten23e353c2007-10-23 08:50:32 +08004905 .rlen = 16,
4906 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004907 .key = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
4908 "\x43\xd6\xce\x1f\x32\x53\x91\x63"
4909 "\x00\x6c\xb6\xdb",
Joy Latten23e353c2007-10-23 08:50:32 +08004910 .klen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004911 .iv = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
4912 .input = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
4913 "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
4914 "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
4915 "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
4916 .ilen = 32,
4917 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
4918 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4919 "\x10\x11\x12\x13\x14\x15\x16\x17"
4920 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Joy Latten23e353c2007-10-23 08:50:32 +08004921 .rlen = 32,
4922 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004923 .key = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
4924 "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
4925 "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
4926 "\x00\x00\x00\x48",
4927 .klen = 28,
4928 .iv = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
4929 .input = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
4930 "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
4931 .ilen = 16,
4932 .result = "Single block msg",
Joy Latten23e353c2007-10-23 08:50:32 +08004933 .rlen = 16,
4934 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004935 .key = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
4936 "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
4937 "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
4938 "\x00\x96\xb0\x3b",
Joy Latten23e353c2007-10-23 08:50:32 +08004939 .klen = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004940 .iv = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
4941 .input = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
4942 "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
4943 "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
4944 "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
Joy Latten23e353c2007-10-23 08:50:32 +08004945 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004946 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
4947 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4948 "\x10\x11\x12\x13\x14\x15\x16\x17"
4949 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
4950 .rlen = 32,
Joy Latten23e353c2007-10-23 08:50:32 +08004951 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004952 .key = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
4953 "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
4954 "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
4955 "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
4956 "\x00\x00\x00\x60",
Joy Latten23e353c2007-10-23 08:50:32 +08004957 .klen = 36,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004958 .iv = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
4959 .input = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
4960 "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
Joy Latten23e353c2007-10-23 08:50:32 +08004961 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004962 .result = "Single block msg",
4963 .rlen = 16,
Joy Latten23e353c2007-10-23 08:50:32 +08004964 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004965 .key = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
4966 "\x07\x96\x36\x58\x79\xef\xf8\x86"
4967 "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
4968 "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
4969 "\x00\xfa\xac\x24",
4970 .klen = 36,
4971 .iv = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
4972 .input = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
4973 "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
4974 "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
4975 "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
Joy Latten23e353c2007-10-23 08:50:32 +08004976 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004977 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
4978 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4979 "\x10\x11\x12\x13\x14\x15\x16\x17"
4980 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Joy Latten23e353c2007-10-23 08:50:32 +08004981 .rlen = 32,
4982 },
4983};
4984
Mikko Herranen28db8e32007-11-26 22:24:11 +08004985static struct aead_testvec aes_gcm_enc_tv_template[] = {
4986 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004987 .key = zeroed_string,
Mikko Herranen28db8e32007-11-26 22:24:11 +08004988 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004989 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
4990 "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
Herbert Xu6160b282007-12-04 19:17:50 +11004991 .rlen = 16,
Mikko Herranen28db8e32007-11-26 22:24:11 +08004992 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004993 .key = zeroed_string,
Mikko Herranen28db8e32007-11-26 22:24:11 +08004994 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004995 .input = zeroed_string,
Mikko Herranen28db8e32007-11-26 22:24:11 +08004996 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08004997 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
4998 "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
4999 "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
5000 "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
Herbert Xu6160b282007-12-04 19:17:50 +11005001 .rlen = 32,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005002 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005003 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5004 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005005 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005006 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
5007 "\xde\xca\xf8\x88",
5008 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
5009 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
5010 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
5011 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
5012 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
5013 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
5014 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
5015 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005016 .ilen = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005017 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
5018 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
5019 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
5020 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
5021 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
5022 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
5023 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
5024 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
5025 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
5026 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
Herbert Xu6160b282007-12-04 19:17:50 +11005027 .rlen = 80,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005028 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005029 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5030 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005031 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005032 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
5033 "\xde\xca\xf8\x88",
5034 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
5035 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
5036 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
5037 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
5038 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
5039 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
5040 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
5041 "\xba\x63\x7b\x39",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005042 .ilen = 60,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005043 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
5044 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
5045 "\xab\xad\xda\xd2",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005046 .alen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005047 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
5048 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
5049 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
5050 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
5051 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
5052 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
5053 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
5054 "\x3d\x58\xe0\x91"
5055 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
5056 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
Herbert Xu6160b282007-12-04 19:17:50 +11005057 .rlen = 76,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005058 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005059 .key = zeroed_string,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005060 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005061 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
5062 "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
Herbert Xu6160b282007-12-04 19:17:50 +11005063 .rlen = 16,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005064 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005065 .key = zeroed_string,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005066 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005067 .input = zeroed_string,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005068 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005069 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
5070 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
5071 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
5072 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
Herbert Xu6160b282007-12-04 19:17:50 +11005073 .rlen = 32,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005074 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005075 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5076 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5077 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005078 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005079 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
5080 "\xde\xca\xf8\x88",
5081 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
5082 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
5083 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
5084 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
5085 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
5086 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
5087 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
5088 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005089 .ilen = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005090 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
5091 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
5092 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
5093 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
5094 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
5095 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
5096 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
5097 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
5098 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
5099 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
Herbert Xu6160b282007-12-04 19:17:50 +11005100 .rlen = 80,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005101 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005102 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5103 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5104 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005105 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005106 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
5107 "\xde\xca\xf8\x88",
5108 .input = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
5109 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
5110 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
5111 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
5112 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
5113 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
5114 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
5115 "\xba\x63\x7b\x39",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005116 .ilen = 60,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005117 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
5118 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
5119 "\xab\xad\xda\xd2",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005120 .alen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005121 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
5122 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
5123 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
5124 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
5125 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
5126 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
5127 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
5128 "\xcc\xda\x27\x10"
5129 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
5130 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
Herbert Xu6160b282007-12-04 19:17:50 +11005131 .rlen = 76,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005132 .np = 2,
5133 .tap = { 32, 28 },
5134 .anp = 2,
5135 .atap = { 8, 12 }
5136 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005137 .key = zeroed_string,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005138 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005139 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
5140 "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
Herbert Xu6160b282007-12-04 19:17:50 +11005141 .rlen = 16,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005142 }
5143};
5144
5145static struct aead_testvec aes_gcm_dec_tv_template[] = {
5146 { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005147 .key = zeroed_string,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005148 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005149 .input = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
5150 "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
5151 "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
5152 "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
Herbert Xu6160b282007-12-04 19:17:50 +11005153 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005154 .result = zeroed_string,
Herbert Xu6160b282007-12-04 19:17:50 +11005155 .rlen = 16,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005156 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005157 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5158 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5159 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5160 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005161 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005162 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
5163 "\xde\xca\xf8\x88",
5164 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
5165 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
5166 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
5167 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
5168 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
5169 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
5170 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
5171 "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
5172 "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
5173 "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
Herbert Xu6160b282007-12-04 19:17:50 +11005174 .ilen = 80,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005175 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
5176 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
5177 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
5178 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
5179 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
5180 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
5181 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
5182 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005183 .rlen = 64,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005184 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005185 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5186 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5187 "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5188 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005189 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005190 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
5191 "\xde\xca\xf8\x88",
5192 .input = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
5193 "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
5194 "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
5195 "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
5196 "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
5197 "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
5198 "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
5199 "\xbc\xc9\xf6\x62"
5200 "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
5201 "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
Herbert Xu6160b282007-12-04 19:17:50 +11005202 .ilen = 76,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005203 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
5204 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
5205 "\xab\xad\xda\xd2",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005206 .alen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005207 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
5208 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
5209 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
5210 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
5211 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
5212 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
5213 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
5214 "\xba\x63\x7b\x39",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005215 .rlen = 60,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005216 .np = 2,
Herbert Xu6160b282007-12-04 19:17:50 +11005217 .tap = { 48, 28 },
Mikko Herranen28db8e32007-11-26 22:24:11 +08005218 .anp = 3,
5219 .atap = { 8, 8, 4 }
5220 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005221 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5222 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005223 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005224 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
5225 "\xde\xca\xf8\x88",
5226 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
5227 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
5228 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
5229 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
5230 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
5231 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
5232 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
5233 "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
5234 "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
5235 "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
Herbert Xu6160b282007-12-04 19:17:50 +11005236 .ilen = 80,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005237 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
5238 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
5239 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
5240 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
5241 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
5242 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
5243 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
5244 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005245 .rlen = 64,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005246 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005247 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5248 "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005249 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005250 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
5251 "\xde\xca\xf8\x88",
5252 .input = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
5253 "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
5254 "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
5255 "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
5256 "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
5257 "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
5258 "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
5259 "\x3d\x58\xe0\x91"
5260 "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
5261 "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
Herbert Xu6160b282007-12-04 19:17:50 +11005262 .ilen = 76,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005263 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
5264 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
5265 "\xab\xad\xda\xd2",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005266 .alen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005267 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
5268 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
5269 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
5270 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
5271 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
5272 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
5273 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
5274 "\xba\x63\x7b\x39",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005275 .rlen = 60,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005276 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005277 .key = zeroed_string,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005278 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005279 .input = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
5280 "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
5281 "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
5282 "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
Herbert Xu6160b282007-12-04 19:17:50 +11005283 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005284 .result = zeroed_string,
Herbert Xu6160b282007-12-04 19:17:50 +11005285 .rlen = 16,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005286 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005287 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5288 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5289 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005290 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005291 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
5292 "\xde\xca\xf8\x88",
5293 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
5294 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
5295 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
5296 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
5297 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
5298 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
5299 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
5300 "\xcc\xda\x27\x10\xac\xad\xe2\x56"
5301 "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
5302 "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
Herbert Xu6160b282007-12-04 19:17:50 +11005303 .ilen = 80,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005304 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
5305 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
5306 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
5307 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
5308 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
5309 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
5310 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
5311 "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005312 .rlen = 64,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005313 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005314 .key = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
5315 "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
5316 "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005317 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005318 .iv = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
5319 "\xde\xca\xf8\x88",
5320 .input = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
5321 "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
5322 "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
5323 "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
5324 "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
5325 "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
5326 "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
5327 "\xcc\xda\x27\x10"
5328 "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
5329 "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
Herbert Xu6160b282007-12-04 19:17:50 +11005330 .ilen = 76,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005331 .assoc = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
5332 "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
5333 "\xab\xad\xda\xd2",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005334 .alen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005335 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
5336 "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
5337 "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
5338 "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
5339 "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
5340 "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
5341 "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
5342 "\xba\x63\x7b\x39",
Mikko Herranen28db8e32007-11-26 22:24:11 +08005343 .rlen = 60,
Mikko Herranen28db8e32007-11-26 22:24:11 +08005344 }
5345};
5346
Joy Latten93cc74e2007-12-12 20:24:22 +08005347static struct aead_testvec aes_ccm_enc_tv_template[] = {
5348 { /* From RFC 3610 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005349 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5350 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
Joy Latten93cc74e2007-12-12 20:24:22 +08005351 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005352 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
5353 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
5354 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
Joy Latten93cc74e2007-12-12 20:24:22 +08005355 .alen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005356 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5357 "\x10\x11\x12\x13\x14\x15\x16\x17"
5358 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
Joy Latten93cc74e2007-12-12 20:24:22 +08005359 .ilen = 23,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005360 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
5361 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
5362 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
5363 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
Joy Latten93cc74e2007-12-12 20:24:22 +08005364 .rlen = 31,
5365 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005366 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5367 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
Joy Latten93cc74e2007-12-12 20:24:22 +08005368 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005369 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
5370 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
5371 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
5372 "\x08\x09\x0a\x0b",
Joy Latten93cc74e2007-12-12 20:24:22 +08005373 .alen = 12,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005374 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
5375 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
5376 "\x1c\x1d\x1e\x1f",
Joy Latten93cc74e2007-12-12 20:24:22 +08005377 .ilen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005378 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
5379 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
5380 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
5381 "\x7d\x9c\x2d\x93",
Joy Latten93cc74e2007-12-12 20:24:22 +08005382 .rlen = 28,
5383 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005384 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5385 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
Joy Latten93cc74e2007-12-12 20:24:22 +08005386 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005387 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
5388 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
5389 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
Joy Latten93cc74e2007-12-12 20:24:22 +08005390 .alen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005391 .input = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5392 "\x10\x11\x12\x13\x14\x15\x16\x17"
5393 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5394 "\x20",
Joy Latten93cc74e2007-12-12 20:24:22 +08005395 .ilen = 25,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005396 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
5397 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
5398 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
5399 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
5400 "\x7e\x5f\x4e",
Joy Latten93cc74e2007-12-12 20:24:22 +08005401 .rlen = 35,
5402 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005403 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5404 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
Joy Latten93cc74e2007-12-12 20:24:22 +08005405 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005406 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
5407 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
5408 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
5409 "\x08\x09\x0a\x0b",
Joy Latten93cc74e2007-12-12 20:24:22 +08005410 .alen = 12,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005411 .input = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
5412 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
5413 "\x1c\x1d\x1e",
Joy Latten93cc74e2007-12-12 20:24:22 +08005414 .ilen = 19,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005415 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
5416 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
5417 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
5418 "\x4d\x99\x99\x88\xdd",
Joy Latten93cc74e2007-12-12 20:24:22 +08005419 .rlen = 29,
5420 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005421 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
5422 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
Joy Latten93cc74e2007-12-12 20:24:22 +08005423 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005424 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
5425 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
5426 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
Joy Latten93cc74e2007-12-12 20:24:22 +08005427 .alen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005428 .input = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
5429 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
5430 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
Joy Latten93cc74e2007-12-12 20:24:22 +08005431 .ilen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005432 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
5433 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
5434 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
5435 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
Joy Latten93cc74e2007-12-12 20:24:22 +08005436 .rlen = 32,
5437 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005438 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
5439 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
Joy Latten93cc74e2007-12-12 20:24:22 +08005440 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005441 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
5442 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
5443 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
5444 "\x20\xea\x60\xc0",
Joy Latten93cc74e2007-12-12 20:24:22 +08005445 .alen = 12,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005446 .input = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
5447 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
5448 "\x3a\x80\x3b\xa8\x7f",
Joy Latten93cc74e2007-12-12 20:24:22 +08005449 .ilen = 21,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005450 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
5451 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
5452 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
5453 "\x5a\xe0\x70\x45\x51",
Joy Latten93cc74e2007-12-12 20:24:22 +08005454 .rlen = 29,
5455 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005456 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
5457 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
Joy Latten93cc74e2007-12-12 20:24:22 +08005458 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005459 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
5460 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
5461 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
Joy Latten93cc74e2007-12-12 20:24:22 +08005462 .alen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005463 .input = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
5464 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
5465 "\x98\x09\xd6\x7d\xbe\xdd\x18",
Joy Latten93cc74e2007-12-12 20:24:22 +08005466 .ilen = 23,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005467 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
5468 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
5469 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
5470 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
5471 "\xba",
Joy Latten93cc74e2007-12-12 20:24:22 +08005472 .rlen = 33,
5473 },
5474};
5475
5476static struct aead_testvec aes_ccm_dec_tv_template[] = {
5477 { /* From RFC 3610 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005478 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5479 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
Joy Latten93cc74e2007-12-12 20:24:22 +08005480 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005481 .iv = "\x01\x00\x00\x00\x03\x02\x01\x00"
5482 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
5483 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
Joy Latten93cc74e2007-12-12 20:24:22 +08005484 .alen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005485 .input = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
5486 "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
5487 "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
5488 "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
Joy Latten93cc74e2007-12-12 20:24:22 +08005489 .ilen = 31,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005490 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5491 "\x10\x11\x12\x13\x14\x15\x16\x17"
5492 "\x18\x19\x1a\x1b\x1c\x1d\x1e",
Joy Latten93cc74e2007-12-12 20:24:22 +08005493 .rlen = 23,
5494 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005495 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5496 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
Joy Latten93cc74e2007-12-12 20:24:22 +08005497 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005498 .iv = "\x01\x00\x00\x00\x07\x06\x05\x04"
5499 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
5500 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
5501 "\x08\x09\x0a\x0b",
Joy Latten93cc74e2007-12-12 20:24:22 +08005502 .alen = 12,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005503 .input = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
5504 "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
5505 "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
5506 "\x7d\x9c\x2d\x93",
Joy Latten93cc74e2007-12-12 20:24:22 +08005507 .ilen = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005508 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
5509 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
5510 "\x1c\x1d\x1e\x1f",
Joy Latten93cc74e2007-12-12 20:24:22 +08005511 .rlen = 20,
5512 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005513 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5514 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
Joy Latten93cc74e2007-12-12 20:24:22 +08005515 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005516 .iv = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
5517 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
5518 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07",
Joy Latten93cc74e2007-12-12 20:24:22 +08005519 .alen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005520 .input = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
5521 "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
5522 "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
5523 "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
5524 "\x7e\x5f\x4e",
Joy Latten93cc74e2007-12-12 20:24:22 +08005525 .ilen = 35,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005526 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5527 "\x10\x11\x12\x13\x14\x15\x16\x17"
5528 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5529 "\x20",
Joy Latten93cc74e2007-12-12 20:24:22 +08005530 .rlen = 25,
5531 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005532 .key = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5533 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
Joy Latten93cc74e2007-12-12 20:24:22 +08005534 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005535 .iv = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
5536 "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
5537 .assoc = "\x00\x01\x02\x03\x04\x05\x06\x07"
5538 "\x08\x09\x0a\x0b",
Joy Latten93cc74e2007-12-12 20:24:22 +08005539 .alen = 12,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005540 .input = "\x07\x34\x25\x94\x15\x77\x85\x15"
5541 "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
5542 "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
5543 "\x4d\x99\x99\x88\xdd",
Joy Latten93cc74e2007-12-12 20:24:22 +08005544 .ilen = 29,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005545 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
5546 "\x14\x15\x16\x17\x18\x19\x1a\x1b"
5547 "\x1c\x1d\x1e",
Joy Latten93cc74e2007-12-12 20:24:22 +08005548 .rlen = 19,
5549 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005550 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
5551 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
Joy Latten93cc74e2007-12-12 20:24:22 +08005552 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005553 .iv = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
5554 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
5555 .assoc = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
Joy Latten93cc74e2007-12-12 20:24:22 +08005556 .alen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005557 .input = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
5558 "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
5559 "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
5560 "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
Joy Latten93cc74e2007-12-12 20:24:22 +08005561 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005562 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
5563 "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
5564 "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
Joy Latten93cc74e2007-12-12 20:24:22 +08005565 .rlen = 24,
5566 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005567 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
5568 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
Joy Latten93cc74e2007-12-12 20:24:22 +08005569 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005570 .iv = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
5571 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
5572 .assoc = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
5573 "\x20\xea\x60\xc0",
Joy Latten93cc74e2007-12-12 20:24:22 +08005574 .alen = 12,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005575 .input = "\x00\x97\x69\xec\xab\xdf\x48\x62"
5576 "\x55\x94\xc5\x92\x51\xe6\x03\x57"
5577 "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
5578 "\x5a\xe0\x70\x45\x51",
Joy Latten93cc74e2007-12-12 20:24:22 +08005579 .ilen = 29,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005580 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
5581 "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
5582 "\x3a\x80\x3b\xa8\x7f",
Joy Latten93cc74e2007-12-12 20:24:22 +08005583 .rlen = 21,
5584 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005585 .key = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
5586 "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
Joy Latten93cc74e2007-12-12 20:24:22 +08005587 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005588 .iv = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
5589 "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
5590 .assoc = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
Joy Latten93cc74e2007-12-12 20:24:22 +08005591 .alen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005592 .input = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
5593 "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
5594 "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
5595 "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
5596 "\xba",
Joy Latten93cc74e2007-12-12 20:24:22 +08005597 .ilen = 33,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005598 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
5599 "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
5600 "\x98\x09\xd6\x7d\xbe\xdd\x18",
Joy Latten93cc74e2007-12-12 20:24:22 +08005601 .rlen = 23,
5602 },
5603};
5604
Linus Torvalds1da177e2005-04-16 15:20:36 -07005605/* Cast5 test vectors from RFC 2144 */
5606#define CAST5_ENC_TEST_VECTORS 3
5607#define CAST5_DEC_TEST_VECTORS 3
5608
Herbert Xuef2736f2005-06-22 13:26:03 -07005609static struct cipher_testvec cast5_enc_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07005610 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005611 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
5612 "\x23\x45\x67\x89\x34\x56\x78\x9a",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005613 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005614 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005615 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005616 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005617 .rlen = 8,
5618 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005619 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
5620 "\x23\x45",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005621 .klen = 10,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005622 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005623 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005624 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005625 .rlen = 8,
5626 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005627 .key = "\x01\x23\x45\x67\x12",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005628 .klen = 5,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005629 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005630 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005631 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005632 .rlen = 8,
5633 },
5634};
5635
Herbert Xuef2736f2005-06-22 13:26:03 -07005636static struct cipher_testvec cast5_dec_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07005637 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005638 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
5639 "\x23\x45\x67\x89\x34\x56\x78\x9a",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005640 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005641 .input = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005642 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005643 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005644 .rlen = 8,
5645 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005646 .key = "\x01\x23\x45\x67\x12\x34\x56\x78"
5647 "\x23\x45",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005648 .klen = 10,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005649 .input = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005650 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005651 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005652 .rlen = 8,
5653 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005654 .key = "\x01\x23\x45\x67\x12",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005655 .klen = 5,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005656 .input = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005657 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005658 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005659 .rlen = 8,
5660 },
5661};
5662
Herbert Xuef2736f2005-06-22 13:26:03 -07005663/*
5664 * ARC4 test vectors from OpenSSL
Linus Torvalds1da177e2005-04-16 15:20:36 -07005665 */
5666#define ARC4_ENC_TEST_VECTORS 7
5667#define ARC4_DEC_TEST_VECTORS 7
5668
Herbert Xuef2736f2005-06-22 13:26:03 -07005669static struct cipher_testvec arc4_enc_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07005670 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005671 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005672 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005673 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005674 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005675 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005676 .rlen = 8,
5677 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005678 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005679 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005680 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005681 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005682 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005683 .rlen = 8,
5684 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005685 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005686 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005687 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005688 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005689 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005690 .rlen = 8,
5691 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005692 .key = "\xef\x01\x23\x45",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005693 .klen = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005694 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
5695 "\x00\x00\x00\x00\x00\x00\x00\x00"
5696 "\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005697 .ilen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005698 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
5699 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
5700 "\x36\xb6\x78\x58",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005701 .rlen = 20,
5702 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005703 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005704 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005705 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
5706 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
5707 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
5708 "\x12\x34\x56\x78",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005709 .ilen = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005710 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
5711 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
5712 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
5713 "\x40\x01\x1e\xcf",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005714 .rlen = 28,
5715 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005716 .key = "\xef\x01\x23\x45",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005717 .klen = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005718 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
5719 "\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005720 .ilen = 10,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005721 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
5722 "\xbd\x61",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005723 .rlen = 10,
5724 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005725 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
5726 "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005727 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005728 .input = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005729 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005730 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005731 .rlen = 8,
5732 },
5733};
5734
Herbert Xuef2736f2005-06-22 13:26:03 -07005735static struct cipher_testvec arc4_dec_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07005736 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005737 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005738 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005739 .input = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005740 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005741 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005742 .rlen = 8,
5743 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005744 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005745 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005746 .input = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005747 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005748 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005749 .rlen = 8,
5750 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005751 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005752 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005753 .input = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005754 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005755 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005756 .rlen = 8,
5757 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005758 .key = "\xef\x01\x23\x45",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005759 .klen = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005760 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
5761 "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
5762 "\x36\xb6\x78\x58",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005763 .ilen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005764 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
5765 "\x00\x00\x00\x00\x00\x00\x00\x00"
5766 "\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005767 .rlen = 20,
5768 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005769 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005770 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005771 .input = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
5772 "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
5773 "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
5774 "\x40\x01\x1e\xcf",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005775 .ilen = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005776 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
5777 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
5778 "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
5779 "\x12\x34\x56\x78",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005780 .rlen = 28,
5781 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005782 .key = "\xef\x01\x23\x45",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005783 .klen = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005784 .input = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
5785 "\xbd\x61",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005786 .ilen = 10,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005787 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
5788 "\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005789 .rlen = 10,
5790 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005791 .key = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
5792 "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005793 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005794 .input = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005795 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005796 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005797 .rlen = 8,
5798 },
5799};
5800
Herbert Xuef2736f2005-06-22 13:26:03 -07005801/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07005802 * TEA test vectors
5803 */
5804#define TEA_ENC_TEST_VECTORS 4
5805#define TEA_DEC_TEST_VECTORS 4
5806
Herbert Xuef2736f2005-06-22 13:26:03 -07005807static struct cipher_testvec tea_enc_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07005808 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005809 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07005810 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005811 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07005812 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005813 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005814 .rlen = 8,
5815 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005816 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
5817 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005818 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005819 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005820 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005821 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005822 .rlen = 8,
5823 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005824 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
5825 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005826 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005827 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
5828 "\x65\x73\x74\x5f\x76\x65\x63\x74",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005829 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005830 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
5831 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005832 .rlen = 16,
5833 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005834 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
5835 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005836 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005837 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
5838 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
5839 "\x79\x6f\x75\x21\x21\x21\x20\x72"
5840 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005841 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005842 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
5843 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
5844 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
5845 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005846 .rlen = 32,
5847 }
5848};
5849
Herbert Xuef2736f2005-06-22 13:26:03 -07005850static struct cipher_testvec tea_dec_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07005851 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005852 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07005853 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005854 .input = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005855 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005856 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07005857 .rlen = 8,
5858 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005859 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
5860 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005861 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005862 .input = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005863 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005864 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005865 .rlen = 8,
5866 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005867 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
5868 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005869 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005870 .input = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
5871 "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
Herbert Xuef2736f2005-06-22 13:26:03 -07005872 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005873 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
5874 "\x65\x73\x74\x5f\x76\x65\x63\x74",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005875 .rlen = 16,
5876 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005877 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
5878 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005879 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005880 .input = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
5881 "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
5882 "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
5883 "\x07\x89\x73\xc2\x45\x92\xc6\x90",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005884 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005885 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
5886 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
5887 "\x79\x6f\x75\x21\x21\x21\x20\x72"
5888 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005889 .rlen = 32,
5890 }
5891};
5892
Herbert Xuef2736f2005-06-22 13:26:03 -07005893/*
5894 * XTEA test vectors
Linus Torvalds1da177e2005-04-16 15:20:36 -07005895 */
5896#define XTEA_ENC_TEST_VECTORS 4
5897#define XTEA_DEC_TEST_VECTORS 4
5898
Herbert Xuef2736f2005-06-22 13:26:03 -07005899static struct cipher_testvec xtea_enc_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07005900 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005901 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07005902 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005903 .input = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07005904 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005905 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005906 .rlen = 8,
5907 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005908 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
5909 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005910 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005911 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005912 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005913 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005914 .rlen = 8,
5915 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005916 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
5917 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005918 .klen = 16,
Sebastian Siewiorf0df30b2008-03-13 20:29:07 +08005919 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005920 "\x65\x73\x74\x5f\x76\x65\x63\x74",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005921 .ilen = 16,
Sebastian Siewiorf0df30b2008-03-13 20:29:07 +08005922 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
5923 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005924 .rlen = 16,
5925 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005926 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
5927 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005928 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005929 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
5930 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
5931 "\x79\x6f\x75\x21\x21\x21\x20\x72"
5932 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005933 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005934 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
5935 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
5936 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
5937 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005938 .rlen = 32,
5939 }
5940};
5941
Herbert Xuef2736f2005-06-22 13:26:03 -07005942static struct cipher_testvec xtea_dec_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07005943 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005944 .key = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07005945 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005946 .input = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005947 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005948 .result = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07005949 .rlen = 8,
5950 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005951 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
5952 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005953 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005954 .input = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005955 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005956 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005957 .rlen = 8,
5958 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005959 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
5960 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005961 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005962 .input = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
5963 "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005964 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005965 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
5966 "\x65\x73\x74\x5f\x76\x65\x63\x74",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005967 .rlen = 16,
5968 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005969 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
5970 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005971 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005972 .input = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
5973 "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
5974 "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
5975 "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005976 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005977 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
5978 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
5979 "\x79\x6f\x75\x21\x21\x21\x20\x72"
5980 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005981 .rlen = 32,
5982 }
5983};
5984
5985/*
5986 * KHAZAD test vectors.
5987 */
5988#define KHAZAD_ENC_TEST_VECTORS 5
5989#define KHAZAD_DEC_TEST_VECTORS 5
5990
Herbert Xuef2736f2005-06-22 13:26:03 -07005991static struct cipher_testvec khazad_enc_tv_template[] = {
5992 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005993 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
5994 "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005995 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005996 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005997 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08005998 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07005999 .rlen = 8,
6000 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006001 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
6002 "\x38\x38\x38\x38\x38\x38\x38\x38",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006003 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006004 .input = "\x38\x38\x38\x38\x38\x38\x38\x38",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006005 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006006 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006007 .rlen = 8,
6008 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006009 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
6010 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006011 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006012 .input = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006013 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006014 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006015 .rlen = 8,
6016 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006017 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
6018 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006019 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006020 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006021 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006022 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006023 .rlen = 8,
6024 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006025 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
6026 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006027 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006028 .input = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
6029 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006030 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006031 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
6032 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006033 .rlen = 16,
6034 },
6035};
6036
Herbert Xuef2736f2005-06-22 13:26:03 -07006037static struct cipher_testvec khazad_dec_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07006038 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006039 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
6040 "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006041 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006042 .input = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006043 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006044 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006045 .rlen = 8,
6046 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006047 .key = "\x38\x38\x38\x38\x38\x38\x38\x38"
6048 "\x38\x38\x38\x38\x38\x38\x38\x38",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006049 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006050 .input = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006051 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006052 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006053 .rlen = 8,
6054 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006055 .key = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
6056 "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006057 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006058 .input = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006059 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006060 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006061 .rlen = 8,
6062 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006063 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
6064 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006065 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006066 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006067 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006068 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006069 .rlen = 8,
6070 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006071 .key = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
6072 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006073 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006074 .input = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
6075 "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006076 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006077 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
6078 "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006079 .rlen = 16,
6080 },
6081};
6082
6083/*
6084 * Anubis test vectors.
6085 */
6086
6087#define ANUBIS_ENC_TEST_VECTORS 5
6088#define ANUBIS_DEC_TEST_VECTORS 5
6089#define ANUBIS_CBC_ENC_TEST_VECTORS 2
6090#define ANUBIS_CBC_DEC_TEST_VECTORS 2
6091
6092static struct cipher_testvec anubis_enc_tv_template[] = {
6093 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006094 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
6095 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006096 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006097 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
6098 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006099 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006100 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
6101 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006102 .rlen = 16,
6103 }, {
6104
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006105 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
6106 "\x03\x03\x03\x03\x03\x03\x03\x03"
6107 "\x03\x03\x03\x03",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006108 .klen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006109 .input = "\x03\x03\x03\x03\x03\x03\x03\x03"
6110 "\x03\x03\x03\x03\x03\x03\x03\x03",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006111 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006112 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
6113 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006114 .rlen = 16,
6115 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006116 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
6117 "\x24\x24\x24\x24\x24\x24\x24\x24"
6118 "\x24\x24\x24\x24\x24\x24\x24\x24"
6119 "\x24\x24\x24\x24",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006120 .klen = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006121 .input = "\x24\x24\x24\x24\x24\x24\x24\x24"
6122 "\x24\x24\x24\x24\x24\x24\x24\x24",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006123 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006124 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
6125 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006126 .rlen = 16,
6127 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006128 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
6129 "\x25\x25\x25\x25\x25\x25\x25\x25"
6130 "\x25\x25\x25\x25\x25\x25\x25\x25"
6131 "\x25\x25\x25\x25\x25\x25\x25\x25",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006132 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006133 .input = "\x25\x25\x25\x25\x25\x25\x25\x25"
6134 "\x25\x25\x25\x25\x25\x25\x25\x25",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006135 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006136 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
6137 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006138 .rlen = 16,
6139 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006140 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
6141 "\x35\x35\x35\x35\x35\x35\x35\x35"
6142 "\x35\x35\x35\x35\x35\x35\x35\x35"
6143 "\x35\x35\x35\x35\x35\x35\x35\x35"
6144 "\x35\x35\x35\x35\x35\x35\x35\x35",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006145 .klen = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006146 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
6147 "\x35\x35\x35\x35\x35\x35\x35\x35",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006148 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006149 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
6150 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006151 .rlen = 16,
6152 },
6153};
6154
6155static struct cipher_testvec anubis_dec_tv_template[] = {
6156 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006157 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
6158 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006159 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006160 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
6161 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006162 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006163 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
6164 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006165 .rlen = 16,
6166 }, {
6167
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006168 .key = "\x03\x03\x03\x03\x03\x03\x03\x03"
6169 "\x03\x03\x03\x03\x03\x03\x03\x03"
6170 "\x03\x03\x03\x03",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006171 .klen = 20,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006172 .input = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
6173 "\x87\x41\x6f\x82\x0a\x98\x64\xae",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006174 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006175 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
6176 "\x03\x03\x03\x03\x03\x03\x03\x03",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006177 .rlen = 16,
6178 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006179 .key = "\x24\x24\x24\x24\x24\x24\x24\x24"
6180 "\x24\x24\x24\x24\x24\x24\x24\x24"
6181 "\x24\x24\x24\x24\x24\x24\x24\x24"
6182 "\x24\x24\x24\x24",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006183 .klen = 28,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006184 .input = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
6185 "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006186 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006187 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
6188 "\x24\x24\x24\x24\x24\x24\x24\x24",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006189 .rlen = 16,
6190 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006191 .key = "\x25\x25\x25\x25\x25\x25\x25\x25"
6192 "\x25\x25\x25\x25\x25\x25\x25\x25"
6193 "\x25\x25\x25\x25\x25\x25\x25\x25"
6194 "\x25\x25\x25\x25\x25\x25\x25\x25",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006195 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006196 .input = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
6197 "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006198 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006199 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
6200 "\x25\x25\x25\x25\x25\x25\x25\x25",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006201 .rlen = 16,
6202 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006203 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
6204 "\x35\x35\x35\x35\x35\x35\x35\x35"
6205 "\x35\x35\x35\x35\x35\x35\x35\x35"
6206 "\x35\x35\x35\x35\x35\x35\x35\x35"
6207 "\x35\x35\x35\x35\x35\x35\x35\x35",
6208 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
6209 "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006210 .klen = 40,
6211 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006212 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
6213 "\x35\x35\x35\x35\x35\x35\x35\x35",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006214 .rlen = 16,
6215 },
6216};
6217
6218static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
6219 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006220 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
6221 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006222 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006223 .input = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
6224 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
6225 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
6226 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006227 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006228 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
6229 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
6230 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
6231 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006232 .rlen = 32,
6233 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006234 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
6235 "\x35\x35\x35\x35\x35\x35\x35\x35"
6236 "\x35\x35\x35\x35\x35\x35\x35\x35"
6237 "\x35\x35\x35\x35\x35\x35\x35\x35"
6238 "\x35\x35\x35\x35\x35\x35\x35\x35",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006239 .klen = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006240 .input = "\x35\x35\x35\x35\x35\x35\x35\x35"
6241 "\x35\x35\x35\x35\x35\x35\x35\x35"
6242 "\x35\x35\x35\x35\x35\x35\x35\x35"
6243 "\x35\x35\x35\x35\x35\x35\x35\x35",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006244 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006245 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
6246 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
6247 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
6248 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006249 .rlen = 32,
6250 },
6251};
6252
6253static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
6254 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006255 .key = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
6256 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006257 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006258 .input = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
6259 "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
6260 "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
6261 "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006262 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006263 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
6264 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
6265 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
6266 "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006267 .rlen = 32,
6268 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006269 .key = "\x35\x35\x35\x35\x35\x35\x35\x35"
6270 "\x35\x35\x35\x35\x35\x35\x35\x35"
6271 "\x35\x35\x35\x35\x35\x35\x35\x35"
6272 "\x35\x35\x35\x35\x35\x35\x35\x35"
6273 "\x35\x35\x35\x35\x35\x35\x35\x35",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006274 .klen = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006275 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
6276 "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
6277 "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
6278 "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006279 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006280 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
6281 "\x35\x35\x35\x35\x35\x35\x35\x35"
6282 "\x35\x35\x35\x35\x35\x35\x35\x35"
6283 "\x35\x35\x35\x35\x35\x35\x35\x35",
Linus Torvalds1da177e2005-04-16 15:20:36 -07006284 .rlen = 32,
6285 },
6286};
6287
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006288/*
6289 * XETA test vectors
6290 */
6291#define XETA_ENC_TEST_VECTORS 4
6292#define XETA_DEC_TEST_VECTORS 4
6293
6294static struct cipher_testvec xeta_enc_tv_template[] = {
6295 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006296 .key = zeroed_string,
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006297 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006298 .input = zeroed_string,
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006299 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006300 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006301 .rlen = 8,
6302 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006303 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
6304 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006305 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006306 .input = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006307 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006308 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006309 .rlen = 8,
6310 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006311 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
6312 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006313 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006314 .input = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
6315 "\x65\x73\x74\x5f\x76\x65\x63\x74",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006316 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006317 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
6318 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006319 .rlen = 16,
6320 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006321 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
6322 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006323 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006324 .input = "\x54\x65\x61\x20\x69\x73\x20\x67"
6325 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
6326 "\x79\x6f\x75\x21\x21\x21\x20\x72"
6327 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006328 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006329 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
6330 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
6331 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
6332 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006333 .rlen = 32,
6334 }
6335};
6336
6337static struct cipher_testvec xeta_dec_tv_template[] = {
6338 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006339 .key = zeroed_string,
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006340 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006341 .input = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006342 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006343 .result = zeroed_string,
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006344 .rlen = 8,
6345 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006346 .key = "\x2b\x02\x05\x68\x06\x14\x49\x76"
6347 "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006348 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006349 .input = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006350 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006351 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006352 .rlen = 8,
6353 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006354 .key = "\x09\x65\x43\x11\x66\x44\x39\x25"
6355 "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006356 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006357 .input = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
6358 "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006359 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006360 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
6361 "\x65\x73\x74\x5f\x76\x65\x63\x74",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006362 .rlen = 16,
6363 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006364 .key = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
6365 "\x5d\x04\x16\x36\x15\x72\x63\x2f",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006366 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006367 .input = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
6368 "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
6369 "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
6370 "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006371 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006372 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
6373 "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
6374 "\x79\x6f\x75\x21\x21\x21\x20\x72"
6375 "\x65\x61\x6c\x6c\x79\x21\x21\x21",
Aaron Grothefb4f10e2005-09-01 17:42:46 -07006376 .rlen = 32,
6377 }
6378};
6379
David Howells90831632006-12-16 12:13:14 +11006380/*
6381 * FCrypt test vectors
6382 */
6383#define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
6384#define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
6385
6386static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
6387 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006388 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
David Howells90831632006-12-16 12:13:14 +11006389 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006390 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
6391 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
David Howells90831632006-12-16 12:13:14 +11006392 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006393 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
David Howells90831632006-12-16 12:13:14 +11006394 .rlen = 8,
6395 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006396 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
David Howells90831632006-12-16 12:13:14 +11006397 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006398 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
6399 .input = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
David Howells90831632006-12-16 12:13:14 +11006400 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006401 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
David Howells90831632006-12-16 12:13:14 +11006402 .rlen = 8,
6403 }, { /* From Arla */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006404 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
David Howells90831632006-12-16 12:13:14 +11006405 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006406 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
David Howells90831632006-12-16 12:13:14 +11006407 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
6408 .ilen = 48,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006409 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
6410 "\xee\xac\x98\x62\x44\x51\xe4\x84"
6411 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
6412 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
6413 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
6414 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
David Howells90831632006-12-16 12:13:14 +11006415 .rlen = 48,
6416 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006417 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
David Howells90831632006-12-16 12:13:14 +11006418 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006419 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
David Howells90831632006-12-16 12:13:14 +11006420 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
6421 .ilen = 48,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006422 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
6423 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
6424 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
6425 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
6426 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
6427 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
David Howells90831632006-12-16 12:13:14 +11006428 .rlen = 48,
6429 }, { /* split-page version */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006430 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
David Howells90831632006-12-16 12:13:14 +11006431 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006432 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
David Howells90831632006-12-16 12:13:14 +11006433 .input = "The quick brown fox jumps over the lazy dogs.\0\0",
6434 .ilen = 48,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006435 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
6436 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
6437 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
6438 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
6439 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
6440 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
David Howells90831632006-12-16 12:13:14 +11006441 .rlen = 48,
6442 .np = 2,
6443 .tap = { 20, 28 },
6444 }
6445};
6446
6447static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
6448 { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006449 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
David Howells90831632006-12-16 12:13:14 +11006450 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006451 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
6452 .input = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
David Howells90831632006-12-16 12:13:14 +11006453 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006454 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
David Howells90831632006-12-16 12:13:14 +11006455 .rlen = 8,
6456 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006457 .key = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
David Howells90831632006-12-16 12:13:14 +11006458 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006459 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
6460 .input = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
David Howells90831632006-12-16 12:13:14 +11006461 .ilen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006462 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
David Howells90831632006-12-16 12:13:14 +11006463 .rlen = 8,
6464 }, { /* From Arla */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006465 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
David Howells90831632006-12-16 12:13:14 +11006466 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006467 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6468 .input = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
6469 "\xee\xac\x98\x62\x44\x51\xe4\x84"
6470 "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
6471 "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
6472 "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
6473 "\xf8\x91\x3c\xac\x44\x22\x92\xef",
David Howells90831632006-12-16 12:13:14 +11006474 .ilen = 48,
6475 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
6476 .rlen = 48,
6477 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006478 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
David Howells90831632006-12-16 12:13:14 +11006479 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006480 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
6481 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
6482 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
6483 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
6484 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
6485 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
6486 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
David Howells90831632006-12-16 12:13:14 +11006487 .ilen = 48,
6488 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
6489 .rlen = 48,
6490 }, { /* split-page version */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006491 .key = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
David Howells90831632006-12-16 12:13:14 +11006492 .klen = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006493 .iv = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
6494 .input = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
6495 "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
6496 "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
6497 "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
6498 "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
6499 "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
David Howells90831632006-12-16 12:13:14 +11006500 .ilen = 48,
6501 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
6502 .rlen = 48,
6503 .np = 2,
6504 .tap = { 20, 28 },
6505 }
6506};
6507
Linus Torvalds1da177e2005-04-16 15:20:36 -07006508/*
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006509 * CAMELLIA test vectors.
6510 */
6511#define CAMELLIA_ENC_TEST_VECTORS 3
6512#define CAMELLIA_DEC_TEST_VECTORS 3
6513#define CAMELLIA_CBC_ENC_TEST_VECTORS 2
6514#define CAMELLIA_CBC_DEC_TEST_VECTORS 2
6515
6516static struct cipher_testvec camellia_enc_tv_template[] = {
6517 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006518 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6519 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006520 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006521 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6522 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006523 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006524 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
6525 "\x08\x57\x06\x56\x48\xea\xbe\x43",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006526 .rlen = 16,
6527 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006528 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6529 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
6530 "\x00\x11\x22\x33\x44\x55\x66\x77",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006531 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006532 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6533 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006534 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006535 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
6536 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006537 .rlen = 16,
6538 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006539 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6540 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
6541 "\x00\x11\x22\x33\x44\x55\x66\x77"
6542 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006543 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006544 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6545 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006546 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006547 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
6548 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006549 .rlen = 16,
6550 },
6551};
6552
6553static struct cipher_testvec camellia_dec_tv_template[] = {
6554 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006555 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6556 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006557 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006558 .input = "\x67\x67\x31\x38\x54\x96\x69\x73"
6559 "\x08\x57\x06\x56\x48\xea\xbe\x43",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006560 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006561 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6562 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006563 .rlen = 16,
6564 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006565 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6566 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
6567 "\x00\x11\x22\x33\x44\x55\x66\x77",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006568 .klen = 24,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006569 .input = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
6570 "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006571 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006572 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6573 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006574 .rlen = 16,
6575 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006576 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6577 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
6578 "\x00\x11\x22\x33\x44\x55\x66\x77"
6579 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006580 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006581 .input = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
6582 "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006583 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006584 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6585 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006586 .rlen = 16,
6587 },
6588};
6589
6590static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
6591 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006592 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
6593 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006594 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006595 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
6596 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
6597 .input = "Single block msg",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006598 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006599 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
6600 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006601 .rlen = 16,
6602 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006603 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
6604 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006605 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006606 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
6607 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
6608 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
6609 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6610 "\x10\x11\x12\x13\x14\x15\x16\x17"
6611 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006612 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006613 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
6614 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
6615 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
6616 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006617 .rlen = 32,
6618 },
6619};
6620
6621static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
6622 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006623 .key = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
6624 "\x51\x2e\x03\xd5\x34\x12\x00\x06",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006625 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006626 .iv = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
6627 "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
6628 .input = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
6629 "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006630 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006631 .result = "Single block msg",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006632 .rlen = 16,
6633 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006634 .key = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
6635 "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006636 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006637 .iv = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
6638 "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
6639 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
6640 "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
6641 "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
6642 "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006643 .ilen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006644 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6645 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6646 "\x10\x11\x12\x13\x14\x15\x16\x17"
6647 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Noriaki TAKAMIYA02ab5a72007-01-24 21:48:19 +11006648 .rlen = 32,
6649 },
6650};
6651
6652/*
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006653 * SEED test vectors
6654 */
6655#define SEED_ENC_TEST_VECTORS 4
6656#define SEED_DEC_TEST_VECTORS 4
6657
6658static struct cipher_testvec seed_enc_tv_template[] = {
6659 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006660 .key = zeroed_string,
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006661 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006662 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
6663 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006664 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006665 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
6666 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006667 .rlen = 16,
6668 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006669 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6670 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006671 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006672 .input = zeroed_string,
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006673 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006674 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
6675 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006676 .rlen = 16,
6677 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006678 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
6679 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006680 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006681 .input = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
6682 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006683 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006684 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
6685 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006686 .rlen = 16,
6687 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006688 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
6689 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006690 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006691 .input = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
6692 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006693 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006694 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
6695 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006696 .rlen = 16,
6697 }
6698};
6699
6700static struct cipher_testvec seed_dec_tv_template[] = {
6701 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006702 .key = zeroed_string,
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006703 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006704 .input = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
6705 "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006706 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006707 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6708 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006709 .rlen = 16,
6710 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006711 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6712 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006713 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006714 .input = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
6715 "\x84\x48\x35\x97\xe4\x37\x0f\x43",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006716 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006717 .result = zeroed_string,
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006718 .rlen = 16,
6719 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006720 .key = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
6721 "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006722 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006723 .input = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
6724 "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006725 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006726 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
6727 "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006728 .rlen = 16,
6729 }, {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006730 .key = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
6731 "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006732 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006733 .input = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
6734 "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006735 .ilen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006736 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
6737 "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08006738 .rlen = 16,
6739 }
6740};
6741
Tan Swee Heng8bff664c2007-12-07 16:41:29 +08006742#define SALSA20_STREAM_ENC_TEST_VECTORS 5
Tan Swee Heng2407d602007-11-23 19:45:00 +08006743static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
6744 /*
6745 * Testvectors from verified.test-vectors submitted to ECRYPT.
6746 * They are truncated to size 39, 64, 111, 129 to test a variety
6747 * of input length.
6748 */
6749 { /* Set 3, vector 0 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006750 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6751 "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
Tan Swee Heng2407d602007-11-23 19:45:00 +08006752 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006753 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
6754 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
6755 "\x00\x00\x00\x00\x00\x00\x00\x00"
6756 "\x00\x00\x00\x00\x00\x00\x00\x00"
6757 "\x00\x00\x00\x00\x00\x00\x00\x00"
6758 "\x00\x00\x00\x00\x00\x00\x00",
Tan Swee Heng2407d602007-11-23 19:45:00 +08006759 .ilen = 39,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006760 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
6761 "\x68\x02\x41\x0C\x68\x86\x88\x89"
6762 "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
6763 "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
6764 "\x58\x3F\x52\x79\x70\xEB\xC1",
Tan Swee Heng2407d602007-11-23 19:45:00 +08006765 .rlen = 39,
6766 }, { /* Set 5, vector 0 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006767 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
6768 "\x00\x00\x00\x00\x00\x00\x00\x00",
Tan Swee Heng2407d602007-11-23 19:45:00 +08006769 .klen = 16,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006770 .iv = "\x80\x00\x00\x00\x00\x00\x00\x00",
6771 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
6772 "\x00\x00\x00\x00\x00\x00\x00\x00"
6773 "\x00\x00\x00\x00\x00\x00\x00\x00"
6774 "\x00\x00\x00\x00\x00\x00\x00\x00"
6775 "\x00\x00\x00\x00\x00\x00\x00\x00"
6776 "\x00\x00\x00\x00\x00\x00\x00\x00"
6777 "\x00\x00\x00\x00\x00\x00\x00\x00"
6778 "\x00\x00\x00\x00\x00\x00\x00\x00",
Tan Swee Heng2407d602007-11-23 19:45:00 +08006779 .ilen = 64,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006780 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
6781 "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
6782 "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
6783 "\x46\x26\xBF\x44\x3F\x21\x97\x76"
6784 "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
6785 "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
6786 "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
6787 "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
Tan Swee Heng2407d602007-11-23 19:45:00 +08006788 .rlen = 64,
6789 }, { /* Set 3, vector 27 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006790 .key = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
6791 "\x23\x24\x25\x26\x27\x28\x29\x2A"
6792 "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
6793 "\x33\x34\x35\x36\x37\x38\x39\x3A",
Tan Swee Heng2407d602007-11-23 19:45:00 +08006794 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006795 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
6796 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
6797 "\x00\x00\x00\x00\x00\x00\x00\x00"
6798 "\x00\x00\x00\x00\x00\x00\x00\x00"
6799 "\x00\x00\x00\x00\x00\x00\x00\x00"
6800 "\x00\x00\x00\x00\x00\x00\x00\x00"
6801 "\x00\x00\x00\x00\x00\x00\x00\x00"
6802 "\x00\x00\x00\x00\x00\x00\x00\x00"
6803 "\x00\x00\x00\x00\x00\x00\x00\x00"
6804 "\x00\x00\x00\x00\x00\x00\x00\x00"
6805 "\x00\x00\x00\x00\x00\x00\x00\x00"
6806 "\x00\x00\x00\x00\x00\x00\x00\x00"
6807 "\x00\x00\x00\x00\x00\x00\x00\x00"
6808 "\x00\x00\x00\x00\x00\x00\x00\x00"
6809 "\x00\x00\x00\x00\x00\x00\x00",
Tan Swee Heng2407d602007-11-23 19:45:00 +08006810 .ilen = 111,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006811 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
6812 "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
6813 "\x87\xD9\x47\xF8\x28\x91\x35\x98"
6814 "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
6815 "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
6816 "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
6817 "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
6818 "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
6819 "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
6820 "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
6821 "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
6822 "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
6823 "\x95\x46\x45\x54\xE9\x75\x03\x08"
6824 "\x44\xAF\xE5\x8A\x81\x12\x09",
Tan Swee Heng2407d602007-11-23 19:45:00 +08006825 .rlen = 111,
Tan Swee Heng2407d602007-11-23 19:45:00 +08006826 }, { /* Set 5, vector 27 */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006827 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
6828 "\x00\x00\x00\x00\x00\x00\x00\x00"
6829 "\x00\x00\x00\x00\x00\x00\x00\x00"
6830 "\x00\x00\x00\x00\x00\x00\x00\x00",
Tan Swee Heng2407d602007-11-23 19:45:00 +08006831 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006832 .iv = "\x00\x00\x00\x10\x00\x00\x00\x00",
6833 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
6834 "\x00\x00\x00\x00\x00\x00\x00\x00"
6835 "\x00\x00\x00\x00\x00\x00\x00\x00"
6836 "\x00\x00\x00\x00\x00\x00\x00\x00"
6837 "\x00\x00\x00\x00\x00\x00\x00\x00"
6838 "\x00\x00\x00\x00\x00\x00\x00\x00"
6839 "\x00\x00\x00\x00\x00\x00\x00\x00"
6840 "\x00\x00\x00\x00\x00\x00\x00\x00"
6841 "\x00\x00\x00\x00\x00\x00\x00\x00"
6842 "\x00\x00\x00\x00\x00\x00\x00\x00"
6843 "\x00\x00\x00\x00\x00\x00\x00\x00"
6844 "\x00\x00\x00\x00\x00\x00\x00\x00"
6845 "\x00\x00\x00\x00\x00\x00\x00\x00"
6846 "\x00\x00\x00\x00\x00\x00\x00\x00"
6847 "\x00\x00\x00\x00\x00\x00\x00\x00"
6848 "\x00\x00\x00\x00\x00\x00\x00\x00"
6849 "\x00",
Tan Swee Heng2407d602007-11-23 19:45:00 +08006850 .ilen = 129,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006851 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
6852 "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
6853 "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
6854 "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
6855 "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
6856 "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
6857 "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
6858 "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
6859 "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
6860 "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
6861 "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
6862 "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
6863 "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
6864 "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
6865 "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
6866 "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
6867 "\x5A",
Tan Swee Heng2407d602007-11-23 19:45:00 +08006868 .rlen = 129,
Tan Swee Heng8bff664c2007-12-07 16:41:29 +08006869 }, { /* large test vector generated using Crypto++ */
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006870 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
6871 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6872 "\x10\x11\x12\x13\x14\x15\x16\x17"
6873 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
Tan Swee Heng8bff664c2007-12-07 16:41:29 +08006874 .klen = 32,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08006875 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
6876 "\x00\x00\x00\x00\x00\x00\x00\x00",
6877 .input =
6878 "\x00\x01\x02\x03\x04\x05\x06\x07"
6879 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6880 "\x10\x11\x12\x13\x14\x15\x16\x17"
6881 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6882 "\x20\x21\x22\x23\x24\x25\x26\x27"
6883 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6884 "\x30\x31\x32\x33\x34\x35\x36\x37"
6885 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6886 "\x40\x41\x42\x43\x44\x45\x46\x47"
6887 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6888 "\x50\x51\x52\x53\x54\x55\x56\x57"
6889 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6890 "\x60\x61\x62\x63\x64\x65\x66\x67"
6891 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6892 "\x70\x71\x72\x73\x74\x75\x76\x77"
6893 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6894 "\x80\x81\x82\x83\x84\x85\x86\x87"
6895 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6896 "\x90\x91\x92\x93\x94\x95\x96\x97"
6897 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6898 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6899 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6900 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6901 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6902 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6903 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6904 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6905 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6906 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6907 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6908 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6909 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6910 "\x00\x03\x06\x09\x0c\x0f\x12\x15"
6911 "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
6912 "\x30\x33\x36\x39\x3c\x3f\x42\x45"
6913 "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
6914 "\x60\x63\x66\x69\x6c\x6f\x72\x75"
6915 "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
6916 "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
6917 "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
6918 "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
6919 "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
6920 "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
6921 "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
6922 "\x20\x23\x26\x29\x2c\x2f\x32\x35"
6923 "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
6924 "\x50\x53\x56\x59\x5c\x5f\x62\x65"
6925 "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
6926 "\x80\x83\x86\x89\x8c\x8f\x92\x95"
6927 "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
6928 "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
6929 "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
6930 "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
6931 "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
6932 "\x10\x13\x16\x19\x1c\x1f\x22\x25"
6933 "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
6934 "\x40\x43\x46\x49\x4c\x4f\x52\x55"
6935 "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
6936 "\x70\x73\x76\x79\x7c\x7f\x82\x85"
6937 "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
6938 "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
6939 "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
6940 "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
6941 "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
6942 "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
6943 "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
6944 "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
6945 "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
6946 "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
6947 "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
6948 "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
6949 "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
6950 "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
6951 "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
6952 "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
6953 "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
6954 "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
6955 "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
6956 "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
6957 "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
6958 "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
6959 "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
6960 "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
6961 "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
6962 "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
6963 "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
6964 "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
6965 "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
6966 "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
6967 "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
6968 "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
6969 "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
6970 "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
6971 "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
6972 "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
6973 "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
6974 "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
6975 "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
6976 "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
6977 "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
6978 "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
6979 "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
6980 "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
6981 "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
6982 "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
6983 "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
6984 "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
6985 "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
6986 "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
6987 "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
6988 "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
6989 "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
6990 "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
6991 "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
6992 "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
6993 "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
6994 "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
6995 "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
6996 "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
6997 "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
6998 "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
6999 "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
7000 "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
7001 "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
7002 "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
7003 "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
7004 "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
7005 "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
7006 "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
7007 "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
7008 "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
7009 "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
7010 "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
7011 "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
7012 "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
7013 "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
7014 "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
7015 "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
7016 "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
7017 "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
7018 "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
7019 "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
7020 "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
7021 "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
7022 "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
7023 "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
7024 "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
7025 "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
7026 "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
7027 "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
7028 "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
7029 "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
7030 "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
7031 "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
7032 "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
7033 "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
7034 "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
7035 "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
7036 "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
7037 "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
7038 "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
7039 "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
7040 "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
7041 "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
7042 "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
7043 "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
7044 "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
7045 "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
7046 "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
7047 "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
7048 "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
7049 "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
7050 "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
7051 "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
7052 "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
7053 "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
7054 "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
7055 "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
7056 "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
7057 "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
7058 "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
7059 "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
7060 "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
7061 "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
7062 "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
7063 "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
7064 "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
7065 "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
7066 "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
7067 "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
7068 "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
7069 "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
7070 "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
7071 "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
7072 "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
7073 "\x38\x45\x52\x5f\x6c\x79\x86\x93"
7074 "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
7075 "\x08\x15\x22\x2f\x3c\x49\x56\x63"
7076 "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
7077 "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
7078 "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
7079 "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
7080 "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
7081 "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
7082 "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
7083 "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
7084 "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
7085 "\x18\x25\x32\x3f\x4c\x59\x66\x73"
7086 "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
7087 "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
7088 "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
7089 "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
7090 "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
7091 "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
7092 "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
7093 "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
7094 "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
7095 "\x28\x35\x42\x4f\x5c\x69\x76\x83"
7096 "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
7097 "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
7098 "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
7099 "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
7100 "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
7101 "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
7102 "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
7103 "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
7104 "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
7105 "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
7106 "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
7107 "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
7108 "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
7109 "\x48\x57\x66\x75\x84\x93\xa2\xb1"
7110 "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
7111 "\x38\x47\x56\x65\x74\x83\x92\xa1"
7112 "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
7113 "\x28\x37\x46\x55\x64\x73\x82\x91"
7114 "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
7115 "\x18\x27\x36\x45\x54\x63\x72\x81"
7116 "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
7117 "\x08\x17\x26\x35\x44\x53\x62\x71"
7118 "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
7119 "\xf8\x07\x16\x25\x34\x43\x52\x61"
7120 "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
7121 "\xe8\xf7\x06\x15\x24\x33\x42\x51"
7122 "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
7123 "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
7124 "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
7125 "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
7126 "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
7127 "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
7128 "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
7129 "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
7130 "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
7131 "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
7132 "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
7133 "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
7134 "\x00\x11\x22\x33\x44\x55\x66\x77"
7135 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
7136 "\x10\x21\x32\x43\x54\x65\x76\x87"
7137 "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
7138 "\x20\x31\x42\x53\x64\x75\x86\x97"
7139 "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
7140 "\x30\x41\x52\x63\x74\x85\x96\xa7"
7141 "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
7142 "\x40\x51\x62\x73\x84\x95\xa6\xb7"
7143 "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
7144 "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
7145 "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
7146 "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
7147 "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
7148 "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
7149 "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
7150 "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
7151 "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
7152 "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
7153 "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
7154 "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
7155 "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
7156 "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
7157 "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
7158 "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
7159 "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
7160 "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
7161 "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
7162 "\xe0\xf1\x02\x13\x24\x35\x46\x57"
7163 "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
7164 "\xf0\x01\x12\x23\x34\x45\x56\x67"
7165 "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
7166 "\x00\x13\x26\x39\x4c\x5f\x72\x85"
7167 "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
7168 "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
7169 "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
7170 "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
7171 "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
7172 "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
7173 "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
7174 "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
7175 "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
7176 "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
7177 "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
7178 "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
7179 "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
7180 "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
7181 "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
7182 "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
7183 "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
7184 "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
7185 "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
7186 "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
7187 "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
7188 "\x10\x23\x36\x49\x5c\x6f\x82\x95"
7189 "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
7190 "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
7191 "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
7192 "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
7193 "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
7194 "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
7195 "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
7196 "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
7197 "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
7198 "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
7199 "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
7200 "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
7201 "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
7202 "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
7203 "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
7204 "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
7205 "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
7206 "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
7207 "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
7208 "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
7209 "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
7210 "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
7211 "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
7212 "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
7213 "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
7214 "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
7215 "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
7216 "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
7217 "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
7218 "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
7219 "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
7220 "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
7221 "\x18\x2d\x42\x57\x6c\x81\x96\xab"
7222 "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
7223 "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
7224 "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
7225 "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
7226 "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
7227 "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
7228 "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
7229 "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
7230 "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
7231 "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
7232 "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
7233 "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
7234 "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
7235 "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
7236 "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
7237 "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
7238 "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
7239 "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
7240 "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
7241 "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
7242 "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
7243 "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
7244 "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
7245 "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
7246 "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
7247 "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
7248 "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
7249 "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
7250 "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
7251 "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
7252 "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
7253 "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
7254 "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
7255 "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
7256 "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
7257 "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
7258 "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
7259 "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
7260 "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
7261 "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
7262 "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
7263 "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
7264 "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
7265 "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
7266 "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
7267 "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
7268 "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
7269 "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
7270 "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
7271 "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
7272 "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
7273 "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
7274 "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
7275 "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
7276 "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
7277 "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
7278 "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
7279 "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
7280 "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
7281 "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
7282 "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
7283 "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
7284 "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
7285 "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
7286 "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
7287 "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
7288 "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
7289 "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
7290 "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
7291 "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
7292 "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
7293 "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
7294 "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
7295 "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
7296 "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
7297 "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
7298 "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
7299 "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
7300 "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
7301 "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
7302 "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
7303 "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
7304 "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
7305 "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
7306 "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
7307 "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
7308 "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
7309 "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
7310 "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
7311 "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
7312 "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
7313 "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
7314 "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
7315 "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
7316 "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
7317 "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
7318 "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
7319 "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
7320 "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
7321 "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
7322 "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
7323 "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
7324 "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
7325 "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
7326 "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
7327 "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
7328 "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
7329 "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
7330 "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
7331 "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
7332 "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
7333 "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
7334 "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
7335 "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
7336 "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
7337 "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
7338 "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
7339 "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
7340 "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
7341 "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
7342 "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
7343 "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
7344 "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
7345 "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
7346 "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
7347 "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
7348 "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
7349 "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
7350 "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
7351 "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
7352 "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
7353 "\x78\x95\xb2\xcf\xec\x09\x26\x43"
7354 "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
7355 "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
7356 "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
7357 "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
7358 "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
7359 "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
7360 "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
7361 "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
7362 "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
7363 "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
7364 "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
7365 "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
7366 "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
7367 "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
7368 "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
7369 "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
7370 "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
7371 "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
7372 "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
7373 "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
7374 "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
7375 "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
7376 "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
7377 "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
7378 "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
7379 "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
7380 "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
7381 "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
7382 "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
7383 "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
7384 "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
7385 "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
7386 "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
7387 "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
7388 "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
7389 "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
7390 "\x00\x21\x42\x63",
Tan Swee Heng8bff664c2007-12-07 16:41:29 +08007391 .ilen = 4100,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08007392 .result =
7393 "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
7394 "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
7395 "\x29\x01\xce\x98\x55\x53\xf9\x0c"
7396 "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
7397 "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
7398 "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
7399 "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
7400 "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
7401 "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
7402 "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
7403 "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
7404 "\xbb\xde\x56\x86\xab\x65\x21\x30"
7405 "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
7406 "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
7407 "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
7408 "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
7409 "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
7410 "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
7411 "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
7412 "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
7413 "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
7414 "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
7415 "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
7416 "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
7417 "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
7418 "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
7419 "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
7420 "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
7421 "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
7422 "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
7423 "\x45\xff\x3f\xce\x55\xf6\x95\x10"
7424 "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
7425 "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
7426 "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
7427 "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
7428 "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
7429 "\x62\x08\x18\x7a\x25\x49\x28\xac"
7430 "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
7431 "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
7432 "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
7433 "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
7434 "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
7435 "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
7436 "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
7437 "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
7438 "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
7439 "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
7440 "\x33\xee\x14\x19\x22\x52\x89\xa7"
7441 "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
7442 "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
7443 "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
7444 "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
7445 "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
7446 "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
7447 "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
7448 "\x04\x07\x08\x52\xe6\xc0\xda\x93"
7449 "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
7450 "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
7451 "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
7452 "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
7453 "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
7454 "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
7455 "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
7456 "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
7457 "\x5a\x90\xae\x75\x0a\x74\x18\x89"
7458 "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
7459 "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
7460 "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
7461 "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
7462 "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
7463 "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
7464 "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
7465 "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
7466 "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
7467 "\x49\x97\x33\xab\x36\x14\x0a\x70"
7468 "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
7469 "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
7470 "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
7471 "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
7472 "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
7473 "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
7474 "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
7475 "\x47\x13\x28\x73\x3c\xbb\x00\x90"
7476 "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
7477 "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
7478 "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
7479 "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
7480 "\xad\x04\x07\xae\x22\x90\x4a\x93"
7481 "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
7482 "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
7483 "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
7484 "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
7485 "\x53\xf9\x80\x10\xde\x80\xa2\x41"
7486 "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
7487 "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
7488 "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
7489 "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
7490 "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
7491 "\xde\xff\x07\x44\xdd\x56\x1b\xad"
7492 "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
7493 "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
7494 "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
7495 "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
7496 "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
7497 "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
7498 "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
7499 "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
7500 "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
7501 "\x23\xf8\x66\x18\x14\x28\x34\x0f"
7502 "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
7503 "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
7504 "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
7505 "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
7506 "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
7507 "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
7508 "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
7509 "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
7510 "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
7511 "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
7512 "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
7513 "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
7514 "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
7515 "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
7516 "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
7517 "\xca\x8e\x61\x87\xde\xad\x80\xd2"
7518 "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
7519 "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
7520 "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
7521 "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
7522 "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
7523 "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
7524 "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
7525 "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
7526 "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
7527 "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
7528 "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
7529 "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
7530 "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
7531 "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
7532 "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
7533 "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
7534 "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
7535 "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
7536 "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
7537 "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
7538 "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
7539 "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
7540 "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
7541 "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
7542 "\x54\xda\x24\x6a\xc4\x41\x65\x46"
7543 "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
7544 "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
7545 "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
7546 "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
7547 "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
7548 "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
7549 "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
7550 "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
7551 "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
7552 "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
7553 "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
7554 "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
7555 "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
7556 "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
7557 "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
7558 "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
7559 "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
7560 "\xef\xcc\xa7\xec\xab\x43\x09\x18"
7561 "\xd3\xab\x68\xd1\x07\x99\x44\x47"
7562 "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
7563 "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
7564 "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
7565 "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
7566 "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
7567 "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
7568 "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
7569 "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
7570 "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
7571 "\x71\x6e\x9f\x58\x15\x67\x72\x87"
7572 "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
7573 "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
7574 "\xba\x41\x54\xac\xf0\xfc\x59\x12"
7575 "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
7576 "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
7577 "\x2e\x53\x49\x97\x94\x33\xae\x40"
7578 "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
7579 "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
7580 "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
7581 "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
7582 "\xce\x87\xad\xcc\x72\x05\x00\x29"
7583 "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
7584 "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
7585 "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
7586 "\xac\xc0\x79\x50\x69\xca\x59\x32"
7587 "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
7588 "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
7589 "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
7590 "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
7591 "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
7592 "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
7593 "\x05\x68\x6b\xab\xe3\x41\x49\xed"
7594 "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
7595 "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
7596 "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
7597 "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
7598 "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
7599 "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
7600 "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
7601 "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
7602 "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
7603 "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
7604 "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
7605 "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
7606 "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
7607 "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
7608 "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
7609 "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
7610 "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
7611 "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
7612 "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
7613 "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
7614 "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
7615 "\x85\x75\xe6\x43\xf6\x87\x08\x68"
7616 "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
7617 "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
7618 "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
7619 "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
7620 "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
7621 "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
7622 "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
7623 "\xaf\x55\xeb\x22\xac\x93\x68\x32"
7624 "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
7625 "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
7626 "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
7627 "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
7628 "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
7629 "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
7630 "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
7631 "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
7632 "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
7633 "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
7634 "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
7635 "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
7636 "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
7637 "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
7638 "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
7639 "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
7640 "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
7641 "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
7642 "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
7643 "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
7644 "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
7645 "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
7646 "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
7647 "\x38\x55\xab\x33\x26\xef\x9f\x43"
7648 "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
7649 "\x58\x09\x09\x1b\xc3\x65\x46\x46"
7650 "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
7651 "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
7652 "\x63\x86\xf2\x03\x67\x45\xd2\x72"
7653 "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
7654 "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
7655 "\x2b\x82\x39\xbd\x69\x54\xed\x62"
7656 "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
7657 "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
7658 "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
7659 "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
7660 "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
7661 "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
7662 "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
7663 "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
7664 "\x55\xad\xa4\xd1\x22\x54\x70\x94"
7665 "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
7666 "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
7667 "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
7668 "\x62\x36\x43\xb2\x82\x15\x75\x50"
7669 "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
7670 "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
7671 "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
7672 "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
7673 "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
7674 "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
7675 "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
7676 "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
7677 "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
7678 "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
7679 "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
7680 "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
7681 "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
7682 "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
7683 "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
7684 "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
7685 "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
7686 "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
7687 "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
7688 "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
7689 "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
7690 "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
7691 "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
7692 "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
7693 "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
7694 "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
7695 "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
7696 "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
7697 "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
7698 "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
7699 "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
7700 "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
7701 "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
7702 "\x42\x19\x23\x7d\xc8\x73\xee\x25"
7703 "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
7704 "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
7705 "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
7706 "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
7707 "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
7708 "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
7709 "\xdb\x87\xee\xef\x55\x89\x2a\x59"
7710 "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
7711 "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
7712 "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
7713 "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
7714 "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
7715 "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
7716 "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
7717 "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
7718 "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
7719 "\xae\xab\x86\x09\x89\xc9\xc2\x40"
7720 "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
7721 "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
7722 "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
7723 "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
7724 "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
7725 "\x95\xd9\x34\x34\x86\xc6\x41\x94"
7726 "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
7727 "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
7728 "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
7729 "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
7730 "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
7731 "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
7732 "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
7733 "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
7734 "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
7735 "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
7736 "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
7737 "\xa7\x33\x34\x86\xca\xe4\x96\x23"
7738 "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
7739 "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
7740 "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
7741 "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
7742 "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
7743 "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
7744 "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
7745 "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
7746 "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
7747 "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
7748 "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
7749 "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
7750 "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
7751 "\x68\xc8\x7f\x51\x22\x42\xef\x49"
7752 "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
7753 "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
7754 "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
7755 "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
7756 "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
7757 "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
7758 "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
7759 "\x73\x2e\x71\x79\x16\x06\x63\x28"
7760 "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
7761 "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
7762 "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
7763 "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
7764 "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
7765 "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
7766 "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
7767 "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
7768 "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
7769 "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
7770 "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
7771 "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
7772 "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
7773 "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
7774 "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
7775 "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
7776 "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
7777 "\x19\x07\xaf\x90\x62\x5c\x68\x98"
7778 "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
7779 "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
7780 "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
7781 "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
7782 "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
7783 "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
7784 "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
7785 "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
7786 "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
7787 "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
7788 "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
7789 "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
7790 "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
7791 "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
7792 "\x21\x33\x44\xfe\x7f\x35\x32\x93"
7793 "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
7794 "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
7795 "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
7796 "\x64\xf0\x48\xe5\x57\x99\xee\x75"
7797 "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
7798 "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
7799 "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
7800 "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
7801 "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
7802 "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
7803 "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
7804 "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
7805 "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
7806 "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
7807 "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
7808 "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
7809 "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
7810 "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
7811 "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
7812 "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
7813 "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
7814 "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
7815 "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
7816 "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
7817 "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
7818 "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
7819 "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
7820 "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
7821 "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
7822 "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
7823 "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
7824 "\x56\xf5\x4e\x01\x35\x27\x45\x77"
7825 "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
7826 "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
7827 "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
7828 "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
7829 "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
7830 "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
7831 "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
7832 "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
7833 "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
7834 "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
7835 "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
7836 "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
7837 "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
7838 "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
7839 "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
7840 "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
7841 "\x87\x8f\x03\x21\x28\x95\x0c\x89"
7842 "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
7843 "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
7844 "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
7845 "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
7846 "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
7847 "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
7848 "\x85\x73\x78\x45\x20\x7f\xae\x13"
7849 "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
7850 "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
7851 "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
7852 "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
7853 "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
7854 "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
7855 "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
7856 "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
7857 "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
7858 "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
7859 "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
7860 "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
7861 "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
7862 "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
7863 "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
7864 "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
7865 "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
7866 "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
7867 "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
7868 "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
7869 "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
7870 "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
7871 "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
7872 "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
7873 "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
7874 "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
7875 "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
7876 "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
7877 "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
7878 "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
7879 "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
7880 "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
7881 "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
7882 "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
7883 "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
7884 "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
7885 "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
7886 "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
7887 "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
7888 "\x6e\x12\x17\x72\x63\x57\xc7\xba"
7889 "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
7890 "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
7891 "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
7892 "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
7893 "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
7894 "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
7895 "\x0c\x24\x43\x31\x40\x57\xf1\x72"
7896 "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
7897 "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
7898 "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
7899 "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
7900 "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
7901 "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
7902 "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
7903 "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
7904 "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
7905 "\xaf\xdf\x11\x95",
Tan Swee Heng8bff664c2007-12-07 16:41:29 +08007906 .rlen = 4100,
7907 },
Tan Swee Heng2407d602007-11-23 19:45:00 +08007908};
7909
Hye-Shik Change2ee95b2007-08-21 20:01:03 +08007910/*
Kevin Coffman76cb9522008-03-24 21:26:16 +08007911 * CTS (Cipher Text Stealing) mode tests
7912 */
7913#define CTS_MODE_ENC_TEST_VECTORS 6
7914#define CTS_MODE_DEC_TEST_VECTORS 6
7915static struct cipher_testvec cts_mode_enc_tv_template[] = {
7916 { /* from rfc3962 */
7917 .klen = 16,
7918 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
7919 "\x74\x65\x72\x69\x79\x61\x6b\x69",
7920 .ilen = 17,
7921 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
7922 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
7923 "\x20",
7924 .rlen = 17,
7925 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
7926 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
7927 "\x97",
7928 }, {
7929 .klen = 16,
7930 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
7931 "\x74\x65\x72\x69\x79\x61\x6b\x69",
7932 .ilen = 31,
7933 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
7934 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
7935 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
7936 "\x20\x47\x61\x75\x27\x73\x20",
7937 .rlen = 31,
7938 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
7939 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
7940 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
7941 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
7942 }, {
7943 .klen = 16,
7944 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
7945 "\x74\x65\x72\x69\x79\x61\x6b\x69",
7946 .ilen = 32,
7947 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
7948 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
7949 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
7950 "\x20\x47\x61\x75\x27\x73\x20\x43",
7951 .rlen = 32,
7952 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
7953 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
7954 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
7955 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
7956 }, {
7957 .klen = 16,
7958 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
7959 "\x74\x65\x72\x69\x79\x61\x6b\x69",
7960 .ilen = 47,
7961 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
7962 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
7963 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
7964 "\x20\x47\x61\x75\x27\x73\x20\x43"
7965 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
7966 "\x70\x6c\x65\x61\x73\x65\x2c",
7967 .rlen = 47,
7968 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
7969 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
7970 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
7971 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
7972 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
7973 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
7974 }, {
7975 .klen = 16,
7976 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
7977 "\x74\x65\x72\x69\x79\x61\x6b\x69",
7978 .ilen = 48,
7979 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
7980 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
7981 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
7982 "\x20\x47\x61\x75\x27\x73\x20\x43"
7983 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
7984 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
7985 .rlen = 48,
7986 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
7987 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
7988 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
7989 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
7990 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
7991 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
7992 }, {
7993 .klen = 16,
7994 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
7995 "\x74\x65\x72\x69\x79\x61\x6b\x69",
7996 .ilen = 64,
7997 .input = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
7998 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
7999 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
8000 "\x20\x47\x61\x75\x27\x73\x20\x43"
8001 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
8002 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
8003 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
8004 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
8005 .rlen = 64,
8006 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
8007 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
8008 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
8009 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
8010 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
8011 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
8012 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
8013 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
8014 }
8015};
8016
8017static struct cipher_testvec cts_mode_dec_tv_template[] = {
8018 { /* from rfc3962 */
8019 .klen = 16,
8020 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
8021 "\x74\x65\x72\x69\x79\x61\x6b\x69",
8022 .rlen = 17,
8023 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
8024 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
8025 "\x20",
8026 .ilen = 17,
8027 .input = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
8028 "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
8029 "\x97",
8030 }, {
8031 .klen = 16,
8032 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
8033 "\x74\x65\x72\x69\x79\x61\x6b\x69",
8034 .rlen = 31,
8035 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
8036 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
8037 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
8038 "\x20\x47\x61\x75\x27\x73\x20",
8039 .ilen = 31,
8040 .input = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
8041 "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
8042 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
8043 "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
8044 }, {
8045 .klen = 16,
8046 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
8047 "\x74\x65\x72\x69\x79\x61\x6b\x69",
8048 .rlen = 32,
8049 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
8050 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
8051 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
8052 "\x20\x47\x61\x75\x27\x73\x20\x43",
8053 .ilen = 32,
8054 .input = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
8055 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
8056 "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
8057 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
8058 }, {
8059 .klen = 16,
8060 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
8061 "\x74\x65\x72\x69\x79\x61\x6b\x69",
8062 .rlen = 47,
8063 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
8064 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
8065 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
8066 "\x20\x47\x61\x75\x27\x73\x20\x43"
8067 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
8068 "\x70\x6c\x65\x61\x73\x65\x2c",
8069 .ilen = 47,
8070 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
8071 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
8072 "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
8073 "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
8074 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
8075 "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
8076 }, {
8077 .klen = 16,
8078 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
8079 "\x74\x65\x72\x69\x79\x61\x6b\x69",
8080 .rlen = 48,
8081 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
8082 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
8083 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
8084 "\x20\x47\x61\x75\x27\x73\x20\x43"
8085 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
8086 "\x70\x6c\x65\x61\x73\x65\x2c\x20",
8087 .ilen = 48,
8088 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
8089 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
8090 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
8091 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
8092 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
8093 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
8094 }, {
8095 .klen = 16,
8096 .key = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
8097 "\x74\x65\x72\x69\x79\x61\x6b\x69",
8098 .rlen = 64,
8099 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
8100 "\x6c\x69\x6b\x65\x20\x74\x68\x65"
8101 "\x20\x47\x65\x6e\x65\x72\x61\x6c"
8102 "\x20\x47\x61\x75\x27\x73\x20\x43"
8103 "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
8104 "\x70\x6c\x65\x61\x73\x65\x2c\x20"
8105 "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
8106 "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
8107 .ilen = 64,
8108 .input = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
8109 "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
8110 "\x39\x31\x25\x23\xa7\x86\x62\xd5"
8111 "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
8112 "\x48\x07\xef\xe8\x36\xee\x89\xa5"
8113 "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
8114 "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
8115 "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
8116 }
8117};
8118
8119/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07008120 * Compression stuff.
8121 */
8122#define COMP_BUF_SIZE 512
8123
8124struct comp_testvec {
8125 int inlen, outlen;
8126 char input[COMP_BUF_SIZE];
8127 char output[COMP_BUF_SIZE];
8128};
8129
8130/*
8131 * Deflate test vectors (null-terminated strings).
8132 * Params: winbits=11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
8133 */
8134#define DEFLATE_COMP_TEST_VECTORS 2
8135#define DEFLATE_DECOMP_TEST_VECTORS 2
8136
8137static struct comp_testvec deflate_comp_tv_template[] = {
8138 {
8139 .inlen = 70,
8140 .outlen = 38,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008141 .input = "Join us now and share the software "
8142 "Join us now and share the software ",
8143 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
8144 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
8145 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
8146 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
8147 "\x71\xbc\x08\x2b\x01\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008148 }, {
8149 .inlen = 191,
8150 .outlen = 122,
8151 .input = "This document describes a compression method based on the DEFLATE"
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008152 "compression algorithm. This document defines the application of "
8153 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
8154 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
8155 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
8156 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
8157 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
8158 "\x68\x12\x51\xae\x76\x67\xd6\x27"
8159 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
8160 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
8161 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
8162 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
8163 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
8164 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
8165 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
8166 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
8167 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
8168 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
8169 "\xfa\x02",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008170 },
8171};
8172
8173static struct comp_testvec deflate_decomp_tv_template[] = {
8174 {
8175 .inlen = 122,
8176 .outlen = 191,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008177 .input = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
8178 "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
8179 "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
8180 "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
8181 "\x68\x12\x51\xae\x76\x67\xd6\x27"
8182 "\x19\x88\x1a\xde\x85\xab\x21\xf2"
8183 "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
8184 "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
8185 "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
8186 "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
8187 "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
8188 "\x52\x37\xed\x0e\x52\x6b\x59\x02"
8189 "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
8190 "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
8191 "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
8192 "\xfa\x02",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008193 .output = "This document describes a compression method based on the DEFLATE"
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008194 "compression algorithm. This document defines the application of "
8195 "the DEFLATE algorithm to the IP Payload Compression Protocol.",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008196 }, {
8197 .inlen = 38,
8198 .outlen = 70,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008199 .input = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
8200 "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
8201 "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
8202 "\x48\x55\x28\xce\x4f\x2b\x29\x07"
8203 "\x71\xbc\x08\x2b\x01\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008204 .output = "Join us now and share the software "
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008205 "Join us now and share the software ",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008206 },
8207};
8208
8209/*
Zoltan Sogor0b77abb2007-12-07 16:53:23 +08008210 * LZO test vectors (null-terminated strings).
8211 */
8212#define LZO_COMP_TEST_VECTORS 2
8213#define LZO_DECOMP_TEST_VECTORS 2
8214
8215static struct comp_testvec lzo_comp_tv_template[] = {
8216 {
8217 .inlen = 70,
8218 .outlen = 46,
8219 .input = "Join us now and share the software "
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008220 "Join us now and share the software ",
8221 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
8222 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
8223 "\x64\x20\x73\x68\x61\x72\x65\x20"
8224 "\x74\x68\x65\x20\x73\x6f\x66\x74"
8225 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
8226 "\x3d\x88\x00\x11\x00\x00",
Zoltan Sogor0b77abb2007-12-07 16:53:23 +08008227 }, {
8228 .inlen = 159,
8229 .outlen = 133,
8230 .input = "This document describes a compression method based on the LZO "
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008231 "compression algorithm. This document defines the application of "
8232 "the LZO algorithm used in UBIFS.",
8233 .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
8234 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
8235 "\x64\x65\x73\x63\x72\x69\x62\x65"
8236 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
8237 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
8238 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
8239 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
8240 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
8241 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
8242 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
8243 "\x68\x69\x73\x2a\x54\x01\x02\x66"
8244 "\x69\x6e\x65\x73\x94\x06\x05\x61"
8245 "\x70\x70\x6c\x69\x63\x61\x74\x76"
8246 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
8247 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
8248 "\x20\x69\x6e\x20\x55\x42\x49\x46"
8249 "\x53\x2e\x11\x00\x00",
Zoltan Sogor0b77abb2007-12-07 16:53:23 +08008250 },
8251};
8252
8253static struct comp_testvec lzo_decomp_tv_template[] = {
8254 {
8255 .inlen = 133,
8256 .outlen = 159,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008257 .input = "\x00\x2b\x54\x68\x69\x73\x20\x64"
8258 "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
8259 "\x64\x65\x73\x63\x72\x69\x62\x65"
8260 "\x73\x20\x61\x20\x63\x6f\x6d\x70"
8261 "\x72\x65\x73\x73\x69\x6f\x6e\x20"
8262 "\x6d\x65\x74\x68\x6f\x64\x20\x62"
8263 "\x61\x73\x65\x64\x20\x6f\x6e\x20"
8264 "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
8265 "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
8266 "\x69\x74\x68\x6d\x2e\x20\x20\x54"
8267 "\x68\x69\x73\x2a\x54\x01\x02\x66"
8268 "\x69\x6e\x65\x73\x94\x06\x05\x61"
8269 "\x70\x70\x6c\x69\x63\x61\x74\x76"
8270 "\x0a\x6f\x66\x88\x02\x60\x09\x27"
8271 "\xf0\x00\x0c\x20\x75\x73\x65\x64"
8272 "\x20\x69\x6e\x20\x55\x42\x49\x46"
8273 "\x53\x2e\x11\x00\x00",
Zoltan Sogor0b77abb2007-12-07 16:53:23 +08008274 .output = "This document describes a compression method based on the LZO "
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008275 "compression algorithm. This document defines the application of "
8276 "the LZO algorithm used in UBIFS.",
Zoltan Sogor0b77abb2007-12-07 16:53:23 +08008277 }, {
8278 .inlen = 46,
8279 .outlen = 70,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008280 .input = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
8281 "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
8282 "\x64\x20\x73\x68\x61\x72\x65\x20"
8283 "\x74\x68\x65\x20\x73\x6f\x66\x74"
8284 "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
8285 "\x3d\x88\x00\x11\x00\x00",
Zoltan Sogor0b77abb2007-12-07 16:53:23 +08008286 .output = "Join us now and share the software "
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008287 "Join us now and share the software ",
Zoltan Sogor0b77abb2007-12-07 16:53:23 +08008288 },
8289};
8290
8291/*
Linus Torvalds1da177e2005-04-16 15:20:36 -07008292 * Michael MIC test vectors from IEEE 802.11i
8293 */
8294#define MICHAEL_MIC_TEST_VECTORS 6
8295
Herbert Xuef2736f2005-06-22 13:26:03 -07008296static struct hash_testvec michael_mic_tv_template[] = {
Linus Torvalds1da177e2005-04-16 15:20:36 -07008297 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008298 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008299 .ksize = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008300 .plaintext = zeroed_string,
Linus Torvalds1da177e2005-04-16 15:20:36 -07008301 .psize = 0,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008302 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008303 },
8304 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008305 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008306 .ksize = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008307 .plaintext = "M",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008308 .psize = 1,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008309 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008310 },
8311 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008312 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008313 .ksize = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008314 .plaintext = "Mi",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008315 .psize = 2,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008316 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008317 },
8318 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008319 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008320 .ksize = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008321 .plaintext = "Mic",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008322 .psize = 3,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008323 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008324 },
8325 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008326 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008327 .ksize = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008328 .plaintext = "Mich",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008329 .psize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008330 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008331 },
8332 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008333 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008334 .ksize = 8,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008335 .plaintext = "Michael",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008336 .psize = 7,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008337 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
Linus Torvalds1da177e2005-04-16 15:20:36 -07008338 }
8339};
8340
Harald Welteebfd9bc2005-06-22 13:27:23 -07008341/*
Herbert Xuc907ee72006-08-21 22:04:03 +10008342 * CRC32C test vectors
8343 */
8344#define CRC32C_TEST_VECTORS 14
8345
8346static struct hash_testvec crc32c_tv_template[] = {
8347 {
8348 .psize = 0,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008349 .digest = "\x00\x00\x00\x00",
Herbert Xuc907ee72006-08-21 22:04:03 +10008350 },
8351 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008352 .key = "\x87\xa9\xcb\xed",
Herbert Xuc907ee72006-08-21 22:04:03 +10008353 .ksize = 4,
8354 .psize = 0,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008355 .digest = "\x78\x56\x34\x12",
Herbert Xuc907ee72006-08-21 22:04:03 +10008356 },
8357 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008358 .key = "\xff\xff\xff\xff",
Herbert Xuc907ee72006-08-21 22:04:03 +10008359 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008360 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
8361 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
8362 "\x11\x12\x13\x14\x15\x16\x17\x18"
8363 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
8364 "\x21\x22\x23\x24\x25\x26\x27\x28",
Herbert Xuc907ee72006-08-21 22:04:03 +10008365 .psize = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008366 .digest = "\x7f\x15\x2c\x0e",
Herbert Xuc907ee72006-08-21 22:04:03 +10008367 },
8368 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008369 .key = "\xff\xff\xff\xff",
Herbert Xuc907ee72006-08-21 22:04:03 +10008370 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008371 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
8372 "\x31\x32\x33\x34\x35\x36\x37\x38"
8373 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
8374 "\x41\x42\x43\x44\x45\x46\x47\x48"
8375 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
Herbert Xuc907ee72006-08-21 22:04:03 +10008376 .psize = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008377 .digest = "\xf6\xeb\x80\xe9",
Herbert Xuc907ee72006-08-21 22:04:03 +10008378 },
8379 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008380 .key = "\xff\xff\xff\xff",
Herbert Xuc907ee72006-08-21 22:04:03 +10008381 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008382 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
8383 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
8384 "\x61\x62\x63\x64\x65\x66\x67\x68"
8385 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
8386 "\x71\x72\x73\x74\x75\x76\x77\x78",
Herbert Xuc907ee72006-08-21 22:04:03 +10008387 .psize = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008388 .digest = "\xed\xbd\x74\xde",
Herbert Xuc907ee72006-08-21 22:04:03 +10008389 },
8390 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008391 .key = "\xff\xff\xff\xff",
Herbert Xuc907ee72006-08-21 22:04:03 +10008392 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008393 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
8394 "\x81\x82\x83\x84\x85\x86\x87\x88"
8395 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
8396 "\x91\x92\x93\x94\x95\x96\x97\x98"
8397 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
Herbert Xuc907ee72006-08-21 22:04:03 +10008398 .psize = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008399 .digest = "\x62\xc8\x79\xd5",
Herbert Xuc907ee72006-08-21 22:04:03 +10008400 },
8401 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008402 .key = "\xff\xff\xff\xff",
Herbert Xuc907ee72006-08-21 22:04:03 +10008403 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008404 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
8405 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
8406 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
8407 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
8408 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
Herbert Xuc907ee72006-08-21 22:04:03 +10008409 .psize = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008410 .digest = "\xd0\x9a\x97\xba",
Herbert Xuc907ee72006-08-21 22:04:03 +10008411 },
8412 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008413 .key = "\xff\xff\xff\xff",
Herbert Xuc907ee72006-08-21 22:04:03 +10008414 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008415 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
8416 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
8417 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
8418 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
8419 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
Herbert Xuc907ee72006-08-21 22:04:03 +10008420 .psize = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008421 .digest = "\x13\xd9\x29\x2b",
Herbert Xuc907ee72006-08-21 22:04:03 +10008422 },
8423 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008424 .key = "\x80\xea\xd3\xf1",
Herbert Xuc907ee72006-08-21 22:04:03 +10008425 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008426 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
8427 "\x31\x32\x33\x34\x35\x36\x37\x38"
8428 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
8429 "\x41\x42\x43\x44\x45\x46\x47\x48"
8430 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
Herbert Xuc907ee72006-08-21 22:04:03 +10008431 .psize = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008432 .digest = "\x0c\xb5\xe2\xa2",
Herbert Xuc907ee72006-08-21 22:04:03 +10008433 },
8434 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008435 .key = "\xf3\x4a\x1d\x5d",
Herbert Xuc907ee72006-08-21 22:04:03 +10008436 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008437 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
8438 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
8439 "\x61\x62\x63\x64\x65\x66\x67\x68"
8440 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
8441 "\x71\x72\x73\x74\x75\x76\x77\x78",
Herbert Xuc907ee72006-08-21 22:04:03 +10008442 .psize = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008443 .digest = "\xd1\x7f\xfb\xa6",
Herbert Xuc907ee72006-08-21 22:04:03 +10008444 },
8445 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008446 .key = "\x2e\x80\x04\x59",
Herbert Xuc907ee72006-08-21 22:04:03 +10008447 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008448 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
8449 "\x81\x82\x83\x84\x85\x86\x87\x88"
8450 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
8451 "\x91\x92\x93\x94\x95\x96\x97\x98"
8452 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
Herbert Xuc907ee72006-08-21 22:04:03 +10008453 .psize = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008454 .digest = "\x59\x33\xe6\x7a",
Herbert Xuc907ee72006-08-21 22:04:03 +10008455 },
8456 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008457 .key = "\xa6\xcc\x19\x85",
Herbert Xuc907ee72006-08-21 22:04:03 +10008458 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008459 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
8460 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
8461 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
8462 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
8463 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
Herbert Xuc907ee72006-08-21 22:04:03 +10008464 .psize = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008465 .digest = "\xbe\x03\x01\xd2",
Herbert Xuc907ee72006-08-21 22:04:03 +10008466 },
8467 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008468 .key = "\x41\xfc\xfe\x2d",
Herbert Xuc907ee72006-08-21 22:04:03 +10008469 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008470 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
8471 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
8472 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
8473 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
8474 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
Herbert Xuc907ee72006-08-21 22:04:03 +10008475 .psize = 40,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008476 .digest = "\x75\xd3\xc5\x24",
Herbert Xuc907ee72006-08-21 22:04:03 +10008477 },
8478 {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008479 .key = "\xff\xff\xff\xff",
Herbert Xuc907ee72006-08-21 22:04:03 +10008480 .ksize = 4,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008481 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
8482 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
8483 "\x11\x12\x13\x14\x15\x16\x17\x18"
8484 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
8485 "\x21\x22\x23\x24\x25\x26\x27\x28"
8486 "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
8487 "\x31\x32\x33\x34\x35\x36\x37\x38"
8488 "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
8489 "\x41\x42\x43\x44\x45\x46\x47\x48"
8490 "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
8491 "\x51\x52\x53\x54\x55\x56\x57\x58"
8492 "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
8493 "\x61\x62\x63\x64\x65\x66\x67\x68"
8494 "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
8495 "\x71\x72\x73\x74\x75\x76\x77\x78"
8496 "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
8497 "\x81\x82\x83\x84\x85\x86\x87\x88"
8498 "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
8499 "\x91\x92\x93\x94\x95\x96\x97\x98"
8500 "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
8501 "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
8502 "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
8503 "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
8504 "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
8505 "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
8506 "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
8507 "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
8508 "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
8509 "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
8510 "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
Herbert Xuc907ee72006-08-21 22:04:03 +10008511 .psize = 240,
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008512 .digest = "\x75\xd3\xc5\x24",
Herbert Xuc907ee72006-08-21 22:04:03 +10008513 .np = 2,
8514 .tap = { 31, 209 }
8515 },
8516};
8517
8518/*
Harald Welteebfd9bc2005-06-22 13:27:23 -07008519 * Cipher speed tests
8520 */
Sebastian Siewiord5dc3922008-03-11 21:27:11 +08008521static u8 speed_template_8[] = {8, 0};
8522static u8 speed_template_24[] = {24, 0};
8523static u8 speed_template_8_32[] = {8, 32, 0};
8524static u8 speed_template_16_32[] = {16, 32, 0};
8525static u8 speed_template_16_24_32[] = {16, 24, 32, 0};
8526static u8 speed_template_32_40_48[] = {32, 40, 48, 0};
8527static u8 speed_template_32_48_64[] = {32, 48, 64, 0};
Rik Snelf19f5112007-09-19 20:23:13 +08008528
Michal Ludvige8057922006-05-30 22:04:19 +10008529/*
8530 * Digest speed tests
8531 */
Herbert Xue9d41162006-08-19 21:38:49 +10008532static struct hash_speed generic_hash_speed_template[] = {
Sebastian Siewiorde224c32008-03-13 20:21:51 +08008533 { .blen = 16, .plen = 16, },
Michal Ludvige8057922006-05-30 22:04:19 +10008534 { .blen = 64, .plen = 16, },
8535 { .blen = 64, .plen = 64, },
8536 { .blen = 256, .plen = 16, },
8537 { .blen = 256, .plen = 64, },
8538 { .blen = 256, .plen = 256, },
8539 { .blen = 1024, .plen = 16, },
8540 { .blen = 1024, .plen = 256, },
8541 { .blen = 1024, .plen = 1024, },
8542 { .blen = 2048, .plen = 16, },
8543 { .blen = 2048, .plen = 256, },
8544 { .blen = 2048, .plen = 1024, },
8545 { .blen = 2048, .plen = 2048, },
8546 { .blen = 4096, .plen = 16, },
8547 { .blen = 4096, .plen = 256, },
8548 { .blen = 4096, .plen = 1024, },
8549 { .blen = 4096, .plen = 4096, },
8550 { .blen = 8192, .plen = 16, },
8551 { .blen = 8192, .plen = 256, },
8552 { .blen = 8192, .plen = 1024, },
8553 { .blen = 8192, .plen = 4096, },
8554 { .blen = 8192, .plen = 8192, },
8555
8556 /* End marker */
8557 { .blen = 0, .plen = 0, }
8558};
8559
Linus Torvalds1da177e2005-04-16 15:20:36 -07008560#endif /* _CRYPTO_TCRYPT_H */