]> git.karo-electronics.de Git - mv-sheeva.git/blob - crypto/testmgr.h
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[mv-sheeva.git] / crypto / testmgr.h
1 /*
2  * Algorithm testing framework and tests.
3  *
4  * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
5  * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
6  * Copyright (c) 2007 Nokia Siemens Networks
7  * Copyright (c) 2008 Herbert Xu <herbert@gondor.apana.org.au>
8  *
9  * Updated RFC4106 AES-GCM testing. Some test vectors were taken from
10  * http://csrc.nist.gov/groups/ST/toolkit/BCM/documents/proposedmodes/
11  * gcm/gcm-test-vectors.tar.gz
12  *     Authors: Aidan O'Mahony (aidan.o.mahony@intel.com)
13  *              Adrian Hoban <adrian.hoban@intel.com>
14  *              Gabriele Paoloni <gabriele.paoloni@intel.com>
15  *              Tadeusz Struk (tadeusz.struk@intel.com)
16  *     Copyright (c) 2010, Intel Corporation.
17  *
18  * This program is free software; you can redistribute it and/or modify it
19  * under the terms of the GNU General Public License as published by the Free
20  * Software Foundation; either version 2 of the License, or (at your option)
21  * any later version.
22  *
23  */
24 #ifndef _CRYPTO_TESTMGR_H
25 #define _CRYPTO_TESTMGR_H
26
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
38 struct hash_testvec {
39         /* only used with keyed hash algorithms */
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
49 struct 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; /* weak key flag */
58         unsigned char klen;
59         unsigned short ilen;
60         unsigned short rlen;
61 };
62
63 struct 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;   /* ccm dec verification failure expected */
75         unsigned char wk; /* weak key flag */
76         unsigned char klen;
77         unsigned short ilen;
78         unsigned short alen;
79         unsigned short rlen;
80 };
81
82 struct 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
94 static char zeroed_string[48];
95
96 /*
97  * MD4 test vectors from RFC1320
98  */
99 #define MD4_TEST_VECTORS        7
100
101 static 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  * MD5 test vectors from RFC1321
144  */
145 #define MD5_TEST_VECTORS        7
146
147 static 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  * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
190  */
191 #define RMD128_TEST_VECTORS     10
192
193 static 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  * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
254  */
255 #define RMD160_TEST_VECTORS     10
256
257 static 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  * RIPEMD-256 test vectors
318  */
319 #define RMD256_TEST_VECTORS     8
320
321 static 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  * RIPEMD-320 test vectors
386  */
387 #define RMD320_TEST_VECTORS     8
388
389 static 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  * SHA1 test vectors  from from FIPS PUB 180-1
454  * Long vector from CAVS 5.0
455  */
456 #define SHA1_TEST_VECTORS       3
457
458 static 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  * SHA224 test vectors from from FIPS PUB 180-2
504  */
505 #define SHA224_TEST_VECTORS     2
506
507 static 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  * SHA256 test vectors from from NIST
530  */
531 #define SHA256_TEST_VECTORS     2
532
533 static 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  * SHA384 test vectors from from NIST and kerneli
555  */
556 #define SHA384_TEST_VECTORS     4
557
558 static 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  * SHA512 test vectors from from NIST and kerneli
604  */
605 #define SHA512_TEST_VECTORS     4
606
607 static 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  * WHIRLPOOL test vectors from Whirlpool package
662  * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
663  * submission
664  */
665 #define WP512_TEST_VECTORS      8
666
667 static 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
765 static 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
847 static 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  * TIGER test vectors from Tiger website
913  */
914 #define TGR192_TEST_VECTORS     6
915
916 static 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
961 static 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
1006 static 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
1045 static 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  * HMAC-MD5 test vectors from RFC2202
1060  * (These need to be fixed to not use strlen).
1061  */
1062 #define HMAC_MD5_TEST_VECTORS   7
1063
1064 static 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  * HMAC-RIPEMD128 test vectors from RFC2286
1143  */
1144 #define HMAC_RMD128_TEST_VECTORS        7
1145
1146 static 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  * HMAC-RIPEMD160 test vectors from RFC2286
1224  */
1225 #define HMAC_RMD160_TEST_VECTORS        7
1226
1227 static 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  * HMAC-SHA1 test vectors from RFC2202
1305  */
1306 #define HMAC_SHA1_TEST_VECTORS  7
1307
1308 static 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  * SHA224 HMAC test vectors from RFC4231
1388  */
1389 #define HMAC_SHA224_TEST_VECTORS    4
1390
1391 static 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                 /*  ("Hi There") */
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                 /* ("what do ya want for nothing?") */
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                 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
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                 /* ("This is a test using a larger than block-size key and a")
1471                 (" larger than block-size data. The key needs to be")
1472                         (" hashed before being used by the HMAC algorithm.") */
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  * HMAC-SHA256 test vectors from
1502  * draft-ietf-ipsec-ciph-sha-256-01.txt
1503  */
1504 #define HMAC_SHA256_TEST_VECTORS        10
1505
1506 static 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
1643 static 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
1710 static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
1711                                 '\x02', '\x03', '\x02', '\x02',
1712                                 '\x02', '\x04', '\x01', '\x07',
1713                                 '\x04', '\x01', '\x04', '\x03',};
1714 static char vmac_string2[128] = {'a', 'b', 'c',};
1715 static 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
1725 static 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  * SHA384 HMAC test vectors from RFC4231
1783  */
1784
1785 #define HMAC_SHA384_TEST_VECTORS        4
1786
1787 static 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  * SHA512 HMAC test vectors from RFC4231
1883  */
1884
1885 #define HMAC_SHA512_TEST_VECTORS        4
1886
1887 static 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  * DES test vectors.
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
2004 static struct cipher_testvec des_enc_tv_template[] = {
2005         { /* From Applied Cryptography */
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         }, { /* Same key, different plaintext block */
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         }, { /* Sbox test from NBS */
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         }, { /* Three blocks */
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         }, { /* Weak key */
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         }, { /* Two blocks -- for testing encryption across pages */
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         }, { /* Four blocks -- for testing encryption with chunking */
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
2108 static struct cipher_testvec des_dec_tv_template[] = {
2109         { /* From Applied Cryptography */
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         }, { /* Sbox test from NBS */
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         }, { /* Two blocks, for chunking test */
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
2148 static struct cipher_testvec des_cbc_enc_tv_template[] = {
2149         { /* From OpenSSL */
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         }, { /* FIPS Pub 81 */
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         }, { /* Copy of openssl vector for chunk testing */
2186              /* From OpenSSL */
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
2203 static struct cipher_testvec des_cbc_dec_tv_template[] = {
2204         { /* FIPS Pub 81 */
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         }, { /* Copy of above, for chunk testing */
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
2241 static struct cipher_testvec des3_ede_enc_tv_template[] = {
2242         { /* These are from openssl */
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
2272 static struct cipher_testvec des3_ede_dec_tv_template[] = {
2273         { /* These are from openssl */
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
2303 static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
2304         { /* Generated from openssl */
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
2347 static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
2348         { /* Generated from openssl */
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  * Blowfish test vectors.
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
2401 static struct cipher_testvec bf_enc_tv_template[] = {
2402         { /* DES test vectors from OpenSSL */
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         }, { /* Vary the keylength... */
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         }, { /* Generated with bf488 */
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         }, { /* Generated with Crypto++ */
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
2474 static struct cipher_testvec bf_dec_tv_template[] = {
2475         { /* DES test vectors from OpenSSL */
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         }, { /* Vary the keylength... */
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         }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
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         }, { /* Generated with Crypto++ */
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
2547 static struct cipher_testvec bf_cbc_enc_tv_template[] = {
2548         { /* From OpenSSL */
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         }, { /* Generated with Crypto++ */
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
2585 static struct cipher_testvec bf_cbc_dec_tv_template[] = {
2586         { /* From OpenSSL */
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         }, { /* Generated with Crypto++ */
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
2623 static struct cipher_testvec bf_ctr_enc_tv_template[] = {
2624         { /* Generated with Crypto++ */
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         }, { /* Generated with Crypto++ */
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
2667 static struct cipher_testvec bf_ctr_dec_tv_template[] = {
2668         { /* Generated with Crypto++ */
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         }, { /* Generated with Crypto++ */
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  * Twofish test vectors.
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
2725 static 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         }, { /* Generated with Crypto++ */
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
2782 static 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         }, { /* Generated with Crypto++ */
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
2839 static struct cipher_testvec tf_cbc_enc_tv_template[] = {
2840         { /* Generated with Nettle */
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         }, { /* Generated with Crypto++ */
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
2911 static struct cipher_testvec tf_cbc_dec_tv_template[] = {
2912         { /* Reverse of the first four above */
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         }, { /* Generated with Crypto++ */
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
2983 static struct cipher_testvec tf_ctr_enc_tv_template[] = {
2984         { /* Generated with Crypto++ */
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         }, { /* Generated with Crypto++ */
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
3041 static struct cipher_testvec tf_ctr_dec_tv_template[] = {
3042         { /* Generated with Crypto++ */
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         }, { /* Generated with Crypto++ */
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
3099 static struct cipher_testvec tf_lrw_enc_tv_template[] = {
3100         /* Generated from AES-LRW test vectors */
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
3348 static struct cipher_testvec tf_lrw_dec_tv_template[] = {
3349         /* Generated from AES-LRW test vectors */
3350         /* same as enc vectors with input and result reversed */
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
3598 static struct cipher_testvec tf_xts_enc_tv_template[] = {
3599         /* Generated from AES-XTS test vectors */
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
3937 static struct cipher_testvec tf_xts_dec_tv_template[] = {
3938         /* Generated from AES-XTS test vectors */
3939         /* same as enc vectors with input and result reversed */
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  * Serpent test vectors.  These are backwards because Serpent writes
4279  * octet sequences in right-to-left mode.
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
4299 static 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         }, { /* Generated with Crypto++ */
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
4384 static struct cipher_testvec tnepres_enc_tv_template[] = {
4385         { /* KeySize=128, PT=0, I=1 */
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         }, { /* KeySize=192, PT=0, I=1 */
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         }, { /* KeySize=256, PT=0, I=1 */
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         }, { /* KeySize=256, I=257 */
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
4434 static 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         }, { /* Generated with Crypto++ */
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
4519 static 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         }, { /* KeySize=128, I=121 */
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
4560 static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
4561         { /* Generated with Crypto++ */
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
4610 static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
4611         { /* Generated with Crypto++ */
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
4660 static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
4661         { /* Generated with Crypto++ */
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         }, { /* Generated with Crypto++ */
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
4758 static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
4759         { /* Generated with Crypto++ */
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         }, { /* Generated with Crypto++ */
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
4856 static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
4857         /* Generated from AES-LRW test vectors */
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
5105 static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
5106         /* Generated from AES-LRW test vectors */
5107         /* same as enc vectors with input and result reversed */
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
5355 static struct cipher_testvec serpent_xts_enc_tv_template[] = {
5356         /* Generated from AES-XTS test vectors */
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
5694 static struct cipher_testvec serpent_xts_dec_tv_template[] = {
5695         /* Generated from AES-XTS test vectors */
5696         /* same as enc vectors with input and result reversed */
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"
5853                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5854                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5855                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5856                           "\x00\x01\x02\x03\x04\x05\x06\x07"
5857                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5858                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5859                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5860                           "\x20\x21\x22\x23\x24\x25\x26\x27"
5861                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5862                           "\x30\x31\x32\x33\x34\x35\x36\x37"
5863                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5864                           "\x40\x41\x42\x43\x44\x45\x46\x47"
5865                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5866                           "\x50\x51\x52\x53\x54\x55\x56\x57"
5867                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5868                           "\x60\x61\x62\x63\x64\x65\x66\x67"
5869                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5870                           "\x70\x71\x72\x73\x74\x75\x76\x77"
5871                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5872                           "\x80\x81\x82\x83\x84\x85\x86\x87"
5873                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5874                           "\x90\x91\x92\x93\x94\x95\x96\x97"
5875                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5876                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5877                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5878                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5879                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5880                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5881                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5882                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5883                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5884                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5885                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5886                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5887                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5888                 .rlen   = 512,
5889         }, {
5890                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
5891                           "\x23\x53\x60\x28\x74\x71\x35\x26"
5892                           "\x62\x49\x77\x57\x24\x70\x93\x69"
5893                           "\x99\x59\x57\x49\x66\x96\x76\x27"
5894                           "\x31\x41\x59\x26\x53\x58\x97\x93"
5895                           "\x23\x84\x62\x64\x33\x83\x27\x95"
5896                           "\x02\x88\x41\x97\x16\x93\x99\x37"
5897                           "\x51\x05\x82\x09\x74\x94\x45\x92",
5898                 .klen   = 64,
5899                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
5900                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5901                 .input  = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
5902                           "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
5903                           "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
5904                           "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
5905                           "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
5906                           "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
5907                           "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
5908                           "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
5909                           "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
5910                           "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
5911                           "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
5912                           "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
5913                           "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
5914                           "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
5915                           "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
5916                           "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
5917                           "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
5918                           "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
5919                           "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
5920                           "\xec\x9a\xda\x64\x96\xb5\x61\xff"
5921                           "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
5922                           "\x81\x85\x14\xa8\x59\xac\x8c\x94"
5923                           "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
5924                           "\x82\xc6\x4d\xca\x86\xea\x53\x28"
5925                           "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
5926                           "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
5927                           "\x05\xca\x81\x7b\xda\xa2\xde\x63"
5928                           "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
5929                           "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
5930                           "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
5931                           "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
5932                           "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
5933                           "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
5934                           "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
5935                           "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
5936                           "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
5937                           "\xfd\x43\x7d\xda\x42\x51\x87\x43"
5938                           "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
5939                           "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
5940                           "\x27\x5f\x11\xac\x71\xc7\x48\x46"
5941                           "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
5942                           "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
5943                           "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
5944                           "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
5945                           "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
5946                           "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
5947                           "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
5948                           "\x50\x88\x97\x40\x69\xb1\x37\xf5"
5949                           "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
5950                           "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
5951                           "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
5952                           "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
5953                           "\xc1\x16\x73\x50\x77\xba\xa6\x65"
5954                           "\x20\x2d\xb0\x02\x27\x89\xda\x99"
5955                           "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
5956                           "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
5957                           "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
5958                           "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
5959                           "\xa3\x0e\x33\x74\x40\x18\x39\x72"
5960                           "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
5961                           "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
5962                           "\x30\x05\xc8\x92\x98\x80\xff\x7a"
5963                           "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
5964                           "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
5965                 .ilen   = 512,
5966                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5967                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5968                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5969                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5970                           "\x20\x21\x22\x23\x24\x25\x26\x27"
5971                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5972                           "\x30\x31\x32\x33\x34\x35\x36\x37"
5973                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5974                           "\x40\x41\x42\x43\x44\x45\x46\x47"
5975                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5976                           "\x50\x51\x52\x53\x54\x55\x56\x57"
5977                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5978                           "\x60\x61\x62\x63\x64\x65\x66\x67"
5979                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5980                           "\x70\x71\x72\x73\x74\x75\x76\x77"
5981                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5982                           "\x80\x81\x82\x83\x84\x85\x86\x87"
5983                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5984                           "\x90\x91\x92\x93\x94\x95\x96\x97"
5985                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5986                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5987                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5988                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5989                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5990                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5991                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5992                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5993                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5994                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5995                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5996                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5997                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5998                           "\x00\x01\x02\x03\x04\x05\x06\x07"
5999                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6000                           "\x10\x11\x12\x13\x14\x15\x16\x17"
6001                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6002                           "\x20\x21\x22\x23\x24\x25\x26\x27"
6003                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6004                           "\x30\x31\x32\x33\x34\x35\x36\x37"
6005                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6006                           "\x40\x41\x42\x43\x44\x45\x46\x47"
6007                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6008                           "\x50\x51\x52\x53\x54\x55\x56\x57"
6009                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6010                           "\x60\x61\x62\x63\x64\x65\x66\x67"
6011                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6012                           "\x70\x71\x72\x73\x74\x75\x76\x77"
6013                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6014                           "\x80\x81\x82\x83\x84\x85\x86\x87"
6015                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6016                           "\x90\x91\x92\x93\x94\x95\x96\x97"
6017                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6018                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6019                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6020                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6021                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6022                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6023                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6024                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6025                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6026                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6027                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6028                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6029                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
6030                 .rlen   = 512,
6031         },
6032 };
6033
6034 /* Cast6 test vectors from RFC 2612 */
6035 #define CAST6_ENC_TEST_VECTORS  3
6036 #define CAST6_DEC_TEST_VECTORS  3
6037
6038 static struct cipher_testvec cast6_enc_tv_template[] = {
6039         {
6040                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
6041                           "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
6042                 .klen   = 16,
6043                 .input  = zeroed_string,
6044                 .ilen   = 16,
6045                 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
6046                           "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
6047                 .rlen   = 16,
6048         }, {
6049                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
6050                           "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
6051                           "\xba\xc7\x7a\x77\x17\x94\x28\x63",
6052                 .klen   = 24,
6053                 .input  = zeroed_string,
6054                 .ilen   = 16,
6055                 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
6056                           "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
6057                 .rlen   = 16,
6058         }, {
6059                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
6060                           "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
6061                           "\x8d\x7c\x47\xce\x26\x49\x08\x46"
6062                           "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
6063                 .klen   = 32,
6064                 .input  = zeroed_string,
6065                 .ilen   = 16,
6066                 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
6067                           "\xc9\x87\x01\x36\x55\x33\x17\xfa",
6068                 .rlen   = 16,
6069         },
6070 };
6071
6072 static struct cipher_testvec cast6_dec_tv_template[] = {
6073         {
6074                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
6075                           "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
6076                 .klen   = 16,
6077                 .input  = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
6078                           "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
6079                 .ilen   = 16,
6080                 .result = zeroed_string,
6081                 .rlen   = 16,
6082         }, {
6083                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
6084                           "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
6085                           "\xba\xc7\x7a\x77\x17\x94\x28\x63",
6086                 .klen   = 24,
6087                 .input  = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
6088                           "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
6089                 .ilen   = 16,
6090                 .result = zeroed_string,
6091                 .rlen   = 16,
6092         }, {
6093                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
6094                           "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
6095                           "\x8d\x7c\x47\xce\x26\x49\x08\x46"
6096                           "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
6097                 .klen   = 32,
6098                 .input  = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
6099                           "\xc9\x87\x01\x36\x55\x33\x17\xfa",
6100                 .ilen   = 16,
6101                 .result = zeroed_string,
6102                 .rlen   = 16,
6103         },
6104 };
6105
6106
6107 /*
6108  * AES test vectors.
6109  */
6110 #define AES_ENC_TEST_VECTORS 3
6111 #define AES_DEC_TEST_VECTORS 3
6112 #define AES_CBC_ENC_TEST_VECTORS 4
6113 #define AES_CBC_DEC_TEST_VECTORS 4
6114 #define AES_LRW_ENC_TEST_VECTORS 8
6115 #define AES_LRW_DEC_TEST_VECTORS 8
6116 #define AES_XTS_ENC_TEST_VECTORS 5
6117 #define AES_XTS_DEC_TEST_VECTORS 5
6118 #define AES_CTR_ENC_TEST_VECTORS 3
6119 #define AES_CTR_DEC_TEST_VECTORS 3
6120 #define AES_OFB_ENC_TEST_VECTORS 1
6121 #define AES_OFB_DEC_TEST_VECTORS 1
6122 #define AES_CTR_3686_ENC_TEST_VECTORS 7
6123 #define AES_CTR_3686_DEC_TEST_VECTORS 6
6124 #define AES_GCM_ENC_TEST_VECTORS 9
6125 #define AES_GCM_DEC_TEST_VECTORS 8
6126 #define AES_GCM_4106_ENC_TEST_VECTORS 7
6127 #define AES_GCM_4106_DEC_TEST_VECTORS 7
6128 #define AES_CCM_ENC_TEST_VECTORS 7
6129 #define AES_CCM_DEC_TEST_VECTORS 7
6130 #define AES_CCM_4309_ENC_TEST_VECTORS 7
6131 #define AES_CCM_4309_DEC_TEST_VECTORS 10
6132
6133 static struct cipher_testvec aes_enc_tv_template[] = {
6134         { /* From FIPS-197 */
6135                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
6136                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6137                 .klen   = 16,
6138                 .input  = "\x00\x11\x22\x33\x44\x55\x66\x77"
6139                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
6140                 .ilen   = 16,
6141                 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
6142                           "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
6143                 .rlen   = 16,
6144         }, {
6145                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
6146                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6147                           "\x10\x11\x12\x13\x14\x15\x16\x17",
6148                 .klen   = 24,
6149                 .input  = "\x00\x11\x22\x33\x44\x55\x66\x77"
6150                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
6151                 .ilen   = 16,
6152                 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
6153                           "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
6154                 .rlen   = 16,
6155         }, {
6156                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
6157                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6158                           "\x10\x11\x12\x13\x14\x15\x16\x17"
6159                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
6160                 .klen   = 32,
6161                 .input  = "\x00\x11\x22\x33\x44\x55\x66\x77"
6162                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
6163                 .ilen   = 16,
6164                 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
6165                           "\xea\xfc\x49\x90\x4b\x49\x60\x89",
6166                 .rlen   = 16,
6167         },
6168 };
6169
6170 static struct cipher_testvec aes_dec_tv_template[] = {
6171         { /* From FIPS-197 */
6172                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
6173                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6174                 .klen   = 16,
6175                 .input  = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
6176                           "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
6177                 .ilen   = 16,
6178                 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
6179                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
6180                 .rlen   = 16,
6181         }, {
6182                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
6183                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6184                           "\x10\x11\x12\x13\x14\x15\x16\x17",
6185                 .klen   = 24,
6186                 .input  = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
6187                           "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
6188                 .ilen   = 16,
6189                 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
6190                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
6191                 .rlen   = 16,
6192         }, {
6193                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
6194                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6195                           "\x10\x11\x12\x13\x14\x15\x16\x17"
6196                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
6197                 .klen   = 32,
6198                 .input  = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
6199                           "\xea\xfc\x49\x90\x4b\x49\x60\x89",
6200                 .ilen   = 16,
6201                 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
6202                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
6203                 .rlen   = 16,
6204         },
6205 };
6206
6207 static struct cipher_testvec aes_cbc_enc_tv_template[] = {
6208         { /* From RFC 3602 */
6209                 .key    = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
6210                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
6211                 .klen   = 16,
6212                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
6213                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
6214                 .input  = "Single block msg",
6215                 .ilen   = 16,
6216                 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
6217                           "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
6218                 .rlen   = 16,
6219         }, {
6220                 .key    = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
6221                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
6222                 .klen   = 16,
6223                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
6224                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
6225                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
6226                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6227                           "\x10\x11\x12\x13\x14\x15\x16\x17"
6228                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
6229                 .ilen   = 32,
6230                 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
6231                           "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
6232                           "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
6233                           "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
6234                 .rlen   = 32,
6235         }, { /* From NIST SP800-38A */
6236                 .key    = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
6237                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
6238                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
6239                 .klen   = 24,
6240                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
6241                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6242                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
6243                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
6244                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
6245                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
6246                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
6247                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
6248                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
6249                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
6250                 .ilen   = 64,
6251                 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
6252                           "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
6253                           "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
6254                           "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
6255                           "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
6256                           "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
6257                           "\x08\xb0\xe2\x79\x88\x59\x88\x81"
6258                           "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
6259                 .rlen   = 64,
6260         }, {
6261                 .key    = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
6262                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
6263                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
6264                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
6265                 .klen   = 32,
6266                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
6267                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6268                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
6269                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
6270                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
6271                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
6272                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
6273                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
6274                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
6275                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
6276                 .ilen   = 64,
6277                 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
6278                           "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
6279                           "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
6280                           "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
6281                           "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
6282                           "\xa5\x30\xe2\x63\x04\x23\x14\x61"
6283                           "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
6284                           "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
6285                 .rlen   = 64,
6286         },
6287 };
6288
6289 static struct cipher_testvec aes_cbc_dec_tv_template[] = {
6290         { /* From RFC 3602 */
6291                 .key    = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
6292                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
6293                 .klen   = 16,
6294                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
6295                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
6296                 .input  = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
6297                           "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
6298                 .ilen   = 16,
6299                 .result = "Single block msg",
6300                 .rlen   = 16,
6301         }, {
6302                 .key    = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
6303                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
6304                 .klen   = 16,
6305                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
6306                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
6307                 .input  = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
6308                           "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
6309                           "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
6310                           "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
6311                 .ilen   = 32,
6312                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6313                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6314                           "\x10\x11\x12\x13\x14\x15\x16\x17"
6315                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
6316                 .rlen   = 32,
6317         }, { /* From NIST SP800-38A */
6318                 .key    = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
6319                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
6320                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
6321                 .klen   = 24,
6322                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
6323                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6324                 .input  = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
6325                           "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
6326                           "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
6327                           "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
6328                           "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
6329                           "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
6330                           "\x08\xb0\xe2\x79\x88\x59\x88\x81"
6331                           "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
6332                 .ilen   = 64,
6333                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
6334                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
6335                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
6336                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
6337                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
6338                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
6339                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
6340                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
6341                 .rlen   = 64,
6342         }, {
6343                 .key    = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
6344                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
6345                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
6346                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
6347                 .klen   = 32,
6348                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
6349                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6350                 .input  = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
6351                           "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
6352                           "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
6353                           "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
6354                           "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
6355                           "\xa5\x30\xe2\x63\x04\x23\x14\x61"
6356                           "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
6357                           "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
6358                 .ilen   = 64,
6359                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
6360                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
6361                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
6362                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
6363                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
6364                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
6365                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
6366                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
6367                 .rlen   = 64,
6368         },
6369 };
6370
6371 static struct cipher_testvec aes_lrw_enc_tv_template[] = {
6372         /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
6373         { /* LRW-32-AES 1 */
6374                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
6375                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
6376                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
6377                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
6378                 .klen   = 32,
6379                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6380                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6381                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6382                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6383                 .ilen   = 16,
6384                 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
6385                           "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
6386                 .rlen   = 16,
6387         }, { /* LRW-32-AES 2 */
6388                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
6389                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
6390                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
6391                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
6392                 .klen   = 32,
6393                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6394                           "\x00\x00\x00\x00\x00\x00\x00\x02",
6395                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6396                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6397                 .ilen   = 16,
6398                 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
6399                           "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
6400                 .rlen   = 16,
6401         }, { /* LRW-32-AES 3 */
6402                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
6403                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
6404                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
6405                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
6406                 .klen   = 32,
6407                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6408                           "\x00\x00\x00\x02\x00\x00\x00\x00",
6409                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6410                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6411                 .ilen   = 16,
6412                 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
6413                           "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
6414                 .rlen   = 16,
6415         }, { /* LRW-32-AES 4 */
6416                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
6417                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
6418                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
6419                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
6420                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
6421                 .klen   = 40,
6422                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6423                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6424                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6425                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6426                 .ilen   = 16,
6427                 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
6428                           "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
6429                 .rlen   = 16,
6430         }, { /* LRW-32-AES 5 */
6431                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
6432                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
6433                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
6434                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
6435                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
6436                 .klen   = 40,
6437                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6438                           "\x00\x00\x00\x02\x00\x00\x00\x00",
6439                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6440                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6441                 .ilen   = 16,
6442                 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
6443                           "\xc8\x60\x48\x02\x87\xe3\x34\x06",
6444                 .rlen   = 16,
6445         }, { /* LRW-32-AES 6 */
6446                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6447                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6448                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6449                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6450                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6451                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6452                 .klen   = 48,
6453                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6454                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6455                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6456                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6457                 .ilen   = 16,
6458                 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
6459                           "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
6460                 .rlen   = 16,
6461         }, { /* LRW-32-AES 7 */
6462                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
6463                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
6464                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
6465                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
6466                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
6467                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
6468                 .klen   = 48,
6469                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6470                           "\x00\x00\x00\x02\x00\x00\x00\x00",
6471                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6472                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6473                 .ilen   = 16,
6474                 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
6475                           "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
6476                 .rlen   = 16,
6477         }, {
6478 /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
6479                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6480                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6481                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6482                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6483                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6484                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6485                 .klen   = 48,
6486                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6487                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6488                 .input  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
6489                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
6490                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
6491                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
6492                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
6493                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
6494                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
6495                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
6496                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
6497                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
6498                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
6499                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
6500                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
6501                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
6502                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
6503                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
6504                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
6505                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
6506                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
6507                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
6508                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
6509                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
6510                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
6511                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
6512                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
6513                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
6514                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
6515                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
6516                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
6517                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
6518                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
6519                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
6520                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
6521                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
6522                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
6523                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
6524                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
6525                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
6526                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
6527                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
6528                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
6529                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
6530                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
6531                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
6532                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
6533                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
6534                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
6535                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
6536                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
6537                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
6538                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
6539                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
6540                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
6541                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
6542                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
6543                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
6544                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
6545                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
6546                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
6547                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
6548                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
6549                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
6550                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
6551                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
6552                 .ilen   = 512,
6553                 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
6554                           "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
6555                           "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
6556                           "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
6557                           "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
6558                           "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
6559                           "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
6560                           "\xe8\x58\x46\x97\x39\x51\x07\xde"
6561                           "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
6562                           "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
6563                           "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
6564                           "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
6565                           "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
6566                           "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
6567                           "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
6568                           "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
6569                           "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
6570                           "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
6571                           "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
6572                           "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
6573                           "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
6574                           "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
6575                           "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
6576                           "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
6577                           "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
6578                           "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
6579                           "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
6580                           "\x41\x30\x58\xc5\x62\x74\x52\x1d"
6581                           "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
6582                           "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
6583                           "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
6584                           "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
6585                           "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
6586                           "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
6587                           "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
6588                           "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
6589                           "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
6590                           "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
6591                           "\xb8\x79\x78\x97\x94\xff\x72\x13"
6592                           "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
6593                           "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
6594                           "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
6595                           "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
6596                           "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
6597                           "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
6598                           "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
6599                           "\x1e\x86\x53\x11\x53\x94\x00\xee"
6600                           "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
6601                           "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
6602                           "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
6603                           "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
6604                           "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
6605                           "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
6606                           "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
6607                           "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
6608                           "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
6609                           "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
6610                           "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
6611                           "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
6612                           "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
6613                           "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
6614                           "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
6615                           "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
6616                           "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
6617                 .rlen   = 512,
6618         }
6619 };
6620
6621 static struct cipher_testvec aes_lrw_dec_tv_template[] = {
6622         /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
6623         /* same as enc vectors with input and result reversed */
6624         { /* LRW-32-AES 1 */
6625                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
6626                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
6627                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
6628                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
6629                 .klen   = 32,
6630                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6631                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6632                 .input  = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
6633                           "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
6634                 .ilen   = 16,
6635                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6636                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6637                 .rlen   = 16,
6638         }, { /* LRW-32-AES 2 */
6639                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
6640                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
6641                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
6642                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
6643                 .klen   = 32,
6644                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6645                           "\x00\x00\x00\x00\x00\x00\x00\x02",
6646                 .input  = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
6647                           "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
6648                 .ilen   = 16,
6649                 .result  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6650                            "\x38\x39\x41\x42\x43\x44\x45\x46",
6651                 .rlen   = 16,
6652         }, { /* LRW-32-AES 3 */
6653                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
6654                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
6655                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
6656                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
6657                 .klen   = 32,
6658                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6659                           "\x00\x00\x00\x02\x00\x00\x00\x00",
6660                 .input  = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
6661                           "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
6662                 .ilen   = 16,
6663                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6664                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6665                 .rlen   = 16,
6666         }, { /* LRW-32-AES 4 */
6667                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
6668                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
6669                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
6670                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
6671                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
6672                 .klen   = 40,
6673                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6674                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6675                 .input  = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
6676                           "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
6677                 .ilen   = 16,
6678                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6679                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6680                 .rlen   = 16,
6681         }, { /* LRW-32-AES 5 */
6682                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
6683                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
6684                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
6685                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
6686                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
6687                 .klen   = 40,
6688                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6689                           "\x00\x00\x00\x02\x00\x00\x00\x00",
6690                 .input  = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
6691                           "\xc8\x60\x48\x02\x87\xe3\x34\x06",
6692                 .ilen   = 16,
6693                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6694                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6695                 .rlen   = 16,
6696         }, { /* LRW-32-AES 6 */
6697                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6698                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6699                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6700                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6701                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6702                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6703                 .klen   = 48,
6704                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6705                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6706                 .input  = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
6707                           "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
6708                 .ilen   = 16,
6709                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6710                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6711                 .rlen   = 16,
6712         }, { /* LRW-32-AES 7 */
6713                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
6714                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
6715                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
6716                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
6717                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
6718                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
6719                 .klen   = 48,
6720                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6721                           "\x00\x00\x00\x02\x00\x00\x00\x00",
6722                 .input  = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
6723                           "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
6724                 .ilen   = 16,
6725                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6726                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6727                 .rlen   = 16,
6728         }, {
6729 /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
6730                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6731                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6732                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6733                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6734                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6735                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6736                 .klen   = 48,
6737                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6738                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6739                 .input  = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
6740                           "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
6741                           "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
6742                           "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
6743                           "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
6744                           "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
6745                           "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
6746                           "\xe8\x58\x46\x97\x39\x51\x07\xde"
6747                           "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
6748                           "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
6749                           "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
6750                           "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
6751                           "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
6752                           "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
6753                           "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
6754                           "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
6755                           "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
6756                           "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
6757                           "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
6758                           "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
6759                           "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
6760                           "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
6761                           "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
6762                           "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
6763                           "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
6764                           "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
6765                           "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
6766                           "\x41\x30\x58\xc5\x62\x74\x52\x1d"
6767                           "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
6768                           "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
6769                           "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
6770                           "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
6771                           "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
6772                           "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
6773                           "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
6774                           "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
6775                           "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
6776                           "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
6777                           "\xb8\x79\x78\x97\x94\xff\x72\x13"
6778                           "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
6779                           "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
6780                           "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
6781                           "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
6782                           "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
6783                           "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
6784                           "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
6785                           "\x1e\x86\x53\x11\x53\x94\x00\xee"
6786                           "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
6787                           "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
6788                           "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
6789                           "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
6790                           "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
6791                           "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
6792                           "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
6793                           "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
6794                           "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
6795                           "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
6796                           "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
6797                           "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
6798                           "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
6799                           "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
6800                           "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
6801                           "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
6802                           "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
6803                 .ilen   = 512,
6804                 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
6805                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
6806                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
6807                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
6808                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
6809                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
6810                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
6811                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
6812                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
6813                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
6814                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
6815                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
6816                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
6817                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
6818                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
6819                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
6820                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
6821                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
6822                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
6823                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
6824                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
6825                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
6826                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
6827                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
6828                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
6829                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
6830                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
6831                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
6832                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
6833                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
6834                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
6835                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
6836                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
6837                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
6838                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
6839                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
6840                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
6841                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
6842                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
6843                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
6844                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
6845                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
6846                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
6847                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
6848                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
6849                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
6850                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
6851                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
6852                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
6853                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
6854                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
6855                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
6856                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
6857                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
6858                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
6859                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
6860                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
6861                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
6862                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
6863                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
6864                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
6865                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
6866                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
6867                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
6868                 .rlen   = 512,
6869         }
6870 };
6871
6872 static struct cipher_testvec aes_xts_enc_tv_template[] = {
6873         /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
6874         { /* XTS-AES 1 */
6875                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
6876                           "\x00\x00\x00\x00\x00\x00\x00\x00"
6877                           "\x00\x00\x00\x00\x00\x00\x00\x00"
6878                           "\x00\x00\x00\x00\x00\x00\x00\x00",
6879                 .klen   = 32,
6880                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6881                           "\x00\x00\x00\x00\x00\x00\x00\x00",
6882                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
6883                           "\x00\x00\x00\x00\x00\x00\x00\x00"
6884                           "\x00\x00\x00\x00\x00\x00\x00\x00"
6885                           "\x00\x00\x00\x00\x00\x00\x00\x00",
6886                 .ilen   = 32,
6887                 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
6888                           "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
6889                           "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
6890                           "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
6891                 .rlen   = 32,
6892         }, { /* XTS-AES 2 */
6893                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
6894                           "\x11\x11\x11\x11\x11\x11\x11\x11"
6895                           "\x22\x22\x22\x22\x22\x22\x22\x22"
6896                           "\x22\x22\x22\x22\x22\x22\x22\x22",
6897                 .klen   = 32,
6898                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
6899                           "\x00\x00\x00\x00\x00\x00\x00\x00",
6900                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
6901                           "\x44\x44\x44\x44\x44\x44\x44\x44"
6902                           "\x44\x44\x44\x44\x44\x44\x44\x44"
6903                           "\x44\x44\x44\x44\x44\x44\x44\x44",
6904                 .ilen   = 32,
6905                 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
6906                           "\x39\x33\x40\x38\xac\xef\x83\x8b"
6907                           "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
6908                           "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
6909                 .rlen   = 32,
6910         }, { /* XTS-AES 3 */
6911                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
6912                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
6913                           "\x22\x22\x22\x22\x22\x22\x22\x22"
6914                           "\x22\x22\x22\x22\x22\x22\x22\x22",
6915                 .klen   = 32,
6916                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
6917                           "\x00\x00\x00\x00\x00\x00\x00\x00",
6918                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
6919                           "\x44\x44\x44\x44\x44\x44\x44\x44"
6920                           "\x44\x44\x44\x44\x44\x44\x44\x44"
6921                           "\x44\x44\x44\x44\x44\x44\x44\x44",
6922                 .ilen   = 32,
6923                 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
6924                           "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
6925                           "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
6926                           "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
6927                 .rlen   = 32,
6928         }, { /* XTS-AES 4 */
6929                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
6930                           "\x23\x53\x60\x28\x74\x71\x35\x26"
6931                           "\x31\x41\x59\x26\x53\x58\x97\x93"
6932                           "\x23\x84\x62\x64\x33\x83\x27\x95",
6933                 .klen   = 32,
6934                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6935                           "\x00\x00\x00\x00\x00\x00\x00\x00",
6936                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
6937                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6938                           "\x10\x11\x12\x13\x14\x15\x16\x17"
6939                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6940                           "\x20\x21\x22\x23\x24\x25\x26\x27"
6941                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6942                           "\x30\x31\x32\x33\x34\x35\x36\x37"
6943                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6944                           "\x40\x41\x42\x43\x44\x45\x46\x47"
6945                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6946                           "\x50\x51\x52\x53\x54\x55\x56\x57"
6947                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6948                           "\x60\x61\x62\x63\x64\x65\x66\x67"
6949                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6950                           "\x70\x71\x72\x73\x74\x75\x76\x77"
6951                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6952                           "\x80\x81\x82\x83\x84\x85\x86\x87"
6953                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6954                           "\x90\x91\x92\x93\x94\x95\x96\x97"
6955                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6956                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6957                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6958                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6959                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6960                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6961                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6962                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6963                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6964                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6965                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6966                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6967                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
6968                           "\x00\x01\x02\x03\x04\x05\x06\x07"
6969                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
6970                           "\x10\x11\x12\x13\x14\x15\x16\x17"
6971                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
6972                           "\x20\x21\x22\x23\x24\x25\x26\x27"
6973                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
6974                           "\x30\x31\x32\x33\x34\x35\x36\x37"
6975                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
6976                           "\x40\x41\x42\x43\x44\x45\x46\x47"
6977                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
6978                           "\x50\x51\x52\x53\x54\x55\x56\x57"
6979                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
6980                           "\x60\x61\x62\x63\x64\x65\x66\x67"
6981                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
6982                           "\x70\x71\x72\x73\x74\x75\x76\x77"
6983                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
6984                           "\x80\x81\x82\x83\x84\x85\x86\x87"
6985                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
6986                           "\x90\x91\x92\x93\x94\x95\x96\x97"
6987                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
6988                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
6989                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
6990                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
6991                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
6992                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
6993                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
6994                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
6995                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
6996                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
6997                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
6998                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
6999                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7000                 .ilen   = 512,
7001                 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
7002                           "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
7003                           "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
7004                           "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
7005                           "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
7006                           "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
7007                           "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
7008                           "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
7009                           "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
7010                           "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
7011                           "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
7012                           "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
7013                           "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
7014                           "\x22\x97\x61\x46\xae\x20\xce\x84"
7015                           "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
7016                           "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
7017                           "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
7018                           "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
7019                           "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
7020                           "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
7021                           "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
7022                           "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
7023                           "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
7024                           "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
7025                           "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
7026                           "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
7027                           "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
7028                           "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
7029                           "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
7030                           "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
7031                           "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
7032                           "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
7033                           "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
7034                           "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
7035                           "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
7036                           "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
7037                           "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
7038                           "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
7039                           "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
7040                           "\x55\xef\x52\x97\xca\x67\xe9\xf3"
7041                           "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
7042                           "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
7043                           "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
7044                           "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
7045                           "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
7046                           "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
7047                           "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
7048                           "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
7049                           "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
7050                           "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
7051                           "\x18\x84\x69\x77\xae\x11\x9f\x7a"
7052                           "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
7053                           "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
7054                           "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
7055                           "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
7056                           "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
7057                           "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
7058                           "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
7059                           "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
7060                           "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
7061                           "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
7062                           "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
7063                           "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
7064                           "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
7065                 .rlen   = 512,
7066         }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
7067                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
7068                           "\x23\x53\x60\x28\x74\x71\x35\x26"
7069                           "\x62\x49\x77\x57\x24\x70\x93\x69"
7070                           "\x99\x59\x57\x49\x66\x96\x76\x27"
7071                           "\x31\x41\x59\x26\x53\x58\x97\x93"
7072                           "\x23\x84\x62\x64\x33\x83\x27\x95"
7073                           "\x02\x88\x41\x97\x16\x93\x99\x37"
7074                           "\x51\x05\x82\x09\x74\x94\x45\x92",
7075                 .klen   = 64,
7076                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
7077                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7078                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7079                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7080                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
7081                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7082                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7083                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7084                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7085                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7086                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7087                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7088                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7089                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7090                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7091                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7092                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7093                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7094                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7095                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7096                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7097                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7098                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7099                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7100                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7101                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7102                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7103                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7104                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7105                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7106                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7107                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7108                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7109                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7110                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7111                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7112                           "\x00\x01\x02\x03\x04\x05\x06\x07"
7113                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7114                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7115                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7116                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7117                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7118                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7119                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7120                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7121                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7122                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7123                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7124                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7125                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7126                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7127                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7128                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7129                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7130                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7131                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7132                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7133                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7134                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7135                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7136                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7137                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7138                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7139                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7140                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7141                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7142                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7143                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7144                 .ilen   = 512,
7145                 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
7146                           "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
7147                           "\xea\x00\x80\x3f\x5e\x48\x23\x57"
7148                           "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
7149                           "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
7150                           "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
7151                           "\x68\x0a\x86\xac\x35\xad\xfc\x33"
7152                           "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
7153                           "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
7154                           "\xb1\x08\xfd\x10\x98\xba\xec\x70"
7155                           "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
7156                           "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
7157                           "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
7158                           "\xae\xba\x12\x29\x61\xd0\x3a\x75"
7159                           "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
7160                           "\x00\x02\x08\x87\x89\x14\x29\xca"
7161                           "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
7162                           "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
7163                           "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
7164                           "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
7165                           "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
7166                           "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
7167                           "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
7168                           "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
7169                           "\x93\xec\x05\xc5\x2e\x04\x93\xef"
7170                           "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
7171                           "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
7172                           "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
7173                           "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
7174                           "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
7175                           "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
7176                           "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
7177                           "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
7178                           "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
7179                           "\xbc\x48\x14\x57\x77\x8f\x61\x60"
7180                           "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
7181                           "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
7182                           "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
7183                           "\xf4\xc3\x33\xec\x44\x23\x88\x51"
7184                           "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
7185                           "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
7186                           "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
7187                           "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
7188                           "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
7189                           "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
7190                           "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
7191                           "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
7192                           "\x92\x5f\xed\xc4\xae\x74\xff\xac"
7193                           "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
7194                           "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
7195                           "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
7196                           "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
7197                           "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
7198                           "\x94\x30\x54\xff\x84\x01\x14\x93"
7199                           "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
7200                           "\x53\x76\x44\x1a\x77\xed\x43\x85"
7201                           "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
7202                           "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
7203                           "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
7204                           "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
7205                           "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
7206                           "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
7207                           "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
7208                           "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
7209                 .rlen   = 512,
7210         }
7211 };
7212
7213 static struct cipher_testvec aes_xts_dec_tv_template[] = {
7214         /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
7215         { /* XTS-AES 1 */
7216                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
7217                           "\x00\x00\x00\x00\x00\x00\x00\x00"
7218                           "\x00\x00\x00\x00\x00\x00\x00\x00"
7219                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7220                 .klen   = 32,
7221                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
7222                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7223                 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
7224                          "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
7225                          "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
7226                          "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
7227                 .ilen   = 32,
7228                 .result  = "\x00\x00\x00\x00\x00\x00\x00\x00"
7229                            "\x00\x00\x00\x00\x00\x00\x00\x00"
7230                            "\x00\x00\x00\x00\x00\x00\x00\x00"
7231                            "\x00\x00\x00\x00\x00\x00\x00\x00",
7232                 .rlen   = 32,
7233         }, { /* XTS-AES 2 */
7234                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
7235                           "\x11\x11\x11\x11\x11\x11\x11\x11"
7236                           "\x22\x22\x22\x22\x22\x22\x22\x22"
7237                           "\x22\x22\x22\x22\x22\x22\x22\x22",
7238                 .klen   = 32,
7239                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
7240                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7241                 .input  = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
7242                           "\x39\x33\x40\x38\xac\xef\x83\x8b"
7243                           "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
7244                           "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
7245                 .ilen   = 32,
7246                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
7247                           "\x44\x44\x44\x44\x44\x44\x44\x44"
7248                           "\x44\x44\x44\x44\x44\x44\x44\x44"
7249                           "\x44\x44\x44\x44\x44\x44\x44\x44",
7250                 .rlen   = 32,
7251         }, { /* XTS-AES 3 */
7252                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
7253                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
7254                           "\x22\x22\x22\x22\x22\x22\x22\x22"
7255                           "\x22\x22\x22\x22\x22\x22\x22\x22",
7256                 .klen   = 32,
7257                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
7258                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7259                 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
7260                           "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
7261                           "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
7262                           "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
7263                 .ilen   = 32,
7264                 .result  = "\x44\x44\x44\x44\x44\x44\x44\x44"
7265                           "\x44\x44\x44\x44\x44\x44\x44\x44"
7266                           "\x44\x44\x44\x44\x44\x44\x44\x44"
7267                           "\x44\x44\x44\x44\x44\x44\x44\x44",
7268                 .rlen   = 32,
7269         }, { /* XTS-AES 4 */
7270                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
7271                           "\x23\x53\x60\x28\x74\x71\x35\x26"
7272                           "\x31\x41\x59\x26\x53\x58\x97\x93"
7273                           "\x23\x84\x62\x64\x33\x83\x27\x95",
7274                 .klen   = 32,
7275                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
7276                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7277                 .input  = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
7278                           "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
7279                           "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
7280                           "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
7281                           "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
7282                           "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
7283                           "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
7284                           "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
7285                           "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
7286                           "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
7287                           "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
7288                           "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
7289                           "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
7290                           "\x22\x97\x61\x46\xae\x20\xce\x84"
7291                           "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
7292                           "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
7293                           "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
7294                           "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
7295                           "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
7296                           "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
7297                           "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
7298                           "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
7299                           "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
7300                           "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
7301                           "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
7302                           "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
7303                           "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
7304                           "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
7305                           "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
7306                           "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
7307                           "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
7308                           "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
7309                           "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
7310                           "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
7311                           "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
7312                           "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
7313                           "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
7314                           "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
7315                           "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
7316                           "\x55\xef\x52\x97\xca\x67\xe9\xf3"
7317                           "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
7318                           "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
7319                           "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
7320                           "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
7321                           "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
7322                           "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
7323                           "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
7324                           "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
7325                           "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
7326                           "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
7327                           "\x18\x84\x69\x77\xae\x11\x9f\x7a"
7328                           "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
7329                           "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
7330                           "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
7331                           "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
7332                           "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
7333                           "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
7334                           "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
7335                           "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
7336                           "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
7337                           "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
7338                           "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
7339                           "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
7340                           "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
7341                 .ilen   = 512,
7342                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
7343                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7344                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7345                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7346                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7347                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7348                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7349                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7350                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7351                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7352                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7353                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7354                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7355                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7356                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7357                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7358                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7359                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7360                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7361                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7362                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7363                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7364                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7365                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7366                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7367                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7368                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7369                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7370                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7371                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7372                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7373                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7374                           "\x00\x01\x02\x03\x04\x05\x06\x07"
7375                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7376                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7377                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7378                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7379                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7380                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7381                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7382                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7383                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7384                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7385                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7386                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7387                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7388                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7389                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7390                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7391                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7392                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7393                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7394                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7395                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7396                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7397                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7398                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7399                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7400                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7401                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7402                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7403                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7404                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7405                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7406                 .rlen   = 512,
7407         }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
7408                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
7409                           "\x23\x53\x60\x28\x74\x71\x35\x26"
7410                           "\x62\x49\x77\x57\x24\x70\x93\x69"
7411                           "\x99\x59\x57\x49\x66\x96\x76\x27"
7412                           "\x31\x41\x59\x26\x53\x58\x97\x93"
7413                           "\x23\x84\x62\x64\x33\x83\x27\x95"
7414                           "\x02\x88\x41\x97\x16\x93\x99\x37"
7415                           "\x51\x05\x82\x09\x74\x94\x45\x92",
7416                 .klen   = 64,
7417                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
7418                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7419                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7420                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7421                 .input  = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
7422                           "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
7423                           "\xea\x00\x80\x3f\x5e\x48\x23\x57"
7424                           "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
7425                           "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
7426                           "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
7427                           "\x68\x0a\x86\xac\x35\xad\xfc\x33"
7428                           "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
7429                           "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
7430                           "\xb1\x08\xfd\x10\x98\xba\xec\x70"
7431                           "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
7432                           "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
7433                           "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
7434                           "\xae\xba\x12\x29\x61\xd0\x3a\x75"
7435                           "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
7436                           "\x00\x02\x08\x87\x89\x14\x29\xca"
7437                           "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
7438                           "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
7439                           "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
7440                           "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
7441                           "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
7442                           "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
7443                           "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
7444                           "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
7445                           "\x93\xec\x05\xc5\x2e\x04\x93\xef"
7446                           "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
7447                           "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
7448                           "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
7449                           "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
7450                           "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
7451                           "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
7452                           "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
7453                           "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
7454                           "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
7455                           "\xbc\x48\x14\x57\x77\x8f\x61\x60"
7456                           "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
7457                           "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
7458                           "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
7459                           "\xf4\xc3\x33\xec\x44\x23\x88\x51"
7460                           "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
7461                           "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
7462                           "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
7463                           "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
7464                           "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
7465                           "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
7466                           "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
7467                           "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
7468                           "\x92\x5f\xed\xc4\xae\x74\xff\xac"
7469                           "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
7470                           "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
7471                           "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
7472                           "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
7473                           "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
7474                           "\x94\x30\x54\xff\x84\x01\x14\x93"
7475                           "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
7476                           "\x53\x76\x44\x1a\x77\xed\x43\x85"
7477                           "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
7478                           "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
7479                           "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
7480                           "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
7481                           "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
7482                           "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
7483                           "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
7484                           "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
7485                 .ilen   = 512,
7486                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
7487                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7488                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7489                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7490                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7491                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7492                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7493                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7494                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7495                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7496                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7497                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7498                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7499                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7500                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7501                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7502                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7503                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7504                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7505                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7506                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7507                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7508                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7509                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7510                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7511                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7512                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7513                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7514                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7515                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7516                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7517                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7518                           "\x00\x01\x02\x03\x04\x05\x06\x07"
7519                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7520                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7521                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7522                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7523                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7524                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7525                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7526                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7527                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7528                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7529                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7530                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7531                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7532                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7533                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7534                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7535                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7536                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7537                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7538                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7539                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7540                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7541                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7542                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7543                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7544                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7545                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7546                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7547                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7548                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7549                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7550                 .rlen   = 512,
7551
7552         }
7553 };
7554
7555
7556 static struct cipher_testvec aes_ctr_enc_tv_template[] = {
7557         { /* From NIST Special Publication 800-38A, Appendix F.5 */
7558                 .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
7559                           "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
7560                 .klen   = 16,
7561                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7562                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7563                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
7564                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
7565                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
7566                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
7567                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
7568                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
7569                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
7570                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
7571                 .ilen   = 64,
7572                 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
7573                           "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
7574                           "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
7575                           "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
7576                           "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
7577                           "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
7578                           "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
7579                           "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
7580                 .rlen   = 64,
7581         }, {
7582                 .key    = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
7583                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
7584                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
7585                 .klen   = 24,
7586                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7587                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7588                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
7589                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
7590                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
7591                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
7592                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
7593                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
7594                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
7595                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
7596                 .ilen   = 64,
7597                 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
7598                           "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
7599                           "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
7600                           "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
7601                           "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
7602                           "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
7603                           "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
7604                           "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
7605                 .rlen   = 64,
7606         }, {
7607                 .key    = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
7608                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
7609                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
7610                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
7611                 .klen   = 32,
7612                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7613                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7614                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
7615                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
7616                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
7617                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
7618                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
7619                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
7620                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
7621                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
7622                 .ilen   = 64,
7623                 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
7624                           "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
7625                           "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
7626                           "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
7627                           "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
7628                           "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
7629                           "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
7630                           "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
7631                 .rlen   = 64,
7632         }
7633 };
7634
7635 static struct cipher_testvec aes_ctr_dec_tv_template[] = {
7636         { /* From NIST Special Publication 800-38A, Appendix F.5 */
7637                 .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
7638                           "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
7639                 .klen   = 16,
7640                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7641                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7642                 .input  = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
7643                           "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
7644                           "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
7645                           "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
7646                           "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
7647                           "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
7648                           "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
7649                           "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
7650                 .ilen   = 64,
7651                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
7652                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
7653                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
7654                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
7655                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
7656                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
7657                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
7658                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
7659                 .rlen   = 64,
7660         }, {
7661                 .key    = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
7662                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
7663                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
7664                 .klen   = 24,
7665                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7666                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7667                 .input  = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
7668                           "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
7669                           "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
7670                           "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
7671                           "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
7672                           "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
7673                           "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
7674                           "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
7675                 .ilen   = 64,
7676                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
7677                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
7678                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
7679                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
7680                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
7681                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
7682                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
7683                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
7684                 .rlen   = 64,
7685         }, {
7686                 .key    = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
7687                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
7688                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
7689                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
7690                 .klen   = 32,
7691                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7692                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7693                 .input  = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
7694                           "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
7695                           "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
7696                           "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
7697                           "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
7698                           "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
7699                           "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
7700                           "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
7701                 .ilen   = 64,
7702                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
7703                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
7704                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
7705                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
7706                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
7707                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
7708                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
7709                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
7710                 .rlen   = 64,
7711         }
7712 };
7713
7714 static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
7715         { /* From RFC 3686 */
7716                 .key    = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
7717                           "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
7718                           "\x00\x00\x00\x30",
7719                 .klen   = 20,
7720                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
7721                 .input  = "Single block msg",
7722                 .ilen   = 16,
7723                 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
7724                           "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
7725                 .rlen   = 16,
7726         }, {
7727                 .key    = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
7728                           "\x43\xd6\xce\x1f\x32\x53\x91\x63"
7729                           "\x00\x6c\xb6\xdb",
7730                 .klen   = 20,
7731                 .iv     = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
7732                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
7733                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7734                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7735                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
7736                 .ilen   = 32,
7737                 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
7738                           "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
7739                           "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
7740                           "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
7741                 .rlen   = 32,
7742         }, {
7743                 .key    = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
7744                           "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
7745                           "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
7746                           "\x00\x00\x00\x48",
7747                 .klen   = 28,
7748                 .iv     = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
7749                 .input  = "Single block msg",
7750                 .ilen   = 16,
7751                 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
7752                           "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
7753                 .rlen   = 16,
7754         }, {
7755                 .key    = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
7756                           "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
7757                           "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
7758                           "\x00\x96\xb0\x3b",
7759                 .klen   = 28,
7760                 .iv     = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
7761                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
7762                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7763                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7764                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
7765                 .ilen   = 32,
7766                 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
7767                           "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
7768                           "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
7769                           "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
7770                 .rlen   = 32,
7771         }, {
7772                 .key    = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
7773                           "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
7774                           "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
7775                           "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
7776                           "\x00\x00\x00\x60",
7777                 .klen   = 36,
7778                 .iv     = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
7779                 .input  = "Single block msg",
7780                 .ilen   = 16,
7781                 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
7782                           "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
7783                 .rlen   = 16,
7784         }, {
7785                 .key    = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
7786                           "\x07\x96\x36\x58\x79\xef\xf8\x86"
7787                           "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
7788                           "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
7789                           "\x00\xfa\xac\x24",
7790                 .klen   = 36,
7791                 .iv     = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
7792                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
7793                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7794                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7795                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
7796                 .ilen   = 32,
7797                 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
7798                           "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
7799                           "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
7800                           "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
7801                 .rlen   = 32,
7802         }, {
7803         // generated using Crypto++
7804                 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
7805                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7806                         "\x10\x11\x12\x13\x14\x15\x16\x17"
7807                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7808                         "\x00\x00\x00\x00",
7809                 .klen = 32 + 4,
7810                 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
7811                 .input =
7812                         "\x00\x01\x02\x03\x04\x05\x06\x07"
7813                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7814                         "\x10\x11\x12\x13\x14\x15\x16\x17"
7815                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7816                         "\x20\x21\x22\x23\x24\x25\x26\x27"
7817                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7818                         "\x30\x31\x32\x33\x34\x35\x36\x37"
7819                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7820                         "\x40\x41\x42\x43\x44\x45\x46\x47"
7821                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7822                         "\x50\x51\x52\x53\x54\x55\x56\x57"
7823                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7824                         "\x60\x61\x62\x63\x64\x65\x66\x67"
7825                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7826                         "\x70\x71\x72\x73\x74\x75\x76\x77"
7827                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7828                         "\x80\x81\x82\x83\x84\x85\x86\x87"
7829                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7830                         "\x90\x91\x92\x93\x94\x95\x96\x97"
7831                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7832                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7833                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7834                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7835                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7836                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7837                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7838                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7839                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7840                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7841                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7842                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7843                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7844                         "\x00\x03\x06\x09\x0c\x0f\x12\x15"
7845                         "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
7846                         "\x30\x33\x36\x39\x3c\x3f\x42\x45"
7847                         "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
7848                         "\x60\x63\x66\x69\x6c\x6f\x72\x75"
7849                         "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
7850                         "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
7851                         "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
7852                         "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
7853                         "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
7854                         "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
7855                         "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
7856                         "\x20\x23\x26\x29\x2c\x2f\x32\x35"
7857                         "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
7858                         "\x50\x53\x56\x59\x5c\x5f\x62\x65"
7859                         "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
7860                         "\x80\x83\x86\x89\x8c\x8f\x92\x95"
7861                         "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
7862                         "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
7863                         "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
7864                         "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
7865                         "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
7866                         "\x10\x13\x16\x19\x1c\x1f\x22\x25"
7867                         "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
7868                         "\x40\x43\x46\x49\x4c\x4f\x52\x55"
7869                         "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
7870                         "\x70\x73\x76\x79\x7c\x7f\x82\x85"
7871                         "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
7872                         "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
7873                         "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
7874                         "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
7875                         "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
7876                         "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
7877                         "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
7878                         "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
7879                         "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
7880                         "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
7881                         "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
7882                         "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
7883                         "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
7884                         "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
7885                         "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
7886                         "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
7887                         "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
7888                         "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
7889                         "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
7890                         "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
7891                         "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
7892                         "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
7893                         "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
7894                         "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
7895                         "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
7896                         "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
7897                         "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
7898                         "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
7899                         "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
7900                         "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
7901                         "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
7902                         "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
7903                         "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
7904                         "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
7905                         "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
7906                         "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
7907                         "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
7908                         "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
7909                         "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
7910                         "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
7911                         "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
7912                         "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
7913                         "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
7914                         "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
7915                         "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
7916                         "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
7917                         "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
7918                         "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
7919                         "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
7920                         "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
7921                         "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
7922                         "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
7923                         "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
7924                         "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
7925                         "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
7926                         "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
7927                         "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
7928                         "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
7929                         "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
7930                         "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
7931                         "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
7932                         "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
7933                         "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
7934                         "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
7935                         "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
7936                         "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
7937                         "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
7938                         "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
7939                         "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
7940                         "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
7941                         "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
7942                         "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
7943                         "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
7944                         "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
7945                         "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
7946                         "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
7947                         "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
7948                         "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
7949                         "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
7950                         "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
7951                         "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
7952                         "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
7953                         "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
7954                         "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
7955                         "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
7956                         "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
7957                         "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
7958                         "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
7959                         "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
7960                         "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
7961                         "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
7962                         "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
7963                         "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
7964                         "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
7965                         "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
7966                         "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
7967                         "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
7968                         "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
7969                         "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
7970                         "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
7971                         "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
7972                         "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
7973                         "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
7974                         "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
7975                         "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
7976                         "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
7977                         "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
7978                         "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
7979                         "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
7980                         "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
7981                         "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
7982                         "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
7983                         "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
7984                         "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
7985                         "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
7986                         "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
7987                         "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
7988                         "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
7989                         "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
7990                         "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
7991                         "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
7992                         "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
7993                         "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
7994                         "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
7995                         "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
7996                         "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
7997                         "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
7998                         "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
7999                         "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
8000                         "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
8001                         "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
8002                         "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
8003                         "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
8004                         "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
8005                         "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
8006                         "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
8007                         "\x38\x45\x52\x5f\x6c\x79\x86\x93"
8008                         "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
8009                         "\x08\x15\x22\x2f\x3c\x49\x56\x63"
8010                         "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
8011                         "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
8012                         "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
8013                         "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
8014                         "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
8015                         "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
8016                         "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
8017                         "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
8018                         "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
8019                         "\x18\x25\x32\x3f\x4c\x59\x66\x73"
8020                         "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
8021                         "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
8022                         "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
8023                         "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
8024                         "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
8025                         "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
8026                         "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
8027                         "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
8028                         "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
8029                         "\x28\x35\x42\x4f\x5c\x69\x76\x83"
8030                         "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
8031                         "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
8032                         "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
8033                         "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
8034                         "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
8035                         "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
8036                         "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
8037                         "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
8038                         "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
8039                         "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
8040                         "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
8041                         "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
8042                         "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
8043                         "\x48\x57\x66\x75\x84\x93\xa2\xb1"
8044                         "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
8045                         "\x38\x47\x56\x65\x74\x83\x92\xa1"
8046                         "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
8047                         "\x28\x37\x46\x55\x64\x73\x82\x91"
8048                         "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
8049                         "\x18\x27\x36\x45\x54\x63\x72\x81"
8050                         "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
8051                         "\x08\x17\x26\x35\x44\x53\x62\x71"
8052                         "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
8053                         "\xf8\x07\x16\x25\x34\x43\x52\x61"
8054                         "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
8055                         "\xe8\xf7\x06\x15\x24\x33\x42\x51"
8056                         "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
8057                         "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
8058                         "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
8059                         "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
8060                         "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
8061                         "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
8062                         "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
8063                         "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
8064                         "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
8065                         "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
8066                         "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
8067                         "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
8068                         "\x00\x11\x22\x33\x44\x55\x66\x77"
8069                         "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
8070                         "\x10\x21\x32\x43\x54\x65\x76\x87"
8071                         "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
8072                         "\x20\x31\x42\x53\x64\x75\x86\x97"
8073                         "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
8074                         "\x30\x41\x52\x63\x74\x85\x96\xa7"
8075                         "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
8076                         "\x40\x51\x62\x73\x84\x95\xa6\xb7"
8077                         "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
8078                         "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
8079                         "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
8080                         "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
8081                         "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
8082                         "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
8083                         "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
8084                         "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
8085                         "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
8086                         "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
8087                         "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
8088                         "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
8089                         "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
8090                         "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
8091                         "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
8092                         "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
8093                         "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
8094                         "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
8095                         "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
8096                         "\xe0\xf1\x02\x13\x24\x35\x46\x57"
8097                         "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
8098                         "\xf0\x01\x12\x23\x34\x45\x56\x67"
8099                         "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
8100                         "\x00\x13\x26\x39\x4c\x5f\x72\x85"
8101                         "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
8102                         "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
8103                         "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
8104                         "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
8105                         "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
8106                         "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
8107                         "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
8108                         "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
8109                         "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
8110                         "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
8111                         "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
8112                         "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
8113                         "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
8114                         "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
8115                         "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
8116                         "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
8117                         "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
8118                         "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
8119                         "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
8120                         "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
8121                         "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
8122                         "\x10\x23\x36\x49\x5c\x6f\x82\x95"
8123                         "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
8124                         "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
8125                         "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
8126                         "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
8127                         "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
8128                         "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
8129                         "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
8130                         "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
8131                         "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
8132                         "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
8133                         "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
8134                         "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
8135                         "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
8136                         "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
8137                         "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
8138                         "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
8139                         "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
8140                         "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
8141                         "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
8142                         "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
8143                         "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
8144                         "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
8145                         "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
8146                         "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
8147                         "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
8148                         "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
8149                         "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
8150                         "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
8151                         "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
8152                         "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
8153                         "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
8154                         "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
8155                         "\x18\x2d\x42\x57\x6c\x81\x96\xab"
8156                         "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
8157                         "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
8158                         "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
8159                         "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
8160                         "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
8161                         "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
8162                         "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
8163                         "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
8164                         "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
8165                         "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
8166                         "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
8167                         "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
8168                         "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
8169                         "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
8170                         "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
8171                         "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
8172                         "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
8173                         "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
8174                         "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
8175                         "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
8176                         "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
8177                         "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
8178                         "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
8179                         "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
8180                         "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
8181                         "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
8182                         "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
8183                         "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
8184                         "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
8185                         "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
8186                         "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
8187                         "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
8188                         "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
8189                         "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
8190                         "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
8191                         "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
8192                         "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
8193                         "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
8194                         "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
8195                         "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
8196                         "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
8197                         "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
8198                         "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
8199                         "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
8200                         "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
8201                         "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
8202                         "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
8203                         "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
8204                         "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
8205                         "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
8206                         "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
8207                         "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
8208                         "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
8209                         "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
8210                         "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
8211                         "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
8212                         "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
8213                         "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
8214                         "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
8215                         "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
8216                         "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
8217                         "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
8218                         "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
8219                         "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
8220                         "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
8221                         "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
8222                         "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
8223                         "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
8224                         "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
8225                         "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
8226                         "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
8227                         "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
8228                         "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
8229                         "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
8230                         "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
8231                         "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
8232                         "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
8233                         "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
8234                         "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
8235                         "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
8236                         "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
8237                         "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
8238                         "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
8239                         "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
8240                         "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
8241                         "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
8242                         "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
8243                         "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
8244                         "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
8245                         "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
8246                         "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
8247                         "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
8248                         "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
8249                         "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
8250                         "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
8251                         "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
8252                         "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
8253                         "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
8254                         "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
8255                         "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
8256                         "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
8257                         "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
8258                         "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
8259                         "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
8260                         "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
8261                         "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
8262                         "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
8263                         "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
8264                         "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
8265                         "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
8266                         "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
8267                         "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
8268                         "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
8269                         "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
8270                         "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
8271                         "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
8272                         "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
8273                         "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
8274                         "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
8275                         "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
8276                         "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
8277                         "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
8278                         "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
8279                         "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
8280                         "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
8281                         "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
8282                         "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
8283                         "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
8284                         "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
8285                         "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
8286                         "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
8287                         "\x78\x95\xb2\xcf\xec\x09\x26\x43"
8288                         "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
8289                         "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
8290                         "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
8291                         "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
8292                         "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
8293                         "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
8294                         "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
8295                         "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
8296                         "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
8297                         "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
8298                         "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
8299                         "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
8300                         "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
8301                         "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
8302                         "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
8303                         "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
8304                         "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
8305                         "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
8306                         "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
8307                         "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
8308                         "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
8309                         "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
8310                         "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
8311                         "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
8312                         "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
8313                         "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
8314                         "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
8315                         "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
8316                         "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
8317                         "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
8318                         "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
8319                         "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
8320                         "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
8321                         "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
8322                         "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
8323                         "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
8324                         "\x00\x21\x42\x63",
8325                 .ilen = 4100,
8326                 .result =
8327                         "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
8328                         "\xae\xff\x91\x3a\x44\xcf\x38\x32"
8329                         "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
8330                         "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
8331                         "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
8332                         "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
8333                         "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
8334                         "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
8335                         "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
8336                         "\x18\xff\x75\x6d\x06\x2d\x00\xab"
8337                         "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
8338                         "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
8339                         "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
8340                         "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
8341                         "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
8342                         "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
8343                         "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
8344                         "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
8345                         "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
8346                         "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
8347                         "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
8348                         "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
8349                         "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
8350                         "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
8351                         "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
8352                         "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
8353                         "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
8354                         "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
8355                         "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
8356                         "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
8357                         "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
8358                         "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
8359                         "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
8360                         "\x6a\x25\x15\x33\x4e\x45\x08\xec"
8361                         "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
8362                         "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
8363                         "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
8364                         "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
8365                         "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
8366                         "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
8367                         "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
8368                         "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
8369                         "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
8370                         "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
8371                         "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
8372                         "\x04\x02\xef\xd3\x44\xde\x76\x31"
8373                         "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
8374                         "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
8375                         "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
8376                         "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
8377                         "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
8378                         "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
8379                         "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
8380                         "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
8381                         "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
8382                         "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
8383                         "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
8384                         "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
8385                         "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
8386                         "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
8387                         "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
8388                         "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
8389                         "\x32\x03\xed\xf0\x50\x1c\x56\x39"
8390                         "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
8391                         "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
8392                         "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
8393                         "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
8394                         "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
8395                         "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
8396                         "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
8397                         "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
8398                         "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
8399                         "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
8400                         "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
8401                         "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
8402                         "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
8403                         "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
8404                         "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
8405                         "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
8406                         "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
8407                         "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
8408                         "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
8409                         "\x69\x3a\x29\x23\xac\x86\x32\xa5"
8410                         "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
8411                         "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
8412                         "\x59\x6a\xd3\x50\x59\x43\x59\xde"
8413                         "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
8414                         "\x18\x34\x0d\x1a\x63\x33\xed\x10"
8415                         "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
8416                         "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
8417                         "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
8418                         "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
8419                         "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
8420                         "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
8421                         "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
8422                         "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
8423                         "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
8424                         "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
8425                         "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
8426                         "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
8427                         "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
8428                         "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
8429                         "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
8430                         "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
8431                         "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
8432                         "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
8433                         "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
8434                         "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
8435                         "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
8436                         "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
8437                         "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
8438                         "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
8439                         "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
8440                         "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
8441                         "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
8442                         "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
8443                         "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
8444                         "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
8445                         "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
8446                         "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
8447                         "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
8448                         "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
8449                         "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
8450                         "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
8451                         "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
8452                         "\x26\x39\x83\x94\xef\x27\xd8\x53"
8453                         "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
8454                         "\x43\x7c\x95\x0a\x53\xef\x66\xda"
8455                         "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
8456                         "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
8457                         "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
8458                         "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
8459                         "\x88\xee\x73\xcf\x66\x2f\x52\x56"
8460                         "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
8461                         "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
8462                         "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
8463                         "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
8464                         "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
8465                         "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
8466                         "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
8467                         "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
8468                         "\xba\x61\x34\x38\x7c\xda\x48\x3e"
8469                         "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
8470                         "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
8471                         "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
8472                         "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
8473                         "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
8474                         "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
8475                         "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
8476                         "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
8477                         "\x35\x12\xe3\x36\x28\x27\x36\x58"
8478                         "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
8479                         "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
8480                         "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
8481                         "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
8482                         "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
8483                         "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
8484                         "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
8485                         "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
8486                         "\x89\xf3\x78\x35\x44\x62\x78\x72"
8487                         "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
8488                         "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
8489                         "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
8490                         "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
8491                         "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
8492                         "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
8493                         "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
8494                         "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
8495                         "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
8496                         "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
8497                         "\xd2\x49\x77\x81\x6d\x90\x70\xae"
8498                         "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
8499                         "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
8500                         "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
8501                         "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
8502                         "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
8503                         "\x45\x42\x27\x75\x50\xe5\xee\xb8"
8504                         "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
8505                         "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
8506                         "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
8507                         "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
8508                         "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
8509                         "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
8510                         "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
8511                         "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
8512                         "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
8513                         "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
8514                         "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
8515                         "\xa9\x21\x2b\x92\x94\x87\x62\x57"
8516                         "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
8517                         "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
8518                         "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
8519                         "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
8520                         "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
8521                         "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
8522                         "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
8523                         "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
8524                         "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
8525                         "\x69\x34\x78\x61\x24\x21\x9c\x8a"
8526                         "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
8527                         "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
8528                         "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
8529                         "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
8530                         "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
8531                         "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
8532                         "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
8533                         "\xb1\x95\x28\x86\x20\xe9\x17\x49"
8534                         "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
8535                         "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
8536                         "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
8537                         "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
8538                         "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
8539                         "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
8540                         "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
8541                         "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
8542                         "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
8543                         "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
8544                         "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
8545                         "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
8546                         "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
8547                         "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
8548                         "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
8549                         "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
8550                         "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
8551                         "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
8552                         "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
8553                         "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
8554                         "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
8555                         "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
8556                         "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
8557                         "\x29\x90\x46\x30\x92\x69\x7d\x13"
8558                         "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
8559                         "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
8560                         "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
8561                         "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
8562                         "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
8563                         "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
8564                         "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
8565                         "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
8566                         "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
8567                         "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
8568                         "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
8569                         "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
8570                         "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
8571                         "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
8572                         "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
8573                         "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
8574                         "\x77\x65\x08\x60\x11\x76\x4c\x8d"
8575                         "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
8576                         "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
8577                         "\x03\xd1\x24\x95\xec\x6d\xab\x38"
8578                         "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
8579                         "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
8580                         "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
8581                         "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
8582                         "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
8583                         "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
8584                         "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
8585                         "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
8586                         "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
8587                         "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
8588                         "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
8589                         "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
8590                         "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
8591                         "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
8592                         "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
8593                         "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
8594                         "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
8595                         "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
8596                         "\xe5\x79\x81\x73\xcd\x43\x59\x68"
8597                         "\x73\x02\x3b\x78\x21\x72\x43\x00"
8598                         "\x49\x17\xf7\x00\xaf\x68\x24\x53"
8599                         "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
8600                         "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
8601                         "\x11\x94\x13\x69\x51\x09\x28\xde"
8602                         "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
8603                         "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
8604                         "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
8605                         "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
8606                         "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
8607                         "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
8608                         "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
8609                         "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
8610                         "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
8611                         "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
8612                         "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
8613                         "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
8614                         "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
8615                         "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
8616                         "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
8617                         "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
8618                         "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
8619                         "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
8620                         "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
8621                         "\x69\xdc\xab\x24\x57\x60\x47\xc1"
8622                         "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
8623                         "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
8624                         "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
8625                         "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
8626                         "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
8627                         "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
8628                         "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
8629                         "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
8630                         "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
8631                         "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
8632                         "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
8633                         "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
8634                         "\x85\x62\x82\x70\x18\xe2\x9a\x78"
8635                         "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
8636                         "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
8637                         "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
8638                         "\x35\xf3\x61\x06\x72\x84\xc4\x32"
8639                         "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
8640                         "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
8641                         "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
8642                         "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
8643                         "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
8644                         "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
8645                         "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
8646                         "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
8647                         "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
8648                         "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
8649                         "\x4f\x73\x38\x09\x75\x64\x48\xe0"
8650                         "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
8651                         "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
8652                         "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
8653                         "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
8654                         "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
8655                         "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
8656                         "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
8657                         "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
8658                         "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
8659                         "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
8660                         "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
8661                         "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
8662                         "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
8663                         "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
8664                         "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
8665                         "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
8666                         "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
8667                         "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
8668                         "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
8669                         "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
8670                         "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
8671                         "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
8672                         "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
8673                         "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
8674                         "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
8675                         "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
8676                         "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
8677                         "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
8678                         "\xce\x4d\x5f\x18\x60\xce\x87\x22"
8679                         "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
8680                         "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
8681                         "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
8682                         "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
8683                         "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
8684                         "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
8685                         "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
8686                         "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
8687                         "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
8688                         "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
8689                         "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
8690                         "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
8691                         "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
8692                         "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
8693                         "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
8694                         "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
8695                         "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
8696                         "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
8697                         "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
8698                         "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
8699                         "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
8700                         "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
8701                         "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
8702                         "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
8703                         "\xce\x54\xf9\x18\x58\xb5\xff\x44"
8704                         "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
8705                         "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
8706                         "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
8707                         "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
8708                         "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
8709                         "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
8710                         "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
8711                         "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
8712                         "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
8713                         "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
8714                         "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
8715                         "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
8716                         "\x0c\xd6\x04\x14\xde\x51\x74\x75"
8717                         "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
8718                         "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
8719                         "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
8720                         "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
8721                         "\x75\x46\x65\x4e\x07\x34\x37\xa3"
8722                         "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
8723                         "\x69\x24\x0e\x38\x67\x43\x8c\xde"
8724                         "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
8725                         "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
8726                         "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
8727                         "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
8728                         "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
8729                         "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
8730                         "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
8731                         "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
8732                         "\x91\x7d\x62\x64\x96\x72\xde\xfc"
8733                         "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
8734                         "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
8735                         "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
8736                         "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
8737                         "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
8738                         "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
8739                         "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
8740                         "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
8741                         "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
8742                         "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
8743                         "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
8744                         "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
8745                         "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
8746                         "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
8747                         "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
8748                         "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
8749                         "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
8750                         "\xae\xed\x39\x88\x42\x11\x3c\xed"
8751                         "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
8752                         "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
8753                         "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
8754                         "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
8755                         "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
8756                         "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
8757                         "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
8758                         "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
8759                         "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
8760                         "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
8761                         "\x34\x17\xde\xba\x47\xf1\x06\x18"
8762                         "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
8763                         "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
8764                         "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
8765                         "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
8766                         "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
8767                         "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
8768                         "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
8769                         "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
8770                         "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
8771                         "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
8772                         "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
8773                         "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
8774                         "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
8775                         "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
8776                         "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
8777                         "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
8778                         "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
8779                         "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
8780                         "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
8781                         "\x2c\x56\x39\x79\x0f\x69\x44\x75"
8782                         "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
8783                         "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
8784                         "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
8785                         "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
8786                         "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
8787                         "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
8788                         "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
8789                         "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
8790                         "\x63\x9b\xce\x61\x24\x79\xc0\x70"
8791                         "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
8792                         "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
8793                         "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
8794                         "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
8795                         "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
8796                         "\x74\x56\x58\x40\x02\x37\x52\x2c"
8797                         "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
8798                         "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
8799                         "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
8800                         "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
8801                         "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
8802                         "\xed\x38\x80\x36\x72\x43\x27\x49"
8803                         "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
8804                         "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
8805                         "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
8806                         "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
8807                         "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
8808                         "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
8809                         "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
8810                         "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
8811                         "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
8812                         "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
8813                         "\x12\xee\x30\xfe\xd8\x30\xef\x34"
8814                         "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
8815                         "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
8816                         "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
8817                         "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
8818                         "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
8819                         "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
8820                         "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
8821                         "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
8822                         "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
8823                         "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
8824                         "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
8825                         "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
8826                         "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
8827                         "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
8828                         "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
8829                         "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
8830                         "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
8831                         "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
8832                         "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
8833                         "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
8834                         "\x44\x12\xfb\x73\x77\xd4\x13\x39"
8835                         "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
8836                         "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
8837                         "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
8838                         "\x4b\xef\x31\x18\xea\xac\xb1\x84"
8839                         "\x21\xed\xda\x86",
8840                 .rlen = 4100,
8841                 .np     = 2,
8842                 .tap    = { 4064, 36 },
8843         },
8844 };
8845
8846 static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
8847         { /* From RFC 3686 */
8848                 .key    = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
8849                           "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
8850                           "\x00\x00\x00\x30",
8851                 .klen   = 20,
8852                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
8853                 .input  = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
8854                           "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
8855                 .ilen   = 16,
8856                 .result = "Single block msg",
8857                 .rlen   = 16,
8858         }, {
8859                 .key    = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
8860                           "\x43\xd6\xce\x1f\x32\x53\x91\x63"
8861                           "\x00\x6c\xb6\xdb",
8862                 .klen   = 20,
8863                 .iv     = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
8864                 .input  = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
8865                           "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
8866                           "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
8867                           "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
8868                 .ilen   = 32,
8869                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8870                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8871                           "\x10\x11\x12\x13\x14\x15\x16\x17"
8872                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8873                 .rlen   = 32,
8874         }, {
8875                 .key    = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
8876                           "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
8877                           "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
8878                           "\x00\x00\x00\x48",
8879                 .klen   = 28,
8880                 .iv     = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
8881                 .input  = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
8882                           "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
8883                 .ilen   = 16,
8884                 .result = "Single block msg",
8885                 .rlen   = 16,
8886         }, {
8887                 .key    = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
8888                           "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
8889                           "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
8890                           "\x00\x96\xb0\x3b",
8891                 .klen   = 28,
8892                 .iv     = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
8893                 .input  = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
8894                           "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
8895                           "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
8896                           "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
8897                 .ilen   = 32,
8898                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8899                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8900                           "\x10\x11\x12\x13\x14\x15\x16\x17"
8901                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8902                 .rlen   = 32,
8903         }, {
8904                 .key    = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
8905                           "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
8906                           "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
8907                           "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
8908                           "\x00\x00\x00\x60",
8909                 .klen   = 36,
8910                 .iv     = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
8911                 .input  = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
8912                           "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
8913                 .ilen   = 16,
8914                 .result = "Single block msg",
8915                 .rlen   = 16,
8916         }, {
8917                 .key    = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
8918                           "\x07\x96\x36\x58\x79\xef\xf8\x86"
8919                           "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
8920                           "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
8921                           "\x00\xfa\xac\x24",
8922                 .klen   = 36,
8923                 .iv     = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
8924                 .input  = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
8925                           "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
8926                           "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
8927                           "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
8928                 .ilen   = 32,
8929                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
8930                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
8931                           "\x10\x11\x12\x13\x14\x15\x16\x17"
8932                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
8933                 .rlen   = 32,
8934         },
8935 };
8936
8937 static struct cipher_testvec aes_ofb_enc_tv_template[] = {
8938          /* From NIST Special Publication 800-38A, Appendix F.5 */
8939         {
8940                 .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
8941                           "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
8942                 .klen   = 16,
8943                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
8944                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8945                 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
8946                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
8947                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
8948                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
8949                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
8950                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
8951                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
8952                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
8953                 .ilen   = 64,
8954                 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
8955                           "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
8956                           "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
8957                           "\x3c\x52\xda\xc5\x4e\xd8\x25"
8958                           "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
8959                           "\x44\xf7\xa8\x22\x60\xed\xcc"
8960                           "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
8961                           "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
8962                 .rlen   = 64,
8963         }
8964 };
8965
8966 static struct cipher_testvec aes_ofb_dec_tv_template[] = {
8967          /* From NIST Special Publication 800-38A, Appendix F.5 */
8968         {
8969                 .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
8970                           "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
8971                 .klen   = 16,
8972                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
8973                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
8974                 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
8975                           "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
8976                           "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
8977                           "\x3c\x52\xda\xc5\x4e\xd8\x25"
8978                           "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
8979                           "\x44\xf7\xa8\x22\x60\xed\xcc"
8980                           "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
8981                           "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
8982                 .ilen   = 64,
8983                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
8984                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
8985                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
8986                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
8987                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
8988                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
8989                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
8990                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
8991                 .rlen   = 64,
8992         }
8993 };
8994
8995 static struct aead_testvec aes_gcm_enc_tv_template[] = {
8996         { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
8997                 .key    = zeroed_string,
8998                 .klen   = 16,
8999                 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
9000                           "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
9001                 .rlen   = 16,
9002         }, {
9003                 .key    = zeroed_string,
9004                 .klen   = 16,
9005                 .input  = zeroed_string,
9006                 .ilen   = 16,
9007                 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
9008                           "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
9009                           "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
9010                           "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
9011                 .rlen   = 32,
9012         }, {
9013                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9014                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
9015                 .klen   = 16,
9016                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
9017                           "\xde\xca\xf8\x88",
9018                 .input  = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
9019                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
9020                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
9021                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
9022                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
9023                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
9024                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
9025                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
9026                 .ilen   = 64,
9027                 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
9028                           "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
9029                           "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
9030                           "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
9031                           "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
9032                           "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
9033                           "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
9034                           "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
9035                           "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
9036                           "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
9037                 .rlen   = 80,
9038         }, {
9039                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9040                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
9041                 .klen   = 16,
9042                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
9043                           "\xde\xca\xf8\x88",
9044                 .input  = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
9045                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
9046                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
9047                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
9048                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
9049                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
9050                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
9051                           "\xba\x63\x7b\x39",
9052                 .ilen   = 60,
9053                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
9054                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
9055                           "\xab\xad\xda\xd2",
9056                 .alen   = 20,
9057                 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
9058                           "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
9059                           "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
9060                           "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
9061                           "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
9062                           "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
9063                           "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
9064                           "\x3d\x58\xe0\x91"
9065                           "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
9066                           "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
9067                 .rlen   = 76,
9068         }, {
9069                 .key    = zeroed_string,
9070                 .klen   = 24,
9071                 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
9072                           "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
9073                 .rlen   = 16,
9074         }, {
9075                 .key    = zeroed_string,
9076                 .klen   = 24,
9077                 .input  = zeroed_string,
9078                 .ilen   = 16,
9079                 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
9080                           "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
9081                           "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
9082                           "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
9083                 .rlen   = 32,
9084         }, {
9085                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9086                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9087                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
9088                 .klen   = 24,
9089                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
9090                           "\xde\xca\xf8\x88",
9091                 .input  = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
9092                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
9093                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
9094                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
9095                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
9096                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
9097                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
9098                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
9099                 .ilen   = 64,
9100                 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
9101                           "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
9102                           "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
9103                           "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
9104                           "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
9105                           "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
9106                           "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
9107                           "\xcc\xda\x27\x10\xac\xad\xe2\x56"
9108                           "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
9109                           "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
9110                 .rlen   = 80,
9111         }, {
9112                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9113                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9114                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
9115                 .klen   = 24,
9116                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
9117                           "\xde\xca\xf8\x88",
9118                 .input  = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
9119                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
9120                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
9121                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
9122                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
9123                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
9124                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
9125                           "\xba\x63\x7b\x39",
9126                 .ilen   = 60,
9127                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
9128                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
9129                           "\xab\xad\xda\xd2",
9130                 .alen   = 20,
9131                 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
9132                           "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
9133                           "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
9134                           "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
9135                           "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
9136                           "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
9137                           "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
9138                           "\xcc\xda\x27\x10"
9139                           "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
9140                           "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
9141                 .rlen   = 76,
9142                 .np     = 2,
9143                 .tap    = { 32, 28 },
9144                 .anp    = 2,
9145                 .atap   = { 8, 12 }
9146         }, {
9147                 .key    = zeroed_string,
9148                 .klen   = 32,
9149                 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
9150                           "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
9151                 .rlen   = 16,
9152         }
9153 };
9154
9155 static struct aead_testvec aes_gcm_dec_tv_template[] = {
9156         { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
9157                 .key    = zeroed_string,
9158                 .klen   = 32,
9159                 .input  = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
9160                           "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
9161                           "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
9162                           "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
9163                 .ilen   = 32,
9164                 .result  = zeroed_string,
9165                 .rlen   = 16,
9166         }, {
9167                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9168                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9169                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9170                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
9171                 .klen   = 32,
9172                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
9173                           "\xde\xca\xf8\x88",
9174                 .input  = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
9175                           "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
9176                           "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
9177                           "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
9178                           "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
9179                           "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
9180                           "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
9181                           "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
9182                           "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
9183                           "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
9184                 .ilen   = 80,
9185                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
9186                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
9187                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
9188                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
9189                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
9190                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
9191                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
9192                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
9193                 .rlen   = 64,
9194         }, {
9195                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9196                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9197                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9198                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
9199                 .klen   = 32,
9200                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
9201                           "\xde\xca\xf8\x88",
9202                 .input  = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
9203                           "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
9204                           "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
9205                           "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
9206                           "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
9207                           "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
9208                           "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
9209                           "\xbc\xc9\xf6\x62"
9210                           "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
9211                           "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
9212                 .ilen   = 76,
9213                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
9214                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
9215                           "\xab\xad\xda\xd2",
9216                 .alen   = 20,
9217                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
9218                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
9219                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
9220                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
9221                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
9222                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
9223                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
9224                           "\xba\x63\x7b\x39",
9225                 .rlen   = 60,
9226                 .np     = 2,
9227                 .tap    = { 48, 28 },
9228                 .anp    = 3,
9229                 .atap   = { 8, 8, 4 }
9230         }, {
9231                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9232                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
9233                 .klen   = 16,
9234                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
9235                           "\xde\xca\xf8\x88",
9236                 .input  = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
9237                           "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
9238                           "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
9239                           "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
9240                           "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
9241                           "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
9242                           "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
9243                           "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
9244                           "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
9245                           "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
9246                 .ilen   = 80,
9247                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
9248                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
9249                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
9250                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
9251                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
9252                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
9253                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
9254                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
9255                 .rlen   = 64,
9256         }, {
9257                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9258                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
9259                 .klen   = 16,
9260                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
9261                           "\xde\xca\xf8\x88",
9262                 .input  = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
9263                           "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
9264                           "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
9265                           "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
9266                           "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
9267                           "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
9268                           "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
9269                           "\x3d\x58\xe0\x91"
9270                           "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
9271                           "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
9272                 .ilen   = 76,
9273                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
9274                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
9275                           "\xab\xad\xda\xd2",
9276                 .alen   = 20,
9277                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
9278                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
9279                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
9280                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
9281                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
9282                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
9283                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
9284                           "\xba\x63\x7b\x39",
9285                 .rlen   = 60,
9286         }, {
9287                 .key    = zeroed_string,
9288                 .klen   = 24,
9289                 .input  = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
9290                           "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
9291                           "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
9292                           "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
9293                 .ilen   = 32,
9294                 .result  = zeroed_string,
9295                 .rlen   = 16,
9296         }, {
9297                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9298                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9299                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
9300                 .klen   = 24,
9301                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
9302                           "\xde\xca\xf8\x88",
9303                 .input  = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
9304                           "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
9305                           "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
9306                           "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
9307                           "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
9308                           "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
9309                           "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
9310                           "\xcc\xda\x27\x10\xac\xad\xe2\x56"
9311                           "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
9312                           "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
9313                 .ilen   = 80,
9314                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
9315                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
9316                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
9317                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
9318                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
9319                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
9320                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
9321                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
9322                 .rlen   = 64,
9323         }, {
9324                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9325                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9326                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
9327                 .klen   = 24,
9328                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
9329                           "\xde\xca\xf8\x88",
9330                 .input  = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
9331                           "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
9332                           "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
9333                           "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
9334                           "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
9335                           "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
9336                           "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
9337                           "\xcc\xda\x27\x10"
9338                           "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
9339                           "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
9340                 .ilen   = 76,
9341                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
9342                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
9343                           "\xab\xad\xda\xd2",
9344                 .alen   = 20,
9345                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
9346                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
9347                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
9348                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
9349                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
9350                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
9351                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
9352                           "\xba\x63\x7b\x39",
9353                 .rlen   = 60,
9354         }
9355 };
9356
9357 static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
9358         { /* Generated using Crypto++ */
9359                 .key    = zeroed_string,
9360                 .klen   = 20,
9361                 .iv     = zeroed_string,
9362                 .input  = zeroed_string,
9363                 .ilen   = 16,
9364                 .assoc  = zeroed_string,
9365                 .alen   = 8,
9366                 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
9367                           "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
9368                           "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
9369                           "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
9370                 .rlen   = 32,
9371         },{
9372                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9373                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9374                           "\x00\x00\x00\x00",
9375                 .klen   = 20,
9376                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01"
9377                           "\x00\x00\x00\x00",
9378                 .input  = zeroed_string,
9379                 .ilen   = 16,
9380                 .assoc  = zeroed_string,
9381                 .alen   = 8,
9382                 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
9383                           "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
9384                           "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
9385                           "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
9386                 .rlen   = 32,
9387
9388         }, {
9389                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9390                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9391                           "\x00\x00\x00\x00",
9392                 .klen   = 20,
9393                 .iv     = zeroed_string,
9394                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
9395                           "\x01\x01\x01\x01\x01\x01\x01\x01",
9396                 .ilen   = 16,
9397                 .assoc  = zeroed_string,
9398                 .alen   = 8,
9399                 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
9400                           "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
9401                           "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
9402                           "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
9403                 .rlen   = 32,
9404         }, {
9405                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9406                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9407                           "\x00\x00\x00\x00",
9408                 .klen   = 20,
9409                 .iv     = zeroed_string,
9410                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
9411                           "\x01\x01\x01\x01\x01\x01\x01\x01",
9412                 .ilen   = 16,
9413                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01",
9414                 .alen   = 8,
9415                 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
9416                           "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
9417                           "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
9418                           "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
9419                 .rlen   = 32,
9420         }, {
9421                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9422                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9423                           "\x00\x00\x00\x00",
9424                 .klen   = 20,
9425                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01"
9426                           "\x00\x00\x00\x00",
9427                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
9428                           "\x01\x01\x01\x01\x01\x01\x01\x01",
9429                 .ilen   = 16,
9430                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01",
9431                 .alen   = 8,
9432                 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
9433                           "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
9434                           "\x64\x50\xF9\x32\x13\xFB\x74\x61"
9435                           "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
9436                 .rlen   = 32,
9437         }, {
9438                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9439                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9440                           "\x00\x00\x00\x00",
9441                 .klen   = 20,
9442                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01"
9443                           "\x00\x00\x00\x00",
9444                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
9445                           "\x01\x01\x01\x01\x01\x01\x01\x01"
9446                           "\x01\x01\x01\x01\x01\x01\x01\x01"
9447                           "\x01\x01\x01\x01\x01\x01\x01\x01"
9448                           "\x01\x01\x01\x01\x01\x01\x01\x01"
9449                           "\x01\x01\x01\x01\x01\x01\x01\x01"
9450                           "\x01\x01\x01\x01\x01\x01\x01\x01"
9451                           "\x01\x01\x01\x01\x01\x01\x01\x01",
9452                 .ilen   = 64,
9453                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01",
9454                 .alen   = 8,
9455                 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
9456                           "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
9457                           "\x98\x14\xA1\x42\x37\x80\xFD\x90"
9458                           "\x68\x12\x01\xA8\x91\x89\xB9\x83"
9459                           "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
9460                           "\x94\x5F\x18\x12\xBA\x27\x09\x39"
9461                           "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
9462                           "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
9463                           "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
9464                           "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
9465                 .rlen   = 80,
9466         }, {
9467                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
9468                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9469                           "\x00\x00\x00\x00",
9470                 .klen   = 20,
9471                 .iv     = "\x00\x00\x45\x67\x89\xab\xcd\xef"
9472                           "\x00\x00\x00\x00",
9473                 .input  = "\xff\xff\xff\xff\xff\xff\xff\xff"
9474                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9475                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9476                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9477                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9478                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9479                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9480                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9481                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9482                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9483                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9484                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9485                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9486                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9487                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9488                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9489                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9490                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9491                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9492                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9493                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9494                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9495                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9496                           "\xff\xff\xff\xff\xff\xff\xff\xff",
9497                 .ilen   = 192,
9498                 .assoc  = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
9499                           "\xaa\xaa\xaa\xaa",
9500                 .alen   = 12,
9501                 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
9502                           "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
9503                           "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
9504                           "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
9505                           "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
9506                           "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
9507                           "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
9508                           "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
9509                           "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
9510                           "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
9511                           "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
9512                           "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
9513                           "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
9514                           "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
9515                           "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
9516                           "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
9517                           "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
9518                           "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
9519                           "\x7E\x13\x06\x82\x08\x17\xA4\x35"
9520                           "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
9521                           "\xA3\x05\x38\x95\x20\x1A\x47\x04"
9522                           "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
9523                           "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
9524                           "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
9525                           "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
9526                           "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
9527                 .rlen   = 208,
9528         }
9529 };
9530
9531 static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
9532         { /* Generated using Crypto++ */
9533                 .key    = zeroed_string,
9534                 .klen   = 20,
9535                 .iv     = zeroed_string,
9536                 .input  = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
9537                           "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
9538                           "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
9539                           "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
9540                 .ilen   = 32,
9541                 .assoc  = zeroed_string,
9542                 .alen   = 8,
9543                 .result = zeroed_string,
9544                 .rlen   = 16,
9545
9546         },{
9547                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9548                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9549                           "\x00\x00\x00\x00",
9550                 .klen   = 20,
9551                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01"
9552                           "\x00\x00\x00\x00",
9553                 .input  = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
9554                           "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
9555                           "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
9556                           "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
9557                 .ilen   = 32,
9558                 .assoc  = zeroed_string,
9559                 .alen   = 8,
9560                 .result = zeroed_string,
9561                 .rlen   = 16,
9562         }, {
9563                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9564                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9565                           "\x00\x00\x00\x00",
9566                 .klen   = 20,
9567                 .iv     = zeroed_string,
9568                 .input  = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
9569                           "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
9570                           "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
9571                           "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
9572                 .ilen   = 32,
9573                 .assoc  = zeroed_string,
9574                 .alen   = 8,
9575                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
9576                           "\x01\x01\x01\x01\x01\x01\x01\x01",
9577                 .rlen   = 16,
9578         }, {
9579                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9580                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9581                           "\x00\x00\x00\x00",
9582                 .klen   = 20,
9583                 .iv     = zeroed_string,
9584                 .input  = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
9585                           "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
9586                           "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
9587                           "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
9588                 .ilen   = 32,
9589                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01",
9590                 .alen   = 8,
9591                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
9592                           "\x01\x01\x01\x01\x01\x01\x01\x01",
9593                 .rlen   = 16,
9594
9595         }, {
9596                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9597                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9598                           "\x00\x00\x00\x00",
9599                 .klen   = 20,
9600                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01"
9601                           "\x00\x00\x00\x00",
9602                 .input  = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
9603                           "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
9604                           "\x64\x50\xF9\x32\x13\xFB\x74\x61"
9605                           "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
9606                 .ilen   = 32,
9607                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01",
9608                 .alen   = 8,
9609                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
9610                           "\x01\x01\x01\x01\x01\x01\x01\x01",
9611                 .rlen   = 16,
9612         }, {
9613                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
9614                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
9615                           "\x00\x00\x00\x00",
9616                 .klen   = 20,
9617                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01"
9618                           "\x00\x00\x00\x00",
9619                 .input  = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
9620                           "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
9621                           "\x98\x14\xA1\x42\x37\x80\xFD\x90"
9622                           "\x68\x12\x01\xA8\x91\x89\xB9\x83"
9623                           "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
9624                           "\x94\x5F\x18\x12\xBA\x27\x09\x39"
9625                           "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
9626                           "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
9627                           "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
9628                           "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
9629                 .ilen   = 80,
9630                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01",
9631                 .alen   = 8,
9632                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
9633                           "\x01\x01\x01\x01\x01\x01\x01\x01"
9634                           "\x01\x01\x01\x01\x01\x01\x01\x01"
9635                           "\x01\x01\x01\x01\x01\x01\x01\x01"
9636                           "\x01\x01\x01\x01\x01\x01\x01\x01"
9637                           "\x01\x01\x01\x01\x01\x01\x01\x01"
9638                           "\x01\x01\x01\x01\x01\x01\x01\x01"
9639                           "\x01\x01\x01\x01\x01\x01\x01\x01",
9640                 .rlen   = 64,
9641         }, {
9642                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
9643                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9644                           "\x00\x00\x00\x00",
9645                 .klen   = 20,
9646                 .iv     = "\x00\x00\x45\x67\x89\xab\xcd\xef"
9647                           "\x00\x00\x00\x00",
9648                 .input  = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
9649                           "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
9650                           "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
9651                           "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
9652                           "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
9653                           "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
9654                           "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
9655                           "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
9656                           "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
9657                           "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
9658                           "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
9659                           "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
9660                           "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
9661                           "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
9662                           "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
9663                           "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
9664                           "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
9665                           "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
9666                           "\x7E\x13\x06\x82\x08\x17\xA4\x35"
9667                           "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
9668                           "\xA3\x05\x38\x95\x20\x1A\x47\x04"
9669                           "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
9670                           "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
9671                           "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
9672                           "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
9673                           "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
9674                 .ilen   = 208,
9675                 .assoc  = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
9676                           "\xaa\xaa\xaa\xaa",
9677                 .alen   = 12,
9678                 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
9679                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9680                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9681                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9682                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9683                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9684                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9685                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9686                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9687                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9688                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9689                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9690                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9691                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9692                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9693                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9694                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9695                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9696                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9697                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9698                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9699                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9700                           "\xff\xff\xff\xff\xff\xff\xff\xff"
9701                           "\xff\xff\xff\xff\xff\xff\xff\xff",
9702                 .rlen   = 192,
9703
9704         }
9705 };
9706
9707 static struct aead_testvec aes_ccm_enc_tv_template[] = {
9708         { /* From RFC 3610 */
9709                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9710                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9711                 .klen   = 16,
9712                 .iv     = "\x01\x00\x00\x00\x03\x02\x01\x00"
9713                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9714                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07",
9715                 .alen   = 8,
9716                 .input  = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9717                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9718                           "\x18\x19\x1a\x1b\x1c\x1d\x1e",
9719                 .ilen   = 23,
9720                 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
9721                           "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
9722                           "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
9723                           "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
9724                 .rlen   = 31,
9725         }, {
9726                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9727                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9728                 .klen   = 16,
9729                 .iv     = "\x01\x00\x00\x00\x07\x06\x05\x04"
9730                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9731                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9732                           "\x08\x09\x0a\x0b",
9733                 .alen   = 12,
9734                 .input  = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
9735                           "\x14\x15\x16\x17\x18\x19\x1a\x1b"
9736                           "\x1c\x1d\x1e\x1f",
9737                 .ilen   = 20,
9738                 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
9739                           "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
9740                           "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
9741                           "\x7d\x9c\x2d\x93",
9742                 .rlen   = 28,
9743         }, {
9744                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9745                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9746                 .klen   = 16,
9747                 .iv     = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
9748                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9749                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07",
9750                 .alen   = 8,
9751                 .input  = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9752                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9753                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9754                           "\x20",
9755                 .ilen   = 25,
9756                 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
9757                           "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
9758                           "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
9759                           "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
9760                           "\x7e\x5f\x4e",
9761                 .rlen   = 35,
9762         }, {
9763                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9764                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9765                 .klen   = 16,
9766                 .iv     = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
9767                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9768                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9769                           "\x08\x09\x0a\x0b",
9770                 .alen   = 12,
9771                 .input  = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
9772                           "\x14\x15\x16\x17\x18\x19\x1a\x1b"
9773                           "\x1c\x1d\x1e",
9774                 .ilen   = 19,
9775                 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
9776                           "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
9777                           "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
9778                           "\x4d\x99\x99\x88\xdd",
9779                 .rlen   = 29,
9780         }, {
9781                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
9782                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
9783                 .klen   = 16,
9784                 .iv     = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
9785                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
9786                 .assoc  = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
9787                 .alen   = 8,
9788                 .input  = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
9789                           "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
9790                           "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
9791                 .ilen   = 24,
9792                 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
9793                           "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
9794                           "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
9795                           "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
9796                 .rlen   = 32,
9797         }, {
9798                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
9799                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
9800                 .klen   = 16,
9801                 .iv     = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
9802                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
9803                 .assoc  = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
9804                           "\x20\xea\x60\xc0",
9805                 .alen   = 12,
9806                 .input  = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
9807                           "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
9808                           "\x3a\x80\x3b\xa8\x7f",
9809                 .ilen   = 21,
9810                 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
9811                           "\x55\x94\xc5\x92\x51\xe6\x03\x57"
9812                           "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
9813                           "\x5a\xe0\x70\x45\x51",
9814                 .rlen   = 29,
9815         }, {
9816                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
9817                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
9818                 .klen   = 16,
9819                 .iv     = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
9820                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
9821                 .assoc  = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
9822                 .alen   = 8,
9823                 .input  = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
9824                           "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
9825                           "\x98\x09\xd6\x7d\xbe\xdd\x18",
9826                 .ilen   = 23,
9827                 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
9828                           "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
9829                           "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
9830                           "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
9831                           "\xba",
9832                 .rlen   = 33,
9833         },
9834 };
9835
9836 static struct aead_testvec aes_ccm_dec_tv_template[] = {
9837         { /* From RFC 3610 */
9838                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9839                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9840                 .klen   = 16,
9841                 .iv     = "\x01\x00\x00\x00\x03\x02\x01\x00"
9842                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9843                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07",
9844                 .alen   = 8,
9845                 .input  = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
9846                           "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
9847                           "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
9848                           "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
9849                 .ilen   = 31,
9850                 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9851                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9852                           "\x18\x19\x1a\x1b\x1c\x1d\x1e",
9853                 .rlen   = 23,
9854         }, {
9855                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9856                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9857                 .klen   = 16,
9858                 .iv     = "\x01\x00\x00\x00\x07\x06\x05\x04"
9859                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9860                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9861                           "\x08\x09\x0a\x0b",
9862                 .alen   = 12,
9863                 .input  = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
9864                           "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
9865                           "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
9866                           "\x7d\x9c\x2d\x93",
9867                 .ilen   = 28,
9868                 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
9869                           "\x14\x15\x16\x17\x18\x19\x1a\x1b"
9870                           "\x1c\x1d\x1e\x1f",
9871                 .rlen   = 20,
9872         }, {
9873                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9874                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9875                 .klen   = 16,
9876                 .iv     = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
9877                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9878                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07",
9879                 .alen   = 8,
9880                 .input  = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
9881                           "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
9882                           "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
9883                           "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
9884                           "\x7e\x5f\x4e",
9885                 .ilen   = 35,
9886                 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9887                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9888                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9889                           "\x20",
9890                 .rlen   = 25,
9891         }, {
9892                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9893                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
9894                 .klen   = 16,
9895                 .iv     = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
9896                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
9897                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9898                           "\x08\x09\x0a\x0b",
9899                 .alen   = 12,
9900                 .input  = "\x07\x34\x25\x94\x15\x77\x85\x15"
9901                           "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
9902                           "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
9903                           "\x4d\x99\x99\x88\xdd",
9904                 .ilen   = 29,
9905                 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
9906                           "\x14\x15\x16\x17\x18\x19\x1a\x1b"
9907                           "\x1c\x1d\x1e",
9908                 .rlen   = 19,
9909         }, {
9910                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
9911                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
9912                 .klen   = 16,
9913                 .iv     = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
9914                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
9915                 .assoc  = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
9916                 .alen   = 8,
9917                 .input  = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
9918                           "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
9919                           "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
9920                           "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
9921                 .ilen   = 32,
9922                 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
9923                           "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
9924                           "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
9925                 .rlen   = 24,
9926         }, {
9927                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
9928                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
9929                 .klen   = 16,
9930                 .iv     = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
9931                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
9932                 .assoc  = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
9933                           "\x20\xea\x60\xc0",
9934                 .alen   = 12,
9935                 .input  = "\x00\x97\x69\xec\xab\xdf\x48\x62"
9936                           "\x55\x94\xc5\x92\x51\xe6\x03\x57"
9937                           "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
9938                           "\x5a\xe0\x70\x45\x51",
9939                 .ilen   = 29,
9940                 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
9941                           "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
9942                           "\x3a\x80\x3b\xa8\x7f",
9943                 .rlen   = 21,
9944         }, {
9945                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
9946                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
9947                 .klen   = 16,
9948                 .iv     = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
9949                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
9950                 .assoc  = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
9951                 .alen   = 8,
9952                 .input  = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
9953                           "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
9954                           "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
9955                           "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
9956                           "\xba",
9957                 .ilen   = 33,
9958                 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
9959                           "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
9960                           "\x98\x09\xd6\x7d\xbe\xdd\x18",
9961                 .rlen   = 23,
9962         },
9963 };
9964
9965 /*
9966  * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
9967  * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
9968  * Special Publication 800-38C's test vectors also use nonce lengths our
9969  * implementation doesn't support. The following are taken from fips cavs
9970  * fax files on hand at Red Hat.
9971  *
9972  * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
9973  * part of the nonce which combine w/the iv, but need to be input this way.
9974  */
9975 static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
9976         {
9977                 .key    = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
9978                           "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
9979                           "\x96\xac\x59",
9980                 .klen   = 19,
9981                 .iv     = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
9982                 .alen   = 0,
9983                 .input  = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
9984                           "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
9985                           "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
9986                           "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
9987                 .ilen   = 32,
9988                 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
9989                           "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
9990                           "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
9991                           "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
9992                           "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
9993                           "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
9994                 .rlen   = 48,
9995         }, {
9996                 .key    = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
9997                           "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
9998                           "\x4f\xa3\x19",
9999                 .klen   = 19,
10000                 .iv     = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
10001                 .assoc  = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
10002                           "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
10003                           "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
10004                           "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
10005                 .alen   = 32,
10006                 .input  = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
10007                           "\xa9\x28\x63\xba\x12\xa3\x14\x85"
10008                           "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
10009                           "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
10010                 .ilen   = 32,
10011                 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
10012                           "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
10013                           "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
10014                           "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
10015                           "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
10016                           "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
10017                 .rlen   = 48,
10018         }, {
10019                 .key    = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
10020                           "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
10021                           "\x53\x14\x73\x66\x8d\x88\xf6\x80"
10022                           "\xa0\x20\x35",
10023                 .klen   = 27,
10024                 .iv     = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
10025                 .assoc  = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
10026                           "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
10027                           "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
10028                           "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
10029                 .alen   = 32,
10030                 .ilen   = 0,
10031                 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
10032                           "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
10033                 .rlen   = 16,
10034         }, {
10035                 .key    = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
10036                           "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
10037                           "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
10038                           "\xd6\x3c\x8c",
10039                 .klen   = 27,
10040                 .iv     = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
10041                 .assoc  = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
10042                           "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
10043                           "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
10044                           "\xe3\x00\x73\x69\x84\x69\x87\x79",
10045                 .alen   = 32,
10046                 .input  = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
10047                           "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
10048                           "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
10049                           "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
10050                 .ilen   = 32,
10051                 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
10052                           "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
10053                           "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
10054                           "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
10055                           "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
10056                           "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
10057                 .rlen   = 48,
10058         }, {
10059                 .key    = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
10060                           "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
10061                           "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
10062                           "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
10063                           "\x1e\x29\x91",
10064                 .klen   = 35,
10065                 .iv     = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
10066                 .assoc  = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
10067                           "\x78\x2b\x94\x02\x29\x0f\x42\x27"
10068                           "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
10069                           "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
10070                 .alen   = 32,
10071                 .input  = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
10072                           "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
10073                           "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
10074                           "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
10075                 .ilen   = 32,
10076                 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
10077                           "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
10078                           "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
10079                           "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
10080                           "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
10081                 .rlen   = 40,
10082         }, {
10083                 .key    = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
10084                           "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
10085                           "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
10086                           "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
10087                           "\xf9\xd9\x4e",
10088                 .klen   = 35,
10089                 .iv     = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
10090                 .assoc  = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
10091                           "\x13\x02\x01\x0c\x83\x4c\x96\x35"
10092                           "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
10093                           "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
10094                 .alen   = 32,
10095                 .input  = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
10096                           "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
10097                           "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
10098                           "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
10099                 .ilen   = 32,
10100                 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
10101                           "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
10102                           "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
10103                           "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
10104                           "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
10105                           "\x7b\x72\x8a\xf7",
10106                 .rlen   = 44,
10107         }, {
10108                 .key    = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
10109                           "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
10110                           "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
10111                           "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
10112                           "\x24\xa7\x8b",
10113                 .klen   = 35,
10114                 .iv     = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
10115                 .assoc  = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
10116                           "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
10117                           "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
10118                           "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
10119                 .alen   = 32,
10120                 .input  = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
10121                           "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
10122                           "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
10123                           "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
10124                 .ilen   = 32,
10125                 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
10126                           "\xef\xbb\x80\x21\x04\x6c\x58\x09"
10127                           "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
10128                           "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
10129                           "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
10130                           "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
10131                 .rlen   = 48,
10132         },
10133 };
10134
10135 static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
10136         {
10137                 .key    = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
10138                           "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
10139                           "\xc6\xfb\x7d",
10140                 .klen   = 19,
10141                 .iv     = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
10142                 .alen   = 0,
10143                 .input  = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
10144                 .ilen   = 8,
10145                 .result = "\x00",
10146                 .rlen   = 0,
10147                 .novrfy = 1,
10148         }, {
10149                 .key    = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
10150                           "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
10151                           "\xaf\x94\x87",
10152                 .klen   = 19,
10153                 .iv     = "\x78\x35\x82\x81\x7f\x88\x94\x68",
10154                 .alen   = 0,
10155                 .input  = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
10156                 .ilen   = 8,
10157                 .result = "\x00",
10158                 .rlen   = 0,
10159         }, {
10160                 .key    = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
10161                           "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
10162                           "\xc6\xfb\x7d",
10163                 .klen   = 19,
10164                 .iv     = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
10165                 .assoc  = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
10166                           "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
10167                           "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
10168                           "\xd8\x94\x99\x91\x81\x54\x62\x57",
10169                 .alen   = 32,
10170                 .input  = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
10171                           "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
10172                           "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
10173                           "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
10174                           "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
10175                           "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
10176                 .ilen   = 48,
10177                 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
10178                           "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
10179                           "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
10180                           "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
10181                 .rlen   = 32,
10182                 .novrfy = 1,
10183         }, {
10184                 .key    = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
10185                           "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
10186                           "\x05\xe0\xc9",
10187                 .klen   = 19,
10188                 .iv     = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
10189                 .assoc  = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
10190                           "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
10191                           "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
10192                           "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
10193                 .alen   = 32,
10194                 .input  = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
10195                           "\xad\x83\x52\x6d\x71\x03\x25\x1c"
10196                           "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
10197                           "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
10198                           "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
10199                           "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
10200                 .ilen   = 48,
10201                 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
10202                           "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
10203                           "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
10204                           "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
10205                 .rlen   = 32,
10206         }, {
10207                 .key    = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
10208                           "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
10209                           "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
10210                           "\xee\x49\x83",
10211                 .klen   = 27,
10212                 .iv     = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
10213                 .assoc  = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
10214                           "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
10215                           "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
10216                           "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
10217                 .alen   = 32,
10218                 .input  = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
10219                 .ilen   = 8,
10220                 .result = "\x00",
10221                 .rlen   = 0,
10222         }, {
10223                 .key    = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
10224                           "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
10225                           "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
10226                           "\xee\x49\x83",
10227                 .klen   = 27,
10228                 .iv     = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
10229                 .assoc  = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
10230                           "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
10231                           "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
10232                           "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
10233                 .alen   = 32,
10234                 .input  = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
10235                           "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
10236                           "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
10237                           "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
10238                           "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
10239                 .ilen   = 40,
10240                 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
10241                           "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
10242                           "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
10243                           "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
10244                 .rlen   = 32,
10245         }, {
10246                 .key    = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
10247                           "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
10248                           "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
10249                           "\xd1\xfc\x57",
10250                 .klen   = 27,
10251                 .iv     = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
10252                 .assoc  = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
10253                           "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
10254                           "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
10255                           "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
10256                 .alen   = 32,
10257                 .input  = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
10258                           "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
10259                           "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
10260                           "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
10261                           "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
10262                           "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
10263                 .ilen   = 48,
10264                 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
10265                           "\x99\x2a\xa8\xca\x04\x25\x45\x90"
10266                           "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
10267                           "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
10268                 .rlen   = 32,
10269                 .novrfy = 1,
10270         }, {
10271                 .key    = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
10272                           "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
10273                           "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
10274                           "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
10275                           "\xee\x49\x83",
10276                 .klen   = 35,
10277                 .iv     = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
10278                 .alen   = 0,
10279                 .input  = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
10280                 .ilen   = 8,
10281                 .result = "\x00",
10282                 .rlen   = 0,
10283         }, {
10284                 .key    = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
10285                           "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
10286                           "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
10287                           "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
10288                           "\x85\x34\x66",
10289                 .klen   = 35,
10290                 .iv     = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
10291                 .alen   = 0,
10292                 .input  = "\x48\x01\x5e\x02\x24\x04\x66\x47"
10293                           "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
10294                           "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
10295                           "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
10296                           "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
10297                           "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
10298                 .ilen   = 48,
10299                 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
10300                           "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
10301                           "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
10302                           "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
10303                 .rlen   = 32,
10304                 .novrfy = 1,
10305         }, {
10306                 .key    = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
10307                           "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
10308                           "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
10309                           "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
10310                           "\xcf\x76\x3f",
10311                 .klen   = 35,
10312                 .iv     = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
10313                 .assoc  = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
10314                           "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
10315                           "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
10316                           "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
10317                 .alen   = 32,
10318                 .input  = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
10319                           "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
10320                           "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
10321                           "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
10322                           "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
10323                           "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
10324                 .ilen   = 48,
10325                 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
10326                           "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
10327                           "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
10328                           "\x04\x49\x3b\x19\x93\x57\x25\x5d",
10329                 .rlen   = 32,
10330         },
10331 };
10332
10333 /*
10334  * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
10335  * test vectors, taken from Appendix B.2.9 and B.2.10:
10336  *     http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
10337  * Only AES-128 is supported at this time.
10338  */
10339 #define ANSI_CPRNG_AES_TEST_VECTORS     6
10340
10341 static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
10342         {
10343                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
10344                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
10345                 .klen   = 16,
10346                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
10347                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
10348                 .dtlen  = 16,
10349                 .v      = "\x80\x00\x00\x00\x00\x00\x00\x00"
10350                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10351                 .vlen   = 16,
10352                 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
10353                           "\x84\x79\x66\x85\xc1\x2f\x76\x41",
10354                 .rlen   = 16,
10355                 .loops  = 1,
10356         }, {
10357                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
10358                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
10359                 .klen   = 16,
10360                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
10361                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
10362                 .dtlen  = 16,
10363                 .v      = "\xc0\x00\x00\x00\x00\x00\x00\x00"
10364                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10365                 .vlen   = 16,
10366                 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
10367                           "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
10368                 .rlen   = 16,
10369                 .loops  = 1,
10370         }, {
10371                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
10372                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
10373                 .klen   = 16,
10374                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
10375                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
10376                 .dtlen  = 16,
10377                 .v      = "\xe0\x00\x00\x00\x00\x00\x00\x00"
10378                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10379                 .vlen   = 16,
10380                 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
10381                           "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
10382                 .rlen   = 16,
10383                 .loops  = 1,
10384         }, {
10385                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
10386                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
10387                 .klen   = 16,
10388                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
10389                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
10390                 .dtlen  = 16,
10391                 .v      = "\xf0\x00\x00\x00\x00\x00\x00\x00"
10392                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10393                 .vlen   = 16,
10394                 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
10395                           "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
10396                 .rlen   = 16,
10397                 .loops  = 1,
10398         }, {
10399                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
10400                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
10401                 .klen   = 16,
10402                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
10403                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
10404                 .dtlen  = 16,
10405                 .v      = "\xf8\x00\x00\x00\x00\x00\x00\x00"
10406                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10407                 .vlen   = 16,
10408                 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
10409                           "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
10410                 .rlen   = 16,
10411                 .loops  = 1,
10412         }, {    /* Monte Carlo Test */
10413                 .key    = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
10414                           "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
10415                 .klen   = 16,
10416                 .dt     = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
10417                           "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
10418                 .dtlen  = 16,
10419                 .v      = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
10420                           "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
10421                 .vlen   = 16,
10422                 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
10423                           "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
10424                 .rlen   = 16,
10425                 .loops  = 10000,
10426         },
10427 };
10428
10429 /* Cast5 test vectors from RFC 2144 */
10430 #define CAST5_ENC_TEST_VECTORS  3
10431 #define CAST5_DEC_TEST_VECTORS  3
10432
10433 static struct cipher_testvec cast5_enc_tv_template[] = {
10434         {
10435                 .key    = "\x01\x23\x45\x67\x12\x34\x56\x78"
10436                           "\x23\x45\x67\x89\x34\x56\x78\x9a",
10437                 .klen   = 16,
10438                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10439                 .ilen   = 8,
10440                 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
10441                 .rlen   = 8,
10442         }, {
10443                 .key    = "\x01\x23\x45\x67\x12\x34\x56\x78"
10444                           "\x23\x45",
10445                 .klen   = 10,
10446                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10447                 .ilen   = 8,
10448                 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
10449                 .rlen   = 8,
10450         }, {
10451                 .key    = "\x01\x23\x45\x67\x12",
10452                 .klen   = 5,
10453                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10454                 .ilen   = 8,
10455                 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
10456                 .rlen   = 8,
10457         },
10458 };
10459
10460 static struct cipher_testvec cast5_dec_tv_template[] = {
10461         {
10462                 .key    = "\x01\x23\x45\x67\x12\x34\x56\x78"
10463                           "\x23\x45\x67\x89\x34\x56\x78\x9a",
10464                 .klen   = 16,
10465                 .input  = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
10466                 .ilen   = 8,
10467                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10468                 .rlen   = 8,
10469         }, {
10470                 .key    = "\x01\x23\x45\x67\x12\x34\x56\x78"
10471                           "\x23\x45",
10472                 .klen   = 10,
10473                 .input  = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
10474                 .ilen   = 8,
10475                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10476                 .rlen   = 8,
10477         }, {
10478                 .key    = "\x01\x23\x45\x67\x12",
10479                 .klen   = 5,
10480                 .input  = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
10481                 .ilen   = 8,
10482                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10483                 .rlen   = 8,
10484         },
10485 };
10486
10487 /*
10488  * ARC4 test vectors from OpenSSL
10489  */
10490 #define ARC4_ENC_TEST_VECTORS   7
10491 #define ARC4_DEC_TEST_VECTORS   7
10492
10493 static struct cipher_testvec arc4_enc_tv_template[] = {
10494         {
10495                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10496                 .klen   = 8,
10497                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10498                 .ilen   = 8,
10499                 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
10500                 .rlen   = 8,
10501         }, {
10502                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10503                 .klen   = 8,
10504                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
10505                 .ilen   = 8,
10506                 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
10507                 .rlen   = 8,
10508         }, {
10509                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
10510                 .klen   = 8,
10511                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
10512                 .ilen   = 8,
10513                 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
10514                 .rlen   = 8,
10515         }, {
10516                 .key    = "\xef\x01\x23\x45",
10517                 .klen   = 4,
10518                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
10519                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10520                           "\x00\x00\x00\x00",
10521                 .ilen   = 20,
10522                 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
10523                           "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
10524                           "\x36\xb6\x78\x58",
10525                 .rlen   = 20,
10526         }, {
10527                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10528                 .klen   = 8,
10529                 .input  = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
10530                           "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
10531                           "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
10532                           "\x12\x34\x56\x78",
10533                 .ilen   = 28,
10534                 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
10535                           "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
10536                           "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
10537                           "\x40\x01\x1e\xcf",
10538                 .rlen   = 28,
10539         }, {
10540                 .key    = "\xef\x01\x23\x45",
10541                 .klen   = 4,
10542                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
10543                           "\x00\x00",
10544                 .ilen   = 10,
10545                 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
10546                           "\xbd\x61",
10547                 .rlen   = 10,
10548         }, {
10549                 .key    = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
10550                         "\x00\x00\x00\x00\x00\x00\x00\x00",
10551                 .klen   = 16,
10552                 .input  = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
10553                 .ilen   = 8,
10554                 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
10555                 .rlen   = 8,
10556         },
10557 };
10558
10559 static struct cipher_testvec arc4_dec_tv_template[] = {
10560         {
10561                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10562                 .klen   = 8,
10563                 .input  = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
10564                 .ilen   = 8,
10565                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10566                 .rlen   = 8,
10567         }, {
10568                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10569                 .klen   = 8,
10570                 .input  = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
10571                 .ilen   = 8,
10572                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
10573                 .rlen   = 8,
10574         }, {
10575                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
10576                 .klen   = 8,
10577                 .input  = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
10578                 .ilen   = 8,
10579                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
10580                 .rlen   = 8,
10581         }, {
10582                 .key    = "\xef\x01\x23\x45",
10583                 .klen   = 4,
10584                 .input  = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
10585                           "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
10586                           "\x36\xb6\x78\x58",
10587                 .ilen   = 20,
10588                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
10589                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10590                           "\x00\x00\x00\x00",
10591                 .rlen   = 20,
10592         }, {
10593                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
10594                 .klen   = 8,
10595                 .input  = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
10596                           "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
10597                           "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
10598                           "\x40\x01\x1e\xcf",
10599                 .ilen   = 28,
10600                 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
10601                           "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
10602                           "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
10603                           "\x12\x34\x56\x78",
10604                 .rlen   = 28,
10605         }, {
10606                 .key    = "\xef\x01\x23\x45",
10607                 .klen   = 4,
10608                 .input  = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
10609                           "\xbd\x61",
10610                 .ilen   = 10,
10611                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
10612                           "\x00\x00",
10613                 .rlen   = 10,
10614         }, {
10615                 .key    = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
10616                         "\x00\x00\x00\x00\x00\x00\x00\x00",
10617                 .klen   = 16,
10618                 .input  = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
10619                 .ilen   = 8,
10620                 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
10621                 .rlen   = 8,
10622         },
10623 };
10624
10625 /*
10626  * TEA test vectors
10627  */
10628 #define TEA_ENC_TEST_VECTORS    4
10629 #define TEA_DEC_TEST_VECTORS    4
10630
10631 static struct cipher_testvec tea_enc_tv_template[] = {
10632         {
10633                 .key    = zeroed_string,
10634                 .klen   = 16,
10635                 .input  = zeroed_string,
10636                 .ilen   = 8,
10637                 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
10638                 .rlen   = 8,
10639         }, {
10640                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
10641                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
10642                 .klen   = 16,
10643                 .input  = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
10644                 .ilen   = 8,
10645                 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
10646                 .rlen   = 8,
10647         }, {
10648                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
10649                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
10650                 .klen   = 16,
10651                 .input  = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
10652                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
10653                 .ilen   = 16,
10654                 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
10655                           "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
10656                 .rlen   = 16,
10657         }, {
10658                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
10659                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
10660                 .klen   = 16,
10661                 .input  = "\x54\x65\x61\x20\x69\x73\x20\x67"
10662                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
10663                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
10664                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
10665                 .ilen   = 32,
10666                 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
10667                           "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
10668                           "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
10669                           "\x07\x89\x73\xc2\x45\x92\xc6\x90",
10670                 .rlen   = 32,
10671         }
10672 };
10673
10674 static struct cipher_testvec tea_dec_tv_template[] = {
10675         {
10676                 .key    = zeroed_string,
10677                 .klen   = 16,
10678                 .input  = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
10679                 .ilen   = 8,
10680                 .result = zeroed_string,
10681                 .rlen   = 8,
10682         }, {
10683                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
10684                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
10685                 .klen   = 16,
10686                 .input  = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
10687                 .ilen   = 8,
10688                 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
10689                 .rlen   = 8,
10690         }, {
10691                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
10692                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
10693                 .klen   = 16,
10694                 .input  = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
10695                           "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
10696                 .ilen   = 16,
10697                 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
10698                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
10699                 .rlen   = 16,
10700         }, {
10701                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
10702                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
10703                 .klen   = 16,
10704                 .input  = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
10705                           "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
10706                           "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
10707                           "\x07\x89\x73\xc2\x45\x92\xc6\x90",
10708                 .ilen   = 32,
10709                 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
10710                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
10711                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
10712                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
10713                 .rlen   = 32,
10714         }
10715 };
10716
10717 /*
10718  * XTEA test vectors
10719  */
10720 #define XTEA_ENC_TEST_VECTORS   4
10721 #define XTEA_DEC_TEST_VECTORS   4
10722
10723 static struct cipher_testvec xtea_enc_tv_template[] = {
10724         {
10725                 .key    = zeroed_string,
10726                 .klen   = 16,
10727                 .input  = zeroed_string,
10728                 .ilen   = 8,
10729                 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
10730                 .rlen   = 8,
10731         }, {
10732                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
10733                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
10734                 .klen   = 16,
10735                 .input  = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
10736                 .ilen   = 8,
10737                 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
10738                 .rlen   = 8,
10739         }, {
10740                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
10741                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
10742                 .klen   = 16,
10743                 .input  = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
10744                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
10745                 .ilen   = 16,
10746                 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
10747                           "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
10748                 .rlen   = 16,
10749         }, {
10750                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
10751                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
10752                 .klen   = 16,
10753                 .input  = "\x54\x65\x61\x20\x69\x73\x20\x67"
10754                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
10755                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
10756                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
10757                 .ilen   = 32,
10758                 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
10759                           "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
10760                           "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
10761                           "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
10762                 .rlen   = 32,
10763         }
10764 };
10765
10766 static struct cipher_testvec xtea_dec_tv_template[] = {
10767         {
10768                 .key    = zeroed_string,
10769                 .klen   = 16,
10770                 .input  = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
10771                 .ilen   = 8,
10772                 .result = zeroed_string,
10773                 .rlen   = 8,
10774         }, {
10775                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
10776                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
10777                 .klen   = 16,
10778                 .input  = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
10779                 .ilen   = 8,
10780                 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
10781                 .rlen   = 8,
10782         }, {
10783                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
10784                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
10785                 .klen   = 16,
10786                 .input  = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
10787                           "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
10788                 .ilen   = 16,
10789                 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
10790                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
10791                 .rlen   = 16,
10792         }, {
10793                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
10794                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
10795                 .klen   = 16,
10796                 .input  = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
10797                           "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
10798                           "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
10799                           "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
10800                 .ilen   = 32,
10801                 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
10802                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
10803                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
10804                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
10805                 .rlen   = 32,
10806         }
10807 };
10808
10809 /*
10810  * KHAZAD test vectors.
10811  */
10812 #define KHAZAD_ENC_TEST_VECTORS 5
10813 #define KHAZAD_DEC_TEST_VECTORS 5
10814
10815 static struct cipher_testvec khazad_enc_tv_template[] = {
10816         {
10817                 .key    = "\x80\x00\x00\x00\x00\x00\x00\x00"
10818                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10819                 .klen   = 16,
10820                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
10821                 .ilen   = 8,
10822                 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
10823                 .rlen   = 8,
10824         }, {
10825                 .key    = "\x38\x38\x38\x38\x38\x38\x38\x38"
10826                           "\x38\x38\x38\x38\x38\x38\x38\x38",
10827                 .klen   = 16,
10828                 .input  = "\x38\x38\x38\x38\x38\x38\x38\x38",
10829                 .ilen   = 8,
10830                 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
10831                 .rlen   = 8,
10832         }, {
10833                 .key    = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
10834                         "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
10835                 .klen   = 16,
10836                 .input  = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
10837                 .ilen   = 8,
10838                 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
10839                 .rlen   = 8,
10840         }, {
10841                 .key    = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
10842                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10843                 .klen   = 16,
10844                 .input  = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10845                 .ilen   = 8,
10846                 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
10847                 .rlen   = 8,
10848         }, {
10849                 .key    = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
10850                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10851                 .klen   = 16,
10852                 .input  = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
10853                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10854                 .ilen   = 16,
10855                 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
10856                         "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
10857                 .rlen   = 16,
10858         },
10859 };
10860
10861 static struct cipher_testvec khazad_dec_tv_template[] = {
10862         {
10863                 .key    = "\x80\x00\x00\x00\x00\x00\x00\x00"
10864                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10865                 .klen   = 16,
10866                 .input  = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
10867                 .ilen   = 8,
10868                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
10869                 .rlen   = 8,
10870         }, {
10871                 .key    = "\x38\x38\x38\x38\x38\x38\x38\x38"
10872                           "\x38\x38\x38\x38\x38\x38\x38\x38",
10873                 .klen   = 16,
10874                 .input  = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
10875                 .ilen   = 8,
10876                 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
10877                 .rlen   = 8,
10878         }, {
10879                 .key    = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
10880                         "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
10881                 .klen   = 16,
10882                 .input  = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
10883                 .ilen   = 8,
10884                 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
10885                 .rlen   = 8,
10886         }, {
10887                 .key    = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
10888                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10889                 .klen   = 16,
10890                 .input  = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
10891                 .ilen   = 8,
10892                 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10893                 .rlen   = 8,
10894         }, {
10895                 .key    = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
10896                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10897                 .klen   = 16,
10898                 .input  = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
10899                         "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
10900                 .ilen   = 16,
10901                 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
10902                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
10903                 .rlen   = 16,
10904         },
10905 };
10906
10907 /*
10908  * Anubis test vectors.
10909  */
10910
10911 #define ANUBIS_ENC_TEST_VECTORS                 5
10912 #define ANUBIS_DEC_TEST_VECTORS                 5
10913 #define ANUBIS_CBC_ENC_TEST_VECTORS             2
10914 #define ANUBIS_CBC_DEC_TEST_VECTORS             2
10915
10916 static struct cipher_testvec anubis_enc_tv_template[] = {
10917         {
10918                 .key    = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10919                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
10920                 .klen   = 16,
10921                 .input  = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10922                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
10923                 .ilen   = 16,
10924                 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
10925                           "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
10926                 .rlen   = 16,
10927         }, {
10928
10929                 .key    = "\x03\x03\x03\x03\x03\x03\x03\x03"
10930                           "\x03\x03\x03\x03\x03\x03\x03\x03"
10931                           "\x03\x03\x03\x03",
10932                 .klen   = 20,
10933                 .input  = "\x03\x03\x03\x03\x03\x03\x03\x03"
10934                           "\x03\x03\x03\x03\x03\x03\x03\x03",
10935                 .ilen   = 16,
10936                 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
10937                           "\x87\x41\x6f\x82\x0a\x98\x64\xae",
10938                 .rlen   = 16,
10939         }, {
10940                 .key    = "\x24\x24\x24\x24\x24\x24\x24\x24"
10941                           "\x24\x24\x24\x24\x24\x24\x24\x24"
10942                           "\x24\x24\x24\x24\x24\x24\x24\x24"
10943                           "\x24\x24\x24\x24",
10944                 .klen   = 28,
10945                 .input  = "\x24\x24\x24\x24\x24\x24\x24\x24"
10946                           "\x24\x24\x24\x24\x24\x24\x24\x24",
10947                 .ilen   = 16,
10948                 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
10949                           "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
10950                 .rlen   = 16,
10951         }, {
10952                 .key    = "\x25\x25\x25\x25\x25\x25\x25\x25"
10953                           "\x25\x25\x25\x25\x25\x25\x25\x25"
10954                           "\x25\x25\x25\x25\x25\x25\x25\x25"
10955                           "\x25\x25\x25\x25\x25\x25\x25\x25",
10956                 .klen   = 32,
10957                 .input  = "\x25\x25\x25\x25\x25\x25\x25\x25"
10958                           "\x25\x25\x25\x25\x25\x25\x25\x25",
10959                 .ilen   = 16,
10960                 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
10961                         "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
10962                 .rlen   = 16,
10963         }, {
10964                 .key    = "\x35\x35\x35\x35\x35\x35\x35\x35"
10965                           "\x35\x35\x35\x35\x35\x35\x35\x35"
10966                           "\x35\x35\x35\x35\x35\x35\x35\x35"
10967                           "\x35\x35\x35\x35\x35\x35\x35\x35"
10968                           "\x35\x35\x35\x35\x35\x35\x35\x35",
10969                 .klen   = 40,
10970                 .input  = "\x35\x35\x35\x35\x35\x35\x35\x35"
10971                           "\x35\x35\x35\x35\x35\x35\x35\x35",
10972                 .ilen   = 16,
10973                 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
10974                           "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
10975                 .rlen   = 16,
10976         },
10977 };
10978
10979 static struct cipher_testvec anubis_dec_tv_template[] = {
10980         {
10981                 .key    = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10982                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
10983                 .klen   = 16,
10984                 .input  = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
10985                           "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
10986                 .ilen   = 16,
10987                 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
10988                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
10989                 .rlen   = 16,
10990         }, {
10991
10992                 .key    = "\x03\x03\x03\x03\x03\x03\x03\x03"
10993                           "\x03\x03\x03\x03\x03\x03\x03\x03"
10994                           "\x03\x03\x03\x03",
10995                 .klen   = 20,
10996                 .input  = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
10997                           "\x87\x41\x6f\x82\x0a\x98\x64\xae",
10998                 .ilen   = 16,
10999                 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
11000                           "\x03\x03\x03\x03\x03\x03\x03\x03",
11001                 .rlen   = 16,
11002         }, {
11003                 .key    = "\x24\x24\x24\x24\x24\x24\x24\x24"
11004                           "\x24\x24\x24\x24\x24\x24\x24\x24"
11005                           "\x24\x24\x24\x24\x24\x24\x24\x24"
11006                           "\x24\x24\x24\x24",
11007                 .klen   = 28,
11008                 .input  = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
11009                           "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
11010                 .ilen   = 16,
11011                 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
11012                           "\x24\x24\x24\x24\x24\x24\x24\x24",
11013                 .rlen   = 16,
11014         }, {
11015                 .key    = "\x25\x25\x25\x25\x25\x25\x25\x25"
11016                           "\x25\x25\x25\x25\x25\x25\x25\x25"
11017                           "\x25\x25\x25\x25\x25\x25\x25\x25"
11018                           "\x25\x25\x25\x25\x25\x25\x25\x25",
11019                 .klen   = 32,
11020                 .input  = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
11021                         "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
11022                 .ilen   = 16,
11023                 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
11024                           "\x25\x25\x25\x25\x25\x25\x25\x25",
11025                 .rlen   = 16,
11026         }, {
11027                 .key    = "\x35\x35\x35\x35\x35\x35\x35\x35"
11028                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11029                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11030                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11031                           "\x35\x35\x35\x35\x35\x35\x35\x35",
11032                 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
11033                          "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
11034                 .klen   = 40,
11035                 .ilen   = 16,
11036                 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
11037                           "\x35\x35\x35\x35\x35\x35\x35\x35",
11038                 .rlen   = 16,
11039         },
11040 };
11041
11042 static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
11043         {
11044                 .key    = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
11045                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
11046                 .klen   = 16,
11047                 .input  = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
11048                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
11049                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
11050                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
11051                 .ilen   = 32,
11052                 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
11053                           "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
11054                           "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
11055                           "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
11056                 .rlen   = 32,
11057         }, {
11058                 .key    = "\x35\x35\x35\x35\x35\x35\x35\x35"
11059                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11060                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11061                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11062                           "\x35\x35\x35\x35\x35\x35\x35\x35",
11063                 .klen   = 40,
11064                 .input  = "\x35\x35\x35\x35\x35\x35\x35\x35"
11065                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11066                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11067                           "\x35\x35\x35\x35\x35\x35\x35\x35",
11068                 .ilen   = 32,
11069                 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
11070                           "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
11071                           "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
11072                           "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
11073                 .rlen   = 32,
11074         },
11075 };
11076
11077 static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
11078         {
11079                 .key    = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
11080                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
11081                 .klen   = 16,
11082                 .input  = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
11083                           "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
11084                           "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
11085                           "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
11086                 .ilen   = 32,
11087                 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
11088                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
11089                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
11090                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
11091                 .rlen   = 32,
11092         }, {
11093                 .key    = "\x35\x35\x35\x35\x35\x35\x35\x35"
11094                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11095                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11096                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11097                           "\x35\x35\x35\x35\x35\x35\x35\x35",
11098                 .klen   = 40,
11099                 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
11100                           "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
11101                           "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
11102                           "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
11103                 .ilen   = 32,
11104                 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
11105                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11106                           "\x35\x35\x35\x35\x35\x35\x35\x35"
11107                           "\x35\x35\x35\x35\x35\x35\x35\x35",
11108                 .rlen   = 32,
11109         },
11110 };
11111
11112 /*
11113  * XETA test vectors
11114  */
11115 #define XETA_ENC_TEST_VECTORS   4
11116 #define XETA_DEC_TEST_VECTORS   4
11117
11118 static struct cipher_testvec xeta_enc_tv_template[] = {
11119         {
11120                 .key    = zeroed_string,
11121                 .klen   = 16,
11122                 .input  = zeroed_string,
11123                 .ilen   = 8,
11124                 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
11125                 .rlen   = 8,
11126         }, {
11127                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
11128                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
11129                 .klen   = 16,
11130                 .input  = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
11131                 .ilen   = 8,
11132                 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
11133                 .rlen   = 8,
11134         }, {
11135                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
11136                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
11137                 .klen   = 16,
11138                 .input  = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
11139                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
11140                 .ilen   = 16,
11141                 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
11142                           "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
11143                 .rlen   = 16,
11144         }, {
11145                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
11146                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
11147                 .klen   = 16,
11148                 .input  = "\x54\x65\x61\x20\x69\x73\x20\x67"
11149                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
11150                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
11151                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
11152                 .ilen   = 32,
11153                 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
11154                           "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
11155                           "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
11156                           "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
11157                 .rlen   = 32,
11158         }
11159 };
11160
11161 static struct cipher_testvec xeta_dec_tv_template[] = {
11162         {
11163                 .key    = zeroed_string,
11164                 .klen   = 16,
11165                 .input  = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
11166                 .ilen   = 8,
11167                 .result = zeroed_string,
11168                 .rlen   = 8,
11169         }, {
11170                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
11171                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
11172                 .klen   = 16,
11173                 .input  = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
11174                 .ilen   = 8,
11175                 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
11176                 .rlen   = 8,
11177         }, {
11178                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
11179                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
11180                 .klen   = 16,
11181                 .input  = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
11182                           "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
11183                 .ilen   = 16,
11184                 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
11185                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
11186                 .rlen   = 16,
11187         }, {
11188                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
11189                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
11190                 .klen   = 16,
11191                 .input  = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
11192                           "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
11193                           "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
11194                           "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
11195                 .ilen   = 32,
11196                 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
11197                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
11198                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
11199                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
11200                 .rlen   = 32,
11201         }
11202 };
11203
11204 /*
11205  * FCrypt test vectors
11206  */
11207 #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
11208 #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
11209
11210 static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
11211         { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
11212                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
11213                 .klen   = 8,
11214                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
11215                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
11216                 .ilen   = 8,
11217                 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
11218                 .rlen   = 8,
11219         }, {
11220                 .key    = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
11221                 .klen   = 8,
11222                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
11223                 .input  = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
11224                 .ilen   = 8,
11225                 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
11226                 .rlen   = 8,
11227         }, { /* From Arla */
11228                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
11229                 .klen   = 8,
11230                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11231                 .input  = "The quick brown fox jumps over the lazy dogs.\0\0",
11232                 .ilen   = 48,
11233                 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
11234                           "\xee\xac\x98\x62\x44\x51\xe4\x84"
11235                           "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
11236                           "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
11237                           "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
11238                           "\xf8\x91\x3c\xac\x44\x22\x92\xef",
11239                 .rlen   = 48,
11240         }, {
11241                 .key    = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11242                 .klen   = 8,
11243                 .iv     = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
11244                 .input  = "The quick brown fox jumps over the lazy dogs.\0\0",
11245                 .ilen   = 48,
11246                 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
11247                           "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
11248                           "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
11249                           "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
11250                           "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
11251                           "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
11252                 .rlen   = 48,
11253         }, { /* split-page version */
11254                 .key    = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11255                 .klen   = 8,
11256                 .iv     = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
11257                 .input  = "The quick brown fox jumps over the lazy dogs.\0\0",
11258                 .ilen   = 48,
11259                 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
11260                           "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
11261                           "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
11262                           "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
11263                           "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
11264                           "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
11265                 .rlen   = 48,
11266                 .np     = 2,
11267                 .tap    = { 20, 28 },
11268         }
11269 };
11270
11271 static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
11272         { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
11273                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
11274                 .klen   = 8,
11275                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
11276                 .input  = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
11277                 .ilen   = 8,
11278                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
11279                 .rlen   = 8,
11280         }, {
11281                 .key    = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
11282                 .klen   = 8,
11283                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
11284                 .input  = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
11285                 .ilen   = 8,
11286                 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
11287                 .rlen   = 8,
11288         }, { /* From Arla */
11289                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
11290                 .klen   = 8,
11291                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11292                 .input  = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
11293                           "\xee\xac\x98\x62\x44\x51\xe4\x84"
11294                           "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
11295                           "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
11296                           "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
11297                           "\xf8\x91\x3c\xac\x44\x22\x92\xef",
11298                 .ilen   = 48,
11299                 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
11300                 .rlen   = 48,
11301         }, {
11302                 .key    = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11303                 .klen   = 8,
11304                 .iv     = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
11305                 .input  = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
11306                           "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
11307                           "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
11308                           "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
11309                           "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
11310                           "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
11311                 .ilen   = 48,
11312                 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
11313                 .rlen   = 48,
11314         }, { /* split-page version */
11315                 .key    = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11316                 .klen   = 8,
11317                 .iv     = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
11318                 .input  = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
11319                           "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
11320                           "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
11321                           "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
11322                           "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
11323                           "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
11324                 .ilen   = 48,
11325                 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
11326                 .rlen   = 48,
11327                 .np     = 2,
11328                 .tap    = { 20, 28 },
11329         }
11330 };
11331
11332 /*
11333  * CAMELLIA test vectors.
11334  */
11335 #define CAMELLIA_ENC_TEST_VECTORS 4
11336 #define CAMELLIA_DEC_TEST_VECTORS 4
11337 #define CAMELLIA_CBC_ENC_TEST_VECTORS 3
11338 #define CAMELLIA_CBC_DEC_TEST_VECTORS 3
11339 #define CAMELLIA_CTR_ENC_TEST_VECTORS 2
11340 #define CAMELLIA_CTR_DEC_TEST_VECTORS 2
11341 #define CAMELLIA_LRW_ENC_TEST_VECTORS 8
11342 #define CAMELLIA_LRW_DEC_TEST_VECTORS 8
11343 #define CAMELLIA_XTS_ENC_TEST_VECTORS 5
11344 #define CAMELLIA_XTS_DEC_TEST_VECTORS 5
11345
11346 static struct cipher_testvec camellia_enc_tv_template[] = {
11347         {
11348                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
11349                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11350                 .klen   = 16,
11351                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef"
11352                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11353                 .ilen   = 16,
11354                 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
11355                           "\x08\x57\x06\x56\x48\xea\xbe\x43",
11356                 .rlen   = 16,
11357         }, {
11358                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
11359                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
11360                           "\x00\x11\x22\x33\x44\x55\x66\x77",
11361                 .klen   = 24,
11362                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef"
11363                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11364                 .ilen   = 16,
11365                 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
11366                           "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
11367                 .rlen   = 16,
11368         }, {
11369                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
11370                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
11371                           "\x00\x11\x22\x33\x44\x55\x66\x77"
11372                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
11373                 .klen   = 32,
11374                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef"
11375                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11376                 .ilen   = 16,
11377                 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
11378                           "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
11379                 .rlen   = 16,
11380         },
11381         { /* Generated with Crypto++ */
11382                 .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
11383                           "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
11384                           "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
11385                           "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
11386                 .klen   = 32,
11387                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11388                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11389                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11390                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11391                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11392                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
11393                 .ilen   = 48,
11394                 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
11395                           "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
11396                           "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
11397                           "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
11398                           "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
11399                           "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
11400                 .rlen   = 48,
11401         },
11402 };
11403
11404 static struct cipher_testvec camellia_dec_tv_template[] = {
11405         {
11406                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
11407                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11408                 .klen   = 16,
11409                 .input  = "\x67\x67\x31\x38\x54\x96\x69\x73"
11410                           "\x08\x57\x06\x56\x48\xea\xbe\x43",
11411                 .ilen   = 16,
11412                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
11413                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11414                 .rlen   = 16,
11415         }, {
11416                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
11417                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
11418                           "\x00\x11\x22\x33\x44\x55\x66\x77",
11419                 .klen   = 24,
11420                 .input  = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
11421                           "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
11422                 .ilen   = 16,
11423                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
11424                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11425                 .rlen   = 16,
11426         }, {
11427                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
11428                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
11429                           "\x00\x11\x22\x33\x44\x55\x66\x77"
11430                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
11431                 .klen   = 32,
11432                 .input  = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
11433                           "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
11434                 .ilen   = 16,
11435                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
11436                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
11437                 .rlen   = 16,
11438         },
11439         { /* Generated with Crypto++ */
11440                 .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
11441                           "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
11442                           "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
11443                           "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
11444                 .klen   = 32,
11445                 .input  = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
11446                           "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
11447                           "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
11448                           "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
11449                           "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
11450                           "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
11451                 .ilen   = 48,
11452                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11453                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11454                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11455                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11456                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11457                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
11458                 .rlen   = 48,
11459         },
11460 };
11461
11462 static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
11463         {
11464                 .key    = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
11465                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
11466                 .klen   = 16,
11467                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
11468                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
11469                 .input  = "Single block msg",
11470                 .ilen   = 16,
11471                 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
11472                           "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
11473                 .rlen   = 16,
11474         }, {
11475                 .key    = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
11476                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
11477                 .klen   = 16,
11478                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
11479                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
11480                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
11481                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11482                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11483                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
11484                 .ilen   = 32,
11485                 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
11486                           "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
11487                           "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
11488                           "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
11489                 .rlen   = 32,
11490         },
11491         { /* Generated with Crypto++ */
11492                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11493                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11494                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11495                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11496                 .klen   = 32,
11497                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11498                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11499                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11500                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11501                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11502                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11503                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11504                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
11505                 .ilen   = 48,
11506                 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
11507                           "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
11508                           "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
11509                           "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
11510                           "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
11511                           "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
11512                 .rlen   = 48,
11513         },
11514 };
11515
11516 static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
11517         {
11518                 .key    = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
11519                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
11520                 .klen   = 16,
11521                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
11522                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
11523                 .input  = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
11524                           "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
11525                 .ilen   = 16,
11526                 .result = "Single block msg",
11527                 .rlen   = 16,
11528         }, {
11529                 .key    = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
11530                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
11531                 .klen   = 16,
11532                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
11533                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
11534                 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
11535                           "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
11536                           "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
11537                           "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
11538                 .ilen   = 32,
11539                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
11540                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11541                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11542                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
11543                 .rlen   = 32,
11544         },
11545         { /* Generated with Crypto++ */
11546                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11547                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11548                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11549                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11550                 .klen   = 32,
11551                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11552                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11553                 .input  = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
11554                           "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
11555                           "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
11556                           "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
11557                           "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
11558                           "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
11559                 .ilen   = 48,
11560                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11561                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11562                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11563                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11564                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11565                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
11566                 .rlen   = 48,
11567         },
11568 };
11569
11570 static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
11571         { /* Generated with Crypto++ */
11572                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11573                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11574                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11575                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11576                 .klen   = 32,
11577                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11578                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11579                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11580                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11581                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11582                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11583                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11584                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
11585                 .ilen   = 48,
11586                 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
11587                           "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
11588                           "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
11589                           "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
11590                           "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
11591                           "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
11592                 .rlen   = 48,
11593         },
11594         { /* Generated with Crypto++ */
11595                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11596                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11597                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11598                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11599                 .klen   = 32,
11600                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11601                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11602                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11603                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11604                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11605                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11606                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11607                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11608                           "\xDF\x76\x0D",
11609                 .ilen   = 51,
11610                 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
11611                           "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
11612                           "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
11613                           "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
11614                           "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
11615                           "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
11616                           "\x1E\x43\xEF",
11617                 .rlen   = 51,
11618         },
11619 };
11620
11621 static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
11622         { /* Generated with Crypto++ */
11623                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11624                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11625                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11626                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11627                 .klen   = 32,
11628                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11629                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11630                 .input  = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
11631                           "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
11632                           "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
11633                           "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
11634                           "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
11635                           "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
11636                 .ilen   = 48,
11637                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11638                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11639                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11640                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11641                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11642                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
11643                 .rlen   = 48,
11644         },
11645         { /* Generated with Crypto++ */
11646                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11647                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11648                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11649                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11650                 .klen   = 32,
11651                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11652                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11653                 .input  = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
11654                           "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
11655                           "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
11656                           "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
11657                           "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
11658                           "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
11659                           "\x1E\x43\xEF",
11660                 .ilen   = 51,
11661                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11662                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11663                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11664                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11665                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11666                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11667                           "\xDF\x76\x0D",
11668                 .rlen   = 51,
11669         },
11670
11671 };
11672
11673 static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
11674         /* Generated from AES-LRW test vectors */
11675         {
11676                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11677                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11678                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11679                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11680                 .klen   = 32,
11681                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11682                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11683                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11684                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11685                 .ilen   = 16,
11686                 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
11687                           "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
11688                 .rlen   = 16,
11689         }, {
11690                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11691                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11692                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11693                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11694                 .klen   = 32,
11695                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11696                           "\x00\x00\x00\x00\x00\x00\x00\x02",
11697                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11698                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11699                 .ilen   = 16,
11700                 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
11701                           "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
11702                 .rlen   = 16,
11703         }, {
11704                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11705                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11706                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11707                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11708                 .klen   = 32,
11709                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11710                           "\x00\x00\x00\x02\x00\x00\x00\x00",
11711                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11712                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11713                 .ilen   = 16,
11714                 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
11715                           "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
11716                 .rlen   = 16,
11717         }, {
11718                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11719                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11720                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11721                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11722                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11723                 .klen   = 40,
11724                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11725                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11726                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11727                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11728                 .ilen   = 16,
11729                 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
11730                           "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
11731                 .rlen   = 16,
11732         }, {
11733                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11734                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11735                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11736                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11737                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11738                 .klen   = 40,
11739                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11740                           "\x00\x00\x00\x02\x00\x00\x00\x00",
11741                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11742                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11743                 .ilen   = 16,
11744                 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
11745                           "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
11746                 .rlen   = 16,
11747         }, {
11748                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11749                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11750                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11751                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11752                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11753                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11754                 .klen   = 48,
11755                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11756                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11757                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11758                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11759                 .ilen   = 16,
11760                 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
11761                           "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
11762                 .rlen   = 16,
11763         }, {
11764                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11765                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11766                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11767                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11768                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11769                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11770                 .klen   = 48,
11771                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11772                           "\x00\x00\x00\x02\x00\x00\x00\x00",
11773                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11774                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11775                 .ilen   = 16,
11776                 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
11777                           "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
11778                 .rlen   = 16,
11779         }, {
11780                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11781                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11782                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11783                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11784                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11785                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11786                 .klen   = 48,
11787                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11788                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11789                 .input  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11790                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11791                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11792                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11793                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11794                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11795                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11796                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11797                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11798                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11799                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11800                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11801                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11802                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11803                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11804                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11805                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11806                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11807                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11808                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11809                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11810                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11811                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11812                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11813                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11814                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11815                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11816                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11817                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11818                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11819                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11820                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11821                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11822                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11823                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11824                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11825                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11826                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11827                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11828                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11829                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11830                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11831                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11832                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11833                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11834                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11835                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11836                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11837                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11838                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11839                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11840                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11841                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11842                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11843                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11844                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11845                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11846                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11847                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11848                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11849                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11850                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11851                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11852                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11853                 .ilen   = 512,
11854                 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
11855                           "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
11856                           "\x67\x76\xac\x2c\xd2\x63\x18\x93"
11857                           "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
11858                           "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
11859                           "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
11860                           "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
11861                           "\x62\xdd\x78\x81\xea\x1d\xef\x04"
11862                           "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
11863                           "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
11864                           "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
11865                           "\x40\x41\x69\xaa\x71\xc0\x37\xec"
11866                           "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
11867                           "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
11868                           "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
11869                           "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
11870                           "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
11871                           "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
11872                           "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
11873                           "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
11874                           "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
11875                           "\x42\x08\x40\x82\x06\x1c\x2d\x55"
11876                           "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
11877                           "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
11878                           "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
11879                           "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
11880                           "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
11881                           "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
11882                           "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
11883                           "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
11884                           "\xed\x14\xa9\x57\x19\x63\x40\x04"
11885                           "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
11886                           "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
11887                           "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
11888                           "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
11889                           "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
11890                           "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
11891                           "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
11892                           "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
11893                           "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
11894                           "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
11895                           "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
11896                           "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
11897                           "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
11898                           "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
11899                           "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
11900                           "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
11901                           "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
11902                           "\x35\xa5\x83\x04\x84\x01\x99\x56"
11903                           "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
11904                           "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
11905                           "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
11906                           "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
11907                           "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
11908                           "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
11909                           "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
11910                           "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
11911                           "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
11912                           "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
11913                           "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
11914                           "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
11915                           "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
11916                           "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
11917                           "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
11918                 .rlen   = 512,
11919         },
11920 };
11921
11922 static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
11923         /* Generated from AES-LRW test vectors */
11924         /* same as enc vectors with input and result reversed */
11925         {
11926                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11927                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11928                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11929                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11930                 .klen   = 32,
11931                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11932                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11933                 .input  = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
11934                           "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
11935                 .ilen   = 16,
11936                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11937                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11938                 .rlen   = 16,
11939         }, {
11940                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11941                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11942                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11943                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11944                 .klen   = 32,
11945                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11946                           "\x00\x00\x00\x00\x00\x00\x00\x02",
11947                 .input  = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
11948                           "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
11949                 .ilen   = 16,
11950                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11951                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11952                 .rlen   = 16,
11953         }, {
11954                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11955                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11956                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11957                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11958                 .klen   = 32,
11959                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11960                           "\x00\x00\x00\x02\x00\x00\x00\x00",
11961                 .input  = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
11962                           "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
11963                 .ilen   = 16,
11964                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11965                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11966                 .rlen   = 16,
11967         }, {
11968                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11969                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11970                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11971                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11972                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11973                 .klen   = 40,
11974                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11975                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11976                 .input  = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
11977                           "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
11978                 .ilen   = 16,
11979                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11980                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11981                 .rlen   = 16,
11982         }, {
11983                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11984                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11985                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11986                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11987                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11988                 .klen   = 40,
11989                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11990                           "\x00\x00\x00\x02\x00\x00\x00\x00",
11991                 .input  = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
11992                           "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
11993                 .ilen   = 16,
11994                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11995                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11996                 .rlen   = 16,
11997         }, {
11998                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11999                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
12000                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
12001                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
12002                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
12003                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
12004                 .klen   = 48,
12005                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
12006                           "\x00\x00\x00\x00\x00\x00\x00\x01",
12007                 .input  = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
12008                           "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
12009                 .ilen   = 16,
12010                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
12011                           "\x38\x39\x41\x42\x43\x44\x45\x46",
12012                 .rlen   = 16,
12013         }, {
12014                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
12015                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
12016                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
12017                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
12018                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
12019                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
12020                 .klen   = 48,
12021                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
12022                           "\x00\x00\x00\x02\x00\x00\x00\x00",
12023                 .input  = "\x04\xab\x28\x37\x31\x7a\x26\xab"
12024                           "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
12025                 .ilen   = 16,
12026                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
12027                           "\x38\x39\x41\x42\x43\x44\x45\x46",
12028                 .rlen   = 16,
12029         }, {
12030                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
12031                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
12032                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
12033                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
12034                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
12035                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
12036                 .klen   = 48,
12037                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
12038                           "\x00\x00\x00\x00\x00\x00\x00\x01",
12039                 .input  = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
12040                           "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
12041                           "\x67\x76\xac\x2c\xd2\x63\x18\x93"
12042                           "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
12043                           "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
12044                           "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
12045                           "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
12046                           "\x62\xdd\x78\x81\xea\x1d\xef\x04"
12047                           "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
12048                           "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
12049                           "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
12050                           "\x40\x41\x69\xaa\x71\xc0\x37\xec"
12051                           "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
12052                           "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
12053                           "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
12054                           "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
12055                           "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
12056                           "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
12057                           "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
12058                           "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
12059                           "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
12060                           "\x42\x08\x40\x82\x06\x1c\x2d\x55"
12061                           "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
12062                           "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
12063                           "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
12064                           "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
12065                           "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
12066                           "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
12067                           "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
12068                           "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
12069                           "\xed\x14\xa9\x57\x19\x63\x40\x04"
12070                           "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
12071                           "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
12072                           "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
12073                           "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
12074                           "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
12075                           "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
12076                           "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
12077                           "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
12078                           "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
12079                           "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
12080                           "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
12081                           "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
12082                           "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
12083                           "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
12084                           "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
12085                           "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
12086                           "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
12087                           "\x35\xa5\x83\x04\x84\x01\x99\x56"
12088                           "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
12089                           "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
12090                           "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
12091                           "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
12092                           "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
12093                           "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
12094                           "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
12095                           "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
12096                           "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
12097                           "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
12098                           "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
12099                           "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
12100                           "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
12101                           "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
12102                           "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
12103                 .ilen   = 512,
12104                 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
12105                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
12106                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
12107                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
12108                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
12109                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
12110                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
12111                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
12112                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
12113                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
12114                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
12115                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
12116                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
12117                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
12118                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
12119                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
12120                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
12121                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
12122                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
12123                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
12124                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
12125                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
12126                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
12127                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
12128                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
12129                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
12130                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
12131                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
12132                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
12133                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
12134                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
12135                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
12136                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
12137                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
12138                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
12139                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
12140                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
12141                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
12142                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
12143                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
12144                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
12145                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
12146                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
12147                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
12148                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
12149                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
12150                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
12151                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
12152                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
12153                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
12154                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
12155                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
12156                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
12157                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
12158                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
12159                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
12160                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
12161                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
12162                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
12163                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
12164                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
12165                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
12166                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
12167                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
12168                 .rlen   = 512,
12169         },
12170 };
12171
12172 static struct cipher_testvec camellia_xts_enc_tv_template[] = {
12173         /* Generated from AES-XTS test vectors */
12174         {
12175                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
12176                           "\x00\x00\x00\x00\x00\x00\x00\x00"
12177                           "\x00\x00\x00\x00\x00\x00\x00\x00"
12178                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12179                 .klen   = 32,
12180                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
12181                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12182                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
12183                           "\x00\x00\x00\x00\x00\x00\x00\x00"
12184                           "\x00\x00\x00\x00\x00\x00\x00\x00"
12185                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12186                 .ilen   = 32,
12187                 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
12188                           "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
12189                           "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
12190                           "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
12191                 .rlen   = 32,
12192         }, {
12193                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
12194                           "\x11\x11\x11\x11\x11\x11\x11\x11"
12195                           "\x22\x22\x22\x22\x22\x22\x22\x22"
12196                           "\x22\x22\x22\x22\x22\x22\x22\x22",
12197                 .klen   = 32,
12198                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
12199                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12200                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
12201                           "\x44\x44\x44\x44\x44\x44\x44\x44"
12202                           "\x44\x44\x44\x44\x44\x44\x44\x44"
12203                           "\x44\x44\x44\x44\x44\x44\x44\x44",
12204                 .ilen   = 32,
12205                 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
12206                           "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
12207                           "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
12208                           "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
12209                 .rlen   = 32,
12210         }, {
12211                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12212                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12213                           "\x22\x22\x22\x22\x22\x22\x22\x22"
12214                           "\x22\x22\x22\x22\x22\x22\x22\x22",
12215                 .klen   = 32,
12216                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
12217                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12218                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
12219                           "\x44\x44\x44\x44\x44\x44\x44\x44"
12220                           "\x44\x44\x44\x44\x44\x44\x44\x44"
12221                           "\x44\x44\x44\x44\x44\x44\x44\x44",
12222                 .ilen   = 32,
12223                 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
12224                           "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
12225                           "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
12226                           "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
12227                 .rlen   = 32,
12228         }, {
12229                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
12230                           "\x23\x53\x60\x28\x74\x71\x35\x26"
12231                           "\x31\x41\x59\x26\x53\x58\x97\x93"
12232                           "\x23\x84\x62\x64\x33\x83\x27\x95",
12233                 .klen   = 32,
12234                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
12235                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12236                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
12237                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12238                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12239                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12240                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12241                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12242                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12243                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12244                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12245                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12246                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12247                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12248                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12249                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12250                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12251                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12252                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12253                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12254                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12255                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12256                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12257                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12258                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12259                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12260                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12261                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12262                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12263                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12264                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12265                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12266                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12267                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12268                           "\x00\x01\x02\x03\x04\x05\x06\x07"
12269                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12270                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12271                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12272                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12273                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12274                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12275                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12276                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12277                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12278                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12279                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12280                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12281                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12282                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12283                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12284                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12285                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12286                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12287                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12288                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12289                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12290                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12291                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12292                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12293                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12294                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12295                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12296                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12297                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12298                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12299                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12300                 .ilen   = 512,
12301                 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
12302                           "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
12303                           "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
12304                           "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
12305                           "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
12306                           "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
12307                           "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
12308                           "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
12309                           "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
12310                           "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
12311                           "\x08\xda\x76\x00\x65\xcf\x7b\x31"
12312                           "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
12313                           "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
12314                           "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
12315                           "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
12316                           "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
12317                           "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
12318                           "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
12319                           "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
12320                           "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
12321                           "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
12322                           "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
12323                           "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
12324                           "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
12325                           "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
12326                           "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
12327                           "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
12328                           "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
12329                           "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
12330                           "\x16\x31\xb2\x47\x91\x67\xaa\x28"
12331                           "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
12332                           "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
12333                           "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
12334                           "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
12335                           "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
12336                           "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
12337                           "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
12338                           "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
12339                           "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
12340                           "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
12341                           "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
12342                           "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
12343                           "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
12344                           "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
12345                           "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
12346                           "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
12347                           "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
12348                           "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
12349                           "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
12350                           "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
12351                           "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
12352                           "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
12353                           "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
12354                           "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
12355                           "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
12356                           "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
12357                           "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
12358                           "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
12359                           "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
12360                           "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
12361                           "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
12362                           "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
12363                           "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
12364                           "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
12365                 .rlen   = 512,
12366         }, {
12367                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
12368                           "\x23\x53\x60\x28\x74\x71\x35\x26"
12369                           "\x62\x49\x77\x57\x24\x70\x93\x69"
12370                           "\x99\x59\x57\x49\x66\x96\x76\x27"
12371                           "\x31\x41\x59\x26\x53\x58\x97\x93"
12372                           "\x23\x84\x62\x64\x33\x83\x27\x95"
12373                           "\x02\x88\x41\x97\x16\x93\x99\x37"
12374                           "\x51\x05\x82\x09\x74\x94\x45\x92",
12375                 .klen   = 64,
12376                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
12377                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12378                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
12379                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12380                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12381                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12382                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12383                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12384                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12385                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12386                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12387                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12388                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12389                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12390                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12391                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12392                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12393                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12394                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12395                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12396                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12397                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12398                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12399                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12400                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12401                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12402                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12403                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12404                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12405                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12406                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12407                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12408                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12409                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12410                           "\x00\x01\x02\x03\x04\x05\x06\x07"
12411                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12412                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12413                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12414                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12415                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12416                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12417                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12418                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12419                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12420                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12421                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12422                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12423                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12424                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12425                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12426                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12427                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12428                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12429                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12430                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12431                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12432                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12433                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12434                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12435                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12436                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12437                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12438                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12439                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12440                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12441                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12442                 .ilen   = 512,
12443                 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
12444                           "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
12445                           "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
12446                           "\xf1\x74\xac\x96\x05\x7b\x32\xca"
12447                           "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
12448                           "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
12449                           "\x97\x07\x82\xf0\x07\x12\x38\x0a"
12450                           "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
12451                           "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
12452                           "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
12453                           "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
12454                           "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
12455                           "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
12456                           "\x41\x82\x0c\x45\x39\x35\xa8\x75"
12457                           "\x03\x29\x01\x84\x8c\xab\x48\xbe"
12458                           "\x11\x56\x22\x67\xb7\x67\x1a\x09"
12459                           "\xa1\x72\x25\x41\x3c\x39\x65\x80"
12460                           "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
12461                           "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
12462                           "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
12463                           "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
12464                           "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
12465                           "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
12466                           "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
12467                           "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
12468                           "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
12469                           "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
12470                           "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
12471                           "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
12472                           "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
12473                           "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
12474                           "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
12475                           "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
12476                           "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
12477                           "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
12478                           "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
12479                           "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
12480                           "\xef\x38\x52\x18\x0e\x29\x7e\xef"
12481                           "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
12482                           "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
12483                           "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
12484                           "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
12485                           "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
12486                           "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
12487                           "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
12488                           "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
12489                           "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
12490                           "\x21\x17\xf8\x59\x15\x24\x64\x22"
12491                           "\x57\x48\x80\xd5\x3d\x92\x30\x07"
12492                           "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
12493                           "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
12494                           "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
12495                           "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
12496                           "\x6b\x84\xf3\x00\xba\x52\x05\x02"
12497                           "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
12498                           "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
12499                           "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
12500                           "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
12501                           "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
12502                           "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
12503                           "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
12504                           "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
12505                           "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
12506                           "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
12507                 .rlen   = 512,
12508         },
12509 };
12510
12511 static struct cipher_testvec camellia_xts_dec_tv_template[] = {
12512         /* Generated from AES-XTS test vectors */
12513         /* same as enc vectors with input and result reversed */
12514         {
12515                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
12516                           "\x00\x00\x00\x00\x00\x00\x00\x00"
12517                           "\x00\x00\x00\x00\x00\x00\x00\x00"
12518                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12519                 .klen   = 32,
12520                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
12521                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12522                 .input  = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
12523                           "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
12524                           "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
12525                           "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
12526                 .ilen   = 32,
12527                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
12528                           "\x00\x00\x00\x00\x00\x00\x00\x00"
12529                           "\x00\x00\x00\x00\x00\x00\x00\x00"
12530                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12531                 .rlen   = 32,
12532         }, {
12533                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
12534                           "\x11\x11\x11\x11\x11\x11\x11\x11"
12535                           "\x22\x22\x22\x22\x22\x22\x22\x22"
12536                           "\x22\x22\x22\x22\x22\x22\x22\x22",
12537                 .klen   = 32,
12538                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
12539                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12540                 .input  = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
12541                           "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
12542                           "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
12543                           "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
12544                 .ilen   = 32,
12545                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12546                           "\x44\x44\x44\x44\x44\x44\x44\x44"
12547                           "\x44\x44\x44\x44\x44\x44\x44\x44"
12548                           "\x44\x44\x44\x44\x44\x44\x44\x44",
12549                 .rlen   = 32,
12550         }, {
12551                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12552                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12553                           "\x22\x22\x22\x22\x22\x22\x22\x22"
12554                           "\x22\x22\x22\x22\x22\x22\x22\x22",
12555                 .klen   = 32,
12556                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
12557                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12558                 .input  = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
12559                           "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
12560                           "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
12561                           "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
12562                 .ilen   = 32,
12563                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12564                           "\x44\x44\x44\x44\x44\x44\x44\x44"
12565                           "\x44\x44\x44\x44\x44\x44\x44\x44"
12566                           "\x44\x44\x44\x44\x44\x44\x44\x44",
12567                 .rlen   = 32,
12568         }, {
12569                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
12570                           "\x23\x53\x60\x28\x74\x71\x35\x26"
12571                           "\x31\x41\x59\x26\x53\x58\x97\x93"
12572                           "\x23\x84\x62\x64\x33\x83\x27\x95",
12573                 .klen   = 32,
12574                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
12575                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12576                 .input  = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
12577                           "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
12578                           "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
12579                           "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
12580                           "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
12581                           "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
12582                           "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
12583                           "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
12584                           "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
12585                           "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
12586                           "\x08\xda\x76\x00\x65\xcf\x7b\x31"
12587                           "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
12588                           "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
12589                           "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
12590                           "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
12591                           "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
12592                           "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
12593                           "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
12594                           "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
12595                           "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
12596                           "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
12597                           "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
12598                           "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
12599                           "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
12600                           "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
12601                           "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
12602                           "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
12603                           "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
12604                           "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
12605                           "\x16\x31\xb2\x47\x91\x67\xaa\x28"
12606                           "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
12607                           "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
12608                           "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
12609                           "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
12610                           "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
12611                           "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
12612                           "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
12613                           "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
12614                           "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
12615                           "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
12616                           "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
12617                           "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
12618                           "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
12619                           "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
12620                           "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
12621                           "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
12622                           "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
12623                           "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
12624                           "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
12625                           "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
12626                           "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
12627                           "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
12628                           "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
12629                           "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
12630                           "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
12631                           "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
12632                           "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
12633                           "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
12634                           "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
12635                           "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
12636                           "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
12637                           "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
12638                           "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
12639                           "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
12640                 .ilen   = 512,
12641                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12642                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12643                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12644                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12645                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12646                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12647                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12648                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12649                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12650                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12651                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12652                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12653                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12654                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12655                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12656                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12657                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12658                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12659                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12660                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12661                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12662                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12663                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12664                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12665                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12666                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12667                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12668                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12669                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12670                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12671                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12672                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12673                           "\x00\x01\x02\x03\x04\x05\x06\x07"
12674                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12675                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12676                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12677                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12678                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12679                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12680                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12681                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12682                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12683                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12684                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12685                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12686                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12687                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12688                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12689                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12690                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12691                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12692                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12693                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12694                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12695                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12696                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12697                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12698                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12699                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12700                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12701                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12702                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12703                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12704                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12705                 .rlen   = 512,
12706         }, {
12707                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
12708                           "\x23\x53\x60\x28\x74\x71\x35\x26"
12709                           "\x62\x49\x77\x57\x24\x70\x93\x69"
12710                           "\x99\x59\x57\x49\x66\x96\x76\x27"
12711                           "\x31\x41\x59\x26\x53\x58\x97\x93"
12712                           "\x23\x84\x62\x64\x33\x83\x27\x95"
12713                           "\x02\x88\x41\x97\x16\x93\x99\x37"
12714                           "\x51\x05\x82\x09\x74\x94\x45\x92",
12715                 .klen   = 64,
12716                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
12717                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12718                 .input  = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
12719                           "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
12720                           "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
12721                           "\xf1\x74\xac\x96\x05\x7b\x32\xca"
12722                           "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
12723                           "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
12724                           "\x97\x07\x82\xf0\x07\x12\x38\x0a"
12725                           "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
12726                           "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
12727                           "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
12728                           "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
12729                           "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
12730                           "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
12731                           "\x41\x82\x0c\x45\x39\x35\xa8\x75"
12732                           "\x03\x29\x01\x84\x8c\xab\x48\xbe"
12733                           "\x11\x56\x22\x67\xb7\x67\x1a\x09"
12734                           "\xa1\x72\x25\x41\x3c\x39\x65\x80"
12735                           "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
12736                           "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
12737                           "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
12738                           "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
12739                           "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
12740                           "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
12741                           "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
12742                           "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
12743                           "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
12744                           "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
12745                           "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
12746                           "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
12747                           "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
12748                           "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
12749                           "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
12750                           "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
12751                           "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
12752                           "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
12753                           "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
12754                           "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
12755                           "\xef\x38\x52\x18\x0e\x29\x7e\xef"
12756                           "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
12757                           "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
12758                           "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
12759                           "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
12760                           "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
12761                           "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
12762                           "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
12763                           "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
12764                           "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
12765                           "\x21\x17\xf8\x59\x15\x24\x64\x22"
12766                           "\x57\x48\x80\xd5\x3d\x92\x30\x07"
12767                           "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
12768                           "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
12769                           "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
12770                           "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
12771                           "\x6b\x84\xf3\x00\xba\x52\x05\x02"
12772                           "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
12773                           "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
12774                           "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
12775                           "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
12776                           "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
12777                           "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
12778                           "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
12779                           "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
12780                           "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
12781                           "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
12782                 .ilen   = 512,
12783                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12784                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12785                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12786                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12787                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12788                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12789                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12790                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12791                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12792                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12793                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12794                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12795                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12796                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12797                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12798                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12799                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12800                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12801                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12802                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12803                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12804                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12805                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12806                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12807                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12808                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12809                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12810                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12811                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12812                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12813                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12814                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12815                           "\x00\x01\x02\x03\x04\x05\x06\x07"
12816                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12817                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12818                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12819                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12820                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12821                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12822                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12823                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12824                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12825                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12826                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12827                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12828                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12829                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12830                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12831                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12832                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12833                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12834                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12835                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12836                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12837                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12838                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12839                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12840                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12841                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12842                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12843                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12844                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12845                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12846                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12847                 .rlen   = 512,
12848         },
12849 };
12850
12851 /*
12852  * SEED test vectors
12853  */
12854 #define SEED_ENC_TEST_VECTORS   4
12855 #define SEED_DEC_TEST_VECTORS   4
12856
12857 static struct cipher_testvec seed_enc_tv_template[] = {
12858         {
12859                 .key    = zeroed_string,
12860                 .klen   = 16,
12861                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
12862                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
12863                 .ilen   = 16,
12864                 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
12865                           "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
12866                 .rlen   = 16,
12867         }, {
12868                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
12869                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
12870                 .klen   = 16,
12871                 .input  = zeroed_string,
12872                 .ilen   = 16,
12873                 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
12874                           "\x84\x48\x35\x97\xe4\x37\x0f\x43",
12875                 .rlen   = 16,
12876         }, {
12877                 .key    = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
12878                           "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
12879                 .klen   = 16,
12880                 .input  = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
12881                           "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
12882                 .ilen   = 16,
12883                 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
12884                           "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
12885                 .rlen   = 16,
12886         }, {
12887                 .key    = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
12888                           "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
12889                 .klen   = 16,
12890                 .input  = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
12891                           "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
12892                 .ilen   = 16,
12893                 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
12894                           "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
12895                 .rlen   = 16,
12896         }
12897 };
12898
12899 static struct cipher_testvec seed_dec_tv_template[] = {
12900         {
12901                 .key    = zeroed_string,
12902                 .klen   = 16,
12903                 .input  = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
12904                           "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
12905                 .ilen   = 16,
12906                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12907                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
12908                 .rlen   = 16,
12909         }, {
12910                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
12911                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
12912                 .klen   = 16,
12913                 .input  = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
12914                           "\x84\x48\x35\x97\xe4\x37\x0f\x43",
12915                 .ilen   = 16,
12916                 .result = zeroed_string,
12917                 .rlen   = 16,
12918         }, {
12919                 .key    = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
12920                           "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
12921                 .klen   = 16,
12922                 .input  = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
12923                           "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
12924                 .ilen   = 16,
12925                 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
12926                           "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
12927                 .rlen   = 16,
12928         }, {
12929                 .key    = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
12930                           "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
12931                 .klen   = 16,
12932                 .input  = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
12933                           "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
12934                 .ilen   = 16,
12935                 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
12936                           "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
12937                 .rlen   = 16,
12938         }
12939 };
12940
12941 #define SALSA20_STREAM_ENC_TEST_VECTORS 5
12942 static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
12943         /*
12944         * Testvectors from verified.test-vectors submitted to ECRYPT.
12945         * They are truncated to size 39, 64, 111, 129 to test a variety
12946         * of input length.
12947         */
12948         { /* Set 3, vector 0 */
12949                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
12950                         "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
12951                 .klen   = 16,
12952                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
12953                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
12954                         "\x00\x00\x00\x00\x00\x00\x00\x00"
12955                         "\x00\x00\x00\x00\x00\x00\x00\x00"
12956                         "\x00\x00\x00\x00\x00\x00\x00\x00"
12957                         "\x00\x00\x00\x00\x00\x00\x00",
12958                 .ilen   = 39,
12959                 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
12960                          "\x68\x02\x41\x0C\x68\x86\x88\x89"
12961                          "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
12962                          "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
12963                          "\x58\x3F\x52\x79\x70\xEB\xC1",
12964                 .rlen   = 39,
12965         }, { /* Set 5, vector 0 */
12966                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
12967                         "\x00\x00\x00\x00\x00\x00\x00\x00",
12968                 .klen   = 16,
12969                 .iv     = "\x80\x00\x00\x00\x00\x00\x00\x00",
12970                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
12971                         "\x00\x00\x00\x00\x00\x00\x00\x00"
12972                         "\x00\x00\x00\x00\x00\x00\x00\x00"
12973                         "\x00\x00\x00\x00\x00\x00\x00\x00"
12974                         "\x00\x00\x00\x00\x00\x00\x00\x00"
12975                         "\x00\x00\x00\x00\x00\x00\x00\x00"
12976                         "\x00\x00\x00\x00\x00\x00\x00\x00"
12977                         "\x00\x00\x00\x00\x00\x00\x00\x00",
12978                 .ilen   = 64,
12979                 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
12980                          "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
12981                          "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
12982                          "\x46\x26\xBF\x44\x3F\x21\x97\x76"
12983                          "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
12984                          "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
12985                          "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
12986                          "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
12987                 .rlen   = 64,
12988         }, { /* Set 3, vector 27 */
12989                 .key    = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
12990                         "\x23\x24\x25\x26\x27\x28\x29\x2A"
12991                         "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
12992                         "\x33\x34\x35\x36\x37\x38\x39\x3A",
12993                 .klen   = 32,
12994                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
12995                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
12996                         "\x00\x00\x00\x00\x00\x00\x00\x00"
12997                         "\x00\x00\x00\x00\x00\x00\x00\x00"
12998                         "\x00\x00\x00\x00\x00\x00\x00\x00"
12999                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13000                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13001                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13002                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13003                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13004                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13005                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13006                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13007                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13008                         "\x00\x00\x00\x00\x00\x00\x00",
13009                 .ilen   = 111,
13010                 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
13011                          "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
13012                          "\x87\xD9\x47\xF8\x28\x91\x35\x98"
13013                          "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
13014                          "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
13015                          "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
13016                          "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
13017                          "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
13018                          "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
13019                          "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
13020                          "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
13021                          "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
13022                          "\x95\x46\x45\x54\xE9\x75\x03\x08"
13023                          "\x44\xAF\xE5\x8A\x81\x12\x09",
13024                 .rlen   = 111,
13025         }, { /* Set 5, vector 27 */
13026                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
13027                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13028                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13029                         "\x00\x00\x00\x00\x00\x00\x00\x00",
13030                 .klen   = 32,
13031                 .iv     = "\x00\x00\x00\x10\x00\x00\x00\x00",
13032                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
13033                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13034                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13035                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13036                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13037                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13038                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13039                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13040                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13041                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13042                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13043                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13044                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13045                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13046                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13047                         "\x00\x00\x00\x00\x00\x00\x00\x00"
13048                         "\x00",
13049                 .ilen   = 129,
13050                 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
13051                          "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
13052                          "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
13053                          "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
13054                          "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
13055                          "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
13056                          "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
13057                          "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
13058                          "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
13059                          "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
13060                          "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
13061                          "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
13062                          "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
13063                          "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
13064                          "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
13065                          "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
13066                          "\x5A",
13067                 .rlen   = 129,
13068         }, { /* large test vector generated using Crypto++ */
13069                 .key =  "\x00\x01\x02\x03\x04\x05\x06\x07"
13070                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13071                         "\x10\x11\x12\x13\x14\x15\x16\x17"
13072                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
13073                 .klen = 32,
13074                 .iv =   "\x00\x00\x00\x00\x00\x00\x00\x00"
13075                         "\x00\x00\x00\x00\x00\x00\x00\x00",
13076                 .input =
13077                         "\x00\x01\x02\x03\x04\x05\x06\x07"
13078                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13079                         "\x10\x11\x12\x13\x14\x15\x16\x17"
13080                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13081                         "\x20\x21\x22\x23\x24\x25\x26\x27"
13082                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13083                         "\x30\x31\x32\x33\x34\x35\x36\x37"
13084                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13085                         "\x40\x41\x42\x43\x44\x45\x46\x47"
13086                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13087                         "\x50\x51\x52\x53\x54\x55\x56\x57"
13088                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13089                         "\x60\x61\x62\x63\x64\x65\x66\x67"
13090                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13091                         "\x70\x71\x72\x73\x74\x75\x76\x77"
13092                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13093                         "\x80\x81\x82\x83\x84\x85\x86\x87"
13094                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13095                         "\x90\x91\x92\x93\x94\x95\x96\x97"
13096                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13097                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13098                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13099                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13100                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13101                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13102                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13103                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13104                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13105                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13106                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13107                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13108                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
13109                         "\x00\x03\x06\x09\x0c\x0f\x12\x15"
13110                         "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
13111                         "\x30\x33\x36\x39\x3c\x3f\x42\x45"
13112                         "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
13113                         "\x60\x63\x66\x69\x6c\x6f\x72\x75"
13114                         "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
13115                         "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
13116                         "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
13117                         "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
13118                         "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
13119                         "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
13120                         "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
13121                         "\x20\x23\x26\x29\x2c\x2f\x32\x35"
13122                         "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
13123                         "\x50\x53\x56\x59\x5c\x5f\x62\x65"
13124                         "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
13125                         "\x80\x83\x86\x89\x8c\x8f\x92\x95"
13126                         "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
13127                         "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
13128                         "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
13129                         "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
13130                         "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
13131                         "\x10\x13\x16\x19\x1c\x1f\x22\x25"
13132                         "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
13133                         "\x40\x43\x46\x49\x4c\x4f\x52\x55"
13134                         "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
13135                         "\x70\x73\x76\x79\x7c\x7f\x82\x85"
13136                         "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
13137                         "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
13138                         "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
13139                         "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
13140                         "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
13141                         "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
13142                         "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
13143                         "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
13144                         "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
13145                         "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
13146                         "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
13147                         "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
13148                         "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
13149                         "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
13150                         "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
13151                         "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
13152                         "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
13153                         "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
13154                         "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
13155                         "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
13156                         "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
13157                         "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
13158                         "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
13159                         "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
13160                         "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
13161                         "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
13162                         "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
13163                         "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
13164                         "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
13165                         "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
13166                         "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
13167                         "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
13168                         "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
13169                         "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
13170                         "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
13171                         "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
13172                         "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
13173                         "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
13174                         "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
13175                         "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
13176                         "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
13177                         "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
13178                         "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
13179                         "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
13180                         "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
13181                         "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
13182                         "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
13183                         "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
13184                         "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
13185                         "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
13186                         "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
13187                         "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
13188                         "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
13189                         "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
13190                         "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
13191                         "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
13192                         "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
13193                         "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
13194                         "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
13195                         "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
13196                         "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
13197                         "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
13198                         "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
13199                         "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
13200                         "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
13201                         "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
13202                         "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
13203                         "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
13204                         "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
13205                         "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
13206                         "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
13207                         "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
13208                         "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
13209                         "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
13210                         "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
13211                         "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
13212                         "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
13213                         "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
13214                         "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
13215                         "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
13216                         "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
13217                         "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
13218                         "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
13219                         "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
13220                         "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
13221                         "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
13222                         "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
13223                         "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
13224                         "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
13225                         "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
13226                         "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
13227                         "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
13228                         "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
13229                         "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
13230                         "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
13231                         "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
13232                         "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
13233                         "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
13234                         "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
13235                         "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
13236                         "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
13237                         "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
13238                         "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
13239                         "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
13240                         "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
13241                         "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
13242                         "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
13243                         "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
13244                         "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
13245                         "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
13246                         "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
13247                         "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
13248                         "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
13249                         "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
13250                         "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
13251                         "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
13252                         "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
13253                         "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
13254                         "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
13255                         "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
13256                         "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
13257                         "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
13258                         "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
13259                         "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
13260                         "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
13261                         "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
13262                         "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
13263                         "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
13264                         "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
13265                         "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
13266                         "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
13267                         "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
13268                         "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
13269                         "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
13270                         "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
13271                         "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
13272                         "\x38\x45\x52\x5f\x6c\x79\x86\x93"
13273                         "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
13274                         "\x08\x15\x22\x2f\x3c\x49\x56\x63"
13275                         "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
13276                         "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
13277                         "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
13278                         "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
13279                         "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
13280                         "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
13281                         "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
13282                         "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
13283                         "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
13284                         "\x18\x25\x32\x3f\x4c\x59\x66\x73"
13285                         "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
13286                         "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
13287                         "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
13288                         "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
13289                         "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
13290                         "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
13291                         "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
13292                         "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
13293                         "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
13294                         "\x28\x35\x42\x4f\x5c\x69\x76\x83"
13295                         "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
13296                         "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
13297                         "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
13298                         "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
13299                         "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
13300                         "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
13301                         "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
13302                         "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
13303                         "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
13304                         "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
13305                         "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
13306                         "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
13307                         "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
13308                         "\x48\x57\x66\x75\x84\x93\xa2\xb1"
13309                         "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
13310                         "\x38\x47\x56\x65\x74\x83\x92\xa1"
13311                         "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
13312                         "\x28\x37\x46\x55\x64\x73\x82\x91"
13313                         "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
13314                         "\x18\x27\x36\x45\x54\x63\x72\x81"
13315                         "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
13316                         "\x08\x17\x26\x35\x44\x53\x62\x71"
13317                         "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
13318                         "\xf8\x07\x16\x25\x34\x43\x52\x61"
13319                         "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
13320                         "\xe8\xf7\x06\x15\x24\x33\x42\x51"
13321                         "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
13322                         "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
13323                         "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
13324                         "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
13325                         "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
13326                         "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
13327                         "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
13328                         "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
13329                         "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
13330                         "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
13331                         "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
13332                         "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
13333                         "\x00\x11\x22\x33\x44\x55\x66\x77"
13334                         "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
13335                         "\x10\x21\x32\x43\x54\x65\x76\x87"
13336                         "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
13337                         "\x20\x31\x42\x53\x64\x75\x86\x97"
13338                         "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
13339                         "\x30\x41\x52\x63\x74\x85\x96\xa7"
13340                         "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
13341                         "\x40\x51\x62\x73\x84\x95\xa6\xb7"
13342                         "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
13343                         "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
13344                         "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
13345                         "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
13346                         "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
13347                         "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
13348                         "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
13349                         "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
13350                         "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
13351                         "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
13352                         "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
13353                         "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
13354                         "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
13355                         "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
13356                         "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
13357                         "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
13358                         "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
13359                         "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
13360                         "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
13361                         "\xe0\xf1\x02\x13\x24\x35\x46\x57"
13362                         "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
13363                         "\xf0\x01\x12\x23\x34\x45\x56\x67"
13364                         "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
13365                         "\x00\x13\x26\x39\x4c\x5f\x72\x85"
13366                         "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
13367                         "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
13368                         "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
13369                         "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
13370                         "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
13371                         "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
13372                         "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
13373                         "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
13374                         "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
13375                         "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
13376                         "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
13377                         "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
13378                         "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
13379                         "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
13380                         "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
13381                         "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
13382                         "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
13383                         "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
13384                         "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
13385                         "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
13386                         "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
13387                         "\x10\x23\x36\x49\x5c\x6f\x82\x95"
13388                         "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
13389                         "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
13390                         "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
13391                         "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
13392                         "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
13393                         "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
13394                         "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
13395                         "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
13396                         "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
13397                         "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
13398                         "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
13399                         "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
13400                         "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
13401                         "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
13402                         "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
13403                         "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
13404                         "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
13405                         "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
13406                         "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
13407                         "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
13408                         "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
13409                         "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
13410                         "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
13411                         "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
13412                         "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
13413                         "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
13414                         "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
13415                         "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
13416                         "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
13417                         "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
13418                         "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
13419                         "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
13420                         "\x18\x2d\x42\x57\x6c\x81\x96\xab"
13421                         "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
13422                         "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
13423                         "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
13424                         "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
13425                         "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
13426                         "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
13427                         "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
13428                         "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
13429                         "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
13430                         "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
13431                         "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
13432                         "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
13433                         "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
13434                         "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
13435                         "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
13436                         "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
13437                         "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
13438                         "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
13439                         "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
13440                         "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
13441                         "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
13442                         "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
13443                         "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
13444                         "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
13445                         "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
13446                         "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
13447                         "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
13448                         "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
13449                         "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
13450                         "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
13451                         "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
13452                         "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
13453                         "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
13454                         "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
13455                         "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
13456                         "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
13457                         "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
13458                         "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
13459                         "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
13460                         "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
13461                         "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
13462                         "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
13463                         "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
13464                         "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
13465                         "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
13466                         "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
13467                         "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
13468                         "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
13469                         "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
13470                         "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
13471                         "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
13472                         "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
13473                         "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
13474                         "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
13475                         "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
13476                         "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
13477                         "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
13478                         "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
13479                         "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
13480                         "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
13481                         "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
13482                         "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
13483                         "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
13484                         "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
13485                         "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
13486                         "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
13487                         "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
13488                         "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
13489                         "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
13490                         "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
13491                         "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
13492                         "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
13493                         "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
13494                         "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
13495                         "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
13496                         "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
13497                         "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
13498                         "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
13499                         "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
13500                         "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
13501                         "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
13502                         "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
13503                         "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
13504                         "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
13505                         "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
13506                         "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
13507                         "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
13508                         "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
13509                         "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
13510                         "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
13511                         "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
13512                         "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
13513                         "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
13514                         "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
13515                         "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
13516                         "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
13517                         "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
13518                         "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
13519                         "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
13520                         "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
13521                         "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
13522                         "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
13523                         "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
13524                         "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
13525                         "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
13526                         "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
13527                         "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
13528                         "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
13529                         "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
13530                         "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
13531                         "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
13532                         "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
13533                         "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
13534                         "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
13535                         "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
13536                         "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
13537                         "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
13538                         "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
13539                         "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
13540                         "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
13541                         "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
13542                         "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
13543                         "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
13544                         "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
13545                         "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
13546                         "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
13547                         "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
13548                         "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
13549                         "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
13550                         "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
13551                         "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
13552                         "\x78\x95\xb2\xcf\xec\x09\x26\x43"
13553                         "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
13554                         "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
13555                         "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
13556                         "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
13557                         "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
13558                         "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
13559                         "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
13560                         "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
13561                         "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
13562                         "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
13563                         "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
13564                         "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
13565                         "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
13566                         "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
13567                         "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
13568                         "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
13569                         "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
13570                         "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
13571                         "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
13572                         "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
13573                         "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
13574                         "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
13575                         "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
13576                         "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
13577                         "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
13578                         "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
13579                         "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
13580                         "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
13581                         "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
13582                         "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
13583                         "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
13584                         "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
13585                         "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
13586                         "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
13587                         "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
13588                         "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
13589                         "\x00\x21\x42\x63",
13590                 .ilen = 4100,
13591                 .result =
13592                         "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
13593                         "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
13594                         "\x29\x01\xce\x98\x55\x53\xf9\x0c"
13595                         "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
13596                         "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
13597                         "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
13598                         "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
13599                         "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
13600                         "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
13601                         "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
13602                         "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
13603                         "\xbb\xde\x56\x86\xab\x65\x21\x30"
13604                         "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
13605                         "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
13606                         "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
13607                         "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
13608                         "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
13609                         "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
13610                         "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
13611                         "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
13612                         "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
13613                         "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
13614                         "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
13615                         "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
13616                         "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
13617                         "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
13618                         "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
13619                         "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
13620                         "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
13621                         "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
13622                         "\x45\xff\x3f\xce\x55\xf6\x95\x10"
13623                         "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
13624                         "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
13625                         "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
13626                         "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
13627                         "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
13628                         "\x62\x08\x18\x7a\x25\x49\x28\xac"
13629                         "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
13630                         "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
13631                         "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
13632                         "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
13633                         "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
13634                         "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
13635                         "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
13636                         "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
13637                         "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
13638                         "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
13639                         "\x33\xee\x14\x19\x22\x52\x89\xa7"
13640                         "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
13641                         "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
13642                         "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
13643                         "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
13644                         "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
13645                         "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
13646                         "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
13647                         "\x04\x07\x08\x52\xe6\xc0\xda\x93"
13648                         "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
13649                         "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
13650                         "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
13651                         "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
13652                         "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
13653                         "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
13654                         "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
13655                         "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
13656                         "\x5a\x90\xae\x75\x0a\x74\x18\x89"
13657                         "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
13658                         "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
13659                         "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
13660                         "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
13661                         "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
13662                         "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
13663                         "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
13664                         "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
13665                         "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
13666                         "\x49\x97\x33\xab\x36\x14\x0a\x70"
13667                         "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
13668                         "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
13669                         "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
13670                         "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
13671                         "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
13672                         "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
13673                         "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
13674                         "\x47\x13\x28\x73\x3c\xbb\x00\x90"
13675                         "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
13676                         "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
13677                         "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
13678                         "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
13679                         "\xad\x04\x07\xae\x22\x90\x4a\x93"
13680                         "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
13681                         "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
13682                         "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
13683                         "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
13684                         "\x53\xf9\x80\x10\xde\x80\xa2\x41"
13685                         "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
13686                         "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
13687                         "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
13688                         "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
13689                         "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
13690                         "\xde\xff\x07\x44\xdd\x56\x1b\xad"
13691                         "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
13692                         "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
13693                         "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
13694                         "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
13695                         "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
13696                         "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
13697                         "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
13698                         "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
13699                         "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
13700                         "\x23\xf8\x66\x18\x14\x28\x34\x0f"
13701                         "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
13702                         "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
13703                         "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
13704                         "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
13705                         "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
13706                         "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
13707                         "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
13708                         "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
13709                         "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
13710                         "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
13711                         "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
13712                         "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
13713                         "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
13714                         "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
13715                         "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
13716                         "\xca\x8e\x61\x87\xde\xad\x80\xd2"
13717                         "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
13718                         "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
13719                         "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
13720                         "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
13721                         "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
13722                         "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
13723                         "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
13724                         "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
13725                         "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
13726                         "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
13727                         "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
13728                         "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
13729                         "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
13730                         "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
13731                         "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
13732                         "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
13733                         "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
13734                         "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
13735                         "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
13736                         "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
13737                         "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
13738                         "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
13739                         "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
13740                         "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
13741                         "\x54\xda\x24\x6a\xc4\x41\x65\x46"
13742                         "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
13743                         "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
13744                         "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
13745                         "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
13746                         "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
13747                         "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
13748                         "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
13749                         "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
13750                         "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
13751                         "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
13752                         "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
13753                         "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
13754                         "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
13755                         "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
13756                         "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
13757                         "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
13758                         "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
13759                         "\xef\xcc\xa7\xec\xab\x43\x09\x18"
13760                         "\xd3\xab\x68\xd1\x07\x99\x44\x47"
13761                         "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
13762                         "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
13763                         "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
13764                         "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
13765                         "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
13766                         "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
13767                         "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
13768                         "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
13769                         "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
13770                         "\x71\x6e\x9f\x58\x15\x67\x72\x87"
13771                         "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
13772                         "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
13773                         "\xba\x41\x54\xac\xf0\xfc\x59\x12"
13774                         "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
13775                         "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
13776                         "\x2e\x53\x49\x97\x94\x33\xae\x40"
13777                         "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
13778                         "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
13779                         "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
13780                         "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
13781                         "\xce\x87\xad\xcc\x72\x05\x00\x29"
13782                         "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
13783                         "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
13784                         "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
13785                         "\xac\xc0\x79\x50\x69\xca\x59\x32"
13786                         "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
13787                         "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
13788                         "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
13789                         "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
13790                         "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
13791                         "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
13792                         "\x05\x68\x6b\xab\xe3\x41\x49\xed"
13793                         "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
13794                         "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
13795                         "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
13796                         "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
13797                         "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
13798                         "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
13799                         "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
13800                         "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
13801                         "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
13802                         "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
13803                         "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
13804                         "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
13805                         "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
13806                         "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
13807                         "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
13808                         "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
13809                         "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
13810                         "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
13811                         "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
13812                         "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
13813                         "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
13814                         "\x85\x75\xe6\x43\xf6\x87\x08\x68"
13815                         "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
13816                         "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
13817                         "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
13818                         "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
13819                         "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
13820                         "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
13821                         "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
13822                         "\xaf\x55\xeb\x22\xac\x93\x68\x32"
13823                         "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
13824                         "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
13825                         "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
13826                         "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
13827                         "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
13828                         "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
13829                         "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
13830                         "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
13831                         "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
13832                         "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
13833                         "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
13834                         "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
13835                         "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
13836                         "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
13837                         "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
13838                         "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
13839                         "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
13840                         "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
13841                         "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
13842                         "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
13843                         "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
13844                         "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
13845                         "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
13846                         "\x38\x55\xab\x33\x26\xef\x9f\x43"
13847                         "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
13848                         "\x58\x09\x09\x1b\xc3\x65\x46\x46"
13849                         "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
13850                         "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
13851                         "\x63\x86\xf2\x03\x67\x45\xd2\x72"
13852                         "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
13853                         "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
13854                         "\x2b\x82\x39\xbd\x69\x54\xed\x62"
13855                         "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
13856                         "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
13857                         "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
13858                         "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
13859                         "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
13860                         "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
13861                         "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
13862                         "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
13863                         "\x55\xad\xa4\xd1\x22\x54\x70\x94"
13864                         "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
13865                         "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
13866                         "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
13867                         "\x62\x36\x43\xb2\x82\x15\x75\x50"
13868                         "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
13869                         "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
13870                         "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
13871                         "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
13872                         "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
13873                         "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
13874                         "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
13875                         "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
13876                         "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
13877                         "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
13878                         "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
13879                         "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
13880                         "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
13881                         "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
13882                         "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
13883                         "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
13884                         "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
13885                         "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
13886                         "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
13887                         "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
13888                         "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
13889                         "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
13890                         "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
13891                         "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
13892                         "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
13893                         "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
13894                         "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
13895                         "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
13896                         "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
13897                         "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
13898                         "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
13899                         "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
13900                         "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
13901                         "\x42\x19\x23\x7d\xc8\x73\xee\x25"
13902                         "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
13903                         "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
13904                         "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
13905                         "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
13906                         "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
13907                         "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
13908                         "\xdb\x87\xee\xef\x55\x89\x2a\x59"
13909                         "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
13910                         "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
13911                         "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
13912                         "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
13913                         "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
13914                         "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
13915                         "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
13916                         "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
13917                         "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
13918                         "\xae\xab\x86\x09\x89\xc9\xc2\x40"
13919                         "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
13920                         "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
13921                         "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
13922                         "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
13923                         "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
13924                         "\x95\xd9\x34\x34\x86\xc6\x41\x94"
13925                         "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
13926                         "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
13927                         "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
13928                         "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
13929                         "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
13930                         "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
13931                         "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
13932                         "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
13933                         "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
13934                         "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
13935                         "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
13936                         "\xa7\x33\x34\x86\xca\xe4\x96\x23"
13937                         "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
13938                         "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
13939                         "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
13940                         "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
13941                         "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
13942                         "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
13943                         "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
13944                         "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
13945                         "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
13946                         "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
13947                         "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
13948                         "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
13949                         "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
13950                         "\x68\xc8\x7f\x51\x22\x42\xef\x49"
13951                         "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
13952                         "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
13953                         "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
13954                         "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
13955                         "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
13956                         "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
13957                         "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
13958                         "\x73\x2e\x71\x79\x16\x06\x63\x28"
13959                         "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
13960                         "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
13961                         "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
13962                         "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
13963                         "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
13964                         "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
13965                         "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
13966                         "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
13967                         "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
13968                         "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
13969                         "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
13970                         "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
13971                         "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
13972                         "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
13973                         "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
13974                         "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
13975                         "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
13976                         "\x19\x07\xaf\x90\x62\x5c\x68\x98"
13977                         "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
13978                         "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
13979                         "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
13980                         "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
13981                         "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
13982                         "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
13983                         "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
13984                         "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
13985                         "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
13986                         "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
13987                         "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
13988                         "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
13989                         "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
13990                         "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
13991                         "\x21\x33\x44\xfe\x7f\x35\x32\x93"
13992                         "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
13993                         "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
13994                         "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
13995                         "\x64\xf0\x48\xe5\x57\x99\xee\x75"
13996                         "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
13997                         "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
13998                         "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
13999                         "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
14000                         "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
14001                         "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
14002                         "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
14003                         "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
14004                         "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
14005                         "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
14006                         "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
14007                         "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
14008                         "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
14009                         "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
14010                         "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
14011                         "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
14012                         "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
14013                         "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
14014                         "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
14015                         "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
14016                         "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
14017                         "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
14018                         "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
14019                         "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
14020                         "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
14021                         "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
14022                         "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
14023                         "\x56\xf5\x4e\x01\x35\x27\x45\x77"
14024                         "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
14025                         "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
14026                         "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
14027                         "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
14028                         "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
14029                         "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
14030                         "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
14031                         "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
14032                         "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
14033                         "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
14034                         "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
14035                         "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
14036                         "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
14037                         "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
14038                         "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
14039                         "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
14040                         "\x87\x8f\x03\x21\x28\x95\x0c\x89"
14041                         "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
14042                         "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
14043                         "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
14044                         "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
14045                         "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
14046                         "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
14047                         "\x85\x73\x78\x45\x20\x7f\xae\x13"
14048                         "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
14049                         "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
14050                         "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
14051                         "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
14052                         "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
14053                         "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
14054                         "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
14055                         "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
14056                         "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
14057                         "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
14058                         "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
14059                         "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
14060                         "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
14061                         "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
14062                         "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
14063                         "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
14064                         "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
14065                         "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
14066                         "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
14067                         "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
14068                         "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
14069                         "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
14070                         "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
14071                         "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
14072                         "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
14073                         "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
14074                         "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
14075                         "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
14076                         "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
14077                         "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
14078                         "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
14079                         "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
14080                         "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
14081                         "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
14082                         "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
14083                         "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
14084                         "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
14085                         "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
14086                         "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
14087                         "\x6e\x12\x17\x72\x63\x57\xc7\xba"
14088                         "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
14089                         "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
14090                         "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
14091                         "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
14092                         "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
14093                         "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
14094                         "\x0c\x24\x43\x31\x40\x57\xf1\x72"
14095                         "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
14096                         "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
14097                         "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
14098                         "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
14099                         "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
14100                         "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
14101                         "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
14102                         "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
14103                         "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
14104                         "\xaf\xdf\x11\x95",
14105                 .rlen   = 4100,
14106                 .np     = 2,
14107                 .tap    = { 4064, 36 },
14108         },
14109 };
14110
14111 /*
14112  * CTS (Cipher Text Stealing) mode tests
14113  */
14114 #define CTS_MODE_ENC_TEST_VECTORS 6
14115 #define CTS_MODE_DEC_TEST_VECTORS 6
14116 static struct cipher_testvec cts_mode_enc_tv_template[] = {
14117         { /* from rfc3962 */
14118                 .klen   = 16,
14119                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
14120                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
14121                 .ilen   = 17,
14122                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
14123                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
14124                           "\x20",
14125                 .rlen   = 17,
14126                 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
14127                           "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
14128                           "\x97",
14129         }, {
14130                 .klen   = 16,
14131                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
14132                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
14133                 .ilen   = 31,
14134                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
14135                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
14136                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
14137                           "\x20\x47\x61\x75\x27\x73\x20",
14138                 .rlen   = 31,
14139                 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
14140                           "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
14141                           "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
14142                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
14143         }, {
14144                 .klen   = 16,
14145                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
14146                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
14147                 .ilen   = 32,
14148                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
14149                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
14150                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
14151                           "\x20\x47\x61\x75\x27\x73\x20\x43",
14152                 .rlen   = 32,
14153                 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
14154                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
14155                           "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
14156                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
14157         }, {
14158                 .klen   = 16,
14159                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
14160                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
14161                 .ilen   = 47,
14162                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
14163                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
14164                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
14165                           "\x20\x47\x61\x75\x27\x73\x20\x43"
14166                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
14167                           "\x70\x6c\x65\x61\x73\x65\x2c",
14168                 .rlen   = 47,
14169                 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
14170                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
14171                           "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
14172                           "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
14173                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
14174                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
14175         }, {
14176                 .klen   = 16,
14177                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
14178                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
14179                 .ilen   = 48,
14180                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
14181                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
14182                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
14183                           "\x20\x47\x61\x75\x27\x73\x20\x43"
14184                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
14185                           "\x70\x6c\x65\x61\x73\x65\x2c\x20",
14186                 .rlen   = 48,
14187                 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
14188                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
14189                           "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
14190                           "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
14191                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
14192                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
14193         }, {
14194                 .klen   = 16,
14195                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
14196                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
14197                 .ilen   = 64,
14198                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
14199                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
14200                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
14201                           "\x20\x47\x61\x75\x27\x73\x20\x43"
14202                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
14203                           "\x70\x6c\x65\x61\x73\x65\x2c\x20"
14204                           "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
14205                           "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
14206                 .rlen   = 64,
14207                 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
14208                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
14209                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
14210                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
14211                           "\x48\x07\xef\xe8\x36\xee\x89\xa5"
14212                           "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
14213                           "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
14214                           "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
14215         }
14216 };
14217
14218 static struct cipher_testvec cts_mode_dec_tv_template[] = {
14219         { /* from rfc3962 */
14220                 .klen   = 16,
14221                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
14222                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
14223                 .rlen   = 17,
14224                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
14225                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
14226                           "\x20",
14227                 .ilen   = 17,
14228                 .input  = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
14229                           "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
14230                           "\x97",
14231         }, {
14232                 .klen   = 16,
14233                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
14234                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
14235                 .rlen   = 31,
14236                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
14237                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
14238                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
14239                           "\x20\x47\x61\x75\x27\x73\x20",
14240                 .ilen   = 31,
14241                 .input  = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
14242                           "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
14243                           "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
14244                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
14245         }, {
14246                 .klen   = 16,
14247                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
14248                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
14249                 .rlen   = 32,
14250                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
14251                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
14252                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
14253                           "\x20\x47\x61\x75\x27\x73\x20\x43",
14254                 .ilen   = 32,
14255                 .input  = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
14256                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
14257                           "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
14258                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
14259         }, {
14260                 .klen   = 16,
14261                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
14262                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
14263                 .rlen   = 47,
14264                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
14265                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
14266                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
14267                           "\x20\x47\x61\x75\x27\x73\x20\x43"
14268                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
14269                           "\x70\x6c\x65\x61\x73\x65\x2c",
14270                 .ilen   = 47,
14271                 .input  = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
14272                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
14273                           "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
14274                           "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
14275                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
14276                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
14277         }, {
14278                 .klen   = 16,
14279                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
14280                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
14281                 .rlen   = 48,
14282                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
14283                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
14284                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
14285                           "\x20\x47\x61\x75\x27\x73\x20\x43"
14286                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
14287                           "\x70\x6c\x65\x61\x73\x65\x2c\x20",
14288                 .ilen   = 48,
14289                 .input  = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
14290                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
14291                           "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
14292                           "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
14293                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
14294                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
14295         }, {
14296                 .klen   = 16,
14297                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
14298                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
14299                 .rlen   = 64,
14300                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
14301                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
14302                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
14303                           "\x20\x47\x61\x75\x27\x73\x20\x43"
14304                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
14305                           "\x70\x6c\x65\x61\x73\x65\x2c\x20"
14306                           "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
14307                           "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
14308                 .ilen   = 64,
14309                 .input  = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
14310                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
14311                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
14312                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
14313                           "\x48\x07\xef\xe8\x36\xee\x89\xa5"
14314                           "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
14315                           "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
14316                           "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
14317         }
14318 };
14319
14320 /*
14321  * Compression stuff.
14322  */
14323 #define COMP_BUF_SIZE           512
14324
14325 struct comp_testvec {
14326         int inlen, outlen;
14327         char input[COMP_BUF_SIZE];
14328         char output[COMP_BUF_SIZE];
14329 };
14330
14331 struct pcomp_testvec {
14332         void *params;
14333         unsigned int paramsize;
14334         int inlen, outlen;
14335         char input[COMP_BUF_SIZE];
14336         char output[COMP_BUF_SIZE];
14337 };
14338
14339 /*
14340  * Deflate test vectors (null-terminated strings).
14341  * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
14342  */
14343
14344 #define DEFLATE_COMP_TEST_VECTORS 2
14345 #define DEFLATE_DECOMP_TEST_VECTORS 2
14346
14347 static struct comp_testvec deflate_comp_tv_template[] = {
14348         {
14349                 .inlen  = 70,
14350                 .outlen = 38,
14351                 .input  = "Join us now and share the software "
14352                         "Join us now and share the software ",
14353                 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
14354                           "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
14355                           "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
14356                           "\x48\x55\x28\xce\x4f\x2b\x29\x07"
14357                           "\x71\xbc\x08\x2b\x01\x00",
14358         }, {
14359                 .inlen  = 191,
14360                 .outlen = 122,
14361                 .input  = "This document describes a compression method based on the DEFLATE"
14362                         "compression algorithm.  This document defines the application of "
14363                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
14364                 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
14365                           "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
14366                           "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
14367                           "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
14368                           "\x68\x12\x51\xae\x76\x67\xd6\x27"
14369                           "\x19\x88\x1a\xde\x85\xab\x21\xf2"
14370                           "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
14371                           "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
14372                           "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
14373                           "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
14374                           "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
14375                           "\x52\x37\xed\x0e\x52\x6b\x59\x02"
14376                           "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
14377                           "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
14378                           "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
14379                           "\xfa\x02",
14380         },
14381 };
14382
14383 static struct comp_testvec deflate_decomp_tv_template[] = {
14384         {
14385                 .inlen  = 122,
14386                 .outlen = 191,
14387                 .input  = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
14388                           "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
14389                           "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
14390                           "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
14391                           "\x68\x12\x51\xae\x76\x67\xd6\x27"
14392                           "\x19\x88\x1a\xde\x85\xab\x21\xf2"
14393                           "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
14394                           "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
14395                           "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
14396                           "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
14397                           "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
14398                           "\x52\x37\xed\x0e\x52\x6b\x59\x02"
14399                           "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
14400                           "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
14401                           "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
14402                           "\xfa\x02",
14403                 .output = "This document describes a compression method based on the DEFLATE"
14404                         "compression algorithm.  This document defines the application of "
14405                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
14406         }, {
14407                 .inlen  = 38,
14408                 .outlen = 70,
14409                 .input  = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
14410                           "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
14411                           "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
14412                           "\x48\x55\x28\xce\x4f\x2b\x29\x07"
14413                           "\x71\xbc\x08\x2b\x01\x00",
14414                 .output = "Join us now and share the software "
14415                         "Join us now and share the software ",
14416         },
14417 };
14418
14419 #define ZLIB_COMP_TEST_VECTORS 2
14420 #define ZLIB_DECOMP_TEST_VECTORS 2
14421
14422 static const struct {
14423         struct nlattr nla;
14424         int val;
14425 } deflate_comp_params[] = {
14426         {
14427                 .nla = {
14428                         .nla_len        = NLA_HDRLEN + sizeof(int),
14429                         .nla_type       = ZLIB_COMP_LEVEL,
14430                 },
14431                 .val                    = Z_DEFAULT_COMPRESSION,
14432         }, {
14433                 .nla = {
14434                         .nla_len        = NLA_HDRLEN + sizeof(int),
14435                         .nla_type       = ZLIB_COMP_METHOD,
14436                 },
14437                 .val                    = Z_DEFLATED,
14438         }, {
14439                 .nla = {
14440                         .nla_len        = NLA_HDRLEN + sizeof(int),
14441                         .nla_type       = ZLIB_COMP_WINDOWBITS,
14442                 },
14443                 .val                    = -11,
14444         }, {
14445                 .nla = {
14446                         .nla_len        = NLA_HDRLEN + sizeof(int),
14447                         .nla_type       = ZLIB_COMP_MEMLEVEL,
14448                 },
14449                 .val                    = MAX_MEM_LEVEL,
14450         }, {
14451                 .nla = {
14452                         .nla_len        = NLA_HDRLEN + sizeof(int),
14453                         .nla_type       = ZLIB_COMP_STRATEGY,
14454                 },
14455                 .val                    = Z_DEFAULT_STRATEGY,
14456         }
14457 };
14458
14459 static const struct {
14460         struct nlattr nla;
14461         int val;
14462 } deflate_decomp_params[] = {
14463         {
14464                 .nla = {
14465                         .nla_len        = NLA_HDRLEN + sizeof(int),
14466                         .nla_type       = ZLIB_DECOMP_WINDOWBITS,
14467                 },
14468                 .val                    = -11,
14469         }
14470 };
14471
14472 static struct pcomp_testvec zlib_comp_tv_template[] = {
14473         {
14474                 .params = &deflate_comp_params,
14475                 .paramsize = sizeof(deflate_comp_params),
14476                 .inlen  = 70,
14477                 .outlen = 38,
14478                 .input  = "Join us now and share the software "
14479                         "Join us now and share the software ",
14480                 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
14481                           "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
14482                           "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
14483                           "\x48\x55\x28\xce\x4f\x2b\x29\x07"
14484                           "\x71\xbc\x08\x2b\x01\x00",
14485         }, {
14486                 .params = &deflate_comp_params,
14487                 .paramsize = sizeof(deflate_comp_params),
14488                 .inlen  = 191,
14489                 .outlen = 122,
14490                 .input  = "This document describes a compression method based on the DEFLATE"
14491                         "compression algorithm.  This document defines the application of "
14492                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
14493                 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
14494                           "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
14495                           "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
14496                           "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
14497                           "\x68\x12\x51\xae\x76\x67\xd6\x27"
14498                           "\x19\x88\x1a\xde\x85\xab\x21\xf2"
14499                           "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
14500                           "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
14501                           "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
14502                           "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
14503                           "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
14504                           "\x52\x37\xed\x0e\x52\x6b\x59\x02"
14505                           "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
14506                           "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
14507                           "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
14508                           "\xfa\x02",
14509         },
14510 };
14511
14512 static struct pcomp_testvec zlib_decomp_tv_template[] = {
14513         {
14514                 .params = &deflate_decomp_params,
14515                 .paramsize = sizeof(deflate_decomp_params),
14516                 .inlen  = 122,
14517                 .outlen = 191,
14518                 .input  = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
14519                           "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
14520                           "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
14521                           "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
14522                           "\x68\x12\x51\xae\x76\x67\xd6\x27"
14523                           "\x19\x88\x1a\xde\x85\xab\x21\xf2"
14524                           "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
14525                           "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
14526                           "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
14527                           "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
14528                           "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
14529                           "\x52\x37\xed\x0e\x52\x6b\x59\x02"
14530                           "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
14531                           "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
14532                           "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
14533                           "\xfa\x02",
14534                 .output = "This document describes a compression method based on the DEFLATE"
14535                         "compression algorithm.  This document defines the application of "
14536                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
14537         }, {
14538                 .params = &deflate_decomp_params,
14539                 .paramsize = sizeof(deflate_decomp_params),
14540                 .inlen  = 38,
14541                 .outlen = 70,
14542                 .input  = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
14543                           "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
14544                           "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
14545                           "\x48\x55\x28\xce\x4f\x2b\x29\x07"
14546                           "\x71\xbc\x08\x2b\x01\x00",
14547                 .output = "Join us now and share the software "
14548                         "Join us now and share the software ",
14549         },
14550 };
14551
14552 /*
14553  * LZO test vectors (null-terminated strings).
14554  */
14555 #define LZO_COMP_TEST_VECTORS 2
14556 #define LZO_DECOMP_TEST_VECTORS 2
14557
14558 static struct comp_testvec lzo_comp_tv_template[] = {
14559         {
14560                 .inlen  = 70,
14561                 .outlen = 46,
14562                 .input  = "Join us now and share the software "
14563                         "Join us now and share the software ",
14564                 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
14565                         "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
14566                         "\x64\x20\x73\x68\x61\x72\x65\x20"
14567                         "\x74\x68\x65\x20\x73\x6f\x66\x74"
14568                         "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
14569                         "\x3d\x88\x00\x11\x00\x00",
14570         }, {
14571                 .inlen  = 159,
14572                 .outlen = 133,
14573                 .input  = "This document describes a compression method based on the LZO "
14574                         "compression algorithm.  This document defines the application of "
14575                         "the LZO algorithm used in UBIFS.",
14576                 .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
14577                           "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
14578                           "\x64\x65\x73\x63\x72\x69\x62\x65"
14579                           "\x73\x20\x61\x20\x63\x6f\x6d\x70"
14580                           "\x72\x65\x73\x73\x69\x6f\x6e\x20"
14581                           "\x6d\x65\x74\x68\x6f\x64\x20\x62"
14582                           "\x61\x73\x65\x64\x20\x6f\x6e\x20"
14583                           "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
14584                           "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
14585                           "\x69\x74\x68\x6d\x2e\x20\x20\x54"
14586                           "\x68\x69\x73\x2a\x54\x01\x02\x66"
14587                           "\x69\x6e\x65\x73\x94\x06\x05\x61"
14588                           "\x70\x70\x6c\x69\x63\x61\x74\x76"
14589                           "\x0a\x6f\x66\x88\x02\x60\x09\x27"
14590                           "\xf0\x00\x0c\x20\x75\x73\x65\x64"
14591                           "\x20\x69\x6e\x20\x55\x42\x49\x46"
14592                           "\x53\x2e\x11\x00\x00",
14593         },
14594 };
14595
14596 static struct comp_testvec lzo_decomp_tv_template[] = {
14597         {
14598                 .inlen  = 133,
14599                 .outlen = 159,
14600                 .input  = "\x00\x2b\x54\x68\x69\x73\x20\x64"
14601                           "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
14602                           "\x64\x65\x73\x63\x72\x69\x62\x65"
14603                           "\x73\x20\x61\x20\x63\x6f\x6d\x70"
14604                           "\x72\x65\x73\x73\x69\x6f\x6e\x20"
14605                           "\x6d\x65\x74\x68\x6f\x64\x20\x62"
14606                           "\x61\x73\x65\x64\x20\x6f\x6e\x20"
14607                           "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
14608                           "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
14609                           "\x69\x74\x68\x6d\x2e\x20\x20\x54"
14610                           "\x68\x69\x73\x2a\x54\x01\x02\x66"
14611                           "\x69\x6e\x65\x73\x94\x06\x05\x61"
14612                           "\x70\x70\x6c\x69\x63\x61\x74\x76"
14613                           "\x0a\x6f\x66\x88\x02\x60\x09\x27"
14614                           "\xf0\x00\x0c\x20\x75\x73\x65\x64"
14615                           "\x20\x69\x6e\x20\x55\x42\x49\x46"
14616                           "\x53\x2e\x11\x00\x00",
14617                 .output = "This document describes a compression method based on the LZO "
14618                         "compression algorithm.  This document defines the application of "
14619                         "the LZO algorithm used in UBIFS.",
14620         }, {
14621                 .inlen  = 46,
14622                 .outlen = 70,
14623                 .input  = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
14624                           "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
14625                           "\x64\x20\x73\x68\x61\x72\x65\x20"
14626                           "\x74\x68\x65\x20\x73\x6f\x66\x74"
14627                           "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
14628                           "\x3d\x88\x00\x11\x00\x00",
14629                 .output = "Join us now and share the software "
14630                         "Join us now and share the software ",
14631         },
14632 };
14633
14634 /*
14635  * Michael MIC test vectors from IEEE 802.11i
14636  */
14637 #define MICHAEL_MIC_TEST_VECTORS 6
14638
14639 static struct hash_testvec michael_mic_tv_template[] = {
14640         {
14641                 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
14642                 .ksize = 8,
14643                 .plaintext = zeroed_string,
14644                 .psize = 0,
14645                 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
14646         },
14647         {
14648                 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
14649                 .ksize = 8,
14650                 .plaintext = "M",
14651                 .psize = 1,
14652                 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
14653         },
14654         {
14655                 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
14656                 .ksize = 8,
14657                 .plaintext = "Mi",
14658                 .psize = 2,
14659                 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
14660         },
14661         {
14662                 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
14663                 .ksize = 8,
14664                 .plaintext = "Mic",
14665                 .psize = 3,
14666                 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
14667         },
14668         {
14669                 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
14670                 .ksize = 8,
14671                 .plaintext = "Mich",
14672                 .psize = 4,
14673                 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
14674         },
14675         {
14676                 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
14677                 .ksize = 8,
14678                 .plaintext = "Michael",
14679                 .psize = 7,
14680                 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
14681         }
14682 };
14683
14684 /*
14685  * CRC32C test vectors
14686  */
14687 #define CRC32C_TEST_VECTORS 14
14688
14689 static struct hash_testvec crc32c_tv_template[] = {
14690         {
14691                 .psize = 0,
14692                 .digest = "\x00\x00\x00\x00",
14693         },
14694         {
14695                 .key = "\x87\xa9\xcb\xed",
14696                 .ksize = 4,
14697                 .psize = 0,
14698                 .digest = "\x78\x56\x34\x12",
14699         },
14700         {
14701                 .key = "\xff\xff\xff\xff",
14702                 .ksize = 4,
14703                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
14704                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
14705                              "\x11\x12\x13\x14\x15\x16\x17\x18"
14706                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
14707                              "\x21\x22\x23\x24\x25\x26\x27\x28",
14708                 .psize = 40,
14709                 .digest = "\x7f\x15\x2c\x0e",
14710         },
14711         {
14712                 .key = "\xff\xff\xff\xff",
14713                 .ksize = 4,
14714                 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
14715                              "\x31\x32\x33\x34\x35\x36\x37\x38"
14716                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
14717                              "\x41\x42\x43\x44\x45\x46\x47\x48"
14718                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
14719                 .psize = 40,
14720                 .digest = "\xf6\xeb\x80\xe9",
14721         },
14722         {
14723                 .key = "\xff\xff\xff\xff",
14724                 .ksize = 4,
14725                 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
14726                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
14727                              "\x61\x62\x63\x64\x65\x66\x67\x68"
14728                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
14729                              "\x71\x72\x73\x74\x75\x76\x77\x78",
14730                 .psize = 40,
14731                 .digest = "\xed\xbd\x74\xde",
14732         },
14733         {
14734                 .key = "\xff\xff\xff\xff",
14735                 .ksize = 4,
14736                 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
14737                              "\x81\x82\x83\x84\x85\x86\x87\x88"
14738                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
14739                              "\x91\x92\x93\x94\x95\x96\x97\x98"
14740                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
14741                 .psize = 40,
14742                 .digest = "\x62\xc8\x79\xd5",
14743         },
14744         {
14745                 .key = "\xff\xff\xff\xff",
14746                 .ksize = 4,
14747                 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
14748                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
14749                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
14750                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
14751                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
14752                 .psize = 40,
14753                 .digest = "\xd0\x9a\x97\xba",
14754         },
14755         {
14756                 .key = "\xff\xff\xff\xff",
14757                 .ksize = 4,
14758                 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
14759                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
14760                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
14761                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
14762                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
14763                 .psize = 40,
14764                 .digest = "\x13\xd9\x29\x2b",
14765         },
14766         {
14767                 .key = "\x80\xea\xd3\xf1",
14768                 .ksize = 4,
14769                 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
14770                              "\x31\x32\x33\x34\x35\x36\x37\x38"
14771                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
14772                              "\x41\x42\x43\x44\x45\x46\x47\x48"
14773                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
14774                 .psize = 40,
14775                 .digest = "\x0c\xb5\xe2\xa2",
14776         },
14777         {
14778                 .key = "\xf3\x4a\x1d\x5d",
14779                 .ksize = 4,
14780                 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
14781                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
14782                              "\x61\x62\x63\x64\x65\x66\x67\x68"
14783                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
14784                              "\x71\x72\x73\x74\x75\x76\x77\x78",
14785                 .psize = 40,
14786                 .digest = "\xd1\x7f\xfb\xa6",
14787         },
14788         {
14789                 .key = "\x2e\x80\x04\x59",
14790                 .ksize = 4,
14791                 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
14792                              "\x81\x82\x83\x84\x85\x86\x87\x88"
14793                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
14794                              "\x91\x92\x93\x94\x95\x96\x97\x98"
14795                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
14796                 .psize = 40,
14797                 .digest = "\x59\x33\xe6\x7a",
14798         },
14799         {
14800                 .key = "\xa6\xcc\x19\x85",
14801                 .ksize = 4,
14802                 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
14803                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
14804                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
14805                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
14806                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
14807                 .psize = 40,
14808                 .digest = "\xbe\x03\x01\xd2",
14809         },
14810         {
14811                 .key = "\x41\xfc\xfe\x2d",
14812                 .ksize = 4,
14813                 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
14814                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
14815                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
14816                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
14817                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
14818                 .psize = 40,
14819                 .digest = "\x75\xd3\xc5\x24",
14820         },
14821         {
14822                 .key = "\xff\xff\xff\xff",
14823                 .ksize = 4,
14824                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
14825                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
14826                              "\x11\x12\x13\x14\x15\x16\x17\x18"
14827                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
14828                              "\x21\x22\x23\x24\x25\x26\x27\x28"
14829                              "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
14830                              "\x31\x32\x33\x34\x35\x36\x37\x38"
14831                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
14832                              "\x41\x42\x43\x44\x45\x46\x47\x48"
14833                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
14834                              "\x51\x52\x53\x54\x55\x56\x57\x58"
14835                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
14836                              "\x61\x62\x63\x64\x65\x66\x67\x68"
14837                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
14838                              "\x71\x72\x73\x74\x75\x76\x77\x78"
14839                              "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
14840                              "\x81\x82\x83\x84\x85\x86\x87\x88"
14841                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
14842                              "\x91\x92\x93\x94\x95\x96\x97\x98"
14843                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
14844                              "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
14845                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
14846                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
14847                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
14848                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
14849                              "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
14850                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
14851                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
14852                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
14853                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
14854                 .psize = 240,
14855                 .digest = "\x75\xd3\xc5\x24",
14856                 .np = 2,
14857                 .tap = { 31, 209 }
14858         },
14859 };
14860
14861 #endif  /* _CRYPTO_TESTMGR_H */