1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#ifndef _CRYPTO_TESTMGR_H
25#define _CRYPTO_TESTMGR_H
26
27#include <linux/netlink.h>
28#include <linux/zlib.h>
29
30#include <crypto/compress.h>
31
32#define MAX_DIGEST_SIZE 64
33#define MAX_TAP 8
34
35#define MAX_KEYLEN 56
36#define MAX_IVLEN 32
37
38struct hash_testvec {
39
40 char *key;
41 char *plaintext;
42 char *digest;
43 unsigned char tap[MAX_TAP];
44 unsigned char psize;
45 unsigned char np;
46 unsigned char ksize;
47};
48
49struct cipher_testvec {
50 char *key;
51 char *iv;
52 char *input;
53 char *result;
54 unsigned short tap[MAX_TAP];
55 int np;
56 unsigned char fail;
57 unsigned char wk;
58 unsigned char klen;
59 unsigned short ilen;
60 unsigned short rlen;
61};
62
63struct aead_testvec {
64 char *key;
65 char *iv;
66 char *input;
67 char *assoc;
68 char *result;
69 unsigned char tap[MAX_TAP];
70 unsigned char atap[MAX_TAP];
71 int np;
72 int anp;
73 unsigned char fail;
74 unsigned char novrfy;
75 unsigned char wk;
76 unsigned char klen;
77 unsigned short ilen;
78 unsigned short alen;
79 unsigned short rlen;
80};
81
82struct cprng_testvec {
83 char *key;
84 char *dt;
85 char *v;
86 char *result;
87 unsigned char klen;
88 unsigned short dtlen;
89 unsigned short vlen;
90 unsigned short rlen;
91 unsigned short loops;
92};
93
94static char zeroed_string[48];
95
96
97
98
99#define MD4_TEST_VECTORS 7
100
101static struct hash_testvec md4_tv_template [] = {
102 {
103 .plaintext = "",
104 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
105 "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
106 }, {
107 .plaintext = "a",
108 .psize = 1,
109 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
110 "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
111 }, {
112 .plaintext = "abc",
113 .psize = 3,
114 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
115 "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
116 }, {
117 .plaintext = "message digest",
118 .psize = 14,
119 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
120 "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
121 }, {
122 .plaintext = "abcdefghijklmnopqrstuvwxyz",
123 .psize = 26,
124 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
125 "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
126 .np = 2,
127 .tap = { 13, 13 },
128 }, {
129 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
130 .psize = 62,
131 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
132 "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
133 }, {
134 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
135 "45678901234567890",
136 .psize = 80,
137 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
138 "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
139 },
140};
141
142
143
144
145#define MD5_TEST_VECTORS 7
146
147static struct hash_testvec md5_tv_template[] = {
148 {
149 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
150 "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
151 }, {
152 .plaintext = "a",
153 .psize = 1,
154 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
155 "\x31\xc3\x99\xe2\x69\x77\x26\x61",
156 }, {
157 .plaintext = "abc",
158 .psize = 3,
159 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
160 "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
161 }, {
162 .plaintext = "message digest",
163 .psize = 14,
164 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
165 "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
166 }, {
167 .plaintext = "abcdefghijklmnopqrstuvwxyz",
168 .psize = 26,
169 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
170 "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
171 .np = 2,
172 .tap = {13, 13}
173 }, {
174 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
175 .psize = 62,
176 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
177 "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
178 }, {
179 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
180 "345678901234567890",
181 .psize = 80,
182 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
183 "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
184 }
185
186};
187
188
189
190
191#define RMD128_TEST_VECTORS 10
192
193static struct hash_testvec rmd128_tv_template[] = {
194 {
195 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
196 "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
197 }, {
198 .plaintext = "a",
199 .psize = 1,
200 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
201 "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
202 }, {
203 .plaintext = "abc",
204 .psize = 3,
205 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
206 "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
207 }, {
208 .plaintext = "message digest",
209 .psize = 14,
210 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
211 "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
212 }, {
213 .plaintext = "abcdefghijklmnopqrstuvwxyz",
214 .psize = 26,
215 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
216 "\x10\x71\x49\x22\xb3\x71\x83\x4e",
217 }, {
218 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
219 "fghijklmnopqrstuvwxyz0123456789",
220 .psize = 62,
221 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
222 "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
223 }, {
224 .plaintext = "1234567890123456789012345678901234567890"
225 "1234567890123456789012345678901234567890",
226 .psize = 80,
227 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
228 "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
229 }, {
230 .plaintext = "abcdbcdecdefdefgefghfghighij"
231 "hijkijkljklmklmnlmnomnopnopq",
232 .psize = 56,
233 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
234 "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
235 .np = 2,
236 .tap = { 28, 28 },
237 }, {
238 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
239 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
240 "lmnopqrsmnopqrstnopqrstu",
241 .psize = 112,
242 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
243 "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
244 }, {
245 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
246 .psize = 32,
247 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
248 "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
249 }
250};
251
252
253
254
255#define RMD160_TEST_VECTORS 10
256
257static struct hash_testvec rmd160_tv_template[] = {
258 {
259 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
260 "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
261 }, {
262 .plaintext = "a",
263 .psize = 1,
264 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
265 "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
266 }, {
267 .plaintext = "abc",
268 .psize = 3,
269 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
270 "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
271 }, {
272 .plaintext = "message digest",
273 .psize = 14,
274 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
275 "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
276 }, {
277 .plaintext = "abcdefghijklmnopqrstuvwxyz",
278 .psize = 26,
279 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
280 "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
281 }, {
282 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
283 "fghijklmnopqrstuvwxyz0123456789",
284 .psize = 62,
285 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
286 "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
287 }, {
288 .plaintext = "1234567890123456789012345678901234567890"
289 "1234567890123456789012345678901234567890",
290 .psize = 80,
291 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
292 "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
293 }, {
294 .plaintext = "abcdbcdecdefdefgefghfghighij"
295 "hijkijkljklmklmnlmnomnopnopq",
296 .psize = 56,
297 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
298 "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
299 .np = 2,
300 .tap = { 28, 28 },
301 }, {
302 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
303 "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
304 "lmnopqrsmnopqrstnopqrstu",
305 .psize = 112,
306 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
307 "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
308 }, {
309 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
310 .psize = 32,
311 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
312 "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
313 }
314};
315
316
317
318
319#define RMD256_TEST_VECTORS 8
320
321static struct hash_testvec rmd256_tv_template[] = {
322 {
323 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
324 "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
325 "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
326 "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
327 }, {
328 .plaintext = "a",
329 .psize = 1,
330 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
331 "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
332 "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
333 "\xcd\x88\x3a\x91\x34\x69\x29\x25",
334 }, {
335 .plaintext = "abc",
336 .psize = 3,
337 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
338 "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
339 "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
340 "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
341 }, {
342 .plaintext = "message digest",
343 .psize = 14,
344 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
345 "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
346 "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
347 "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
348 }, {
349 .plaintext = "abcdefghijklmnopqrstuvwxyz",
350 .psize = 26,
351 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
352 "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
353 "\x78\x96\x11\x8a\x51\x97\x96\x87"
354 "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
355 }, {
356 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
357 "fghijklmnopqrstuvwxyz0123456789",
358 .psize = 62,
359 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
360 "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
361 "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
362 "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
363 }, {
364 .plaintext = "1234567890123456789012345678901234567890"
365 "1234567890123456789012345678901234567890",
366 .psize = 80,
367 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
368 "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
369 "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
370 "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
371 }, {
372 .plaintext = "abcdbcdecdefdefgefghfghighij"
373 "hijkijkljklmklmnlmnomnopnopq",
374 .psize = 56,
375 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
376 "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
377 "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
378 "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
379 .np = 2,
380 .tap = { 28, 28 },
381 }
382};
383
384
385
386
387#define RMD320_TEST_VECTORS 8
388
389static struct hash_testvec rmd320_tv_template[] = {
390 {
391 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
392 "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
393 "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
394 "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
395 }, {
396 .plaintext = "a",
397 .psize = 1,
398 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
399 "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
400 "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
401 "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
402 }, {
403 .plaintext = "abc",
404 .psize = 3,
405 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
406 "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
407 "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
408 "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
409 }, {
410 .plaintext = "message digest",
411 .psize = 14,
412 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
413 "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
414 "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
415 "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
416 }, {
417 .plaintext = "abcdefghijklmnopqrstuvwxyz",
418 .psize = 26,
419 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
420 "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
421 "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
422 "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
423 }, {
424 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
425 "fghijklmnopqrstuvwxyz0123456789",
426 .psize = 62,
427 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
428 "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
429 "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
430 "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
431 }, {
432 .plaintext = "1234567890123456789012345678901234567890"
433 "1234567890123456789012345678901234567890",
434 .psize = 80,
435 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
436 "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
437 "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
438 "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
439 }, {
440 .plaintext = "abcdbcdecdefdefgefghfghighij"
441 "hijkijkljklmklmnlmnomnopnopq",
442 .psize = 56,
443 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
444 "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
445 "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
446 "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
447 .np = 2,
448 .tap = { 28, 28 },
449 }
450};
451
452
453
454
455
456#define SHA1_TEST_VECTORS 3
457
458static struct hash_testvec sha1_tv_template[] = {
459 {
460 .plaintext = "abc",
461 .psize = 3,
462 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
463 "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
464 }, {
465 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
466 .psize = 56,
467 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
468 "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
469 .np = 2,
470 .tap = { 28, 28 }
471 }, {
472 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
473 "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
474 "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
475 "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
476 "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
477 "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
478 "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
479 "\x72\x28\x26\xc0\x66\x86\x9e\xda"
480 "\xcd\x73\xb2\x54\x80\x35\x18\x58"
481 "\x13\xe2\x26\x34\xa9\xda\x44\x00"
482 "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
483 "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
484 "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
485 "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
486 "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
487 "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
488 "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
489 "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
490 "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
491 "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
492 "\x5a\x90\x11",
493 .psize = 163,
494 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
495 "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
496 .np = 4,
497 .tap = { 63, 64, 31, 5 }
498 }
499};
500
501
502
503
504
505#define SHA224_TEST_VECTORS 2
506
507static struct hash_testvec sha224_tv_template[] = {
508 {
509 .plaintext = "abc",
510 .psize = 3,
511 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
512 "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
513 "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
514 "\xE3\x6C\x9D\xA7",
515 }, {
516 .plaintext =
517 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
518 .psize = 56,
519 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
520 "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
521 "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
522 "\x52\x52\x25\x25",
523 .np = 2,
524 .tap = { 28, 28 }
525 }
526};
527
528
529
530
531#define SHA256_TEST_VECTORS 2
532
533static struct hash_testvec sha256_tv_template[] = {
534 {
535 .plaintext = "abc",
536 .psize = 3,
537 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
538 "\x41\x41\x40\xde\x5d\xae\x22\x23"
539 "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
540 "\xb4\x10\xff\x61\xf2\x00\x15\xad",
541 }, {
542 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
543 .psize = 56,
544 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
545 "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
546 "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
547 "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
548 .np = 2,
549 .tap = { 28, 28 }
550 },
551};
552
553
554
555
556#define SHA384_TEST_VECTORS 4
557
558static struct hash_testvec sha384_tv_template[] = {
559 {
560 .plaintext= "abc",
561 .psize = 3,
562 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
563 "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
564 "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
565 "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
566 "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
567 "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
568 }, {
569 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
570 .psize = 56,
571 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
572 "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
573 "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
574 "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
575 "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
576 "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
577 }, {
578 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
579 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
580 .psize = 112,
581 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
582 "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
583 "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
584 "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
585 "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
586 "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
587 }, {
588 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
589 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
590 .psize = 104,
591 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
592 "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
593 "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
594 "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
595 "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
596 "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
597 .np = 4,
598 .tap = { 26, 26, 26, 26 }
599 },
600};
601
602
603
604
605#define SHA512_TEST_VECTORS 4
606
607static struct hash_testvec sha512_tv_template[] = {
608 {
609 .plaintext = "abc",
610 .psize = 3,
611 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
612 "\xcc\x41\x73\x49\xae\x20\x41\x31"
613 "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
614 "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
615 "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
616 "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
617 "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
618 "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
619 }, {
620 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
621 .psize = 56,
622 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
623 "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
624 "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
625 "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
626 "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
627 "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
628 "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
629 "\x54\xec\x63\x12\x38\xca\x34\x45",
630 }, {
631 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
632 "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
633 .psize = 112,
634 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
635 "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
636 "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
637 "\x72\x99\xae\xad\xb6\x88\x90\x18"
638 "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
639 "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
640 "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
641 "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
642 }, {
643 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
644 "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
645 .psize = 104,
646 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
647 "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
648 "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
649 "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
650 "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
651 "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
652 "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
653 "\xed\xb4\x19\x87\x23\x28\x50\xc9",
654 .np = 4,
655 .tap = { 26, 26, 26, 26 }
656 },
657};
658
659
660
661
662
663
664
665#define WP512_TEST_VECTORS 8
666
667static struct hash_testvec wp512_tv_template[] = {
668 {
669 .plaintext = "",
670 .psize = 0,
671 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
672 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
673 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
674 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
675 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
676 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
677 "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
678 "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
679
680
681 }, {
682 .plaintext = "a",
683 .psize = 1,
684 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
685 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
686 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
687 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
688 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
689 "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
690 "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
691 "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
692 }, {
693 .plaintext = "abc",
694 .psize = 3,
695 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
696 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
697 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
698 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
699 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
700 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
701 "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
702 "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
703 }, {
704 .plaintext = "message digest",
705 .psize = 14,
706 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
707 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
708 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
709 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
710 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
711 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
712 "\x92\xED\x92\x00\x52\x83\x8F\x33"
713 "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
714 }, {
715 .plaintext = "abcdefghijklmnopqrstuvwxyz",
716 .psize = 26,
717 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
718 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
719 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
720 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
721 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
722 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
723 "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
724 "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
725 }, {
726 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
727 "abcdefghijklmnopqrstuvwxyz0123456789",
728 .psize = 62,
729 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
730 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
731 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
732 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
733 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
734 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
735 "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
736 "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
737 }, {
738 .plaintext = "1234567890123456789012345678901234567890"
739 "1234567890123456789012345678901234567890",
740 .psize = 80,
741 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
742 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
743 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
744 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
745 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
746 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
747 "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
748 "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
749 }, {
750 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
751 .psize = 32,
752 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
753 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
754 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
755 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
756 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
757 "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
758 "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
759 "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
760 },
761};
762
763#define WP384_TEST_VECTORS 8
764
765static struct hash_testvec wp384_tv_template[] = {
766 {
767 .plaintext = "",
768 .psize = 0,
769 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
770 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
771 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
772 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
773 "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
774 "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
775
776
777 }, {
778 .plaintext = "a",
779 .psize = 1,
780 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
781 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
782 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
783 "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
784 "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
785 "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
786 }, {
787 .plaintext = "abc",
788 .psize = 3,
789 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
790 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
791 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
792 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
793 "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
794 "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
795 }, {
796 .plaintext = "message digest",
797 .psize = 14,
798 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
799 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
800 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
801 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
802 "\x84\x21\x55\x76\x59\xEF\x55\xC1"
803 "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
804 }, {
805 .plaintext = "abcdefghijklmnopqrstuvwxyz",
806 .psize = 26,
807 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
808 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
809 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
810 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
811 "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
812 "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
813 }, {
814 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
815 "abcdefghijklmnopqrstuvwxyz0123456789",
816 .psize = 62,
817 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
818 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
819 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
820 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
821 "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
822 "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
823 }, {
824 .plaintext = "1234567890123456789012345678901234567890"
825 "1234567890123456789012345678901234567890",
826 .psize = 80,
827 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
828 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
829 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
830 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
831 "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
832 "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
833 }, {
834 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
835 .psize = 32,
836 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
837 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
838 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
839 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
840 "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
841 "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
842 },
843};
844
845#define WP256_TEST_VECTORS 8
846
847static struct hash_testvec wp256_tv_template[] = {
848 {
849 .plaintext = "",
850 .psize = 0,
851 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
852 "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
853 "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
854 "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
855
856
857 }, {
858 .plaintext = "a",
859 .psize = 1,
860 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
861 "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
862 "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
863 "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
864 }, {
865 .plaintext = "abc",
866 .psize = 3,
867 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
868 "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
869 "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
870 "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
871 }, {
872 .plaintext = "message digest",
873 .psize = 14,
874 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
875 "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
876 "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
877 "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
878 }, {
879 .plaintext = "abcdefghijklmnopqrstuvwxyz",
880 .psize = 26,
881 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
882 "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
883 "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
884 "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
885 }, {
886 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
887 "abcdefghijklmnopqrstuvwxyz0123456789",
888 .psize = 62,
889 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
890 "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
891 "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
892 "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
893 }, {
894 .plaintext = "1234567890123456789012345678901234567890"
895 "1234567890123456789012345678901234567890",
896 .psize = 80,
897 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
898 "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
899 "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
900 "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
901 }, {
902 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
903 .psize = 32,
904 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
905 "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
906 "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
907 "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
908 },
909};
910
911
912
913
914#define TGR192_TEST_VECTORS 6
915
916static struct hash_testvec tgr192_tv_template[] = {
917 {
918 .plaintext = "",
919 .psize = 0,
920 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
921 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
922 "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
923 }, {
924 .plaintext = "abc",
925 .psize = 3,
926 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
927 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
928 "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
929 }, {
930 .plaintext = "Tiger",
931 .psize = 5,
932 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
933 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
934 "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
935 }, {
936 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
937 .psize = 64,
938 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
939 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
940 "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
941 }, {
942 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
943 .psize = 64,
944 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
945 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
946 "\x57\x89\x65\x65\x97\x5f\x91\x97",
947 }, {
948 .plaintext = "Tiger - A Fast New Hash Function, "
949 "by Ross Anderson and Eli Biham, "
950 "proceedings of Fast Software Encryption 3, "
951 "Cambridge, 1996.",
952 .psize = 125,
953 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
954 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
955 "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
956 },
957};
958
959#define TGR160_TEST_VECTORS 6
960
961static struct hash_testvec tgr160_tv_template[] = {
962 {
963 .plaintext = "",
964 .psize = 0,
965 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
966 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
967 "\xf3\x73\xde\x2d",
968 }, {
969 .plaintext = "abc",
970 .psize = 3,
971 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
972 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
973 "\x93\x5f\x7b\x95",
974 }, {
975 .plaintext = "Tiger",
976 .psize = 5,
977 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
978 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
979 "\x37\x79\x0c\x11",
980 }, {
981 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
982 .psize = 64,
983 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
984 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
985 "\xb5\x86\x44\x50",
986 }, {
987 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
988 .psize = 64,
989 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
990 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
991 "\x57\x89\x65\x65",
992 }, {
993 .plaintext = "Tiger - A Fast New Hash Function, "
994 "by Ross Anderson and Eli Biham, "
995 "proceedings of Fast Software Encryption 3, "
996 "Cambridge, 1996.",
997 .psize = 125,
998 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
999 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1000 "\xdd\x68\x15\x1d",
1001 },
1002};
1003
1004#define TGR128_TEST_VECTORS 6
1005
1006static struct hash_testvec tgr128_tv_template[] = {
1007 {
1008 .plaintext = "",
1009 .psize = 0,
1010 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1011 "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
1012 }, {
1013 .plaintext = "abc",
1014 .psize = 3,
1015 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1016 "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
1017 }, {
1018 .plaintext = "Tiger",
1019 .psize = 5,
1020 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1021 "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
1022 }, {
1023 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1024 .psize = 64,
1025 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1026 "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
1027 }, {
1028 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1029 .psize = 64,
1030 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1031 "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
1032 }, {
1033 .plaintext = "Tiger - A Fast New Hash Function, "
1034 "by Ross Anderson and Eli Biham, "
1035 "proceedings of Fast Software Encryption 3, "
1036 "Cambridge, 1996.",
1037 .psize = 125,
1038 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1039 "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
1040 },
1041};
1042
1043#define GHASH_TEST_VECTORS 1
1044
1045static struct hash_testvec ghash_tv_template[] =
1046{
1047 {
1048
1049 .key = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
1050 .ksize = 16,
1051 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
1052 .psize = 16,
1053 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
1054 "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
1055 },
1056};
1057
1058
1059
1060
1061
1062#define HMAC_MD5_TEST_VECTORS 7
1063
1064static struct hash_testvec hmac_md5_tv_template[] =
1065{
1066 {
1067 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1068 .ksize = 16,
1069 .plaintext = "Hi There",
1070 .psize = 8,
1071 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
1072 "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
1073 }, {
1074 .key = "Jefe",
1075 .ksize = 4,
1076 .plaintext = "what do ya want for nothing?",
1077 .psize = 28,
1078 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
1079 "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
1080 .np = 2,
1081 .tap = {14, 14}
1082 }, {
1083 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1084 .ksize = 16,
1085 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1086 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1087 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1088 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1089 .psize = 50,
1090 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
1091 "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
1092 }, {
1093 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1094 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1095 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1096 .ksize = 25,
1097 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1098 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1099 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1100 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1101 .psize = 50,
1102 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
1103 "\x3a\x75\x16\x47\x46\xff\xaa\x79",
1104 }, {
1105 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1106 .ksize = 16,
1107 .plaintext = "Test With Truncation",
1108 .psize = 20,
1109 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
1110 "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
1111 }, {
1112 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1113 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1114 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1115 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1116 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1117 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1118 "\xaa\xaa",
1119 .ksize = 80,
1120 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1121 .psize = 54,
1122 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
1123 "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
1124 }, {
1125 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1126 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1127 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1128 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1129 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1130 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1131 "\xaa\xaa",
1132 .ksize = 80,
1133 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1134 "Block-Size Data",
1135 .psize = 73,
1136 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
1137 "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
1138 },
1139};
1140
1141
1142
1143
1144#define HMAC_RMD128_TEST_VECTORS 7
1145
1146static struct hash_testvec hmac_rmd128_tv_template[] = {
1147 {
1148 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1149 .ksize = 16,
1150 .plaintext = "Hi There",
1151 .psize = 8,
1152 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
1153 "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
1154 }, {
1155 .key = "Jefe",
1156 .ksize = 4,
1157 .plaintext = "what do ya want for nothing?",
1158 .psize = 28,
1159 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
1160 "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
1161 .np = 2,
1162 .tap = { 14, 14 },
1163 }, {
1164 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1165 .ksize = 16,
1166 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1167 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1168 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1169 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1170 .psize = 50,
1171 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
1172 "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
1173 }, {
1174 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1175 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1176 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1177 .ksize = 25,
1178 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1179 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1180 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1181 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1182 .psize = 50,
1183 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
1184 "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
1185 }, {
1186 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1187 .ksize = 16,
1188 .plaintext = "Test With Truncation",
1189 .psize = 20,
1190 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
1191 "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
1192 }, {
1193 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1194 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1195 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1196 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1197 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1198 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1199 "\xaa\xaa",
1200 .ksize = 80,
1201 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1202 .psize = 54,
1203 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
1204 "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
1205 }, {
1206 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1207 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1208 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1209 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1210 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1211 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1212 "\xaa\xaa",
1213 .ksize = 80,
1214 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1215 "Block-Size Data",
1216 .psize = 73,
1217 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
1218 "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
1219 },
1220};
1221
1222
1223
1224
1225#define HMAC_RMD160_TEST_VECTORS 7
1226
1227static struct hash_testvec hmac_rmd160_tv_template[] = {
1228 {
1229 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1230 .ksize = 20,
1231 .plaintext = "Hi There",
1232 .psize = 8,
1233 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
1234 "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
1235 }, {
1236 .key = "Jefe",
1237 .ksize = 4,
1238 .plaintext = "what do ya want for nothing?",
1239 .psize = 28,
1240 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
1241 "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
1242 .np = 2,
1243 .tap = { 14, 14 },
1244 }, {
1245 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1246 .ksize = 20,
1247 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1248 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1249 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1250 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1251 .psize = 50,
1252 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
1253 "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
1254 }, {
1255 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1256 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1257 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1258 .ksize = 25,
1259 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1260 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1261 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1262 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1263 .psize = 50,
1264 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
1265 "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
1266 }, {
1267 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1268 .ksize = 20,
1269 .plaintext = "Test With Truncation",
1270 .psize = 20,
1271 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
1272 "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
1273 }, {
1274 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1275 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1276 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1277 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1278 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1279 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1280 "\xaa\xaa",
1281 .ksize = 80,
1282 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1283 .psize = 54,
1284 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
1285 "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
1286 }, {
1287 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1288 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1289 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1290 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1291 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1292 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1293 "\xaa\xaa",
1294 .ksize = 80,
1295 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1296 "Block-Size Data",
1297 .psize = 73,
1298 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
1299 "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
1300 },
1301};
1302
1303
1304
1305
1306#define HMAC_SHA1_TEST_VECTORS 7
1307
1308static struct hash_testvec hmac_sha1_tv_template[] = {
1309 {
1310 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1311 .ksize = 20,
1312 .plaintext = "Hi There",
1313 .psize = 8,
1314 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
1315 "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
1316 "\x46\xbe",
1317 }, {
1318 .key = "Jefe",
1319 .ksize = 4,
1320 .plaintext = "what do ya want for nothing?",
1321 .psize = 28,
1322 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
1323 "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
1324 .np = 2,
1325 .tap = { 14, 14 }
1326 }, {
1327 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1328 .ksize = 20,
1329 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1330 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1331 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1332 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1333 .psize = 50,
1334 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
1335 "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
1336 }, {
1337 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1338 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1339 "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1340 .ksize = 25,
1341 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1342 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1343 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1344 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1345 .psize = 50,
1346 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
1347 "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
1348 }, {
1349 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1350 .ksize = 20,
1351 .plaintext = "Test With Truncation",
1352 .psize = 20,
1353 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
1354 "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
1355 }, {
1356 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1357 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1358 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1359 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1360 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1361 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1362 "\xaa\xaa",
1363 .ksize = 80,
1364 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1365 .psize = 54,
1366 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
1367 "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
1368 }, {
1369 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1370 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1371 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1372 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1373 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1374 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1375 "\xaa\xaa",
1376 .ksize = 80,
1377 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1378 "Block-Size Data",
1379 .psize = 73,
1380 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
1381 "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
1382 },
1383};
1384
1385
1386
1387
1388
1389#define HMAC_SHA224_TEST_VECTORS 4
1390
1391static struct hash_testvec hmac_sha224_tv_template[] = {
1392 {
1393 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1394 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1395 "\x0b\x0b\x0b\x0b",
1396 .ksize = 20,
1397
1398 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
1399 .psize = 8,
1400 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
1401 "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
1402 "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
1403 "\x53\x68\x4b\x22",
1404 }, {
1405 .key = "Jefe",
1406 .ksize = 4,
1407
1408 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
1409 "\x79\x61\x20\x77\x61\x6e\x74\x20"
1410 "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
1411 "\x69\x6e\x67\x3f",
1412 .psize = 28,
1413 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
1414 "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
1415 "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
1416 "\x8f\xd0\x5e\x44",
1417 .np = 4,
1418 .tap = { 7, 7, 7, 7 }
1419 }, {
1420 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1421 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1422 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1423 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1424 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1425 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1426 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1427 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1428 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1429 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1430 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1431 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1432 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1433 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1434 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1435 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1436 "\xaa\xaa\xaa",
1437 .ksize = 131,
1438
1439 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
1440 "\x6e\x67\x20\x4c\x61\x72\x67\x65"
1441 "\x72\x20\x54\x68\x61\x6e\x20\x42"
1442 "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
1443 "\x65\x20\x4b\x65\x79\x20\x2d\x20"
1444 "\x48\x61\x73\x68\x20\x4b\x65\x79"
1445 "\x20\x46\x69\x72\x73\x74",
1446 .psize = 54,
1447 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
1448 "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
1449 "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
1450 "\x3f\xa6\x87\x0e",
1451 }, {
1452 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1453 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1454 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1455 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1456 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1457 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1458 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1459 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1460 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1461 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1462 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1463 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1464 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1465 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1466 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1467 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1468 "\xaa\xaa\xaa",
1469 .ksize = 131,
1470
1471
1472
1473 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
1474 "\x61\x20\x74\x65\x73\x74\x20\x75"
1475 "\x73\x69\x6e\x67\x20\x61\x20\x6c"
1476 "\x61\x72\x67\x65\x72\x20\x74\x68"
1477 "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
1478 "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
1479 "\x79\x20\x61\x6e\x64\x20\x61\x20"
1480 "\x6c\x61\x72\x67\x65\x72\x20\x74"
1481 "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
1482 "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
1483 "\x61\x74\x61\x2e\x20\x54\x68\x65"
1484 "\x20\x6b\x65\x79\x20\x6e\x65\x65"
1485 "\x64\x73\x20\x74\x6f\x20\x62\x65"
1486 "\x20\x68\x61\x73\x68\x65\x64\x20"
1487 "\x62\x65\x66\x6f\x72\x65\x20\x62"
1488 "\x65\x69\x6e\x67\x20\x75\x73\x65"
1489 "\x64\x20\x62\x79\x20\x74\x68\x65"
1490 "\x20\x48\x4d\x41\x43\x20\x61\x6c"
1491 "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
1492 .psize = 152,
1493 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
1494 "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
1495 "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
1496 "\xf6\xf5\x65\xd1",
1497 },
1498};
1499
1500
1501
1502
1503
1504#define HMAC_SHA256_TEST_VECTORS 10
1505
1506static struct hash_testvec hmac_sha256_tv_template[] = {
1507 {
1508 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1509 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1510 "\x11\x12\x13\x14\x15\x16\x17\x18"
1511 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1512 .ksize = 32,
1513 .plaintext = "abc",
1514 .psize = 3,
1515 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
1516 "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
1517 "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
1518 "\x92\x75\x90\x21\xcf\xab\x81\x81",
1519 }, {
1520 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1521 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1522 "\x11\x12\x13\x14\x15\x16\x17\x18"
1523 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1524 .ksize = 32,
1525 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1526 .psize = 56,
1527 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
1528 "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
1529 "\xe6\x98\xe3\x61\x19\x42\x11\x49"
1530 "\xea\x8c\x71\x24\x56\x69\x7d\x30",
1531 }, {
1532 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1533 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1534 "\x11\x12\x13\x14\x15\x16\x17\x18"
1535 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1536 .ksize = 32,
1537 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
1538 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1539 .psize = 112,
1540 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
1541 "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
1542 "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
1543 "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
1544 }, {
1545 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1546 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1547 "\x0b\x0b\x0b\x0b\x0b\x0b",
1548 .ksize = 32,
1549 .plaintext = "Hi There",
1550 .psize = 8,
1551 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
1552 "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
1553 "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
1554 "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
1555 }, {
1556 .key = "Jefe",
1557 .ksize = 4,
1558 .plaintext = "what do ya want for nothing?",
1559 .psize = 28,
1560 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
1561 "\x6a\x04\x24\x26\x08\x95\x75\xc7"
1562 "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
1563 "\x9d\xec\x58\xb9\x64\xec\x38\x43",
1564 .np = 2,
1565 .tap = { 14, 14 }
1566 }, {
1567 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1568 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1569 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1570 .ksize = 32,
1571 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1572 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1573 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
1574 "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1575 .psize = 50,
1576 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
1577 "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
1578 "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
1579 "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
1580 }, {
1581 .key = "\x01\x02\x03\x04\x05\x06\x07\x08"
1582 "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1583 "\x11\x12\x13\x14\x15\x16\x17\x18"
1584 "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
1585 "\x21\x22\x23\x24\x25",
1586 .ksize = 37,
1587 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1588 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1589 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
1590 "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1591 .psize = 50,
1592 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
1593 "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
1594 "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
1595 "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
1596 }, {
1597 .key = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1598 "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1599 "\x0c\x0c\x0c\x0c\x0c\x0c",
1600 .ksize = 32,
1601 .plaintext = "Test With Truncation",
1602 .psize = 20,
1603 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
1604 "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
1605 "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
1606 "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
1607 }, {
1608 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1609 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1610 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1611 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1612 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1613 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1614 "\xaa\xaa",
1615 .ksize = 80,
1616 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1617 .psize = 54,
1618 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
1619 "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
1620 "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
1621 "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
1622 }, {
1623 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1624 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1625 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1626 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1627 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1628 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1629 "\xaa\xaa",
1630 .ksize = 80,
1631 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
1632 "One Block-Size Data",
1633 .psize = 73,
1634 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
1635 "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
1636 "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
1637 "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
1638 },
1639};
1640
1641#define XCBC_AES_TEST_VECTORS 6
1642
1643static struct hash_testvec aes_xcbc128_tv_template[] = {
1644 {
1645 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1646 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1647 .plaintext = zeroed_string,
1648 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
1649 "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
1650 .psize = 0,
1651 .ksize = 16,
1652 }, {
1653 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1654 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1655 .plaintext = "\x00\x01\x02",
1656 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
1657 "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
1658 .psize = 3,
1659 .ksize = 16,
1660 } , {
1661 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1662 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1663 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1664 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1665 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
1666 "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
1667 .psize = 16,
1668 .ksize = 16,
1669 }, {
1670 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1671 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1672 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1673 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1674 "\x10\x11\x12\x13",
1675 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
1676 "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
1677 .tap = { 10, 10 },
1678 .psize = 20,
1679 .np = 2,
1680 .ksize = 16,
1681 }, {
1682 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1683 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1684 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1685 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1686 "\x10\x11\x12\x13\x14\x15\x16\x17"
1687 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
1688 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
1689 "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
1690 .psize = 32,
1691 .ksize = 16,
1692 }, {
1693 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1694 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1695 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1696 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1697 "\x10\x11\x12\x13\x14\x15\x16\x17"
1698 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
1699 "\x20\x21",
1700 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
1701 "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
1702 .tap = { 17, 17 },
1703 .psize = 34,
1704 .np = 2,
1705 .ksize = 16,
1706 }
1707};
1708
1709#define VMAC_AES_TEST_VECTORS 8
1710static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
1711 '\x02', '\x03', '\x02', '\x02',
1712 '\x02', '\x04', '\x01', '\x07',
1713 '\x04', '\x01', '\x04', '\x03',};
1714static char vmac_string2[128] = {'a', 'b', 'c',};
1715static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
1716 'a', 'b', 'c', 'a', 'b', 'c',
1717 'a', 'b', 'c', 'a', 'b', 'c',
1718 'a', 'b', 'c', 'a', 'b', 'c',
1719 'a', 'b', 'c', 'a', 'b', 'c',
1720 'a', 'b', 'c', 'a', 'b', 'c',
1721 'a', 'b', 'c', 'a', 'b', 'c',
1722 'a', 'b', 'c', 'a', 'b', 'c',
1723 };
1724
1725static struct hash_testvec aes_vmac128_tv_template[] = {
1726 {
1727 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1728 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1729 .plaintext = NULL,
1730 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
1731 .psize = 0,
1732 .ksize = 16,
1733 }, {
1734 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1735 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1736 .plaintext = vmac_string1,
1737 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
1738 .psize = 128,
1739 .ksize = 16,
1740 }, {
1741 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1742 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1743 .plaintext = vmac_string2,
1744 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
1745 .psize = 128,
1746 .ksize = 16,
1747 }, {
1748 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
1749 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1750 .plaintext = vmac_string3,
1751 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
1752 .psize = 128,
1753 .ksize = 16,
1754 }, {
1755 .key = "abcdefghijklmnop",
1756 .plaintext = NULL,
1757 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
1758 .psize = 0,
1759 .ksize = 16,
1760 }, {
1761 .key = "abcdefghijklmnop",
1762 .plaintext = vmac_string1,
1763 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
1764 .psize = 128,
1765 .ksize = 16,
1766 }, {
1767 .key = "abcdefghijklmnop",
1768 .plaintext = vmac_string2,
1769 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
1770 .psize = 128,
1771 .ksize = 16,
1772 }, {
1773 .key = "abcdefghijklmnop",
1774 .plaintext = vmac_string3,
1775 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
1776 .psize = 128,
1777 .ksize = 16,
1778 },
1779};
1780
1781
1782
1783
1784
1785#define HMAC_SHA384_TEST_VECTORS 4
1786
1787static struct hash_testvec hmac_sha384_tv_template[] = {
1788 {
1789 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1790 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1791 "\x0b\x0b\x0b\x0b",
1792 .ksize = 20,
1793 .plaintext = "Hi There",
1794 .psize = 8,
1795 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
1796 "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
1797 "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
1798 "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
1799 "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
1800 "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
1801 }, {
1802 .key = "Jefe",
1803 .ksize = 4,
1804 .plaintext = "what do ya want for nothing?",
1805 .psize = 28,
1806 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
1807 "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
1808 "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
1809 "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
1810 "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
1811 "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
1812 .np = 4,
1813 .tap = { 7, 7, 7, 7 }
1814 }, {
1815 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1816 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1817 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1818 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1819 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1820 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1821 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1822 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1823 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1824 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1825 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1826 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1827 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1828 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1829 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1830 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1831 "\xaa\xaa\xaa",
1832 .ksize = 131,
1833 .plaintext = "Test Using Larger Than Block-Siz"
1834 "e Key - Hash Key First",
1835 .psize = 54,
1836 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
1837 "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
1838 "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
1839 "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
1840 "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
1841 "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
1842 }, {
1843 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1844 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1845 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1846 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1847 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1848 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1849 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1850 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1851 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1852 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1853 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1854 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1855 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1856 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1857 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1858 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1859 "\xaa\xaa\xaa",
1860 .ksize = 131,
1861 .plaintext = "This is a test u"
1862 "sing a larger th"
1863 "an block-size ke"
1864 "y and a larger t"
1865 "han block-size d"
1866 "ata. The key nee"
1867 "ds to be hashed "
1868 "before being use"
1869 "d by the HMAC al"
1870 "gorithm.",
1871 .psize = 152,
1872 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
1873 "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
1874 "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
1875 "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
1876 "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
1877 "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
1878 },
1879};
1880
1881
1882
1883
1884
1885#define HMAC_SHA512_TEST_VECTORS 4
1886
1887static struct hash_testvec hmac_sha512_tv_template[] = {
1888 {
1889 .key = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1890 "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1891 "\x0b\x0b\x0b\x0b",
1892 .ksize = 20,
1893 .plaintext = "Hi There",
1894 .psize = 8,
1895 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
1896 "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
1897 "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
1898 "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
1899 "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
1900 "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
1901 "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
1902 "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
1903 }, {
1904 .key = "Jefe",
1905 .ksize = 4,
1906 .plaintext = "what do ya want for nothing?",
1907 .psize = 28,
1908 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
1909 "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
1910 "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
1911 "\x10\x27\x0c\xd7\xea\x25\x05\x54"
1912 "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
1913 "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
1914 "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
1915 "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
1916 .np = 4,
1917 .tap = { 7, 7, 7, 7 }
1918 }, {
1919 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1920 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1921 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1922 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1923 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1924 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1925 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1926 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1927 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1928 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1929 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1930 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1931 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1932 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1933 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1934 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1935 "\xaa\xaa\xaa",
1936 .ksize = 131,
1937 .plaintext = "Test Using Large"
1938 "r Than Block-Siz"
1939 "e Key - Hash Key"
1940 " First",
1941 .psize = 54,
1942 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
1943 "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
1944 "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
1945 "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
1946 "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
1947 "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
1948 "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
1949 "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
1950 }, {
1951 .key = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1952 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1953 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1954 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1955 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1956 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1957 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1958 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1959 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1960 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1961 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1962 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1963 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1964 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1965 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1966 "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1967 "\xaa\xaa\xaa",
1968 .ksize = 131,
1969 .plaintext =
1970 "This is a test u"
1971 "sing a larger th"
1972 "an block-size ke"
1973 "y and a larger t"
1974 "han block-size d"
1975 "ata. The key nee"
1976 "ds to be hashed "
1977 "before being use"
1978 "d by the HMAC al"
1979 "gorithm.",
1980 .psize = 152,
1981 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
1982 "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
1983 "\xde\xbd\x71\xf8\x86\x72\x89\x86"
1984 "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
1985 "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
1986 "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
1987 "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
1988 "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
1989 },
1990};
1991
1992
1993
1994
1995#define DES_ENC_TEST_VECTORS 10
1996#define DES_DEC_TEST_VECTORS 4
1997#define DES_CBC_ENC_TEST_VECTORS 5
1998#define DES_CBC_DEC_TEST_VECTORS 4
1999#define DES3_EDE_ENC_TEST_VECTORS 3
2000#define DES3_EDE_DEC_TEST_VECTORS 3
2001#define DES3_EDE_CBC_ENC_TEST_VECTORS 1
2002#define DES3_EDE_CBC_DEC_TEST_VECTORS 1
2003
2004static struct cipher_testvec des_enc_tv_template[] = {
2005 {
2006 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2007 .klen = 8,
2008 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2009 .ilen = 8,
2010 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2011 .rlen = 8,
2012 }, {
2013 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2014 .klen = 8,
2015 .input = "\x22\x33\x44\x55\x66\x77\x88\x99",
2016 .ilen = 8,
2017 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2018 .rlen = 8,
2019 }, {
2020 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2021 .klen = 8,
2022 .input = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2023 .ilen = 8,
2024 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2025 .rlen = 8,
2026 }, {
2027 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2028 .klen = 8,
2029 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2030 "\x22\x33\x44\x55\x66\x77\x88\x99"
2031 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2032 .ilen = 24,
2033 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2034 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2035 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2036 .rlen = 24,
2037 }, {
2038 .fail = 1,
2039 .wk = 1,
2040 .key = "\x01\x01\x01\x01\x01\x01\x01\x01",
2041 .klen = 8,
2042 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2043 .ilen = 8,
2044 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2045 .rlen = 8,
2046 }, {
2047 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2048 .klen = 8,
2049 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2050 "\x22\x33\x44\x55\x66\x77\x88\x99",
2051 .ilen = 16,
2052 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2053 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2054 .rlen = 16,
2055 .np = 2,
2056 .tap = { 8, 8 }
2057 }, {
2058 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2059 .klen = 8,
2060 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2061 "\x22\x33\x44\x55\x66\x77\x88\x99"
2062 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
2063 "\x22\x33\x44\x55\x66\x77\x88\x99",
2064 .ilen = 32,
2065 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2066 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2067 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
2068 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2069 .rlen = 32,
2070 .np = 3,
2071 .tap = { 14, 10, 8 }
2072 }, {
2073 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2074 .klen = 8,
2075 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2076 "\x22\x33\x44\x55\x66\x77\x88\x99"
2077 "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2078 .ilen = 24,
2079 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2080 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2081 "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2082 .rlen = 24,
2083 .np = 4,
2084 .tap = { 2, 1, 3, 18 }
2085 }, {
2086 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2087 .klen = 8,
2088 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2089 "\x22\x33\x44\x55\x66\x77\x88\x99",
2090 .ilen = 16,
2091 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2092 "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2093 .rlen = 16,
2094 .np = 5,
2095 .tap = { 2, 2, 2, 2, 8 }
2096 }, {
2097 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2098 .klen = 8,
2099 .input = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2100 .ilen = 8,
2101 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2102 .rlen = 8,
2103 .np = 8,
2104 .tap = { 1, 1, 1, 1, 1, 1, 1, 1 }
2105 },
2106};
2107
2108static struct cipher_testvec des_dec_tv_template[] = {
2109 {
2110 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2111 .klen = 8,
2112 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2113 .ilen = 8,
2114 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2115 .rlen = 8,
2116 }, {
2117 .key = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2118 .klen = 8,
2119 .input = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2120 .ilen = 8,
2121 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2122 .rlen = 8,
2123 }, {
2124 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2125 .klen = 8,
2126 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2127 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2128 .ilen = 16,
2129 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2130 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2131 .rlen = 16,
2132 .np = 2,
2133 .tap = { 8, 8 }
2134 }, {
2135 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2136 .klen = 8,
2137 .input = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2138 "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2139 .ilen = 16,
2140 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2141 "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2142 .rlen = 16,
2143 .np = 3,
2144 .tap = { 3, 12, 1 }
2145 },
2146};
2147
2148static struct cipher_testvec des_cbc_enc_tv_template[] = {
2149 {
2150 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2151 .klen = 8,
2152 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2153 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2154 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2155 "\x68\x65\x20\x74\x69\x6d\x65\x20",
2156 .ilen = 24,
2157 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2158 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2159 "\x46\x8e\x91\x15\x78\x88\xba\x68",
2160 .rlen = 24,
2161 }, {
2162 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2163 .klen = 8,
2164 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2165 .input = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2166 .ilen = 8,
2167 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2168 .rlen = 8,
2169 }, {
2170 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2171 .klen = 8,
2172 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2173 .input = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2174 .ilen = 8,
2175 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2176 .rlen = 8,
2177 }, {
2178 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2179 .klen = 8,
2180 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2181 .input = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2182 .ilen = 8,
2183 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2184 .rlen = 8,
2185 }, {
2186
2187 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2188 .klen = 8,
2189 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2190 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2191 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2192 "\x68\x65\x20\x74\x69\x6d\x65\x20",
2193 .ilen = 24,
2194 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2195 "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2196 "\x46\x8e\x91\x15\x78\x88\xba\x68",
2197 .rlen = 24,
2198 .np = 2,
2199 .tap = { 13, 11 }
2200 },
2201};
2202
2203static struct cipher_testvec des_cbc_dec_tv_template[] = {
2204 {
2205 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2206 .klen = 8,
2207 .iv = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2208 .input = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2209 .ilen = 8,
2210 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2211 .rlen = 8,
2212 }, {
2213 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2214 .klen = 8,
2215 .iv = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2216 .input = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2217 .ilen = 8,
2218 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2219 .rlen = 8,
2220 }, {
2221 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2222 .klen = 8,
2223 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2224 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2225 .ilen = 8,
2226 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2227 .rlen = 8,
2228 }, {
2229 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2230 .klen = 8,
2231 .iv = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2232 .input = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2233 .ilen = 8,
2234 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2235 .rlen = 8,
2236 .np = 2,
2237 .tap = { 4, 4 }
2238 },
2239};
2240
2241static struct cipher_testvec des3_ede_enc_tv_template[] = {
2242 {
2243 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2244 "\x55\x55\x55\x55\x55\x55\x55\x55"
2245 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2246 .klen = 24,
2247 .input = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
2248 .ilen = 8,
2249 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
2250 .rlen = 8,
2251 }, {
2252 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
2253 "\x86\x02\x87\x66\x59\x08\x21\x98"
2254 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
2255 .klen = 24,
2256 .input = "\x73\x71\x75\x69\x67\x67\x6c\x65",
2257 .ilen = 8,
2258 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
2259 .rlen = 8,
2260 }, {
2261 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
2262 "\x91\x07\xd0\x15\x89\x19\x01\x01"
2263 "\x19\x07\x92\x10\x98\x1a\x01\x01",
2264 .klen = 24,
2265 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
2266 .ilen = 8,
2267 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
2268 .rlen = 8,
2269 },
2270};
2271
2272static struct cipher_testvec des3_ede_dec_tv_template[] = {
2273 {
2274 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2275 "\x55\x55\x55\x55\x55\x55\x55\x55"
2276 "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2277 .klen = 24,
2278 .input = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
2279 .ilen = 8,
2280 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
2281 .rlen = 8,
2282 }, {
2283 .key = "\x03\x52\x02\x07\x67\x20\x82\x17"
2284 "\x86\x02\x87\x66\x59\x08\x21\x98"
2285 "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
2286 .klen = 24,
2287 .input = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
2288 .ilen = 8,
2289 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
2290 .rlen = 8,
2291 }, {
2292 .key = "\x10\x46\x10\x34\x89\x98\x80\x20"
2293 "\x91\x07\xd0\x15\x89\x19\x01\x01"
2294 "\x19\x07\x92\x10\x98\x1a\x01\x01",
2295 .klen = 24,
2296 .input = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
2297 .ilen = 8,
2298 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
2299 .rlen = 8,
2300 },
2301};
2302
2303static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
2304 {
2305 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
2306 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
2307 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
2308 .klen = 24,
2309 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
2310 .input = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
2311 "\x53\x20\x63\x65\x65\x72\x73\x74"
2312 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
2313 "\x20\x79\x65\x53\x72\x63\x74\x65"
2314 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
2315 "\x79\x6e\x53\x20\x63\x65\x65\x72"
2316 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
2317 "\x6e\x61\x20\x79\x65\x53\x72\x63"
2318 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
2319 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
2320 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
2321 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
2322 "\x72\x63\x74\x65\x20\x73\x6f\x54"
2323 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
2324 "\x63\x65\x65\x72\x73\x74\x54\x20"
2325 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
2326 .ilen = 128,
2327 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
2328 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
2329 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
2330 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
2331 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
2332 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
2333 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
2334 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
2335 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
2336 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
2337 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
2338 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
2339 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
2340 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
2341 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
2342 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
2343 .rlen = 128,
2344 },
2345};
2346
2347static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
2348 {
2349 .key = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
2350 "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
2351 "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
2352 .klen = 24,
2353 .iv = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
2354 .input = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
2355 "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
2356 "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
2357 "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
2358 "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
2359 "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
2360 "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
2361 "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
2362 "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
2363 "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
2364 "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
2365 "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
2366 "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
2367 "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
2368 "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
2369 "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
2370 .ilen = 128,
2371 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
2372 "\x53\x20\x63\x65\x65\x72\x73\x74"
2373 "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
2374 "\x20\x79\x65\x53\x72\x63\x74\x65"
2375 "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
2376 "\x79\x6e\x53\x20\x63\x65\x65\x72"
2377 "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
2378 "\x6e\x61\x20\x79\x65\x53\x72\x63"
2379 "\x74\x65\x20\x73\x6f\x54\x20\x6f"
2380 "\x61\x4d\x79\x6e\x53\x20\x63\x65"
2381 "\x65\x72\x73\x74\x54\x20\x6f\x6f"
2382 "\x4d\x20\x6e\x61\x20\x79\x65\x53"
2383 "\x72\x63\x74\x65\x20\x73\x6f\x54"
2384 "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
2385 "\x63\x65\x65\x72\x73\x74\x54\x20"
2386 "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
2387 .rlen = 128,
2388 },
2389};
2390
2391
2392
2393
2394#define BF_ENC_TEST_VECTORS 7
2395#define BF_DEC_TEST_VECTORS 7
2396#define BF_CBC_ENC_TEST_VECTORS 2
2397#define BF_CBC_DEC_TEST_VECTORS 2
2398#define BF_CTR_ENC_TEST_VECTORS 2
2399#define BF_CTR_DEC_TEST_VECTORS 2
2400
2401static struct cipher_testvec bf_enc_tv_template[] = {
2402 {
2403 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
2404 .klen = 8,
2405 .input = "\x00\x00\x00\x00\x00\x00\x00\x00",
2406 .ilen = 8,
2407 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
2408 .rlen = 8,
2409 }, {
2410 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
2411 .klen = 8,
2412 .input = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2413 .ilen = 8,
2414 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
2415 .rlen = 8,
2416 }, {
2417 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2418 .klen = 8,
2419 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2420 .ilen = 8,
2421 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
2422 .rlen = 8,
2423 }, {
2424 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2425 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
2426 .klen = 16,
2427 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2428 .ilen = 8,
2429 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
2430 .rlen = 8,
2431 }, {
2432 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2433 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2434 "\x00\x11\x22\x33\x44",
2435 .klen = 21,
2436 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2437 .ilen = 8,
2438 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
2439 .rlen = 8,
2440 }, {
2441 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2442 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2443 "\x00\x11\x22\x33\x44\x55\x66\x77"
2444 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2445 "\x58\x40\x23\x64\x1a\xba\x61\x76"
2446 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2447 "\xff\xff\xff\xff\xff\xff\xff\xff",
2448 .klen = 56,
2449 .input = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2450 .ilen = 8,
2451 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
2452 .rlen = 8,
2453 }, {
2454 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2455 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2456 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2457 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2458 .klen = 32,
2459 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2460 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2461 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2462 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2463 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2464 .ilen = 40,
2465 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
2466 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
2467 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
2468 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
2469 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
2470 .rlen = 40,
2471 },
2472};
2473
2474static struct cipher_testvec bf_dec_tv_template[] = {
2475 {
2476 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
2477 .klen = 8,
2478 .input = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
2479 .ilen = 8,
2480 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
2481 .rlen = 8,
2482 }, {
2483 .key = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
2484 .klen = 8,
2485 .input = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
2486 .ilen = 8,
2487 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2488 .rlen = 8,
2489 }, {
2490 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2491 .klen = 8,
2492 .input = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
2493 .ilen = 8,
2494 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2495 .rlen = 8,
2496 }, {
2497 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2498 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
2499 .klen = 16,
2500 .input = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
2501 .ilen = 8,
2502 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2503 .rlen = 8,
2504 }, {
2505 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2506 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2507 "\x00\x11\x22\x33\x44",
2508 .klen = 21,
2509 .input = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
2510 .ilen = 8,
2511 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2512 .rlen = 8,
2513 }, {
2514 .key = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2515 "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2516 "\x00\x11\x22\x33\x44\x55\x66\x77"
2517 "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2518 "\x58\x40\x23\x64\x1a\xba\x61\x76"
2519 "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2520 "\xff\xff\xff\xff\xff\xff\xff\xff",
2521 .klen = 56,
2522 .input = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
2523 .ilen = 8,
2524 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2525 .rlen = 8,
2526 }, {
2527 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2528 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2529 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2530 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2531 .klen = 32,
2532 .input = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
2533 "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
2534 "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
2535 "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
2536 "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
2537 .ilen = 40,
2538 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2539 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2540 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2541 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2542 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2543 .rlen = 40,
2544 },
2545};
2546
2547static struct cipher_testvec bf_cbc_enc_tv_template[] = {
2548 {
2549 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2550 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2551 .klen = 16,
2552 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2553 .input = "\x37\x36\x35\x34\x33\x32\x31\x20"
2554 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2555 "\x68\x65\x20\x74\x69\x6d\x65\x20"
2556 "\x66\x6f\x72\x20\x00\x00\x00\x00",
2557 .ilen = 32,
2558 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2559 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2560 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2561 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
2562 .rlen = 32,
2563 }, {
2564 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2565 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2566 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2567 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2568 .klen = 32,
2569 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2570 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2571 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2572 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2573 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2574 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2575 .ilen = 40,
2576 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
2577 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
2578 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
2579 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
2580 "\x01\x9C\x93\x63\x51\x60\x82\xD2",
2581 .rlen = 40,
2582 },
2583};
2584
2585static struct cipher_testvec bf_cbc_dec_tv_template[] = {
2586 {
2587 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2588 "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2589 .klen = 16,
2590 .iv = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2591 .input = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2592 "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2593 "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2594 "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
2595 .ilen = 32,
2596 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
2597 "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2598 "\x68\x65\x20\x74\x69\x6d\x65\x20"
2599 "\x66\x6f\x72\x20\x00\x00\x00\x00",
2600 .rlen = 32,
2601 }, {
2602 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2603 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2604 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2605 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2606 .klen = 32,
2607 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2608 .input = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
2609 "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
2610 "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
2611 "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
2612 "\x01\x9C\x93\x63\x51\x60\x82\xD2",
2613 .ilen = 40,
2614 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2615 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2616 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2617 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2618 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2619 .rlen = 40,
2620 },
2621};
2622
2623static struct cipher_testvec bf_ctr_enc_tv_template[] = {
2624 {
2625 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2626 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2627 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2628 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2629 .klen = 32,
2630 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2631 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2632 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2633 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2634 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2635 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2636 .ilen = 40,
2637 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2638 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2639 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2640 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2641 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
2642 .rlen = 40,
2643 }, {
2644 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2645 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2646 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2647 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2648 .klen = 32,
2649 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2650 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2651 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2652 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2653 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2654 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2655 "\x6D\x04\x9B",
2656 .ilen = 43,
2657 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2658 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2659 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2660 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2661 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
2662 "\x3D\xA7\xE9",
2663 .rlen = 43,
2664 },
2665};
2666
2667static struct cipher_testvec bf_ctr_dec_tv_template[] = {
2668 {
2669 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2670 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2671 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2672 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2673 .klen = 32,
2674 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2675 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2676 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2677 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2678 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2679 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
2680 .ilen = 40,
2681 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2682 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2683 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2684 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2685 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2686 .rlen = 40,
2687 }, {
2688 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2689 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2690 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2691 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2692 .klen = 32,
2693 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2694 .input = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2695 "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2696 "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2697 "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2698 "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
2699 "\x3D\xA7\xE9",
2700 .ilen = 43,
2701 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2702 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2703 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2704 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2705 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2706 "\x6D\x04\x9B",
2707 .rlen = 43,
2708 },
2709};
2710
2711
2712
2713
2714#define TF_ENC_TEST_VECTORS 4
2715#define TF_DEC_TEST_VECTORS 4
2716#define TF_CBC_ENC_TEST_VECTORS 5
2717#define TF_CBC_DEC_TEST_VECTORS 5
2718#define TF_CTR_ENC_TEST_VECTORS 2
2719#define TF_CTR_DEC_TEST_VECTORS 2
2720#define TF_LRW_ENC_TEST_VECTORS 8
2721#define TF_LRW_DEC_TEST_VECTORS 8
2722#define TF_XTS_ENC_TEST_VECTORS 5
2723#define TF_XTS_DEC_TEST_VECTORS 5
2724
2725static struct cipher_testvec tf_enc_tv_template[] = {
2726 {
2727 .key = zeroed_string,
2728 .klen = 16,
2729 .input = zeroed_string,
2730 .ilen = 16,
2731 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2732 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2733 .rlen = 16,
2734 }, {
2735 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2736 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2737 "\x00\x11\x22\x33\x44\x55\x66\x77",
2738 .klen = 24,
2739 .input = zeroed_string,
2740 .ilen = 16,
2741 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
2742 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
2743 .rlen = 16,
2744 }, {
2745 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2746 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2747 "\x00\x11\x22\x33\x44\x55\x66\x77"
2748 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
2749 .klen = 32,
2750 .input = zeroed_string,
2751 .ilen = 16,
2752 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
2753 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
2754 .rlen = 16,
2755 }, {
2756 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
2757 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
2758 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
2759 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
2760 .klen = 32,
2761 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2762 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2763 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2764 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2765 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2766 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2767 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2768 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
2769 .ilen = 64,
2770 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
2771 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
2772 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
2773 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
2774 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
2775 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
2776 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
2777 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02",
2778 .rlen = 64,
2779 },
2780};
2781
2782static struct cipher_testvec tf_dec_tv_template[] = {
2783 {
2784 .key = zeroed_string,
2785 .klen = 16,
2786 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2787 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2788 .ilen = 16,
2789 .result = zeroed_string,
2790 .rlen = 16,
2791 }, {
2792 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2793 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2794 "\x00\x11\x22\x33\x44\x55\x66\x77",
2795 .klen = 24,
2796 .input = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
2797 "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
2798 .ilen = 16,
2799 .result = zeroed_string,
2800 .rlen = 16,
2801 }, {
2802 .key = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2803 "\xfe\xdc\xba\x98\x76\x54\x32\x10"
2804 "\x00\x11\x22\x33\x44\x55\x66\x77"
2805 "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
2806 .klen = 32,
2807 .input = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
2808 "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
2809 .ilen = 16,
2810 .result = zeroed_string,
2811 .rlen = 16,
2812 }, {
2813 .key = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
2814 "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
2815 "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
2816 "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
2817 .klen = 32,
2818 .input = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
2819 "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
2820 "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
2821 "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
2822 "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
2823 "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
2824 "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
2825 "\x89\xF6\x82\xF0\xD3\xDB\x06\x02",
2826 .ilen = 64,
2827 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2828 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2829 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2830 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2831 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2832 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2833 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2834 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
2835 .rlen = 64,
2836 },
2837};
2838
2839static struct cipher_testvec tf_cbc_enc_tv_template[] = {
2840 {
2841 .key = zeroed_string,
2842 .klen = 16,
2843 .iv = zeroed_string,
2844 .input = zeroed_string,
2845 .ilen = 16,
2846 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2847 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2848 .rlen = 16,
2849 }, {
2850 .key = zeroed_string,
2851 .klen = 16,
2852 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2853 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2854 .input = zeroed_string,
2855 .ilen = 16,
2856 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2857 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
2858 .rlen = 16,
2859 }, {
2860 .key = zeroed_string,
2861 .klen = 16,
2862 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2863 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
2864 .input = zeroed_string,
2865 .ilen = 16,
2866 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
2867 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
2868 .rlen = 16,
2869 }, {
2870 .key = zeroed_string,
2871 .klen = 16,
2872 .iv = zeroed_string,
2873 .input = zeroed_string,
2874 .ilen = 48,
2875 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2876 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
2877 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2878 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
2879 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
2880 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
2881 .rlen = 48,
2882 }, {
2883 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2884 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2885 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2886 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2887 .klen = 32,
2888 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
2889 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
2890 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2891 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2892 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2893 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2894 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2895 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2896 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2897 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
2898 .ilen = 64,
2899 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
2900 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
2901 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
2902 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
2903 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
2904 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
2905 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
2906 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38",
2907 .rlen = 64,
2908 },
2909};
2910
2911static struct cipher_testvec tf_cbc_dec_tv_template[] = {
2912 {
2913 .key = zeroed_string,
2914 .klen = 16,
2915 .iv = zeroed_string,
2916 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2917 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2918 .ilen = 16,
2919 .result = zeroed_string,
2920 .rlen = 16,
2921 }, {
2922 .key = zeroed_string,
2923 .klen = 16,
2924 .iv = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2925 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
2926 .input = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2927 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
2928 .ilen = 16,
2929 .result = zeroed_string,
2930 .rlen = 16,
2931 }, {
2932 .key = zeroed_string,
2933 .klen = 16,
2934 .iv = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2935 "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
2936 .input = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
2937 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
2938 .ilen = 16,
2939 .result = zeroed_string,
2940 .rlen = 16,
2941 }, {
2942 .key = zeroed_string,
2943 .klen = 16,
2944 .iv = zeroed_string,
2945 .input = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
2946 "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
2947 "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
2948 "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
2949 "\x05\xef\x8c\x61\xa8\x11\x58\x26"
2950 "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
2951 .ilen = 48,
2952 .result = zeroed_string,
2953 .rlen = 48,
2954 }, {
2955 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2956 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2957 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2958 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2959 .klen = 32,
2960 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
2961 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
2962 .input = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
2963 "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
2964 "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
2965 "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
2966 "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
2967 "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
2968 "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
2969 "\xB1\xD3\x44\x65\xDF\xE7\x63\x38",
2970 .ilen = 64,
2971 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2972 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2973 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2974 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2975 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2976 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2977 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2978 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
2979 .rlen = 64,
2980 },
2981};
2982
2983static struct cipher_testvec tf_ctr_enc_tv_template[] = {
2984 {
2985 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2986 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2987 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2988 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2989 .klen = 32,
2990 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
2991 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
2992 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2993 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2994 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2995 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2996 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2997 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2998 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2999 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
3000 .ilen = 64,
3001 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3002 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3003 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3004 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3005 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3006 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3007 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
3008 "\x01\x41\x21\x12\x38\xAB\x52\x4F",
3009 .rlen = 64,
3010 }, {
3011 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3012 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3013 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3014 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3015 .klen = 32,
3016 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3017 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3018 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3019 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3020 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3021 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3022 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3023 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3024 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3025 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3026 "\xC3\x37\xCE",
3027 .ilen = 67,
3028 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3029 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3030 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3031 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3032 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3033 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3034 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
3035 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
3036 "\xA8\x57\x20",
3037 .rlen = 67,
3038 },
3039};
3040
3041static struct cipher_testvec tf_ctr_dec_tv_template[] = {
3042 {
3043 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3044 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3045 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3046 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3047 .klen = 32,
3048 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3049 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3050 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3051 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3052 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3053 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3054 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3055 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3056 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
3057 "\x01\x41\x21\x12\x38\xAB\x52\x4F",
3058 .ilen = 64,
3059 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3060 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3061 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3062 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3063 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3064 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3065 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3066 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C",
3067 .rlen = 64,
3068 }, {
3069 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3070 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3071 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3072 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3073 .klen = 32,
3074 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3075 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3076 .input = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3077 "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3078 "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3079 "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3080 "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3081 "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3082 "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
3083 "\x01\x41\x21\x12\x38\xAB\x52\x4F"
3084 "\xA8\x57\x20",
3085 .ilen = 67,
3086 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3087 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3088 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3089 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3090 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3091 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3092 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3093 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3094 "\xC3\x37\xCE",
3095 .rlen = 67,
3096 },
3097};
3098
3099static struct cipher_testvec tf_lrw_enc_tv_template[] = {
3100
3101 {
3102 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
3103 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
3104 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
3105 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
3106 .klen = 32,
3107 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3108 "\x00\x00\x00\x00\x00\x00\x00\x01",
3109 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3110 "\x38\x39\x41\x42\x43\x44\x45\x46",
3111 .ilen = 16,
3112 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
3113 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
3114 .rlen = 16,
3115 }, {
3116 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
3117 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
3118 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
3119 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
3120 .klen = 32,
3121 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3122 "\x00\x00\x00\x00\x00\x00\x00\x02",
3123 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3124 "\x38\x39\x41\x42\x43\x44\x45\x46",
3125 .ilen = 16,
3126 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
3127 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
3128 .rlen = 16,
3129 }, {
3130 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
3131 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
3132 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
3133 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
3134 .klen = 32,
3135 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3136 "\x00\x00\x00\x02\x00\x00\x00\x00",
3137 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3138 "\x38\x39\x41\x42\x43\x44\x45\x46",
3139 .ilen = 16,
3140 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
3141 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
3142 .rlen = 16,
3143 }, {
3144 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
3145 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
3146 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
3147 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
3148 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
3149 .klen = 40,
3150 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3151 "\x00\x00\x00\x00\x00\x00\x00\x01",
3152 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3153 "\x38\x39\x41\x42\x43\x44\x45\x46",
3154 .ilen = 16,
3155 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
3156 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
3157 .rlen = 16,
3158 }, {
3159 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
3160 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
3161 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
3162 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
3163 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
3164 .klen = 40,
3165 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3166 "\x00\x00\x00\x02\x00\x00\x00\x00",
3167 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3168 "\x38\x39\x41\x42\x43\x44\x45\x46",
3169 .ilen = 16,
3170 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
3171 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
3172 .rlen = 16,
3173 }, {
3174 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
3175 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
3176 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
3177 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
3178 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
3179 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
3180 .klen = 48,
3181 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3182 "\x00\x00\x00\x00\x00\x00\x00\x01",
3183 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3184 "\x38\x39\x41\x42\x43\x44\x45\x46",
3185 .ilen = 16,
3186 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
3187 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
3188 .rlen = 16,
3189 }, {
3190 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
3191 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
3192 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
3193 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
3194 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
3195 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
3196 .klen = 48,
3197 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3198 "\x00\x00\x00\x02\x00\x00\x00\x00",
3199 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
3200 "\x38\x39\x41\x42\x43\x44\x45\x46",
3201 .ilen = 16,
3202 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
3203 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
3204 .rlen = 16,
3205 }, {
3206 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
3207 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
3208 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
3209 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
3210 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
3211 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
3212 .klen = 48,
3213 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3214 "\x00\x00\x00\x00\x00\x00\x00\x01",
3215 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
3216 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
3217 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
3218 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
3219 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
3220 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
3221 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
3222 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
3223 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
3224 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
3225 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
3226 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
3227 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
3228 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
3229 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
3230 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
3231 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
3232 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
3233 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
3234 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
3235 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
3236 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
3237 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
3238 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
3239 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
3240 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
3241 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
3242 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
3243 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
3244 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
3245 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
3246 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
3247 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
3248 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
3249 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
3250 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
3251 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
3252 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
3253 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
3254 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
3255 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
3256 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
3257 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
3258 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
3259 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
3260 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
3261 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
3262 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
3263 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
3264 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
3265 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
3266 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
3267 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
3268 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
3269 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
3270 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
3271 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
3272 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
3273 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
3274 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
3275 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
3276 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
3277 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
3278 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
3279 .ilen = 512,
3280 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
3281 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
3282 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
3283 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
3284 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
3285 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
3286 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
3287 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
3288 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
3289 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
3290 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
3291 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
3292 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
3293 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
3294 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
3295 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
3296 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
3297 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
3298 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
3299 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
3300 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
3301 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
3302 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
3303 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
3304 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
3305 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
3306 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
3307 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
3308 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
3309 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
3310 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
3311 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
3312 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
3313 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
3314 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
3315 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
3316 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
3317 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
3318 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
3319 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
3320 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
3321 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
3322 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
3323 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
3324 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
3325 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
3326 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
3327 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
3328 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
3329 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
3330 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
3331 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
3332 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
3333 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
3334 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
3335 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
3336 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
3337 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
3338 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
3339 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
3340 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
3341 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
3342 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
3343 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
3344 .rlen = 512,
3345 },
3346};
3347
3348static struct cipher_testvec tf_lrw_dec_tv_template[] = {
3349
3350
3351 {
3352 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
3353 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
3354 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
3355 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
3356 .klen = 32,
3357 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3358 "\x00\x00\x00\x00\x00\x00\x00\x01",
3359 .input = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
3360 "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
3361 .ilen = 16,
3362 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3363 "\x38\x39\x41\x42\x43\x44\x45\x46",
3364 .rlen = 16,
3365 }, {
3366 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
3367 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
3368 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
3369 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
3370 .klen = 32,
3371 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3372 "\x00\x00\x00\x00\x00\x00\x00\x02",
3373 .input = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
3374 "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
3375 .ilen = 16,
3376 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3377 "\x38\x39\x41\x42\x43\x44\x45\x46",
3378 .rlen = 16,
3379 }, {
3380 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
3381 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
3382 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
3383 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
3384 .klen = 32,
3385 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3386 "\x00\x00\x00\x02\x00\x00\x00\x00",
3387 .input = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
3388 "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
3389 .ilen = 16,
3390 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3391 "\x38\x39\x41\x42\x43\x44\x45\x46",
3392 .rlen = 16,
3393 }, {
3394 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
3395 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
3396 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
3397 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
3398 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
3399 .klen = 40,
3400 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3401 "\x00\x00\x00\x00\x00\x00\x00\x01",
3402 .input = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
3403 "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
3404 .ilen = 16,
3405 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3406 "\x38\x39\x41\x42\x43\x44\x45\x46",
3407 .rlen = 16,
3408 }, {
3409 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
3410 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
3411 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
3412 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
3413 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
3414 .klen = 40,
3415 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3416 "\x00\x00\x00\x02\x00\x00\x00\x00",
3417 .input = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
3418 "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
3419 .ilen = 16,
3420 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3421 "\x38\x39\x41\x42\x43\x44\x45\x46",
3422 .rlen = 16,
3423 }, {
3424 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
3425 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
3426 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
3427 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
3428 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
3429 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
3430 .klen = 48,
3431 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3432 "\x00\x00\x00\x00\x00\x00\x00\x01",
3433 .input = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
3434 "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
3435 .ilen = 16,
3436 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3437 "\x38\x39\x41\x42\x43\x44\x45\x46",
3438 .rlen = 16,
3439 }, {
3440 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
3441 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
3442 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
3443 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
3444 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
3445 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
3446 .klen = 48,
3447 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3448 "\x00\x00\x00\x02\x00\x00\x00\x00",
3449 .input = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
3450 "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
3451 .ilen = 16,
3452 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
3453 "\x38\x39\x41\x42\x43\x44\x45\x46",
3454 .rlen = 16,
3455 }, {
3456 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
3457 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
3458 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
3459 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
3460 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
3461 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
3462 .klen = 48,
3463 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3464 "\x00\x00\x00\x00\x00\x00\x00\x01",
3465 .input = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
3466 "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
3467 "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
3468 "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
3469 "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
3470 "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
3471 "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
3472 "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
3473 "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
3474 "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
3475 "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
3476 "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
3477 "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
3478 "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
3479 "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
3480 "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
3481 "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
3482 "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
3483 "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
3484 "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
3485 "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
3486 "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
3487 "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
3488 "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
3489 "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
3490 "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
3491 "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
3492 "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
3493 "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
3494 "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
3495 "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
3496 "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
3497 "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
3498 "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
3499 "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
3500 "\x3e\xae\x71\x90\x07\x70\x1c\x38"
3501 "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
3502 "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
3503 "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
3504 "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
3505 "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
3506 "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
3507 "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
3508 "\x93\x51\x1d\x3d\x62\x59\x83\x82"
3509 "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
3510 "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
3511 "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
3512 "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
3513 "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
3514 "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
3515 "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
3516 "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
3517 "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
3518 "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
3519 "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
3520 "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
3521 "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
3522 "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
3523 "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
3524 "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
3525 "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
3526 "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
3527 "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
3528 "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
3529 .ilen = 512,
3530 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
3531 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
3532 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
3533 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
3534 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
3535 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
3536 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
3537 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
3538 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
3539 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
3540 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
3541 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
3542 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
3543 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
3544 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
3545 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
3546 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
3547 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
3548 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
3549 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
3550 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
3551 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
3552 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
3553 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
3554 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
3555 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
3556 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
3557 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
3558 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
3559 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
3560 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
3561 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
3562 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
3563 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
3564 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
3565 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
3566 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
3567 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
3568 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
3569 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
3570 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
3571 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
3572 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
3573 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
3574 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
3575 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
3576 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
3577 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
3578 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
3579 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
3580 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
3581 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
3582 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
3583 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
3584 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
3585 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
3586 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
3587 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
3588 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
3589 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
3590 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
3591 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
3592 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
3593 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
3594 .rlen = 512,
3595 },
3596};
3597
3598static struct cipher_testvec tf_xts_enc_tv_template[] = {
3599
3600{
3601 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
3602 "\x00\x00\x00\x00\x00\x00\x00\x00"
3603 "\x00\x00\x00\x00\x00\x00\x00\x00"
3604 "\x00\x00\x00\x00\x00\x00\x00\x00",
3605 .klen = 32,
3606 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3607 "\x00\x00\x00\x00\x00\x00\x00\x00",
3608 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
3609 "\x00\x00\x00\x00\x00\x00\x00\x00"
3610 "\x00\x00\x00\x00\x00\x00\x00\x00"
3611 "\x00\x00\x00\x00\x00\x00\x00\x00",
3612 .ilen = 32,
3613 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
3614 "\x30\x74\xe4\x44\x52\x77\x97\x43"
3615 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
3616 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
3617 .rlen = 32,
3618 }, {
3619 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
3620 "\x11\x11\x11\x11\x11\x11\x11\x11"
3621 "\x22\x22\x22\x22\x22\x22\x22\x22"
3622 "\x22\x22\x22\x22\x22\x22\x22\x22",
3623 .klen = 32,
3624 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
3625 "\x00\x00\x00\x00\x00\x00\x00\x00",
3626 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
3627 "\x44\x44\x44\x44\x44\x44\x44\x44"
3628 "\x44\x44\x44\x44\x44\x44\x44\x44"
3629 "\x44\x44\x44\x44\x44\x44\x44\x44",
3630 .ilen = 32,
3631 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
3632 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
3633 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
3634 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
3635 .rlen = 32,
3636 }, {
3637 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
3638 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
3639 "\x22\x22\x22\x22\x22\x22\x22\x22"
3640 "\x22\x22\x22\x22\x22\x22\x22\x22",
3641 .klen = 32,
3642 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
3643 "\x00\x00\x00\x00\x00\x00\x00\x00",
3644 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
3645 "\x44\x44\x44\x44\x44\x44\x44\x44"
3646 "\x44\x44\x44\x44\x44\x44\x44\x44"
3647 "\x44\x44\x44\x44\x44\x44\x44\x44",
3648 .ilen = 32,
3649 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
3650 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
3651 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
3652 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
3653 .rlen = 32,
3654 }, {
3655 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
3656 "\x23\x53\x60\x28\x74\x71\x35\x26"
3657 "\x31\x41\x59\x26\x53\x58\x97\x93"
3658 "\x23\x84\x62\x64\x33\x83\x27\x95",
3659 .klen = 32,
3660 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3661 "\x00\x00\x00\x00\x00\x00\x00\x00",
3662 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
3663 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3664 "\x10\x11\x12\x13\x14\x15\x16\x17"
3665 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
3666 "\x20\x21\x22\x23\x24\x25\x26\x27"
3667 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
3668 "\x30\x31\x32\x33\x34\x35\x36\x37"
3669 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
3670 "\x40\x41\x42\x43\x44\x45\x46\x47"
3671 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
3672 "\x50\x51\x52\x53\x54\x55\x56\x57"
3673 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
3674 "\x60\x61\x62\x63\x64\x65\x66\x67"
3675 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
3676 "\x70\x71\x72\x73\x74\x75\x76\x77"
3677 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
3678 "\x80\x81\x82\x83\x84\x85\x86\x87"
3679 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
3680 "\x90\x91\x92\x93\x94\x95\x96\x97"
3681 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
3682 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
3683 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
3684 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
3685 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
3686 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
3687 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
3688 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
3689 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
3690 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
3691 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
3692 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
3693 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
3694 "\x00\x01\x02\x03\x04\x05\x06\x07"
3695 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3696 "\x10\x11\x12\x13\x14\x15\x16\x17"
3697 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
3698 "\x20\x21\x22\x23\x24\x25\x26\x27"
3699 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
3700 "\x30\x31\x32\x33\x34\x35\x36\x37"
3701 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
3702 "\x40\x41\x42\x43\x44\x45\x46\x47"
3703 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
3704 "\x50\x51\x52\x53\x54\x55\x56\x57"
3705 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
3706 "\x60\x61\x62\x63\x64\x65\x66\x67"
3707 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
3708 "\x70\x71\x72\x73\x74\x75\x76\x77"
3709 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
3710 "\x80\x81\x82\x83\x84\x85\x86\x87"
3711 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
3712 "\x90\x91\x92\x93\x94\x95\x96\x97"
3713 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
3714 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
3715 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
3716 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
3717 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
3718 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
3719 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
3720 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
3721 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
3722 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
3723 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
3724 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
3725 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
3726 .ilen = 512,
3727 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
3728 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
3729 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
3730 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
3731 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
3732 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
3733 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
3734 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
3735 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
3736 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
3737 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
3738 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
3739 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
3740 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
3741 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
3742 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
3743 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
3744 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
3745 "\x39\x80\x39\x09\x97\x65\xf2\x83"
3746 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
3747 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
3748 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
3749 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
3750 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
3751 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
3752 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
3753 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
3754 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
3755 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
3756 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
3757 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
3758 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
3759 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
3760 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
3761 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
3762 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
3763 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
3764 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
3765 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
3766 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
3767 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
3768 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
3769 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
3770 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
3771 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
3772 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
3773 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
3774 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
3775 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
3776 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
3777 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
3778 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
3779 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
3780 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
3781 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
3782 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
3783 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
3784 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
3785 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
3786 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
3787 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
3788 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
3789 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
3790 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
3791 .rlen = 512,
3792 }, {
3793 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
3794 "\x23\x53\x60\x28\x74\x71\x35\x26"
3795 "\x62\x49\x77\x57\x24\x70\x93\x69"
3796 "\x99\x59\x57\x49\x66\x96\x76\x27"
3797 "\x31\x41\x59\x26\x53\x58\x97\x93"
3798 "\x23\x84\x62\x64\x33\x83\x27\x95"
3799 "\x02\x88\x41\x97\x16\x93\x99\x37"
3800 "\x51\x05\x82\x09\x74\x94\x45\x92",
3801 .klen = 64,
3802 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
3803 "\x00\x00\x00\x00\x00\x00\x00\x00",
3804 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
3805 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3806 "\x10\x11\x12\x13\x14\x15\x16\x17"
3807 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
3808 "\x20\x21\x22\x23\x24\x25\x26\x27"
3809 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
3810 "\x30\x31\x32\x33\x34\x35\x36\x37"
3811 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
3812 "\x40\x41\x42\x43\x44\x45\x46\x47"
3813 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
3814 "\x50\x51\x52\x53\x54\x55\x56\x57"
3815 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
3816 "\x60\x61\x62\x63\x64\x65\x66\x67"
3817 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
3818 "\x70\x71\x72\x73\x74\x75\x76\x77"
3819 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
3820 "\x80\x81\x82\x83\x84\x85\x86\x87"
3821 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
3822 "\x90\x91\x92\x93\x94\x95\x96\x97"
3823 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
3824 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
3825 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
3826 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
3827 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
3828 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
3829 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
3830 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
3831 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
3832 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
3833 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
3834 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
3835 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
3836 "\x00\x01\x02\x03\x04\x05\x06\x07"
3837 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
3838 "\x10\x11\x12\x13\x14\x15\x16\x17"
3839 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
3840 "\x20\x21\x22\x23\x24\x25\x26\x27"
3841 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
3842 "\x30\x31\x32\x33\x34\x35\x36\x37"
3843 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
3844 "\x40\x41\x42\x43\x44\x45\x46\x47"
3845 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
3846 "\x50\x51\x52\x53\x54\x55\x56\x57"
3847 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
3848 "\x60\x61\x62\x63\x64\x65\x66\x67"
3849 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
3850 "\x70\x71\x72\x73\x74\x75\x76\x77"
3851 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
3852 "\x80\x81\x82\x83\x84\x85\x86\x87"
3853 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
3854 "\x90\x91\x92\x93\x94\x95\x96\x97"
3855 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
3856 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
3857 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
3858 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
3859 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
3860 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
3861 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
3862 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
3863 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
3864 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
3865 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
3866 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
3867 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
3868 .ilen = 512,
3869 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
3870 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
3871 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
3872 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
3873 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
3874 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
3875 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
3876 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
3877 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
3878 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
3879 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
3880 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
3881 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
3882 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
3883 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
3884 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
3885 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
3886 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
3887 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
3888 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
3889 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
3890 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
3891 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
3892 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
3893 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
3894 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
3895 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
3896 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
3897 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
3898 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
3899 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
3900 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
3901 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
3902 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
3903 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
3904 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
3905 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
3906 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
3907 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
3908 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
3909 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
3910 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
3911 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
3912 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
3913 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
3914 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
3915 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
3916 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
3917 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
3918 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
3919 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
3920 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
3921 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
3922 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
3923 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
3924 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
3925 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
3926 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
3927 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
3928 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
3929 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
3930 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
3931 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
3932 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
3933 .rlen = 512,
3934 },
3935};
3936
3937static struct cipher_testvec tf_xts_dec_tv_template[] = {
3938
3939
3940 {
3941 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
3942 "\x00\x00\x00\x00\x00\x00\x00\x00"
3943 "\x00\x00\x00\x00\x00\x00\x00\x00"
3944 "\x00\x00\x00\x00\x00\x00\x00\x00",
3945 .klen = 32,
3946 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
3947 "\x00\x00\x00\x00\x00\x00\x00\x00",
3948 .input = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
3949 "\x30\x74\xe4\x44\x52\x77\x97\x43"
3950 "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
3951 "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
3952 .ilen = 32,
3953 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
3954 "\x00\x00\x00\x00\x00\x00\x00\x00"
3955 "\x00\x00\x00\x00\x00\x00\x00\x00"
3956 "\x00\x00\x00\x00\x00\x00\x00\x00",
3957 .rlen = 32,
3958 }, {
3959 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
3960 "\x11\x11\x11\x11\x11\x11\x11\x11"
3961 "\x22\x22\x22\x22\x22\x22\x22\x22"
3962 "\x22\x22\x22\x22\x22\x22\x22\x22",
3963 .klen = 32,
3964 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
3965 "\x00\x00\x00\x00\x00\x00\x00\x00",
3966 .input = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
3967 "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
3968 "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
3969 "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
3970 .ilen = 32,
3971 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
3972 "\x44\x44\x44\x44\x44\x44\x44\x44"
3973 "\x44\x44\x44\x44\x44\x44\x44\x44"
3974 "\x44\x44\x44\x44\x44\x44\x44\x44",
3975 .rlen = 32,
3976 }, {
3977 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
3978 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
3979 "\x22\x22\x22\x22\x22\x22\x22\x22"
3980 "\x22\x22\x22\x22\x22\x22\x22\x22",
3981 .klen = 32,
3982 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
3983 "\x00\x00\x00\x00\x00\x00\x00\x00",
3984 .input = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
3985 "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
3986 "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
3987 "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
3988 .ilen = 32,
3989 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
3990 "\x44\x44\x44\x44\x44\x44\x44\x44"
3991 "\x44\x44\x44\x44\x44\x44\x44\x44"
3992 "\x44\x44\x44\x44\x44\x44\x44\x44",
3993 .rlen = 32,
3994 }, {
3995 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
3996 "\x23\x53\x60\x28\x74\x71\x35\x26"
3997 "\x31\x41\x59\x26\x53\x58\x97\x93"
3998 "\x23\x84\x62\x64\x33\x83\x27\x95",
3999 .klen = 32,
4000 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4001 "\x00\x00\x00\x00\x00\x00\x00\x00",
4002 .input = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
4003 "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
4004 "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
4005 "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
4006 "\xea\x35\x35\x8c\xb2\x46\x61\x06"
4007 "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
4008 "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
4009 "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
4010 "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
4011 "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
4012 "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
4013 "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
4014 "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
4015 "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
4016 "\x01\x73\x68\x32\x25\x19\xfa\xfb"
4017 "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
4018 "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
4019 "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
4020 "\x39\x80\x39\x09\x97\x65\xf2\x83"
4021 "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
4022 "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
4023 "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
4024 "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
4025 "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
4026 "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
4027 "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
4028 "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
4029 "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
4030 "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
4031 "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
4032 "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
4033 "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
4034 "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
4035 "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
4036 "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
4037 "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
4038 "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
4039 "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
4040 "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
4041 "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
4042 "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
4043 "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
4044 "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
4045 "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
4046 "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
4047 "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
4048 "\x04\x39\x73\x32\xb2\x86\x79\xe7"
4049 "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
4050 "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
4051 "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
4052 "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
4053 "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
4054 "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
4055 "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
4056 "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
4057 "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
4058 "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
4059 "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
4060 "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
4061 "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
4062 "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
4063 "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
4064 "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
4065 "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
4066 .ilen = 512,
4067 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
4068 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4069 "\x10\x11\x12\x13\x14\x15\x16\x17"
4070 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4071 "\x20\x21\x22\x23\x24\x25\x26\x27"
4072 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4073 "\x30\x31\x32\x33\x34\x35\x36\x37"
4074 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4075 "\x40\x41\x42\x43\x44\x45\x46\x47"
4076 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4077 "\x50\x51\x52\x53\x54\x55\x56\x57"
4078 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4079 "\x60\x61\x62\x63\x64\x65\x66\x67"
4080 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4081 "\x70\x71\x72\x73\x74\x75\x76\x77"
4082 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4083 "\x80\x81\x82\x83\x84\x85\x86\x87"
4084 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4085 "\x90\x91\x92\x93\x94\x95\x96\x97"
4086 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4087 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4088 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4089 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
4090 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
4091 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
4092 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
4093 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
4094 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
4095 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
4096 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
4097 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
4098 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
4099 "\x00\x01\x02\x03\x04\x05\x06\x07"
4100 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4101 "\x10\x11\x12\x13\x14\x15\x16\x17"
4102 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4103 "\x20\x21\x22\x23\x24\x25\x26\x27"
4104 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4105 "\x30\x31\x32\x33\x34\x35\x36\x37"
4106 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4107 "\x40\x41\x42\x43\x44\x45\x46\x47"
4108 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4109 "\x50\x51\x52\x53\x54\x55\x56\x57"
4110 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4111 "\x60\x61\x62\x63\x64\x65\x66\x67"
4112 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4113 "\x70\x71\x72\x73\x74\x75\x76\x77"
4114 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4115 "\x80\x81\x82\x83\x84\x85\x86\x87"
4116 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4117 "\x90\x91\x92\x93\x94\x95\x96\x97"
4118 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4119 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4120 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4121 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
4122 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
4123 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
4124 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
4125 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
4126 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
4127 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
4128 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
4129 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
4130 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
4131 .rlen = 512,
4132 }, {
4133 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
4134 "\x23\x53\x60\x28\x74\x71\x35\x26"
4135 "\x62\x49\x77\x57\x24\x70\x93\x69"
4136 "\x99\x59\x57\x49\x66\x96\x76\x27"
4137 "\x31\x41\x59\x26\x53\x58\x97\x93"
4138 "\x23\x84\x62\x64\x33\x83\x27\x95"
4139 "\x02\x88\x41\x97\x16\x93\x99\x37"
4140 "\x51\x05\x82\x09\x74\x94\x45\x92",
4141 .klen = 64,
4142 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
4143 "\x00\x00\x00\x00\x00\x00\x00\x00",
4144 .input = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
4145 "\x35\x39\x71\x88\x76\x1e\xc9\xea"
4146 "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
4147 "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
4148 "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
4149 "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
4150 "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
4151 "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
4152 "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
4153 "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
4154 "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
4155 "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
4156 "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
4157 "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
4158 "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
4159 "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
4160 "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
4161 "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
4162 "\x69\x35\x61\x86\xf8\x86\xb9\x89"
4163 "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
4164 "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
4165 "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
4166 "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
4167 "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
4168 "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
4169 "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
4170 "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
4171 "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
4172 "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
4173 "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
4174 "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
4175 "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
4176 "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
4177 "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
4178 "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
4179 "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
4180 "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
4181 "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
4182 "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
4183 "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
4184 "\xad\x12\x32\x31\x03\xf7\x21\xbe"
4185 "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
4186 "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
4187 "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
4188 "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
4189 "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
4190 "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
4191 "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
4192 "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
4193 "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
4194 "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
4195 "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
4196 "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
4197 "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
4198 "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
4199 "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
4200 "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
4201 "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
4202 "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
4203 "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
4204 "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
4205 "\xf3\xea\x67\x52\x78\xc2\xce\x70"
4206 "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
4207 "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
4208 .ilen = 512,
4209 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
4210 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4211 "\x10\x11\x12\x13\x14\x15\x16\x17"
4212 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4213 "\x20\x21\x22\x23\x24\x25\x26\x27"
4214 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4215 "\x30\x31\x32\x33\x34\x35\x36\x37"
4216 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4217 "\x40\x41\x42\x43\x44\x45\x46\x47"
4218 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4219 "\x50\x51\x52\x53\x54\x55\x56\x57"
4220 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4221 "\x60\x61\x62\x63\x64\x65\x66\x67"
4222 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4223 "\x70\x71\x72\x73\x74\x75\x76\x77"
4224 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4225 "\x80\x81\x82\x83\x84\x85\x86\x87"
4226 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4227 "\x90\x91\x92\x93\x94\x95\x96\x97"
4228 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4229 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4230 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4231 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
4232 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
4233 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
4234 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
4235 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
4236 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
4237 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
4238 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
4239 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
4240 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
4241 "\x00\x01\x02\x03\x04\x05\x06\x07"
4242 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4243 "\x10\x11\x12\x13\x14\x15\x16\x17"
4244 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
4245 "\x20\x21\x22\x23\x24\x25\x26\x27"
4246 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
4247 "\x30\x31\x32\x33\x34\x35\x36\x37"
4248 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
4249 "\x40\x41\x42\x43\x44\x45\x46\x47"
4250 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
4251 "\x50\x51\x52\x53\x54\x55\x56\x57"
4252 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
4253 "\x60\x61\x62\x63\x64\x65\x66\x67"
4254 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
4255 "\x70\x71\x72\x73\x74\x75\x76\x77"
4256 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
4257 "\x80\x81\x82\x83\x84\x85\x86\x87"
4258 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
4259 "\x90\x91\x92\x93\x94\x95\x96\x97"
4260 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
4261 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
4262 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
4263 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
4264 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
4265 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
4266 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
4267 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
4268 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
4269 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
4270 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
4271 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
4272 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
4273 .rlen = 512,
4274 },
4275};
4276
4277
4278
4279
4280
4281#define SERPENT_ENC_TEST_VECTORS 5
4282#define SERPENT_DEC_TEST_VECTORS 5
4283
4284#define TNEPRES_ENC_TEST_VECTORS 4
4285#define TNEPRES_DEC_TEST_VECTORS 4
4286
4287#define SERPENT_CBC_ENC_TEST_VECTORS 1
4288#define SERPENT_CBC_DEC_TEST_VECTORS 1
4289
4290#define SERPENT_CTR_ENC_TEST_VECTORS 2
4291#define SERPENT_CTR_DEC_TEST_VECTORS 2
4292
4293#define SERPENT_LRW_ENC_TEST_VECTORS 8
4294#define SERPENT_LRW_DEC_TEST_VECTORS 8
4295
4296#define SERPENT_XTS_ENC_TEST_VECTORS 5
4297#define SERPENT_XTS_DEC_TEST_VECTORS 5
4298
4299static struct cipher_testvec serpent_enc_tv_template[] = {
4300 {
4301 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
4302 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
4303 .ilen = 16,
4304 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
4305 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
4306 .rlen = 16,
4307 }, {
4308 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
4309 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
4310 .klen = 16,
4311 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
4312 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
4313 .ilen = 16,
4314 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
4315 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
4316 .rlen = 16,
4317 }, {
4318 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
4319 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4320 "\x10\x11\x12\x13\x14\x15\x16\x17"
4321 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
4322 .klen = 32,
4323 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
4324 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
4325 .ilen = 16,
4326 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
4327 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
4328 .rlen = 16,
4329 }, {
4330 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
4331 .klen = 16,
4332 .input = zeroed_string,
4333 .ilen = 16,
4334 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
4335 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
4336 .rlen = 16,
4337 }, {
4338 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4339 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4340 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4341 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4342 .klen = 32,
4343 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4344 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4345 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4346 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4347 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4348 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4349 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4350 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4351 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4352 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4353 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4354 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4355 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4356 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4357 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4358 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4359 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4360 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
4361 .ilen = 144,
4362 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
4363 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
4364 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
4365 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
4366 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
4367 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
4368 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
4369 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
4370 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
4371 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
4372 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
4373 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
4374 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
4375 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
4376 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
4377 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
4378 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
4379 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
4380 .rlen = 144,
4381 },
4382};
4383
4384static struct cipher_testvec tnepres_enc_tv_template[] = {
4385 {
4386 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
4387 "\x00\x00\x00\x00\x00\x00\x00\x00",
4388 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
4389 "\x00\x00\x00\x00\x00\x00\x00\x00",
4390 .klen = 16,
4391 .ilen = 16,
4392 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
4393 "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
4394 .rlen = 16,
4395 }, {
4396 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
4397 "\x00\x00\x00\x00\x00\x00\x00\x00"
4398 "\x00\x00\x00\x00\x00\x00\x00\x00",
4399 .klen = 24,
4400 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
4401 "\x00\x00\x00\x00\x00\x00\x00\x00",
4402 .ilen = 16,
4403 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
4404 "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
4405 .rlen = 16,
4406 }, {
4407 .key = "\x80\x00\x00\x00\x00\x00\x00\x00"
4408 "\x00\x00\x00\x00\x00\x00\x00\x00"
4409 "\x00\x00\x00\x00\x00\x00\x00\x00"
4410 "\x00\x00\x00\x00\x00\x00\x00\x00",
4411 .klen = 32,
4412 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
4413 "\x00\x00\x00\x00\x00\x00\x00\x00",
4414 .ilen = 16,
4415 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
4416 "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
4417 .rlen = 16,
4418 }, {
4419 .key = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
4420 "\x17\x16\x15\x14\x13\x12\x11\x10"
4421 "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
4422 "\x07\x06\x05\x04\x03\x02\x01\x00",
4423 .klen = 32,
4424 .input = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
4425 "\x07\x06\x05\x04\x03\x02\x01\x00",
4426 .ilen = 16,
4427 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
4428 "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
4429 .rlen = 16,
4430 },
4431};
4432
4433
4434static struct cipher_testvec serpent_dec_tv_template[] = {
4435 {
4436 .input = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
4437 "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
4438 .ilen = 16,
4439 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
4440 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
4441 .rlen = 16,
4442 }, {
4443 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
4444 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
4445 .klen = 16,
4446 .input = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
4447 "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
4448 .ilen = 16,
4449 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
4450 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
4451 .rlen = 16,
4452 }, {
4453 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
4454 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4455 "\x10\x11\x12\x13\x14\x15\x16\x17"
4456 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
4457 .klen = 32,
4458 .input = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
4459 "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
4460 .ilen = 16,
4461 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
4462 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
4463 .rlen = 16,
4464 }, {
4465 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
4466 .klen = 16,
4467 .input = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
4468 "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
4469 .ilen = 16,
4470 .result = zeroed_string,
4471 .rlen = 16,
4472 }, {
4473 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4474 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4475 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4476 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4477 .klen = 32,
4478 .input = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
4479 "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
4480 "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
4481 "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
4482 "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
4483 "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
4484 "\x99\x34\x89\x5B\x54\xE9\x12\x13"
4485 "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
4486 "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
4487 "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
4488 "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
4489 "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
4490 "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
4491 "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
4492 "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
4493 "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
4494 "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
4495 "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
4496 .ilen = 144,
4497 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4498 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4499 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4500 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4501 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4502 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4503 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4504 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4505 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4506 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4507 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4508 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4509 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4510 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4511 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4512 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4513 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4514 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
4515 .rlen = 144,
4516 },
4517};
4518
4519static struct cipher_testvec tnepres_dec_tv_template[] = {
4520 {
4521 .input = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
4522 "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
4523 .ilen = 16,
4524 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
4525 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
4526 .rlen = 16,
4527 }, {
4528 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
4529 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
4530 .klen = 16,
4531 .input = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
4532 "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
4533 .ilen = 16,
4534 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
4535 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
4536 .rlen = 16,
4537 }, {
4538 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
4539 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
4540 "\x10\x11\x12\x13\x14\x15\x16\x17"
4541 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
4542 .klen = 32,
4543 .input = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
4544 "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
4545 .ilen = 16,
4546 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
4547 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
4548 .rlen = 16,
4549 }, {
4550 .key = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
4551 .klen = 16,
4552 .input = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
4553 "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
4554 .ilen = 16,
4555 .result = zeroed_string,
4556 .rlen = 16,
4557 },
4558};
4559
4560static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
4561 {
4562 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4563 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4564 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4565 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4566 .klen = 32,
4567 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4568 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4569 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4570 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4571 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4572 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4573 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4574 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4575 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4576 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4577 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4578 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4579 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4580 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4581 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4582 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4583 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4584 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4585 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4586 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
4587 .ilen = 144,
4588 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
4589 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
4590 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
4591 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
4592 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
4593 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
4594 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
4595 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
4596 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
4597 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
4598 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
4599 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
4600 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
4601 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
4602 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
4603 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
4604 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
4605 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
4606 .rlen = 144,
4607 },
4608};
4609
4610static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
4611 {
4612 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4613 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4614 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4615 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4616 .klen = 32,
4617 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4618 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4619 .input = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
4620 "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
4621 "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
4622 "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
4623 "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
4624 "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
4625 "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
4626 "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
4627 "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
4628 "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
4629 "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
4630 "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
4631 "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
4632 "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
4633 "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
4634 "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
4635 "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
4636 "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
4637 .ilen = 144,
4638 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4639 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4640 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4641 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4642 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4643 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4644 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4645 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4646 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4647 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4648 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4649 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4650 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4651 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4652 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4653 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4654 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4655 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
4656 .rlen = 144,
4657 },
4658};
4659
4660static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
4661 {
4662 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4663 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4664 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4665 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4666 .klen = 32,
4667 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4668 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4669 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4670 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4671 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4672 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4673 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4674 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4675 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4676 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4677 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4678 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4679 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4680 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4681 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4682 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4683 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4684 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4685 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4686 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
4687 .ilen = 144,
4688 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
4689 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
4690 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
4691 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
4692 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
4693 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
4694 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
4695 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
4696 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
4697 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
4698 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
4699 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
4700 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
4701 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
4702 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
4703 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
4704 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
4705 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
4706 .rlen = 144,
4707 }, {
4708 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4709 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4710 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4711 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4712 .klen = 32,
4713 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4714 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4715 .input = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4716 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4717 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4718 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4719 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4720 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4721 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4722 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4723 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4724 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4725 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4726 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4727 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4728 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4729 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4730 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4731 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4732 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4733 "\xF1\x65\xFC",
4734 .ilen = 147,
4735 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
4736 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
4737 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
4738 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
4739 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
4740 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
4741 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
4742 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
4743 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
4744 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
4745 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
4746 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
4747 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
4748 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
4749 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
4750 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
4751 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
4752 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
4753 "\xE6\xD0\x97",
4754 .rlen = 147,
4755 },
4756};
4757
4758static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
4759 {
4760 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4761 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4762 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4763 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4764 .klen = 32,
4765 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4766 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4767 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
4768 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
4769 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
4770 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
4771 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
4772 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
4773 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
4774 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
4775 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
4776 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
4777 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
4778 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
4779 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
4780 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
4781 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
4782 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
4783 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
4784 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
4785 .ilen = 144,
4786 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4787 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4788 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4789 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4790 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4791 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4792 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4793 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4794 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4795 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4796 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4797 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4798 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4799 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4800 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4801 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4802 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4803 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
4804 .rlen = 144,
4805 }, {
4806 .key = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4807 "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4808 "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4809 "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4810 .klen = 32,
4811 .iv = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4812 "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4813 .input = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
4814 "\x37\x69\xE3\x3A\x22\x85\x48\x46"
4815 "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
4816 "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
4817 "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
4818 "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
4819 "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
4820 "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
4821 "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
4822 "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
4823 "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
4824 "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
4825 "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
4826 "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
4827 "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
4828 "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
4829 "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
4830 "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
4831 "\xE6\xD0\x97",
4832 .ilen = 147,
4833 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4834 "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4835 "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4836 "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4837 "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4838 "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4839 "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4840 "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4841 "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4842 "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4843 "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4844 "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4845 "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4846 "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4847 "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4848 "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4849 "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4850 "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4851 "\xF1\x65\xFC",
4852 .rlen = 147,
4853 },
4854};
4855
4856static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
4857
4858 {
4859 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
4860 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
4861 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
4862 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
4863 .klen = 32,
4864 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4865 "\x00\x00\x00\x00\x00\x00\x00\x01",
4866 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4867 "\x38\x39\x41\x42\x43\x44\x45\x46",
4868 .ilen = 16,
4869 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
4870 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
4871 .rlen = 16,
4872 }, {
4873 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
4874 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
4875 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
4876 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
4877 .klen = 32,
4878 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4879 "\x00\x00\x00\x00\x00\x00\x00\x02",
4880 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4881 "\x38\x39\x41\x42\x43\x44\x45\x46",
4882 .ilen = 16,
4883 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
4884 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
4885 .rlen = 16,
4886 }, {
4887 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
4888 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
4889 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
4890 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
4891 .klen = 32,
4892 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4893 "\x00\x00\x00\x02\x00\x00\x00\x00",
4894 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4895 "\x38\x39\x41\x42\x43\x44\x45\x46",
4896 .ilen = 16,
4897 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
4898 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
4899 .rlen = 16,
4900 }, {
4901 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
4902 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
4903 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
4904 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
4905 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
4906 .klen = 40,
4907 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4908 "\x00\x00\x00\x00\x00\x00\x00\x01",
4909 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4910 "\x38\x39\x41\x42\x43\x44\x45\x46",
4911 .ilen = 16,
4912 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
4913 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
4914 .rlen = 16,
4915 }, {
4916 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
4917 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
4918 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
4919 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
4920 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
4921 .klen = 40,
4922 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4923 "\x00\x00\x00\x02\x00\x00\x00\x00",
4924 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4925 "\x38\x39\x41\x42\x43\x44\x45\x46",
4926 .ilen = 16,
4927 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
4928 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
4929 .rlen = 16,
4930 }, {
4931 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4932 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4933 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4934 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4935 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4936 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4937 .klen = 48,
4938 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4939 "\x00\x00\x00\x00\x00\x00\x00\x01",
4940 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4941 "\x38\x39\x41\x42\x43\x44\x45\x46",
4942 .ilen = 16,
4943 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
4944 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
4945 .rlen = 16,
4946 }, {
4947 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
4948 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
4949 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
4950 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
4951 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
4952 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
4953 .klen = 48,
4954 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4955 "\x00\x00\x00\x02\x00\x00\x00\x00",
4956 .input = "\x30\x31\x32\x33\x34\x35\x36\x37"
4957 "\x38\x39\x41\x42\x43\x44\x45\x46",
4958 .ilen = 16,
4959 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
4960 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
4961 .rlen = 16,
4962 }, {
4963 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4964 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4965 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4966 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4967 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4968 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4969 .klen = 48,
4970 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
4971 "\x00\x00\x00\x00\x00\x00\x00\x01",
4972 .input = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
4973 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
4974 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
4975 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
4976 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
4977 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
4978 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
4979 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
4980 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
4981 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
4982 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
4983 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
4984 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
4985 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
4986 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
4987 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
4988 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
4989 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
4990 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
4991 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
4992 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
4993 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
4994 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
4995 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
4996 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
4997 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
4998 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
4999 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
5000 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
5001 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
5002 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
5003 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
5004 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
5005 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
5006 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
5007 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
5008 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
5009 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
5010 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
5011 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
5012 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
5013 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
5014 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
5015 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
5016 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
5017 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
5018 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
5019 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
5020 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
5021 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
5022 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
5023 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
5024 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
5025 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
5026 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
5027 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
5028 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
5029 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
5030 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
5031 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
5032 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
5033 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
5034 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
5035 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
5036 .ilen = 512,
5037 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
5038 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
5039 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
5040 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
5041 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
5042 "\xce\xab\xda\x33\x30\x20\x12\xfa"
5043 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
5044 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
5045 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
5046 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
5047 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
5048 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
5049 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
5050 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
5051 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
5052 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
5053 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
5054 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
5055 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
5056 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
5057 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
5058 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
5059 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
5060 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
5061 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
5062 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
5063 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
5064 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
5065 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
5066 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
5067 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
5068 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
5069 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
5070 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
5071 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
5072 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
5073 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
5074 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
5075 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
5076 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
5077 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
5078 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
5079 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
5080 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
5081 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
5082 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
5083 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
5084 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
5085 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
5086 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
5087 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
5088 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
5089 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
5090 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
5091 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
5092 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
5093 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
5094 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
5095 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
5096 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
5097 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
5098 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
5099 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
5100 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
5101 .rlen = 512,
5102 },
5103};
5104
5105static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
5106
5107
5108 {
5109 .key = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
5110 "\x4c\x26\x84\x14\xb5\x68\x01\x85"
5111 "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
5112 "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
5113 .klen = 32,
5114 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5115 "\x00\x00\x00\x00\x00\x00\x00\x01",
5116 .input = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
5117 "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
5118 .ilen = 16,
5119 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5120 "\x38\x39\x41\x42\x43\x44\x45\x46",
5121 .rlen = 16,
5122 }, {
5123 .key = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
5124 "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
5125 "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
5126 "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
5127 .klen = 32,
5128 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5129 "\x00\x00\x00\x00\x00\x00\x00\x02",
5130 .input = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
5131 "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
5132 .ilen = 16,
5133 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5134 "\x38\x39\x41\x42\x43\x44\x45\x46",
5135 .rlen = 16,
5136 }, {
5137 .key = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
5138 "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
5139 "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
5140 "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
5141 .klen = 32,
5142 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5143 "\x00\x00\x00\x02\x00\x00\x00\x00",
5144 .input = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
5145 "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
5146 .ilen = 16,
5147 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5148 "\x38\x39\x41\x42\x43\x44\x45\x46",
5149 .rlen = 16,
5150 }, {
5151 .key = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
5152 "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
5153 "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
5154 "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
5155 "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
5156 .klen = 40,
5157 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5158 "\x00\x00\x00\x00\x00\x00\x00\x01",
5159 .input = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
5160 "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
5161 .ilen = 16,
5162 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5163 "\x38\x39\x41\x42\x43\x44\x45\x46",
5164 .rlen = 16,
5165 }, {
5166 .key = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
5167 "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
5168 "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
5169 "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
5170 "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
5171 .klen = 40,
5172 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5173 "\x00\x00\x00\x02\x00\x00\x00\x00",
5174 .input = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
5175 "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
5176 .ilen = 16,
5177 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5178 "\x38\x39\x41\x42\x43\x44\x45\x46",
5179 .rlen = 16,
5180 }, {
5181 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
5182 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
5183 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
5184 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
5185 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
5186 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
5187 .klen = 48,
5188 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5189 "\x00\x00\x00\x00\x00\x00\x00\x01",
5190 .input = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
5191 "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
5192 .ilen = 16,
5193 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5194 "\x38\x39\x41\x42\x43\x44\x45\x46",
5195 .rlen = 16,
5196 }, {
5197 .key = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
5198 "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
5199 "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
5200 "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
5201 "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
5202 "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
5203 .klen = 48,
5204 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5205 "\x00\x00\x00\x02\x00\x00\x00\x00",
5206 .input = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
5207 "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
5208 .ilen = 16,
5209 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
5210 "\x38\x39\x41\x42\x43\x44\x45\x46",
5211 .rlen = 16,
5212 }, {
5213 .key = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
5214 "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
5215 "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
5216 "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
5217 "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
5218 "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
5219 .klen = 48,
5220 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5221 "\x00\x00\x00\x00\x00\x00\x00\x01",
5222 .input = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
5223 "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
5224 "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
5225 "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
5226 "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
5227 "\xce\xab\xda\x33\x30\x20\x12\xfa"
5228 "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
5229 "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
5230 "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
5231 "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
5232 "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
5233 "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
5234 "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
5235 "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
5236 "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
5237 "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
5238 "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
5239 "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
5240 "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
5241 "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
5242 "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
5243 "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
5244 "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
5245 "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
5246 "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
5247 "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
5248 "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
5249 "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
5250 "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
5251 "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
5252 "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
5253 "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
5254 "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
5255 "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
5256 "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
5257 "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
5258 "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
5259 "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
5260 "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
5261 "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
5262 "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
5263 "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
5264 "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
5265 "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
5266 "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
5267 "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
5268 "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
5269 "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
5270 "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
5271 "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
5272 "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
5273 "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
5274 "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
5275 "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
5276 "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
5277 "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
5278 "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
5279 "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
5280 "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
5281 "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
5282 "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
5283 "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
5284 "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
5285 "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
5286 .ilen = 512,
5287 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
5288 "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
5289 "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
5290 "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
5291 "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
5292 "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
5293 "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
5294 "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
5295 "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
5296 "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
5297 "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
5298 "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
5299 "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
5300 "\x4c\x96\x12\xed\x7c\x92\x03\x01"
5301 "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
5302 "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
5303 "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
5304 "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
5305 "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
5306 "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
5307 "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
5308 "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
5309 "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
5310 "\x76\x12\x73\x44\x1a\x56\xd7\x72"
5311 "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
5312 "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
5313 "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
5314 "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
5315 "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
5316 "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
5317 "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
5318 "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
5319 "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
5320 "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
5321 "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
5322 "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
5323 "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
5324 "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
5325 "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
5326 "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
5327 "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
5328 "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
5329 "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
5330 "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
5331 "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
5332 "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
5333 "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
5334 "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
5335 "\x62\x73\x65\xfd\x46\x63\x25\x3d"
5336 "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
5337 "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
5338 "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
5339 "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
5340 "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
5341 "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
5342 "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
5343 "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
5344 "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
5345 "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
5346 "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
5347 "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
5348 "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
5349 "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
5350 "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
5351 .rlen = 512,
5352 },
5353};
5354
5355static struct cipher_testvec serpent_xts_enc_tv_template[] = {
5356
5357 {
5358 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
5359 "\x00\x00\x00\x00\x00\x00\x00\x00"
5360 "\x00\x00\x00\x00\x00\x00\x00\x00"
5361 "\x00\x00\x00\x00\x00\x00\x00\x00",
5362 .klen = 32,
5363 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5364 "\x00\x00\x00\x00\x00\x00\x00\x00",
5365 .input = "\x00\x00\x00\x00\x00\x00\x00\x00"
5366 "\x00\x00\x00\x00\x00\x00\x00\x00"
5367 "\x00\x00\x00\x00\x00\x00\x00\x00"
5368 "\x00\x00\x00\x00\x00\x00\x00\x00",
5369 .ilen = 32,
5370 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
5371 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
5372 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
5373 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
5374 .rlen = 32,
5375 }, {
5376 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
5377 "\x11\x11\x11\x11\x11\x11\x11\x11"
5378 "\x22\x22\x22\x22\x22\x22\x22\x22"
5379 "\x22\x22\x22\x22\x22\x22\x22\x22",
5380 .klen = 32,
5381 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
5382 "\x00\x00\x00\x00\x00\x00\x00\x00",
5383 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
5384 "\x44\x44\x44\x44\x44\x44\x44\x44"
5385 "\x44\x44\x44\x44\x44\x44\x44\x44"
5386 "\x44\x44\x44\x44\x44\x44\x44\x44",
5387 .ilen = 32,
5388 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
5389 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
5390 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
5391 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
5392 .rlen = 32,
5393 }, {
5394 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
5395 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
5396 "\x22\x22\x22\x22\x22\x22\x22\x22"
5397 "\x22\x22\x22\x22\x22\x22\x22\x22",
5398 .klen = 32,
5399 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
5400 "\x00\x00\x00\x00\x00\x00\x00\x00",
5401 .input = "\x44\x44\x44\x44\x44\x44\x44\x44"
5402 "\x44\x44\x44\x44\x44\x44\x44\x44"
5403 "\x44\x44\x44\x44\x44\x44\x44\x44"
5404 "\x44\x44\x44\x44\x44\x44\x44\x44",
5405 .ilen = 32,
5406 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
5407 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
5408 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
5409 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
5410 .rlen = 32,
5411 }, {
5412 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
5413 "\x23\x53\x60\x28\x74\x71\x35\x26"
5414 "\x31\x41\x59\x26\x53\x58\x97\x93"
5415 "\x23\x84\x62\x64\x33\x83\x27\x95",
5416 .klen = 32,
5417 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5418 "\x00\x00\x00\x00\x00\x00\x00\x00",
5419 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
5420 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5421 "\x10\x11\x12\x13\x14\x15\x16\x17"
5422 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5423 "\x20\x21\x22\x23\x24\x25\x26\x27"
5424 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5425 "\x30\x31\x32\x33\x34\x35\x36\x37"
5426 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5427 "\x40\x41\x42\x43\x44\x45\x46\x47"
5428 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5429 "\x50\x51\x52\x53\x54\x55\x56\x57"
5430 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5431 "\x60\x61\x62\x63\x64\x65\x66\x67"
5432 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5433 "\x70\x71\x72\x73\x74\x75\x76\x77"
5434 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5435 "\x80\x81\x82\x83\x84\x85\x86\x87"
5436 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5437 "\x90\x91\x92\x93\x94\x95\x96\x97"
5438 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5439 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5440 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5441 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5442 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5443 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5444 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5445 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5446 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5447 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5448 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5449 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5450 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5451 "\x00\x01\x02\x03\x04\x05\x06\x07"
5452 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5453 "\x10\x11\x12\x13\x14\x15\x16\x17"
5454 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5455 "\x20\x21\x22\x23\x24\x25\x26\x27"
5456 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5457 "\x30\x31\x32\x33\x34\x35\x36\x37"
5458 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5459 "\x40\x41\x42\x43\x44\x45\x46\x47"
5460 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5461 "\x50\x51\x52\x53\x54\x55\x56\x57"
5462 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5463 "\x60\x61\x62\x63\x64\x65\x66\x67"
5464 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5465 "\x70\x71\x72\x73\x74\x75\x76\x77"
5466 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5467 "\x80\x81\x82\x83\x84\x85\x86\x87"
5468 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5469 "\x90\x91\x92\x93\x94\x95\x96\x97"
5470 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5471 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5472 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5473 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5474 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5475 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5476 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5477 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5478 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5479 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5480 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5481 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5482 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5483 .ilen = 512,
5484 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
5485 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
5486 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
5487 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
5488 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
5489 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
5490 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
5491 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
5492 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
5493 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
5494 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
5495 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
5496 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
5497 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
5498 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
5499 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
5500 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
5501 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
5502 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
5503 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
5504 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
5505 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
5506 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
5507 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
5508 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
5509 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
5510 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
5511 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
5512 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
5513 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
5514 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
5515 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
5516 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
5517 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
5518 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
5519 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
5520 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
5521 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
5522 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
5523 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
5524 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
5525 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
5526 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
5527 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
5528 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
5529 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
5530 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
5531 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
5532 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
5533 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
5534 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
5535 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
5536 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
5537 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
5538 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
5539 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
5540 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
5541 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
5542 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
5543 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
5544 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
5545 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
5546 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
5547 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
5548 .rlen = 512,
5549 }, {
5550 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
5551 "\x23\x53\x60\x28\x74\x71\x35\x26"
5552 "\x62\x49\x77\x57\x24\x70\x93\x69"
5553 "\x99\x59\x57\x49\x66\x96\x76\x27"
5554 "\x31\x41\x59\x26\x53\x58\x97\x93"
5555 "\x23\x84\x62\x64\x33\x83\x27\x95"
5556 "\x02\x88\x41\x97\x16\x93\x99\x37"
5557 "\x51\x05\x82\x09\x74\x94\x45\x92",
5558 .klen = 64,
5559 .iv = "\xff\x00\x00\x00\x00\x00\x00\x00"
5560 "\x00\x00\x00\x00\x00\x00\x00\x00",
5561 .input = "\x00\x01\x02\x03\x04\x05\x06\x07"
5562 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5563 "\x10\x11\x12\x13\x14\x15\x16\x17"
5564 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5565 "\x20\x21\x22\x23\x24\x25\x26\x27"
5566 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5567 "\x30\x31\x32\x33\x34\x35\x36\x37"
5568 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5569 "\x40\x41\x42\x43\x44\x45\x46\x47"
5570 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5571 "\x50\x51\x52\x53\x54\x55\x56\x57"
5572 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5573 "\x60\x61\x62\x63\x64\x65\x66\x67"
5574 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5575 "\x70\x71\x72\x73\x74\x75\x76\x77"
5576 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5577 "\x80\x81\x82\x83\x84\x85\x86\x87"
5578 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5579 "\x90\x91\x92\x93\x94\x95\x96\x97"
5580 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5581 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5582 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5583 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5584 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5585 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5586 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5587 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5588 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5589 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5590 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5591 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5592 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5593 "\x00\x01\x02\x03\x04\x05\x06\x07"
5594 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5595 "\x10\x11\x12\x13\x14\x15\x16\x17"
5596 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5597 "\x20\x21\x22\x23\x24\x25\x26\x27"
5598 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5599 "\x30\x31\x32\x33\x34\x35\x36\x37"
5600 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5601 "\x40\x41\x42\x43\x44\x45\x46\x47"
5602 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5603 "\x50\x51\x52\x53\x54\x55\x56\x57"
5604 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5605 "\x60\x61\x62\x63\x64\x65\x66\x67"
5606 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5607 "\x70\x71\x72\x73\x74\x75\x76\x77"
5608 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5609 "\x80\x81\x82\x83\x84\x85\x86\x87"
5610 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5611 "\x90\x91\x92\x93\x94\x95\x96\x97"
5612 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5613 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5614 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5615 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5616 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5617 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5618 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5619 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5620 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5621 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5622 "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5623 "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5624 "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5625 .ilen = 512,
5626 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
5627 "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
5628 "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
5629 "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
5630 "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
5631 "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
5632 "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
5633 "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
5634 "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
5635 "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
5636 "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
5637 "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
5638 "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
5639 "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
5640 "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
5641 "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
5642 "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
5643 "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
5644 "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
5645 "\xec\x9a\xda\x64\x96\xb5\x61\xff"
5646 "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
5647 "\x81\x85\x14\xa8\x59\xac\x8c\x94"
5648 "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
5649 "\x82\xc6\x4d\xca\x86\xea\x53\x28"
5650 "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
5651 "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
5652 "\x05\xca\x81\x7b\xda\xa2\xde\x63"
5653 "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
5654 "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
5655 "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
5656 "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
5657 "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
5658 "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
5659 "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
5660 "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
5661 "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
5662 "\xfd\x43\x7d\xda\x42\x51\x87\x43"
5663 "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
5664 "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
5665 "\x27\x5f\x11\xac\x71\xc7\x48\x46"
5666 "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
5667 "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
5668 "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
5669 "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
5670 "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
5671 "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
5672 "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
5673 "\x50\x88\x97\x40\x69\xb1\x37\xf5"
5674 "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
5675 "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
5676 "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
5677 "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
5678 "\xc1\x16\x73\x50\x77\xba\xa6\x65"
5679 "\x20\x2d\xb0\x02\x27\x89\xda\x99"
5680 "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
5681 "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
5682 "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
5683 "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
5684 "\xa3\x0e\x33\x74\x40\x18\x39\x72"
5685 "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
5686 "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
5687 "\x30\x05\xc8\x92\x98\x80\xff\x7a"
5688 "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
5689 "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
5690 .rlen = 512,
5691 },
5692};
5693
5694static struct cipher_testvec serpent_xts_dec_tv_template[] = {
5695
5696
5697 {
5698 .key = "\x00\x00\x00\x00\x00\x00\x00\x00"
5699 "\x00\x00\x00\x00\x00\x00\x00\x00"
5700 "\x00\x00\x00\x00\x00\x00\x00\x00"
5701 "\x00\x00\x00\x00\x00\x00\x00\x00",
5702 .klen = 32,
5703 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5704 "\x00\x00\x00\x00\x00\x00\x00\x00",
5705 .input = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
5706 "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
5707 "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
5708 "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
5709 .ilen = 32,
5710 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
5711 "\x00\x00\x00\x00\x00\x00\x00\x00"
5712 "\x00\x00\x00\x00\x00\x00\x00\x00"
5713 "\x00\x00\x00\x00\x00\x00\x00\x00",
5714 .rlen = 32,
5715 }, {
5716 .key = "\x11\x11\x11\x11\x11\x11\x11\x11"
5717 "\x11\x11\x11\x11\x11\x11\x11\x11"
5718 "\x22\x22\x22\x22\x22\x22\x22\x22"
5719 "\x22\x22\x22\x22\x22\x22\x22\x22",
5720 .klen = 32,
5721 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
5722 "\x00\x00\x00\x00\x00\x00\x00\x00",
5723 .input = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
5724 "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
5725 "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
5726 "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
5727 .ilen = 32,
5728 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
5729 "\x44\x44\x44\x44\x44\x44\x44\x44"
5730 "\x44\x44\x44\x44\x44\x44\x44\x44"
5731 "\x44\x44\x44\x44\x44\x44\x44\x44",
5732 .rlen = 32,
5733 }, {
5734 .key = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
5735 "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
5736 "\x22\x22\x22\x22\x22\x22\x22\x22"
5737 "\x22\x22\x22\x22\x22\x22\x22\x22",
5738 .klen = 32,
5739 .iv = "\x33\x33\x33\x33\x33\x00\x00\x00"
5740 "\x00\x00\x00\x00\x00\x00\x00\x00",
5741 .input = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
5742 "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
5743 "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
5744 "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
5745 .ilen = 32,
5746 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
5747 "\x44\x44\x44\x44\x44\x44\x44\x44"
5748 "\x44\x44\x44\x44\x44\x44\x44\x44"
5749 "\x44\x44\x44\x44\x44\x44\x44\x44",
5750 .rlen = 32,
5751 }, {
5752 .key = "\x27\x18\x28\x18\x28\x45\x90\x45"
5753 "\x23\x53\x60\x28\x74\x71\x35\x26"
5754 "\x31\x41\x59\x26\x53\x58\x97\x93"
5755 "\x23\x84\x62\x64\x33\x83\x27\x95",
5756 .klen = 32,
5757 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00"
5758 "\x00\x00\x00\x00\x00\x00\x00\x00",
5759 .input = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
5760 "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
5761 "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
5762 "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
5763 "\x00\x5c\x75\x14\x06\xd6\x25\x82"
5764 "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
5765 "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
5766 "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
5767 "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
5768 "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
5769 "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
5770 "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
5771 "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
5772 "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
5773 "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
5774 "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
5775 "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
5776 "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
5777 "\x58\xfa\x43\x91\x16\x85\x40\xbb"
5778 "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
5779 "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
5780 "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
5781 "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
5782 "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
5783 "\x6e\x29\x60\xbd\x10\x14\x84\x82"
5784 "\x83\x82\x0c\x63\x73\x92\x02\x7c"
5785 "\x55\x37\x20\x80\x17\x51\xc8\xbc"
5786 "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
5787 "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
5788 "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
5789 "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
5790 "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
5791 "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
5792 "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
5793 "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
5794 "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
5795 "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
5796 "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
5797 "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
5798 "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
5799 "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
5800 "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
5801 "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
5802 "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
5803 "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
5804 "\x43\x42\x35\xd0\xcf\xec\x77\x67"
5805 "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
5806 "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
5807 "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
5808 "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
5809 "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
5810 "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
5811 "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
5812 "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
5813 "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
5814 "\x03\x57\xe6\x98\x52\x2f\x61\x62"
5815 "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
5816 "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
5817 "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
5818 "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
5819 "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
5820 "\xef\x91\x64\x1d\x18\x07\x4e\x31"
5821 "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
5822 "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
5823 .ilen = 512,
5824 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5825 "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5826 "\x10\x11\x12\x13\x14\x15\x16\x17"
5827 "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5828 "\x20\x21\x22\x23\x24\x25\x26\x27"
5829 "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5830 "\x30\x31\x32\x33\x34\x35\x36\x37"
5831 "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5832 "\x40\x41\x42\x43\x44\x45\x46\x47"
5833 "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5834 "\x50\x51\x52\x53\x54\x55\x56\x57"
5835 "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5836 "\x60\x61\x62\x63\x64\x65\x66\x67"
5837 "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5838 "\x70\x71\x72\x73\x74\x75\x76\x77"
5839 "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5840 "\x80\x81\x82\x83\x84\x85\x86\x87"
5841 "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5842 "\x90\x91\x92\x93\x94\x95\x96\x97"
5843 "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5844 "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5845 "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5846 "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5847 "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5848 "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5849 "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5850 "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5851 "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5852 "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"