Merge branch 'for-linus-37rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
[platform/adaptation/renesas_rcar/renesas_kernel.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 also_non_np;
57         unsigned char fail;
58         unsigned char wk; /* weak key flag */
59         unsigned char klen;
60         unsigned short ilen;
61         unsigned short rlen;
62 };
63
64 struct aead_testvec {
65         char *key;
66         char *iv;
67         char *input;
68         char *assoc;
69         char *result;
70         unsigned char tap[MAX_TAP];
71         unsigned char atap[MAX_TAP];
72         int np;
73         int anp;
74         unsigned char fail;
75         unsigned char novrfy;   /* ccm dec verification failure expected */
76         unsigned char wk; /* weak key flag */
77         unsigned char klen;
78         unsigned short ilen;
79         unsigned short alen;
80         unsigned short rlen;
81 };
82
83 struct cprng_testvec {
84         char *key;
85         char *dt;
86         char *v;
87         char *result;
88         unsigned char klen;
89         unsigned short dtlen;
90         unsigned short vlen;
91         unsigned short rlen;
92         unsigned short loops;
93 };
94
95 static char zeroed_string[48];
96
97 /*
98  * MD4 test vectors from RFC1320
99  */
100 #define MD4_TEST_VECTORS        7
101
102 static struct hash_testvec md4_tv_template [] = {
103         {
104                 .plaintext = "",
105                 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
106                           "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
107         }, {
108                 .plaintext = "a",
109                 .psize  = 1,
110                 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
111                           "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
112         }, {
113                 .plaintext = "abc",
114                 .psize  = 3,
115                 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
116                           "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
117         }, {
118                 .plaintext = "message digest",
119                 .psize  = 14,
120                 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
121                         "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
122         }, {
123                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
124                 .psize  = 26,
125                 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
126                           "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
127                 .np     = 2,
128                 .tap    = { 13, 13 },
129         }, {
130                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
131                 .psize  = 62,
132                 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
133                           "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
134         }, {
135                 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
136                            "45678901234567890",
137                 .psize  = 80,
138                 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
139                           "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
140         },
141 };
142
143 /*
144  * MD5 test vectors from RFC1321
145  */
146 #define MD5_TEST_VECTORS        7
147
148 static struct hash_testvec md5_tv_template[] = {
149         {
150                 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
151                           "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
152         }, {
153                 .plaintext = "a",
154                 .psize  = 1,
155                 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
156                           "\x31\xc3\x99\xe2\x69\x77\x26\x61",
157         }, {
158                 .plaintext = "abc",
159                 .psize  = 3,
160                 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
161                           "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
162         }, {
163                 .plaintext = "message digest",
164                 .psize  = 14,
165                 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
166                           "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
167         }, {
168                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
169                 .psize  = 26,
170                 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
171                           "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
172                 .np     = 2,
173                 .tap    = {13, 13}
174         }, {
175                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
176                 .psize  = 62,
177                 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
178                           "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
179         }, {
180                 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
181                            "345678901234567890",
182                 .psize  = 80,
183                 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
184                           "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
185         }
186
187 };
188
189 /*
190  * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
191  */
192 #define RMD128_TEST_VECTORS     10
193
194 static struct hash_testvec rmd128_tv_template[] = {
195         {
196                 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
197                           "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
198         }, {
199                 .plaintext = "a",
200                 .psize  = 1,
201                 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
202                           "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
203         }, {
204                 .plaintext = "abc",
205                 .psize  = 3,
206                 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
207                           "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
208         }, {
209                 .plaintext = "message digest",
210                 .psize  = 14,
211                 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
212                           "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
213         }, {
214                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
215                 .psize  = 26,
216                 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
217                           "\x10\x71\x49\x22\xb3\x71\x83\x4e",
218         }, {
219                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
220                              "fghijklmnopqrstuvwxyz0123456789",
221                 .psize  = 62,
222                 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
223                           "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
224         }, {
225                 .plaintext = "1234567890123456789012345678901234567890"
226                              "1234567890123456789012345678901234567890",
227                 .psize  = 80,
228                 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
229                           "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
230         }, {
231                 .plaintext = "abcdbcdecdefdefgefghfghighij"
232                              "hijkijkljklmklmnlmnomnopnopq",
233                 .psize  = 56,
234                 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
235                           "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
236                 .np     = 2,
237                 .tap    = { 28, 28 },
238         }, {
239                 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
240                              "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
241                              "lmnopqrsmnopqrstnopqrstu",
242                 .psize  = 112,
243                 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
244                           "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
245         }, {
246                 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
247                 .psize  = 32,
248                 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
249                           "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
250         }
251 };
252
253 /*
254  * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
255  */
256 #define RMD160_TEST_VECTORS     10
257
258 static struct hash_testvec rmd160_tv_template[] = {
259         {
260                 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
261                           "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
262         }, {
263                 .plaintext = "a",
264                 .psize  = 1,
265                 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
266                           "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
267         }, {
268                 .plaintext = "abc",
269                 .psize  = 3,
270                 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
271                           "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
272         }, {
273                 .plaintext = "message digest",
274                 .psize  = 14,
275                 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
276                           "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
277         }, {
278                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
279                 .psize  = 26,
280                 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
281                           "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
282         }, {
283                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
284                              "fghijklmnopqrstuvwxyz0123456789",
285                 .psize  = 62,
286                 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
287                           "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
288         }, {
289                 .plaintext = "1234567890123456789012345678901234567890"
290                              "1234567890123456789012345678901234567890",
291                 .psize  = 80,
292                 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
293                           "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
294         }, {
295                 .plaintext = "abcdbcdecdefdefgefghfghighij"
296                              "hijkijkljklmklmnlmnomnopnopq",
297                 .psize  = 56,
298                 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
299                           "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
300                 .np     = 2,
301                 .tap    = { 28, 28 },
302         }, {
303                 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
304                              "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
305                              "lmnopqrsmnopqrstnopqrstu",
306                 .psize  = 112,
307                 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
308                           "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
309         }, {
310                 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
311                 .psize  = 32,
312                 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
313                           "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
314         }
315 };
316
317 /*
318  * RIPEMD-256 test vectors
319  */
320 #define RMD256_TEST_VECTORS     8
321
322 static struct hash_testvec rmd256_tv_template[] = {
323         {
324                 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
325                           "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
326                           "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
327                           "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
328         }, {
329                 .plaintext = "a",
330                 .psize  = 1,
331                 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
332                           "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
333                           "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
334                           "\xcd\x88\x3a\x91\x34\x69\x29\x25",
335         }, {
336                 .plaintext = "abc",
337                 .psize  = 3,
338                 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
339                           "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
340                           "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
341                           "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
342         }, {
343                 .plaintext = "message digest",
344                 .psize  = 14,
345                 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
346                           "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
347                           "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
348                           "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
349         }, {
350                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
351                 .psize  = 26,
352                 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
353                           "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
354                           "\x78\x96\x11\x8a\x51\x97\x96\x87"
355                           "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
356         }, {
357                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
358                              "fghijklmnopqrstuvwxyz0123456789",
359                 .psize  = 62,
360                 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
361                           "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
362                           "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
363                           "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
364         }, {
365                 .plaintext = "1234567890123456789012345678901234567890"
366                              "1234567890123456789012345678901234567890",
367                 .psize  = 80,
368                 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
369                           "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
370                           "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
371                           "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
372         }, {
373                 .plaintext = "abcdbcdecdefdefgefghfghighij"
374                              "hijkijkljklmklmnlmnomnopnopq",
375                 .psize  = 56,
376                 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
377                           "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
378                           "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
379                           "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
380                 .np     = 2,
381                 .tap    = { 28, 28 },
382         }
383 };
384
385 /*
386  * RIPEMD-320 test vectors
387  */
388 #define RMD320_TEST_VECTORS     8
389
390 static struct hash_testvec rmd320_tv_template[] = {
391         {
392                 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
393                           "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
394                           "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
395                           "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
396         }, {
397                 .plaintext = "a",
398                 .psize  = 1,
399                 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
400                           "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
401                           "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
402                           "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
403         }, {
404                 .plaintext = "abc",
405                 .psize  = 3,
406                 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
407                           "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
408                           "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
409                           "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
410         }, {
411                 .plaintext = "message digest",
412                 .psize  = 14,
413                 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
414                           "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
415                           "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
416                           "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
417         }, {
418                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
419                 .psize  = 26,
420                 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
421                           "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
422                           "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
423                           "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
424         }, {
425                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
426                              "fghijklmnopqrstuvwxyz0123456789",
427                 .psize  = 62,
428                 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
429                           "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
430                           "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
431                           "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
432         }, {
433                 .plaintext = "1234567890123456789012345678901234567890"
434                              "1234567890123456789012345678901234567890",
435                 .psize  = 80,
436                 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
437                           "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
438                           "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
439                           "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
440         }, {
441                 .plaintext = "abcdbcdecdefdefgefghfghighij"
442                              "hijkijkljklmklmnlmnomnopnopq",
443                 .psize  = 56,
444                 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
445                           "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
446                           "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
447                           "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
448                 .np     = 2,
449                 .tap    = { 28, 28 },
450         }
451 };
452
453 /*
454  * SHA1 test vectors  from from FIPS PUB 180-1
455  * Long vector from CAVS 5.0
456  */
457 #define SHA1_TEST_VECTORS       3
458
459 static struct hash_testvec sha1_tv_template[] = {
460         {
461                 .plaintext = "abc",
462                 .psize  = 3,
463                 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
464                           "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
465         }, {
466                 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
467                 .psize  = 56,
468                 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
469                           "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
470                 .np     = 2,
471                 .tap    = { 28, 28 }
472         }, {
473                 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
474                              "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
475                              "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
476                              "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
477                              "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
478                              "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
479                              "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
480                              "\x72\x28\x26\xc0\x66\x86\x9e\xda"
481                              "\xcd\x73\xb2\x54\x80\x35\x18\x58"
482                              "\x13\xe2\x26\x34\xa9\xda\x44\x00"
483                              "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
484                              "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
485                              "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
486                              "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
487                              "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
488                              "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
489                              "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
490                              "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
491                              "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
492                              "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
493                              "\x5a\x90\x11",
494                 .psize  = 163,
495                 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
496                           "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
497                 .np     = 4,
498                 .tap    = { 63, 64, 31, 5 }
499         }
500 };
501
502
503 /*
504  * SHA224 test vectors from from FIPS PUB 180-2
505  */
506 #define SHA224_TEST_VECTORS     2
507
508 static struct hash_testvec sha224_tv_template[] = {
509         {
510                 .plaintext = "abc",
511                 .psize  = 3,
512                 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
513                           "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
514                           "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
515                           "\xE3\x6C\x9D\xA7",
516         }, {
517                 .plaintext =
518                 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
519                 .psize  = 56,
520                 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
521                           "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
522                           "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
523                           "\x52\x52\x25\x25",
524                 .np     = 2,
525                 .tap    = { 28, 28 }
526         }
527 };
528
529 /*
530  * SHA256 test vectors from from NIST
531  */
532 #define SHA256_TEST_VECTORS     2
533
534 static struct hash_testvec sha256_tv_template[] = {
535         {
536                 .plaintext = "abc",
537                 .psize  = 3,
538                 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
539                           "\x41\x41\x40\xde\x5d\xae\x22\x23"
540                           "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
541                           "\xb4\x10\xff\x61\xf2\x00\x15\xad",
542         }, {
543                 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
544                 .psize  = 56,
545                 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
546                           "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
547                           "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
548                           "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
549                 .np     = 2,
550                 .tap    = { 28, 28 }
551         },
552 };
553
554 /*
555  * SHA384 test vectors from from NIST and kerneli
556  */
557 #define SHA384_TEST_VECTORS     4
558
559 static struct hash_testvec sha384_tv_template[] = {
560         {
561                 .plaintext= "abc",
562                 .psize  = 3,
563                 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
564                           "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
565                           "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
566                           "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
567                           "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
568                           "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
569         }, {
570                 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
571                 .psize  = 56,
572                 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
573                           "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
574                           "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
575                           "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
576                           "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
577                           "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
578         }, {
579                 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
580                            "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
581                 .psize  = 112,
582                 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
583                           "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
584                           "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
585                           "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
586                           "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
587                           "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
588         }, {
589                 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
590                            "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
591                 .psize  = 104,
592                 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
593                           "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
594                           "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
595                           "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
596                           "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
597                           "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
598                 .np     = 4,
599                 .tap    = { 26, 26, 26, 26 }
600         },
601 };
602
603 /*
604  * SHA512 test vectors from from NIST and kerneli
605  */
606 #define SHA512_TEST_VECTORS     4
607
608 static struct hash_testvec sha512_tv_template[] = {
609         {
610                 .plaintext = "abc",
611                 .psize  = 3,
612                 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
613                           "\xcc\x41\x73\x49\xae\x20\x41\x31"
614                           "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
615                           "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
616                           "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
617                           "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
618                           "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
619                           "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
620         }, {
621                 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
622                 .psize  = 56,
623                 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
624                           "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
625                           "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
626                           "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
627                           "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
628                           "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
629                           "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
630                           "\x54\xec\x63\x12\x38\xca\x34\x45",
631         }, {
632                 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
633                            "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
634                 .psize  = 112,
635                 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
636                           "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
637                           "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
638                           "\x72\x99\xae\xad\xb6\x88\x90\x18"
639                           "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
640                           "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
641                           "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
642                           "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
643         }, {
644                 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
645                            "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
646                 .psize  = 104,
647                 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
648                           "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
649                           "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
650                           "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
651                           "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
652                           "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
653                           "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
654                           "\xed\xb4\x19\x87\x23\x28\x50\xc9",
655                 .np     = 4,
656                 .tap    = { 26, 26, 26, 26 }
657         },
658 };
659
660
661 /*
662  * WHIRLPOOL test vectors from Whirlpool package
663  * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
664  * submission
665  */
666 #define WP512_TEST_VECTORS      8
667
668 static struct hash_testvec wp512_tv_template[] = {
669         {
670                 .plaintext = "",
671                 .psize  = 0,
672                 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
673                           "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
674                           "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
675                           "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
676                           "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
677                           "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
678                           "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
679                           "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
680
681
682         }, {
683                 .plaintext = "a",
684                 .psize  = 1,
685                 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
686                           "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
687                           "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
688                           "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
689                           "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
690                           "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
691                           "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
692                           "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
693         }, {
694                 .plaintext = "abc",
695                 .psize  = 3,
696                 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
697                           "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
698                           "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
699                           "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
700                           "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
701                           "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
702                           "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
703                           "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
704         }, {
705                 .plaintext = "message digest",
706                 .psize  = 14,
707                 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
708                           "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
709                           "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
710                           "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
711                           "\x84\x21\x55\x76\x59\xEF\x55\xC1"
712                           "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
713                           "\x92\xED\x92\x00\x52\x83\x8F\x33"
714                           "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
715         }, {
716                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
717                 .psize  = 26,
718                 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
719                           "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
720                           "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
721                           "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
722                           "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
723                           "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
724                           "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
725                           "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
726         }, {
727                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
728                            "abcdefghijklmnopqrstuvwxyz0123456789",
729                 .psize  = 62,
730                 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
731                           "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
732                           "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
733                           "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
734                           "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
735                           "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
736                           "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
737                           "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
738         }, {
739                 .plaintext = "1234567890123456789012345678901234567890"
740                            "1234567890123456789012345678901234567890",
741                 .psize  = 80,
742                 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
743                           "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
744                           "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
745                           "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
746                           "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
747                           "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
748                           "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
749                           "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
750         }, {
751                 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
752                 .psize  = 32,
753                 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
754                           "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
755                           "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
756                           "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
757                           "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
758                           "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
759                           "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
760                           "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
761         },
762 };
763
764 #define WP384_TEST_VECTORS      8
765
766 static struct hash_testvec wp384_tv_template[] = {
767         {
768                 .plaintext = "",
769                 .psize  = 0,
770                 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
771                           "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
772                           "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
773                           "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
774                           "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
775                           "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
776
777
778         }, {
779                 .plaintext = "a",
780                 .psize  = 1,
781                 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
782                           "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
783                           "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
784                           "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
785                           "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
786                           "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
787         }, {
788                 .plaintext = "abc",
789                 .psize  = 3,
790                 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
791                           "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
792                           "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
793                           "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
794                           "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
795                           "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
796         }, {
797                 .plaintext = "message digest",
798                 .psize  = 14,
799                 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
800                           "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
801                           "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
802                           "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
803                           "\x84\x21\x55\x76\x59\xEF\x55\xC1"
804                           "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
805         }, {
806                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
807                 .psize  = 26,
808                 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
809                           "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
810                           "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
811                           "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
812                           "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
813                           "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
814         }, {
815                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
816                            "abcdefghijklmnopqrstuvwxyz0123456789",
817                 .psize  = 62,
818                 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
819                           "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
820                           "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
821                           "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
822                           "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
823                           "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
824         }, {
825                 .plaintext = "1234567890123456789012345678901234567890"
826                            "1234567890123456789012345678901234567890",
827                 .psize  = 80,
828                 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
829                           "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
830                           "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
831                           "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
832                           "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
833                           "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
834         }, {
835                 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
836                 .psize  = 32,
837                 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
838                           "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
839                           "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
840                           "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
841                           "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
842                           "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
843         },
844 };
845
846 #define WP256_TEST_VECTORS      8
847
848 static struct hash_testvec wp256_tv_template[] = {
849         {
850                 .plaintext = "",
851                 .psize  = 0,
852                 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
853                           "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
854                           "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
855                           "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
856
857
858         }, {
859                 .plaintext = "a",
860                 .psize  = 1,
861                 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
862                           "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
863                           "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
864                           "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
865         }, {
866                 .plaintext = "abc",
867                 .psize  = 3,
868                 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
869                           "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
870                           "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
871                           "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
872         }, {
873                 .plaintext = "message digest",
874                 .psize  = 14,
875                 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
876                           "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
877                           "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
878                           "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
879         }, {
880                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
881                 .psize  = 26,
882                 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
883                           "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
884                           "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
885                           "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
886         }, {
887                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
888                            "abcdefghijklmnopqrstuvwxyz0123456789",
889                 .psize  = 62,
890                 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
891                           "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
892                           "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
893                           "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
894         }, {
895                 .plaintext = "1234567890123456789012345678901234567890"
896                            "1234567890123456789012345678901234567890",
897                 .psize  = 80,
898                 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
899                           "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
900                           "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
901                           "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
902         }, {
903                 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
904                 .psize  = 32,
905                 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
906                           "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
907                           "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
908                           "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
909         },
910 };
911
912 /*
913  * TIGER test vectors from Tiger website
914  */
915 #define TGR192_TEST_VECTORS     6
916
917 static struct hash_testvec tgr192_tv_template[] = {
918         {
919                 .plaintext = "",
920                 .psize  = 0,
921                 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
922                           "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
923                           "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
924         }, {
925                 .plaintext = "abc",
926                 .psize  = 3,
927                 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
928                           "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
929                           "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
930         }, {
931                 .plaintext = "Tiger",
932                 .psize  = 5,
933                 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
934                           "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
935                           "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
936         }, {
937                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
938                 .psize  = 64,
939                 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
940                           "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
941                           "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
942         }, {
943                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
944                 .psize  = 64,
945                 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
946                           "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
947                           "\x57\x89\x65\x65\x97\x5f\x91\x97",
948         }, {
949                 .plaintext = "Tiger - A Fast New Hash Function, "
950                            "by Ross Anderson and Eli Biham, "
951                            "proceedings of Fast Software Encryption 3, "
952                            "Cambridge, 1996.",
953                 .psize  = 125,
954                 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
955                           "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
956                           "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
957         },
958 };
959
960 #define TGR160_TEST_VECTORS     6
961
962 static struct hash_testvec tgr160_tv_template[] = {
963         {
964                 .plaintext = "",
965                 .psize  = 0,
966                 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
967                           "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
968                           "\xf3\x73\xde\x2d",
969         }, {
970                 .plaintext = "abc",
971                 .psize  = 3,
972                 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
973                           "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
974                           "\x93\x5f\x7b\x95",
975         }, {
976                 .plaintext = "Tiger",
977                 .psize  = 5,
978                 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
979                           "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
980                           "\x37\x79\x0c\x11",
981         }, {
982                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
983                 .psize  = 64,
984                 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
985                           "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
986                           "\xb5\x86\x44\x50",
987         }, {
988                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
989                 .psize  = 64,
990                 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
991                           "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
992                           "\x57\x89\x65\x65",
993         }, {
994                 .plaintext = "Tiger - A Fast New Hash Function, "
995                            "by Ross Anderson and Eli Biham, "
996                            "proceedings of Fast Software Encryption 3, "
997                            "Cambridge, 1996.",
998                 .psize  = 125,
999                 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1000                           "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1001                           "\xdd\x68\x15\x1d",
1002         },
1003 };
1004
1005 #define TGR128_TEST_VECTORS     6
1006
1007 static struct hash_testvec tgr128_tv_template[] = {
1008         {
1009                 .plaintext = "",
1010                 .psize  = 0,
1011                 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1012                           "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
1013         }, {
1014                 .plaintext = "abc",
1015                 .psize  = 3,
1016                 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1017                           "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
1018         }, {
1019                 .plaintext = "Tiger",
1020                 .psize  = 5,
1021                 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1022                           "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
1023         }, {
1024                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1025                 .psize  = 64,
1026                 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1027                           "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
1028         }, {
1029                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1030                 .psize  = 64,
1031                 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1032                           "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
1033         }, {
1034                 .plaintext = "Tiger - A Fast New Hash Function, "
1035                            "by Ross Anderson and Eli Biham, "
1036                            "proceedings of Fast Software Encryption 3, "
1037                            "Cambridge, 1996.",
1038                 .psize  = 125,
1039                 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1040                           "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
1041         },
1042 };
1043
1044 #define GHASH_TEST_VECTORS 1
1045
1046 static struct hash_testvec ghash_tv_template[] =
1047 {
1048         {
1049
1050                 .key    = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03\xff\xca\xff\x95\xf8\x30\xf0\x61",
1051                 .ksize  = 16,
1052                 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
1053                 .psize  = 16,
1054                 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
1055                           "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
1056         },
1057 };
1058
1059 /*
1060  * HMAC-MD5 test vectors from RFC2202
1061  * (These need to be fixed to not use strlen).
1062  */
1063 #define HMAC_MD5_TEST_VECTORS   7
1064
1065 static struct hash_testvec hmac_md5_tv_template[] =
1066 {
1067         {
1068                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1069                 .ksize  = 16,
1070                 .plaintext = "Hi There",
1071                 .psize  = 8,
1072                 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
1073                           "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
1074         }, {
1075                 .key    = "Jefe",
1076                 .ksize  = 4,
1077                 .plaintext = "what do ya want for nothing?",
1078                 .psize  = 28,
1079                 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
1080                           "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
1081                 .np     = 2,
1082                 .tap    = {14, 14}
1083         }, {
1084                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1085                 .ksize  = 16,
1086                 .plaintext = "\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\xdd"
1089                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1090                 .psize  = 50,
1091                 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
1092                           "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
1093         }, {
1094                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
1095                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1096                           "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1097                 .ksize  = 25,
1098                 .plaintext = "\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\xcd"
1101                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1102                 .psize  = 50,
1103                 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
1104                           "\x3a\x75\x16\x47\x46\xff\xaa\x79",
1105         }, {
1106                 .key    = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1107                 .ksize  = 16,
1108                 .plaintext = "Test With Truncation",
1109                 .psize  = 20,
1110                 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
1111                           "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
1112         }, {
1113                 .key    = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1119                         "\xaa\xaa",
1120                 .ksize  = 80,
1121                 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1122                 .psize  = 54,
1123                 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
1124                           "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
1125         }, {
1126                 .key    = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1132                         "\xaa\xaa",
1133                 .ksize  = 80,
1134                 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1135                            "Block-Size Data",
1136                 .psize  = 73,
1137                 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
1138                           "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
1139         },
1140 };
1141
1142 /*
1143  * HMAC-RIPEMD128 test vectors from RFC2286
1144  */
1145 #define HMAC_RMD128_TEST_VECTORS        7
1146
1147 static struct hash_testvec hmac_rmd128_tv_template[] = {
1148         {
1149                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1150                 .ksize  = 16,
1151                 .plaintext = "Hi There",
1152                 .psize  = 8,
1153                 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
1154                           "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
1155         }, {
1156                 .key    = "Jefe",
1157                 .ksize  = 4,
1158                 .plaintext = "what do ya want for nothing?",
1159                 .psize  = 28,
1160                 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
1161                           "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
1162                 .np     = 2,
1163                 .tap    = { 14, 14 },
1164         }, {
1165                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1166                 .ksize  = 16,
1167                 .plaintext = "\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\xdd"
1170                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1171                 .psize  = 50,
1172                 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
1173                           "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
1174         }, {
1175                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
1176                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1177                           "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1178                 .ksize  = 25,
1179                 .plaintext = "\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\xcd"
1182                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1183                 .psize  = 50,
1184                 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
1185                           "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
1186         }, {
1187                 .key    = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1188                 .ksize  = 16,
1189                 .plaintext = "Test With Truncation",
1190                 .psize  = 20,
1191                 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
1192                           "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
1193         }, {
1194                 .key    = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1200                         "\xaa\xaa",
1201                 .ksize  = 80,
1202                 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1203                 .psize  = 54,
1204                 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
1205                           "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
1206         }, {
1207                 .key    = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1213                         "\xaa\xaa",
1214                 .ksize  = 80,
1215                 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1216                            "Block-Size Data",
1217                 .psize  = 73,
1218                 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
1219                           "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
1220         },
1221 };
1222
1223 /*
1224  * HMAC-RIPEMD160 test vectors from RFC2286
1225  */
1226 #define HMAC_RMD160_TEST_VECTORS        7
1227
1228 static struct hash_testvec hmac_rmd160_tv_template[] = {
1229         {
1230                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1231                 .ksize  = 20,
1232                 .plaintext = "Hi There",
1233                 .psize  = 8,
1234                 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
1235                           "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
1236         }, {
1237                 .key    = "Jefe",
1238                 .ksize  = 4,
1239                 .plaintext = "what do ya want for nothing?",
1240                 .psize  = 28,
1241                 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
1242                           "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
1243                 .np     = 2,
1244                 .tap    = { 14, 14 },
1245         }, {
1246                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1247                 .ksize  = 20,
1248                 .plaintext = "\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\xdd"
1251                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1252                 .psize  = 50,
1253                 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
1254                           "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
1255         }, {
1256                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
1257                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1258                           "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1259                 .ksize  = 25,
1260                 .plaintext = "\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\xcd"
1263                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1264                 .psize  = 50,
1265                 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
1266                           "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
1267         }, {
1268                 .key    = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1269                 .ksize  = 20,
1270                 .plaintext = "Test With Truncation",
1271                 .psize  = 20,
1272                 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
1273                           "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
1274         }, {
1275                 .key    = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1281                         "\xaa\xaa",
1282                 .ksize  = 80,
1283                 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1284                 .psize  = 54,
1285                 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
1286                           "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
1287         }, {
1288                 .key    = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1294                         "\xaa\xaa",
1295                 .ksize  = 80,
1296                 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1297                            "Block-Size Data",
1298                 .psize  = 73,
1299                 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
1300                           "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
1301         },
1302 };
1303
1304 /*
1305  * HMAC-SHA1 test vectors from RFC2202
1306  */
1307 #define HMAC_SHA1_TEST_VECTORS  7
1308
1309 static struct hash_testvec hmac_sha1_tv_template[] = {
1310         {
1311                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
1312                 .ksize  = 20,
1313                 .plaintext = "Hi There",
1314                 .psize  = 8,
1315                 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
1316                           "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
1317                           "\x46\xbe",
1318         }, {
1319                 .key    = "Jefe",
1320                 .ksize  = 4,
1321                 .plaintext = "what do ya want for nothing?",
1322                 .psize  = 28,
1323                 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
1324                           "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
1325                 .np     = 2,
1326                 .tap    = { 14, 14 }
1327         }, {
1328                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1329                 .ksize  = 20,
1330                 .plaintext = "\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\xdd"
1333                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1334                 .psize  = 50,
1335                 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
1336                           "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
1337         }, {
1338                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
1339                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1340                           "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
1341                 .ksize  = 25,
1342                 .plaintext = "\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\xcd"
1345                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1346                 .psize  = 50,
1347                 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
1348                           "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
1349         }, {
1350                 .key    = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
1351                 .ksize  = 20,
1352                 .plaintext = "Test With Truncation",
1353                 .psize  = 20,
1354                 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
1355                           "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
1356         }, {
1357                 .key    = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1363                         "\xaa\xaa",
1364                 .ksize  = 80,
1365                 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1366                 .psize  = 54,
1367                 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
1368                           "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
1369         }, {
1370                 .key    = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1376                         "\xaa\xaa",
1377                 .ksize  = 80,
1378                 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
1379                            "Block-Size Data",
1380                 .psize  = 73,
1381                 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
1382                           "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
1383         },
1384 };
1385
1386
1387 /*
1388  * SHA224 HMAC test vectors from RFC4231
1389  */
1390 #define HMAC_SHA224_TEST_VECTORS    4
1391
1392 static struct hash_testvec hmac_sha224_tv_template[] = {
1393         {
1394                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1395                         "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1396                         "\x0b\x0b\x0b\x0b",
1397                 .ksize  = 20,
1398                 /*  ("Hi There") */
1399                 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
1400                 .psize  = 8,
1401                 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
1402                         "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
1403                         "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
1404                         "\x53\x68\x4b\x22",
1405         }, {
1406                 .key    = "Jefe",
1407                 .ksize  = 4,
1408                 /* ("what do ya want for nothing?") */
1409                 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
1410                         "\x79\x61\x20\x77\x61\x6e\x74\x20"
1411                         "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
1412                         "\x69\x6e\x67\x3f",
1413                 .psize  = 28,
1414                 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
1415                         "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
1416                         "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
1417                         "\x8f\xd0\x5e\x44",
1418                 .np = 4,
1419                 .tap    = { 7, 7, 7, 7 }
1420         }, {
1421                 .key    = "\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\xaa\xaa\xaa\xaa\xaa"
1437                         "\xaa\xaa\xaa",
1438                 .ksize  = 131,
1439                 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
1440                 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
1441                         "\x6e\x67\x20\x4c\x61\x72\x67\x65"
1442                         "\x72\x20\x54\x68\x61\x6e\x20\x42"
1443                         "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
1444                         "\x65\x20\x4b\x65\x79\x20\x2d\x20"
1445                         "\x48\x61\x73\x68\x20\x4b\x65\x79"
1446                         "\x20\x46\x69\x72\x73\x74",
1447                 .psize  = 54,
1448                 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
1449                         "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
1450                         "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
1451                         "\x3f\xa6\x87\x0e",
1452         }, {
1453                 .key    = "\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\xaa\xaa\xaa\xaa\xaa"
1469                         "\xaa\xaa\xaa",
1470                 .ksize  = 131,
1471                 /* ("This is a test using a larger than block-size key and a")
1472                 (" larger than block-size data. The key needs to be")
1473                         (" hashed before being used by the HMAC algorithm.") */
1474                 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
1475                         "\x61\x20\x74\x65\x73\x74\x20\x75"
1476                         "\x73\x69\x6e\x67\x20\x61\x20\x6c"
1477                         "\x61\x72\x67\x65\x72\x20\x74\x68"
1478                         "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
1479                         "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
1480                         "\x79\x20\x61\x6e\x64\x20\x61\x20"
1481                         "\x6c\x61\x72\x67\x65\x72\x20\x74"
1482                         "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
1483                         "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
1484                         "\x61\x74\x61\x2e\x20\x54\x68\x65"
1485                         "\x20\x6b\x65\x79\x20\x6e\x65\x65"
1486                         "\x64\x73\x20\x74\x6f\x20\x62\x65"
1487                         "\x20\x68\x61\x73\x68\x65\x64\x20"
1488                         "\x62\x65\x66\x6f\x72\x65\x20\x62"
1489                         "\x65\x69\x6e\x67\x20\x75\x73\x65"
1490                         "\x64\x20\x62\x79\x20\x74\x68\x65"
1491                         "\x20\x48\x4d\x41\x43\x20\x61\x6c"
1492                         "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
1493                 .psize  = 152,
1494                 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
1495                         "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
1496                         "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
1497                         "\xf6\xf5\x65\xd1",
1498         },
1499 };
1500
1501 /*
1502  * HMAC-SHA256 test vectors from
1503  * draft-ietf-ipsec-ciph-sha-256-01.txt
1504  */
1505 #define HMAC_SHA256_TEST_VECTORS        10
1506
1507 static struct hash_testvec hmac_sha256_tv_template[] = {
1508         {
1509                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
1510                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1511                           "\x11\x12\x13\x14\x15\x16\x17\x18"
1512                           "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1513                 .ksize  = 32,
1514                 .plaintext = "abc",
1515                 .psize  = 3,
1516                 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
1517                           "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
1518                           "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
1519                           "\x92\x75\x90\x21\xcf\xab\x81\x81",
1520         }, {
1521                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
1522                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1523                           "\x11\x12\x13\x14\x15\x16\x17\x18"
1524                           "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1525                 .ksize  = 32,
1526                 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1527                 .psize  = 56,
1528                 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
1529                           "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
1530                           "\xe6\x98\xe3\x61\x19\x42\x11\x49"
1531                           "\xea\x8c\x71\x24\x56\x69\x7d\x30",
1532         }, {
1533                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
1534                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1535                           "\x11\x12\x13\x14\x15\x16\x17\x18"
1536                           "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
1537                 .ksize  = 32,
1538                 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
1539                            "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1540                 .psize  = 112,
1541                 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
1542                           "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
1543                           "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
1544                           "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
1545         }, {
1546                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1547                         "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1548                         "\x0b\x0b\x0b\x0b\x0b\x0b",
1549                 .ksize  = 32,
1550                 .plaintext = "Hi There",
1551                 .psize  = 8,
1552                 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
1553                           "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
1554                           "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
1555                           "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
1556         }, {
1557                 .key    = "Jefe",
1558                 .ksize  = 4,
1559                 .plaintext = "what do ya want for nothing?",
1560                 .psize  = 28,
1561                 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
1562                           "\x6a\x04\x24\x26\x08\x95\x75\xc7"
1563                           "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
1564                           "\x9d\xec\x58\xb9\x64\xec\x38\x43",
1565                 .np     = 2,
1566                 .tap    = { 14, 14 }
1567         }, {
1568                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1569                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1570                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
1571                 .ksize  = 32,
1572                 .plaintext = "\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\xdd"
1575                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
1576                 .psize  = 50,
1577                 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
1578                           "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
1579                           "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
1580                           "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
1581         }, {
1582                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
1583                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
1584                           "\x11\x12\x13\x14\x15\x16\x17\x18"
1585                           "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
1586                           "\x21\x22\x23\x24\x25",
1587                 .ksize  = 37,
1588                 .plaintext = "\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\xcd"
1591                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
1592                 .psize  = 50,
1593                 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
1594                           "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
1595                           "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
1596                           "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
1597         }, {
1598                 .key    = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1599                         "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
1600                         "\x0c\x0c\x0c\x0c\x0c\x0c",
1601                 .ksize  = 32,
1602                 .plaintext = "Test With Truncation",
1603                 .psize  = 20,
1604                 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
1605                           "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
1606                           "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
1607                           "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
1608         }, {
1609                 .key    = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1615                         "\xaa\xaa",
1616                 .ksize  = 80,
1617                 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
1618                 .psize  = 54,
1619                 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
1620                           "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
1621                           "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
1622                           "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
1623         }, {
1624                 .key    = "\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\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
1630                         "\xaa\xaa",
1631                 .ksize  = 80,
1632                 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
1633                            "One Block-Size Data",
1634                 .psize  = 73,
1635                 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
1636                           "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
1637                           "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
1638                           "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
1639         },
1640 };
1641
1642 #define XCBC_AES_TEST_VECTORS 6
1643
1644 static struct hash_testvec aes_xcbc128_tv_template[] = {
1645         {
1646                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
1647                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1648                 .plaintext = zeroed_string,
1649                 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
1650                           "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
1651                 .psize  = 0,
1652                 .ksize  = 16,
1653         }, {
1654                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
1655                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1656                 .plaintext = "\x00\x01\x02",
1657                 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
1658                           "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
1659                 .psize  = 3,
1660                 .ksize  = 16,
1661         } , {
1662                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
1663                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1664                 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1665                              "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1666                 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
1667                           "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
1668                 .psize  = 16,
1669                 .ksize  = 16,
1670         }, {
1671                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
1672                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1673                 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1674                              "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1675                              "\x10\x11\x12\x13",
1676                 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
1677                           "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
1678                 .tap    = { 10, 10 },
1679                 .psize  = 20,
1680                 .np     = 2,
1681                 .ksize  = 16,
1682         }, {
1683                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
1684                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1685                 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1686                              "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1687                              "\x10\x11\x12\x13\x14\x15\x16\x17"
1688                              "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
1689                 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
1690                           "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
1691                 .psize  = 32,
1692                 .ksize  = 16,
1693         }, {
1694                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
1695                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1696                 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
1697                              "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
1698                              "\x10\x11\x12\x13\x14\x15\x16\x17"
1699                              "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
1700                              "\x20\x21",
1701                 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
1702                           "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
1703                 .tap    = { 17, 17 },
1704                 .psize  = 34,
1705                 .np     = 2,
1706                 .ksize  = 16,
1707         }
1708 };
1709
1710 #define VMAC_AES_TEST_VECTORS   8
1711 static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
1712                                 '\x02', '\x03', '\x02', '\x02',
1713                                 '\x02', '\x04', '\x01', '\x07',
1714                                 '\x04', '\x01', '\x04', '\x03',};
1715 static char vmac_string2[128] = {'a', 'b', 'c',};
1716 static char vmac_string3[128] = {'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                                 'a', 'b', 'c', 'a', 'b', 'c',
1724                                 };
1725
1726 static struct hash_testvec aes_vmac128_tv_template[] = {
1727         {
1728                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
1729                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1730                 .plaintext = NULL,
1731                 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
1732                 .psize  = 0,
1733                 .ksize  = 16,
1734         }, {
1735                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
1736                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1737                 .plaintext = vmac_string1,
1738                 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
1739                 .psize  = 128,
1740                 .ksize  = 16,
1741         }, {
1742                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
1743                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1744                 .plaintext = vmac_string2,
1745                 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
1746                 .psize  = 128,
1747                 .ksize  = 16,
1748         }, {
1749                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
1750                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
1751                 .plaintext = vmac_string3,
1752                 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
1753                 .psize  = 128,
1754                 .ksize  = 16,
1755         }, {
1756                 .key    = "abcdefghijklmnop",
1757                 .plaintext = NULL,
1758                 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
1759                 .psize  = 0,
1760                 .ksize  = 16,
1761         }, {
1762                 .key    = "abcdefghijklmnop",
1763                 .plaintext = vmac_string1,
1764                 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
1765                 .psize  = 128,
1766                 .ksize  = 16,
1767         }, {
1768                 .key    = "abcdefghijklmnop",
1769                 .plaintext = vmac_string2,
1770                 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
1771                 .psize  = 128,
1772                 .ksize  = 16,
1773         }, {
1774                 .key    = "abcdefghijklmnop",
1775                 .plaintext = vmac_string3,
1776                 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
1777                 .psize  = 128,
1778                 .ksize  = 16,
1779         },
1780 };
1781
1782 /*
1783  * SHA384 HMAC test vectors from RFC4231
1784  */
1785
1786 #define HMAC_SHA384_TEST_VECTORS        4
1787
1788 static struct hash_testvec hmac_sha384_tv_template[] = {
1789         {
1790                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1791                           "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1792                           "\x0b\x0b\x0b\x0b",
1793                 .ksize  = 20,
1794                 .plaintext = "Hi There",
1795                 .psize  = 8,
1796                 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
1797                           "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
1798                           "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
1799                           "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
1800                           "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
1801                           "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
1802         }, {
1803                 .key    = "Jefe",
1804                 .ksize  = 4,
1805                 .plaintext = "what do ya want for nothing?",
1806                 .psize  = 28,
1807                 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
1808                           "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
1809                           "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
1810                           "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
1811                           "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
1812                           "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
1813                 .np     = 4,
1814                 .tap    = { 7, 7, 7, 7 }
1815         }, {
1816                 .key    = "\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\xaa\xaa\xaa\xaa\xaa"
1832                           "\xaa\xaa\xaa",
1833                 .ksize  = 131,
1834                 .plaintext = "Test Using Larger Than Block-Siz"
1835                            "e Key - Hash Key First",
1836                 .psize  = 54,
1837                 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
1838                           "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
1839                           "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
1840                           "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
1841                           "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
1842                           "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
1843         }, {
1844                 .key    = "\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\xaa\xaa\xaa\xaa\xaa"
1860                           "\xaa\xaa\xaa",
1861                 .ksize  = 131,
1862                 .plaintext = "This is a test u"
1863                            "sing a larger th"
1864                            "an block-size ke"
1865                            "y and a larger t"
1866                            "han block-size d"
1867                            "ata. The key nee"
1868                            "ds to be hashed "
1869                            "before being use"
1870                            "d by the HMAC al"
1871                            "gorithm.",
1872                 .psize  = 152,
1873                 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
1874                           "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
1875                           "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
1876                           "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
1877                           "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
1878                           "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
1879         },
1880 };
1881
1882 /*
1883  * SHA512 HMAC test vectors from RFC4231
1884  */
1885
1886 #define HMAC_SHA512_TEST_VECTORS        4
1887
1888 static struct hash_testvec hmac_sha512_tv_template[] = {
1889         {
1890                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1891                           "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
1892                           "\x0b\x0b\x0b\x0b",
1893                 .ksize  = 20,
1894                 .plaintext = "Hi There",
1895                 .psize  = 8,
1896                 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
1897                           "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
1898                           "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
1899                           "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
1900                           "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
1901                           "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
1902                           "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
1903                           "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
1904         }, {
1905                 .key    = "Jefe",
1906                 .ksize  = 4,
1907                 .plaintext = "what do ya want for nothing?",
1908                 .psize  = 28,
1909                 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
1910                           "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
1911                           "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
1912                           "\x10\x27\x0c\xd7\xea\x25\x05\x54"
1913                           "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
1914                           "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
1915                           "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
1916                           "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
1917                 .np     = 4,
1918                 .tap    = { 7, 7, 7, 7 }
1919         }, {
1920                 .key    = "\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\xaa\xaa\xaa\xaa\xaa"
1936                           "\xaa\xaa\xaa",
1937                 .ksize  = 131,
1938                 .plaintext = "Test Using Large"
1939                            "r Than Block-Siz"
1940                            "e Key - Hash Key"
1941                            " First",
1942                 .psize  = 54,
1943                 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
1944                         "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
1945                         "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
1946                         "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
1947                         "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
1948                         "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
1949                         "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
1950                         "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
1951         }, {
1952                 .key    = "\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\xaa\xaa\xaa\xaa\xaa"
1968                         "\xaa\xaa\xaa",
1969                 .ksize  = 131,
1970                 .plaintext =
1971                           "This is a test u"
1972                           "sing a larger th"
1973                           "an block-size ke"
1974                           "y and a larger t"
1975                           "han block-size d"
1976                           "ata. The key nee"
1977                           "ds to be hashed "
1978                           "before being use"
1979                           "d by the HMAC al"
1980                           "gorithm.",
1981                 .psize  = 152,
1982                 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
1983                         "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
1984                         "\xde\xbd\x71\xf8\x86\x72\x89\x86"
1985                         "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
1986                         "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
1987                         "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
1988                         "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
1989                         "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
1990         },
1991 };
1992
1993 /*
1994  * DES test vectors.
1995  */
1996 #define DES_ENC_TEST_VECTORS            10
1997 #define DES_DEC_TEST_VECTORS            4
1998 #define DES_CBC_ENC_TEST_VECTORS        5
1999 #define DES_CBC_DEC_TEST_VECTORS        4
2000 #define DES3_EDE_ENC_TEST_VECTORS       3
2001 #define DES3_EDE_DEC_TEST_VECTORS       3
2002 #define DES3_EDE_CBC_ENC_TEST_VECTORS   1
2003 #define DES3_EDE_CBC_DEC_TEST_VECTORS   1
2004
2005 static struct cipher_testvec des_enc_tv_template[] = {
2006         { /* From Applied Cryptography */
2007                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2008                 .klen   = 8,
2009                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2010                 .ilen   = 8,
2011                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2012                 .rlen   = 8,
2013         }, { /* Same key, different plaintext block */
2014                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2015                 .klen   = 8,
2016                 .input  = "\x22\x33\x44\x55\x66\x77\x88\x99",
2017                 .ilen   = 8,
2018                 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2019                 .rlen   = 8,
2020         }, { /* Sbox test from NBS */
2021                 .key    = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2022                 .klen   = 8,
2023                 .input  = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2024                 .ilen   = 8,
2025                 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2026                 .rlen   = 8,
2027         }, { /* Three blocks */
2028                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2029                 .klen   = 8,
2030                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2031                           "\x22\x33\x44\x55\x66\x77\x88\x99"
2032                           "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2033                 .ilen   = 24,
2034                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2035                           "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2036                           "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2037                 .rlen   = 24,
2038         }, { /* Weak key */
2039                 .fail   = 1,
2040                 .wk     = 1,
2041                 .key    = "\x01\x01\x01\x01\x01\x01\x01\x01",
2042                 .klen   = 8,
2043                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2044                 .ilen   = 8,
2045                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2046                 .rlen   = 8,
2047         }, { /* Two blocks -- for testing encryption across pages */
2048                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2049                 .klen   = 8,
2050                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2051                           "\x22\x33\x44\x55\x66\x77\x88\x99",
2052                 .ilen   = 16,
2053                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2054                           "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2055                 .rlen   = 16,
2056                 .np     = 2,
2057                 .tap    = { 8, 8 }
2058         }, { /* Four blocks -- for testing encryption with chunking */
2059                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2060                 .klen   = 8,
2061                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2062                           "\x22\x33\x44\x55\x66\x77\x88\x99"
2063                           "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
2064                           "\x22\x33\x44\x55\x66\x77\x88\x99",
2065                 .ilen   = 32,
2066                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2067                           "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2068                           "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
2069                           "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2070                 .rlen   = 32,
2071                 .np     = 3,
2072                 .tap    = { 14, 10, 8 }
2073         }, {
2074                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2075                 .klen   = 8,
2076                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2077                           "\x22\x33\x44\x55\x66\x77\x88\x99"
2078                           "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
2079                 .ilen   = 24,
2080                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2081                           "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
2082                           "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
2083                 .rlen   = 24,
2084                 .np     = 4,
2085                 .tap    = { 2, 1, 3, 18 }
2086         }, {
2087                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2088                 .klen   = 8,
2089                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2090                           "\x22\x33\x44\x55\x66\x77\x88\x99",
2091                 .ilen   = 16,
2092                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2093                           "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
2094                 .rlen   = 16,
2095                 .np     = 5,
2096                 .tap    = { 2, 2, 2, 2, 8 }
2097         }, {
2098                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2099                 .klen   = 8,
2100                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2101                 .ilen   = 8,
2102                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2103                 .rlen   = 8,
2104                 .np     = 8,
2105                 .tap    = { 1, 1, 1, 1, 1, 1, 1, 1 }
2106         },
2107 };
2108
2109 static struct cipher_testvec des_dec_tv_template[] = {
2110         { /* From Applied Cryptography */
2111                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2112                 .klen   = 8,
2113                 .input  = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
2114                 .ilen   = 8,
2115                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
2116                 .rlen   = 8,
2117         }, { /* Sbox test from NBS */
2118                 .key    = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
2119                 .klen   = 8,
2120                 .input  = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2121                 .ilen   = 8,
2122                 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
2123                 .rlen   = 8,
2124         }, { /* Two blocks, for chunking test */
2125                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2126                 .klen   = 8,
2127                 .input  = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2128                           "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2129                 .ilen   = 16,
2130                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2131                           "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2132                 .rlen   = 16,
2133                 .np     = 2,
2134                 .tap    = { 8, 8 }
2135         }, {
2136                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2137                 .klen   = 8,
2138                 .input  = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
2139                           "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
2140                 .ilen   = 16,
2141                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
2142                           "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
2143                 .rlen   = 16,
2144                 .np     = 3,
2145                 .tap    = { 3, 12, 1 }
2146         },
2147 };
2148
2149 static struct cipher_testvec des_cbc_enc_tv_template[] = {
2150         { /* From OpenSSL */
2151                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2152                 .klen   = 8,
2153                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2154                 .input  = "\x37\x36\x35\x34\x33\x32\x31\x20"
2155                           "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2156                           "\x68\x65\x20\x74\x69\x6d\x65\x20",
2157                 .ilen   = 24,
2158                 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2159                           "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2160                           "\x46\x8e\x91\x15\x78\x88\xba\x68",
2161                 .rlen   = 24,
2162         }, { /* FIPS Pub 81 */
2163                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2164                 .klen   = 8,
2165                 .iv     = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2166                 .input  = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2167                 .ilen   = 8,
2168                 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2169                 .rlen   = 8,
2170         }, {
2171                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2172                 .klen   = 8,
2173                 .iv     = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2174                 .input  = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2175                 .ilen   = 8,
2176                 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2177                 .rlen   = 8,
2178         }, {
2179                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2180                 .klen   = 8,
2181                 .iv     = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2182                 .input  = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2183                 .ilen   = 8,
2184                 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2185                 .rlen   = 8,
2186         }, { /* Copy of openssl vector for chunk testing */
2187              /* From OpenSSL */
2188                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2189                 .klen   = 8,
2190                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2191                 .input  = "\x37\x36\x35\x34\x33\x32\x31\x20"
2192                           "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2193                           "\x68\x65\x20\x74\x69\x6d\x65\x20",
2194                 .ilen   = 24,
2195                 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
2196                           "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
2197                           "\x46\x8e\x91\x15\x78\x88\xba\x68",
2198                 .rlen   = 24,
2199                 .np     = 2,
2200                 .tap    = { 13, 11 }
2201         },
2202 };
2203
2204 static struct cipher_testvec des_cbc_dec_tv_template[] = {
2205         { /* FIPS Pub 81 */
2206                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2207                 .klen   = 8,
2208                 .iv     = "\x12\x34\x56\x78\x90\xab\xcd\xef",
2209                 .input  = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2210                 .ilen   = 8,
2211                 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
2212                 .rlen   = 8,
2213         }, {
2214                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2215                 .klen   = 8,
2216                 .iv     = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
2217                 .input  = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2218                 .ilen   = 8,
2219                 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
2220                 .rlen   = 8,
2221         }, {
2222                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2223                 .klen   = 8,
2224                 .iv     = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2225                 .input  = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2226                 .ilen   = 8,
2227                 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2228                 .rlen   = 8,
2229         }, { /* Copy of above, for chunk testing */
2230                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2231                 .klen   = 8,
2232                 .iv     = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
2233                 .input  = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
2234                 .ilen   = 8,
2235                 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
2236                 .rlen   = 8,
2237                 .np     = 2,
2238                 .tap    = { 4, 4 }
2239         },
2240 };
2241
2242 static struct cipher_testvec des3_ede_enc_tv_template[] = {
2243         { /* These are from openssl */
2244                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2245                           "\x55\x55\x55\x55\x55\x55\x55\x55"
2246                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2247                 .klen   = 24,
2248                 .input  = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
2249                 .ilen   = 8,
2250                 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
2251                 .rlen   = 8,
2252         }, {
2253                 .key    = "\x03\x52\x02\x07\x67\x20\x82\x17"
2254                           "\x86\x02\x87\x66\x59\x08\x21\x98"
2255                           "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
2256                 .klen   = 24,
2257                 .input  = "\x73\x71\x75\x69\x67\x67\x6c\x65",
2258                 .ilen   = 8,
2259                 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
2260                 .rlen   = 8,
2261         }, {
2262                 .key    = "\x10\x46\x10\x34\x89\x98\x80\x20"
2263                           "\x91\x07\xd0\x15\x89\x19\x01\x01"
2264                           "\x19\x07\x92\x10\x98\x1a\x01\x01",
2265                 .klen   = 24,
2266                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
2267                 .ilen   = 8,
2268                 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
2269                 .rlen   = 8,
2270         },
2271 };
2272
2273 static struct cipher_testvec des3_ede_dec_tv_template[] = {
2274         { /* These are from openssl */
2275                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2276                           "\x55\x55\x55\x55\x55\x55\x55\x55"
2277                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2278                 .klen   = 24,
2279                 .input  = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
2280                 .ilen   = 8,
2281                 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
2282                 .rlen   = 8,
2283         }, {
2284                 .key    = "\x03\x52\x02\x07\x67\x20\x82\x17"
2285                           "\x86\x02\x87\x66\x59\x08\x21\x98"
2286                           "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
2287                 .klen   = 24,
2288                 .input  = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
2289                 .ilen   = 8,
2290                 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
2291                 .rlen   = 8,
2292         }, {
2293                 .key    = "\x10\x46\x10\x34\x89\x98\x80\x20"
2294                           "\x91\x07\xd0\x15\x89\x19\x01\x01"
2295                           "\x19\x07\x92\x10\x98\x1a\x01\x01",
2296                 .klen   = 24,
2297                 .input  = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
2298                 .ilen   = 8,
2299                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
2300                 .rlen   = 8,
2301         },
2302 };
2303
2304 static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
2305         { /* Generated from openssl */
2306                 .key    = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
2307                           "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
2308                           "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
2309                 .klen   = 24,
2310                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
2311                 .input  = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
2312                           "\x53\x20\x63\x65\x65\x72\x73\x74"
2313                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
2314                           "\x20\x79\x65\x53\x72\x63\x74\x65"
2315                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
2316                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
2317                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
2318                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
2319                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
2320                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
2321                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
2322                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
2323                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
2324                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
2325                           "\x63\x65\x65\x72\x73\x74\x54\x20"
2326                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
2327                 .ilen   = 128,
2328                 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
2329                           "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
2330                           "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
2331                           "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
2332                           "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
2333                           "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
2334                           "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
2335                           "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
2336                           "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
2337                           "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
2338                           "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
2339                           "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
2340                           "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
2341                           "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
2342                           "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
2343                           "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
2344                 .rlen   = 128,
2345         },
2346 };
2347
2348 static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
2349         { /* Generated from openssl */
2350                 .key    = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
2351                           "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
2352                           "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
2353                 .klen   = 24,
2354                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
2355                 .input  = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
2356                           "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
2357                           "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
2358                           "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
2359                           "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
2360                           "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
2361                           "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
2362                           "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
2363                           "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
2364                           "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
2365                           "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
2366                           "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
2367                           "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
2368                           "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
2369                           "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
2370                           "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
2371                 .ilen   = 128,
2372                 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
2373                           "\x53\x20\x63\x65\x65\x72\x73\x74"
2374                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
2375                           "\x20\x79\x65\x53\x72\x63\x74\x65"
2376                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
2377                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
2378                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
2379                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
2380                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
2381                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
2382                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
2383                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
2384                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
2385                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
2386                           "\x63\x65\x65\x72\x73\x74\x54\x20"
2387                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
2388                 .rlen   = 128,
2389         },
2390 };
2391
2392 /*
2393  * Blowfish test vectors.
2394  */
2395 #define BF_ENC_TEST_VECTORS     7
2396 #define BF_DEC_TEST_VECTORS     7
2397 #define BF_CBC_ENC_TEST_VECTORS 2
2398 #define BF_CBC_DEC_TEST_VECTORS 2
2399 #define BF_CTR_ENC_TEST_VECTORS 2
2400 #define BF_CTR_DEC_TEST_VECTORS 2
2401
2402 static struct cipher_testvec bf_enc_tv_template[] = {
2403         { /* DES test vectors from OpenSSL */
2404                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
2405                 .klen   = 8,
2406                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
2407                 .ilen   = 8,
2408                 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
2409                 .rlen   = 8,
2410         }, {
2411                 .key    = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
2412                 .klen   = 8,
2413                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2414                 .ilen   = 8,
2415                 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
2416                 .rlen   = 8,
2417         }, {
2418                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2419                 .klen   = 8,
2420                 .input  = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2421                 .ilen   = 8,
2422                 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
2423                 .rlen   = 8,
2424         }, { /* Vary the keylength... */
2425                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2426                           "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
2427                 .klen   = 16,
2428                 .input  = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2429                 .ilen   = 8,
2430                 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
2431                 .rlen   = 8,
2432         }, {
2433                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2434                           "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2435                           "\x00\x11\x22\x33\x44",
2436                 .klen   = 21,
2437                 .input  = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2438                 .ilen   = 8,
2439                 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
2440                 .rlen   = 8,
2441         }, { /* Generated with bf488 */
2442                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2443                           "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2444                           "\x00\x11\x22\x33\x44\x55\x66\x77"
2445                           "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2446                           "\x58\x40\x23\x64\x1a\xba\x61\x76"
2447                           "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2448                           "\xff\xff\xff\xff\xff\xff\xff\xff",
2449                 .klen   = 56,
2450                 .input  = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2451                 .ilen   = 8,
2452                 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
2453                 .rlen   = 8,
2454         }, { /* Generated with Crypto++ */
2455                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2456                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2457                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2458                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2459                 .klen   = 32,
2460                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2461                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2462                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2463                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2464                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2465                 .ilen   = 40,
2466                 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
2467                           "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
2468                           "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
2469                           "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
2470                           "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
2471                 .rlen   = 40,
2472                 .also_non_np = 1,
2473                 .np     = 2,
2474                 .tap    = { 40 - 8, 8 },
2475         },
2476 };
2477
2478 static struct cipher_testvec bf_dec_tv_template[] = {
2479         { /* DES test vectors from OpenSSL */
2480                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
2481                 .klen   = 8,
2482                 .input  = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
2483                 .ilen   = 8,
2484                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
2485                 .rlen   = 8,
2486         }, {
2487                 .key    = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
2488                 .klen   = 8,
2489                 .input  = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
2490                 .ilen   = 8,
2491                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
2492                 .rlen   = 8,
2493         }, {
2494                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2495                 .klen   = 8,
2496                 .input  = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
2497                 .ilen   = 8,
2498                 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2499                 .rlen   = 8,
2500         }, { /* Vary the keylength... */
2501                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2502                           "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
2503                 .klen   = 16,
2504                 .input  = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
2505                 .ilen   = 8,
2506                 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2507                 .rlen   = 8,
2508         }, {
2509                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2510                           "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2511                           "\x00\x11\x22\x33\x44",
2512                 .klen   = 21,
2513                 .input  = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
2514                 .ilen   = 8,
2515                 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2516                 .rlen   = 8,
2517         }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
2518                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
2519                           "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
2520                           "\x00\x11\x22\x33\x44\x55\x66\x77"
2521                           "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
2522                           "\x58\x40\x23\x64\x1a\xba\x61\x76"
2523                           "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
2524                           "\xff\xff\xff\xff\xff\xff\xff\xff",
2525                 .klen   = 56,
2526                 .input  = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
2527                 .ilen   = 8,
2528                 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2529                 .rlen   = 8,
2530         }, { /* Generated with Crypto++ */
2531                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2532                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2533                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2534                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2535                 .klen   = 32,
2536                 .input  = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
2537                           "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
2538                           "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
2539                           "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
2540                           "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B",
2541                 .ilen   = 40,
2542                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2543                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2544                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2545                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2546                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2547                 .rlen   = 40,
2548                 .also_non_np = 1,
2549                 .np     = 2,
2550                 .tap    = { 40 - 8, 8 },
2551         },
2552 };
2553
2554 static struct cipher_testvec bf_cbc_enc_tv_template[] = {
2555         { /* From OpenSSL */
2556                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2557                           "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2558                 .klen   = 16,
2559                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2560                 .input  = "\x37\x36\x35\x34\x33\x32\x31\x20"
2561                           "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2562                           "\x68\x65\x20\x74\x69\x6d\x65\x20"
2563                           "\x66\x6f\x72\x20\x00\x00\x00\x00",
2564                 .ilen   = 32,
2565                 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2566                           "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2567                           "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2568                           "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
2569                 .rlen   = 32,
2570         }, { /* Generated with Crypto++ */
2571                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2572                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2573                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2574                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2575                 .klen   = 32,
2576                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2577                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2578                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2579                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2580                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2581                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2582                 .ilen   = 40,
2583                 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
2584                           "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
2585                           "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
2586                           "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
2587                           "\x01\x9C\x93\x63\x51\x60\x82\xD2",
2588                 .rlen   = 40,
2589                 .also_non_np = 1,
2590                 .np     = 2,
2591                 .tap    = { 40 - 8, 8 },
2592         },
2593 };
2594
2595 static struct cipher_testvec bf_cbc_dec_tv_template[] = {
2596         { /* From OpenSSL */
2597                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
2598                           "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
2599                 .klen   = 16,
2600                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
2601                 .input  = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
2602                           "\x05\xb1\x56\xe2\x74\x03\x97\x93"
2603                           "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
2604                           "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
2605                 .ilen   = 32,
2606                 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
2607                           "\x4e\x6f\x77\x20\x69\x73\x20\x74"
2608                           "\x68\x65\x20\x74\x69\x6d\x65\x20"
2609                           "\x66\x6f\x72\x20\x00\x00\x00\x00",
2610                 .rlen   = 32,
2611         }, { /* Generated with Crypto++ */
2612                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2613                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2614                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2615                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2616                 .klen   = 32,
2617                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2618                 .input  = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
2619                           "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
2620                           "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
2621                           "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
2622                           "\x01\x9C\x93\x63\x51\x60\x82\xD2",
2623                 .ilen   = 40,
2624                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2625                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2626                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2627                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2628                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2629                 .rlen   = 40,
2630                 .also_non_np = 1,
2631                 .np     = 2,
2632                 .tap    = { 40 - 8, 8 },
2633         },
2634 };
2635
2636 static struct cipher_testvec bf_ctr_enc_tv_template[] = {
2637         { /* Generated with Crypto++ */
2638                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2639                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2640                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2641                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2642                 .klen   = 32,
2643                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2644                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2645                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2646                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2647                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2648                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2649                 .ilen   = 40,
2650                 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2651                           "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2652                           "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2653                           "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2654                           "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
2655                 .rlen   = 40,
2656         }, { /* Generated with Crypto++ */
2657                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2658                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2659                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2660                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2661                 .klen   = 32,
2662                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2663                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2664                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2665                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2666                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2667                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2668                           "\x6D\x04\x9B",
2669                 .ilen   = 43,
2670                 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2671                           "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2672                           "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2673                           "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2674                           "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
2675                           "\x3D\xA7\xE9",
2676                 .rlen   = 43,
2677                 .also_non_np = 1,
2678                 .np     = 2,
2679                 .tap    = { 43 - 8, 8 },
2680         }, { /* Generated with Crypto++ */
2681                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2682                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2683                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2684                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2685                 .klen   = 32,
2686                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
2687                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2688                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2689                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2690                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2691                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2692                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2693                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2694                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
2695                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
2696                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
2697                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
2698                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
2699                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
2700                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
2701                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
2702                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
2703                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
2704                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
2705                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
2706                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
2707                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
2708                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
2709                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
2710                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
2711                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
2712                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
2713                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
2714                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
2715                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
2716                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
2717                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
2718                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
2719                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
2720                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
2721                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
2722                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
2723                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
2724                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
2725                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
2726                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
2727                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
2728                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
2729                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
2730                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
2731                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
2732                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
2733                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
2734                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
2735                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
2736                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
2737                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
2738                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
2739                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
2740                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
2741                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
2742                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
2743                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
2744                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
2745                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
2746                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
2747                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
2748                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
2749                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
2750                 .ilen   = 504,
2751                 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
2752                           "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
2753                           "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
2754                           "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
2755                           "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
2756                           "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
2757                           "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
2758                           "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
2759                           "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
2760                           "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
2761                           "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
2762                           "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
2763                           "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
2764                           "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
2765                           "\x0B\x82\x59\x14\x26\x67\x08\x09"
2766                           "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
2767                           "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
2768                           "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
2769                           "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
2770                           "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
2771                           "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
2772                           "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
2773                           "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
2774                           "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
2775                           "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
2776                           "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
2777                           "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
2778                           "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
2779                           "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
2780                           "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
2781                           "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
2782                           "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
2783                           "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
2784                           "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
2785                           "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
2786                           "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
2787                           "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
2788                           "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
2789                           "\xB4\x19\xD8\x19\x45\x66\x27\x02"
2790                           "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
2791                           "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
2792                           "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
2793                           "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
2794                           "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
2795                           "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
2796                           "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
2797                           "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
2798                           "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
2799                           "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
2800                           "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
2801                           "\x91\x51\x4E\x71\xF2\x98\x85\x16"
2802                           "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
2803                           "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
2804                           "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
2805                           "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
2806                           "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
2807                           "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
2808                           "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
2809                           "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
2810                           "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
2811                           "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
2812                           "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
2813                           "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
2814                 .rlen   = 504,
2815         },
2816 };
2817
2818 static struct cipher_testvec bf_ctr_dec_tv_template[] = {
2819         { /* Generated with Crypto++ */
2820                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2821                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2822                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2823                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2824                 .klen   = 32,
2825                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2826                 .input  = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2827                           "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2828                           "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2829                           "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2830                           "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC",
2831                 .ilen   = 40,
2832                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2833                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2834                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2835                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2836                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9",
2837                 .rlen   = 40,
2838         }, { /* Generated with Crypto++ */
2839                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2840                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2841                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2842                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2843                 .klen   = 32,
2844                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
2845                 .input  = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
2846                           "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
2847                           "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
2848                           "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
2849                           "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
2850                           "\x3D\xA7\xE9",
2851                 .ilen   = 43,
2852                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2853                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2854                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2855                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2856                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2857                           "\x6D\x04\x9B",
2858                 .rlen   = 43,
2859                 .also_non_np = 1,
2860                 .np     = 2,
2861                 .tap    = { 43 - 8, 8 },
2862         }, { /* Generated with Crypto++ */
2863                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
2864                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
2865                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
2866                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
2867                 .klen   = 32,
2868                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
2869                 .input  = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
2870                           "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
2871                           "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
2872                           "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
2873                           "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
2874                           "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
2875                           "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
2876                           "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
2877                           "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
2878                           "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
2879                           "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
2880                           "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
2881                           "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
2882                           "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
2883                           "\x0B\x82\x59\x14\x26\x67\x08\x09"
2884                           "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
2885                           "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
2886                           "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
2887                           "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
2888                           "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
2889                           "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
2890                           "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
2891                           "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
2892                           "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
2893                           "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
2894                           "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
2895                           "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
2896                           "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
2897                           "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
2898                           "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
2899                           "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
2900                           "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
2901                           "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
2902                           "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
2903                           "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
2904                           "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
2905                           "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
2906                           "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
2907                           "\xB4\x19\xD8\x19\x45\x66\x27\x02"
2908                           "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
2909                           "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
2910                           "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
2911                           "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
2912                           "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
2913                           "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
2914                           "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
2915                           "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
2916                           "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
2917                           "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
2918                           "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
2919                           "\x91\x51\x4E\x71\xF2\x98\x85\x16"
2920                           "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
2921                           "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
2922                           "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
2923                           "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
2924                           "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
2925                           "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
2926                           "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
2927                           "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
2928                           "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
2929                           "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
2930                           "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
2931                           "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
2932                 .ilen   = 504,
2933                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
2934                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
2935                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
2936                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
2937                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
2938                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
2939                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
2940                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
2941                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
2942                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
2943                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
2944                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
2945                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
2946                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
2947                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
2948                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
2949                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
2950                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
2951                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
2952                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
2953                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
2954                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
2955                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
2956                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
2957                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
2958                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
2959                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
2960                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
2961                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
2962                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
2963                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
2964                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
2965                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
2966                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
2967                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
2968                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
2969                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
2970                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
2971                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
2972                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
2973                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
2974                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
2975                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
2976                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
2977                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
2978                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
2979                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
2980                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
2981                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
2982                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
2983                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
2984                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
2985                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
2986                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
2987                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
2988                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
2989                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
2990                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
2991                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
2992                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
2993                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
2994                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
2995                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
2996                 .rlen   = 504,
2997         },
2998 };
2999
3000 /*
3001  * Twofish test vectors.
3002  */
3003 #define TF_ENC_TEST_VECTORS             4
3004 #define TF_DEC_TEST_VECTORS             4
3005 #define TF_CBC_ENC_TEST_VECTORS         5
3006 #define TF_CBC_DEC_TEST_VECTORS         5
3007 #define TF_CTR_ENC_TEST_VECTORS         2
3008 #define TF_CTR_DEC_TEST_VECTORS         2
3009 #define TF_LRW_ENC_TEST_VECTORS         8
3010 #define TF_LRW_DEC_TEST_VECTORS         8
3011 #define TF_XTS_ENC_TEST_VECTORS         5
3012 #define TF_XTS_DEC_TEST_VECTORS         5
3013
3014 static struct cipher_testvec tf_enc_tv_template[] = {
3015         {
3016                 .key    = zeroed_string,
3017                 .klen   = 16,
3018                 .input  = zeroed_string,
3019                 .ilen   = 16,
3020                 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3021                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3022                 .rlen   = 16,
3023         }, {
3024                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3025                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
3026                           "\x00\x11\x22\x33\x44\x55\x66\x77",
3027                 .klen   = 24,
3028                 .input  = zeroed_string,
3029                 .ilen   = 16,
3030                 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
3031                           "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
3032                 .rlen   = 16,
3033         }, {
3034                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3035                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
3036                           "\x00\x11\x22\x33\x44\x55\x66\x77"
3037                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
3038                 .klen   = 32,
3039                 .input  = zeroed_string,
3040                 .ilen   = 16,
3041                 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
3042                           "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
3043                 .rlen   = 16,
3044         }, { /* Generated with Crypto++ */
3045                 .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
3046                           "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
3047                           "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
3048                           "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
3049                 .klen   = 32,
3050                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3051                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3052                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3053                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3054                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3055                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3056                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3057                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3058                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3059                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3060                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3061                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3062                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3063                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3064                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3065                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3066                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3067                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3068                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3069                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3070                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3071                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3072                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3073                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3074                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3075                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3076                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3077                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3078                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3079                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3080                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3081                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3082                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3083                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3084                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3085                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3086                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3087                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3088                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3089                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3090                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3091                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3092                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3093                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3094                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3095                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3096                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3097                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3098                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3099                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3100                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3101                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3102                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3103                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3104                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3105                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3106                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3107                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3108                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3109                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3110                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3111                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3112                 .ilen   = 496,
3113                 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
3114                           "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
3115                           "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
3116                           "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
3117                           "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
3118                           "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
3119                           "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
3120                           "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
3121                           "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
3122                           "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
3123                           "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
3124                           "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
3125                           "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
3126                           "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
3127                           "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
3128                           "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
3129                           "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
3130                           "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
3131                           "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
3132                           "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
3133                           "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
3134                           "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
3135                           "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
3136                           "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
3137                           "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
3138                           "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
3139                           "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
3140                           "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
3141                           "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
3142                           "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
3143                           "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
3144                           "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
3145                           "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
3146                           "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
3147                           "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
3148                           "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
3149                           "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
3150                           "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
3151                           "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
3152                           "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
3153                           "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
3154                           "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
3155                           "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
3156                           "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
3157                           "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
3158                           "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
3159                           "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
3160                           "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
3161                           "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
3162                           "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
3163                           "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
3164                           "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
3165                           "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
3166                           "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
3167                           "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
3168                           "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
3169                           "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
3170                           "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
3171                           "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
3172                           "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
3173                           "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
3174                           "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
3175                 .rlen   = 496,
3176                 .also_non_np = 1,
3177                 .np     = 2,
3178                 .tap    = { 496 - 16, 16 },
3179         },
3180 };
3181
3182 static struct cipher_testvec tf_dec_tv_template[] = {
3183         {
3184                 .key    = zeroed_string,
3185                 .klen   = 16,
3186                 .input  = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3187                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3188                 .ilen   = 16,
3189                 .result = zeroed_string,
3190                 .rlen   = 16,
3191         }, {
3192                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3193                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
3194                           "\x00\x11\x22\x33\x44\x55\x66\x77",
3195                 .klen   = 24,
3196                 .input  = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
3197                           "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
3198                 .ilen   = 16,
3199                 .result = zeroed_string,
3200                 .rlen   = 16,
3201         }, {
3202                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
3203                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
3204                           "\x00\x11\x22\x33\x44\x55\x66\x77"
3205                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
3206                 .klen   = 32,
3207                 .input  = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
3208                           "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
3209                 .ilen   = 16,
3210                 .result = zeroed_string,
3211                 .rlen   = 16,
3212         }, { /* Generated with Crypto++ */
3213                 .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
3214                           "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
3215                           "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
3216                           "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
3217                 .klen   = 32,
3218                 .input  = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
3219                           "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
3220                           "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
3221                           "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
3222                           "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
3223                           "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
3224                           "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
3225                           "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
3226                           "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
3227                           "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
3228                           "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
3229                           "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
3230                           "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
3231                           "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
3232                           "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
3233                           "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
3234                           "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
3235                           "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
3236                           "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
3237                           "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
3238                           "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
3239                           "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
3240                           "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
3241                           "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
3242                           "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
3243                           "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
3244                           "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
3245                           "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
3246                           "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
3247                           "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
3248                           "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
3249                           "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
3250                           "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
3251                           "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
3252                           "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
3253                           "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
3254                           "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
3255                           "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
3256                           "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
3257                           "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
3258                           "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
3259                           "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
3260                           "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
3261                           "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
3262                           "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
3263                           "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
3264                           "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
3265                           "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
3266                           "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
3267                           "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
3268                           "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
3269                           "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
3270                           "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
3271                           "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
3272                           "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
3273                           "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
3274                           "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
3275                           "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
3276                           "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
3277                           "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
3278                           "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
3279                           "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
3280                 .ilen   = 496,
3281                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3282                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3283                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3284                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3285                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3286                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3287                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3288                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3289                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3290                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3291                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3292                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3293                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3294                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3295                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3296                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3297                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3298                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3299                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3300                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3301                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3302                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3303                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3304                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3305                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3306                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3307                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3308                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3309                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3310                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3311                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3312                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3313                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3314                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3315                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3316                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3317                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3318                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3319                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3320                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3321                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3322                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3323                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3324                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3325                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3326                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3327                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3328                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3329                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3330                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3331                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3332                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3333                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3334                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3335                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3336                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3337                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3338                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3339                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3340                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3341                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3342                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3343                 .rlen   = 496,
3344                 .also_non_np = 1,
3345                 .np     = 2,
3346                 .tap    = { 496 - 16, 16 },
3347         },
3348 };
3349
3350 static struct cipher_testvec tf_cbc_enc_tv_template[] = {
3351         { /* Generated with Nettle */
3352                 .key    = zeroed_string,
3353                 .klen   = 16,
3354                 .iv     = zeroed_string,
3355                 .input  = zeroed_string,
3356                 .ilen   = 16,
3357                 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3358                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3359                 .rlen   = 16,
3360         }, {
3361                 .key    = zeroed_string,
3362                 .klen   = 16,
3363                 .iv     = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3364                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3365                 .input  = zeroed_string,
3366                 .ilen   = 16,
3367                 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3368                           "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
3369                 .rlen   = 16,
3370         }, {
3371                 .key    = zeroed_string,
3372                 .klen   = 16,
3373                 .iv     = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3374                           "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
3375                 .input  = zeroed_string,
3376                 .ilen   = 16,
3377                 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
3378                           "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
3379                 .rlen   = 16,
3380         }, {
3381                 .key    = zeroed_string,
3382                 .klen   = 16,
3383                 .iv     = zeroed_string,
3384                 .input  = zeroed_string,
3385                 .ilen   = 48,
3386                 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3387                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
3388                           "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3389                           "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
3390                           "\x05\xef\x8c\x61\xa8\x11\x58\x26"
3391                           "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
3392                 .rlen   = 48,
3393         }, { /* Generated with Crypto++ */
3394                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3395                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3396                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3397                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3398                 .klen   = 32,
3399                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3400                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3401                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3402                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3403                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3404                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3405                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3406                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3407                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3408                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3409                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3410                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3411                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3412                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3413                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3414                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3415                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3416                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3417                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3418                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3419                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3420                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3421                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3422                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3423                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3424                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3425                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3426                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3427                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3428                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3429                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3430                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3431                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3432                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3433                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3434                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3435                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3436                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3437                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3438                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3439                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3440                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3441                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3442                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3443                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3444                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3445                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3446                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3447                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3448                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3449                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3450                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3451                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3452                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3453                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3454                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3455                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3456                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3457                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3458                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3459                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3460                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3461                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3462                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3463                 .ilen   = 496,
3464                 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
3465                           "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
3466                           "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
3467                           "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
3468                           "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
3469                           "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
3470                           "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
3471                           "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
3472                           "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
3473                           "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
3474                           "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
3475                           "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
3476                           "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
3477                           "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
3478                           "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
3479                           "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
3480                           "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
3481                           "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
3482                           "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
3483                           "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
3484                           "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
3485                           "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
3486                           "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
3487                           "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
3488                           "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
3489                           "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
3490                           "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
3491                           "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
3492                           "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
3493                           "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
3494                           "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
3495                           "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
3496                           "\x75\x42\x62\x04\x31\x1F\x95\x7C"
3497                           "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
3498                           "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
3499                           "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
3500                           "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
3501                           "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
3502                           "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
3503                           "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
3504                           "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
3505                           "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
3506                           "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
3507                           "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
3508                           "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
3509                           "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
3510                           "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
3511                           "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
3512                           "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
3513                           "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
3514                           "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
3515                           "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
3516                           "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
3517                           "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
3518                           "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
3519                           "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
3520                           "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
3521                           "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
3522                           "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
3523                           "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
3524                           "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
3525                           "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
3526                 .rlen   = 496,
3527                 .also_non_np = 1,
3528                 .np     = 2,
3529                 .tap    = { 496 - 16, 16 },
3530         },
3531 };
3532
3533 static struct cipher_testvec tf_cbc_dec_tv_template[] = {
3534         { /* Reverse of the first four above */
3535                 .key    = zeroed_string,
3536                 .klen   = 16,
3537                 .iv     = zeroed_string,
3538                 .input  = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3539                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3540                 .ilen   = 16,
3541                 .result = zeroed_string,
3542                 .rlen   = 16,
3543         }, {
3544                 .key    = zeroed_string,
3545                 .klen   = 16,
3546                 .iv     = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3547                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
3548                 .input  = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3549                           "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
3550                 .ilen   = 16,
3551                 .result = zeroed_string,
3552                 .rlen   = 16,
3553         }, {
3554                 .key    = zeroed_string,
3555                 .klen   = 16,
3556                 .iv     = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3557                           "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
3558                 .input  = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
3559                           "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
3560                 .ilen   = 16,
3561                 .result = zeroed_string,
3562                 .rlen   = 16,
3563         }, {
3564                 .key    = zeroed_string,
3565                 .klen   = 16,
3566                 .iv     = zeroed_string,
3567                 .input  = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
3568                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
3569                           "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
3570                           "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
3571                           "\x05\xef\x8c\x61\xa8\x11\x58\x26"
3572                           "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
3573                 .ilen   = 48,
3574                 .result = zeroed_string,
3575                 .rlen   = 48,
3576         }, { /* Generated with Crypto++ */
3577                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3578                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3579                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3580                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3581                 .klen   = 32,
3582                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3583                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3584                 .input  = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
3585                           "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
3586                           "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
3587                           "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
3588                           "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
3589                           "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
3590                           "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
3591                           "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
3592                           "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
3593                           "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
3594                           "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
3595                           "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
3596                           "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
3597                           "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
3598                           "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
3599                           "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
3600                           "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
3601                           "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
3602                           "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
3603                           "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
3604                           "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
3605                           "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
3606                           "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
3607                           "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
3608                           "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
3609                           "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
3610                           "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
3611                           "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
3612                           "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
3613                           "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
3614                           "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
3615                           "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
3616                           "\x75\x42\x62\x04\x31\x1F\x95\x7C"
3617                           "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
3618                           "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
3619                           "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
3620                           "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
3621                           "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
3622                           "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
3623                           "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
3624                           "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
3625                           "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
3626                           "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
3627                           "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
3628                           "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
3629                           "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
3630                           "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
3631                           "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
3632                           "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
3633                           "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
3634                           "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
3635                           "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
3636                           "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
3637                           "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
3638                           "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
3639                           "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
3640                           "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
3641                           "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
3642                           "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
3643                           "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
3644                           "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
3645                           "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
3646                 .ilen   = 496,
3647                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3648                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3649                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3650                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3651                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3652                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3653                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3654                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3655                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3656                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3657                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3658                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3659                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3660                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3661                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3662                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3663                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3664                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3665                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3666                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3667                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3668                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3669                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3670                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3671                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3672                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3673                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3674                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3675                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3676                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3677                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3678                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3679                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3680                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3681                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3682                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3683                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3684                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3685                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3686                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3687                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3688                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3689                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3690                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3691                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3692                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3693                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3694                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3695                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3696                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3697                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3698                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3699                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3700                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3701                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3702                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3703                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3704                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3705                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3706                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3707                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3708                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3709                 .rlen   = 496,
3710                 .also_non_np = 1,
3711                 .np     = 2,
3712                 .tap    = { 496 - 16, 16 },
3713         },
3714 };
3715
3716 static struct cipher_testvec tf_ctr_enc_tv_template[] = {
3717         { /* Generated with Crypto++ */
3718                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3719                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3720                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3721                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3722                 .klen   = 32,
3723                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3724                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3725                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3726                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3727                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3728                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3729                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3730                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3731                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3732                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3733                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3734                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3735                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3736                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3737                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3738                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3739                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3740                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3741                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3742                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3743                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3744                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3745                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3746                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3747                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3748                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3749                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3750                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3751                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3752                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3753                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3754                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3755                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3756                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3757                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3758                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3759                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3760                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3761                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3762                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3763                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3764                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3765                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3766                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3767                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3768                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3769                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3770                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3771                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3772                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3773                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3774                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3775                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3776                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3777                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3778                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3779                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3780                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3781                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3782                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3783                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3784                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3785                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3786                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3787                 .ilen   = 496,
3788                 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
3789                           "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
3790                           "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
3791                           "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
3792                           "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
3793                           "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
3794                           "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
3795                           "\x01\x41\x21\x12\x38\xAB\x52\x4F"
3796                           "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
3797                           "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
3798                           "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
3799                           "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
3800                           "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
3801                           "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
3802                           "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
3803                           "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
3804                           "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
3805                           "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
3806                           "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
3807                           "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
3808                           "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
3809                           "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
3810                           "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
3811                           "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
3812                           "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
3813                           "\x23\x61\x48\xEA\x80\x04\x27\xAA"
3814                           "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
3815                           "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
3816                           "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
3817                           "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
3818                           "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
3819                           "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
3820                           "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
3821                           "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
3822                           "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
3823                           "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
3824                           "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
3825                           "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
3826                           "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
3827                           "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
3828                           "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
3829                           "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
3830                           "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
3831                           "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
3832                           "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
3833                           "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
3834                           "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
3835                           "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
3836                           "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
3837                           "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
3838                           "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
3839                           "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
3840                           "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
3841                           "\x11\xE9\x43\x83\x76\xAA\x53\x37"
3842                           "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
3843                           "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
3844                           "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
3845                           "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
3846                           "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
3847                           "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
3848                           "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
3849                           "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
3850                 .rlen   = 496,
3851         }, { /* Generated with Crypto++ */
3852                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3853                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3854                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3855                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3856                 .klen   = 32,
3857                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
3858                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
3859                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3860                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3861                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3862                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3863                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3864                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3865                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
3866                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
3867                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
3868                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
3869                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
3870                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
3871                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
3872                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
3873                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
3874                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
3875                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
3876                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
3877                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
3878                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
3879                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
3880                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
3881                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
3882                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
3883                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
3884                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
3885                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
3886                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
3887                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
3888                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
3889                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
3890                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
3891                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
3892                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
3893                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
3894                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
3895                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
3896                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
3897                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
3898                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
3899                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
3900                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
3901                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
3902                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
3903                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
3904                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
3905                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
3906                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
3907                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
3908                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
3909                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
3910                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
3911                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
3912                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
3913                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
3914                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
3915                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
3916                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
3917                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
3918                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
3919                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
3920                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
3921                 .ilen   = 496,
3922                 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
3923                           "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
3924                           "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
3925                           "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
3926                           "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
3927                           "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
3928                           "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
3929                           "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
3930                           "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
3931                           "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
3932                           "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
3933                           "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
3934                           "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
3935                           "\x39\x18\x09\xA4\x82\x59\x78\xE7"
3936                           "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
3937                           "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
3938                           "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
3939                           "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
3940                           "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
3941                           "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
3942                           "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
3943                           "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
3944                           "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
3945                           "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
3946                           "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
3947                           "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
3948                           "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
3949                           "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
3950                           "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
3951                           "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
3952                           "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
3953                           "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
3954                           "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
3955                           "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
3956                           "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
3957                           "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
3958                           "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
3959                           "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
3960                           "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
3961                           "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
3962                           "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
3963                           "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
3964                           "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
3965                           "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
3966                           "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
3967                           "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
3968                           "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
3969                           "\xDE\x55\x1B\x50\x14\x53\x44\x17"
3970                           "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
3971                           "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
3972                           "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
3973                           "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
3974                           "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
3975                           "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
3976                           "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
3977                           "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
3978                           "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
3979                           "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
3980                           "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
3981                           "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
3982                           "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
3983                           "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
3984                 .rlen   = 496,
3985         }, { /* Generated with Crypto++ */
3986                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
3987                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
3988                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
3989                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
3990                 .klen   = 32,
3991                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
3992                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
3993                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
3994                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
3995                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
3996                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
3997                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
3998                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
3999                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4000                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4001                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4002                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4003                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4004                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4005                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4006                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4007                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4008                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4009                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4010                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4011                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4012                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4013                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4014                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4015                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4016                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4017                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4018                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4019                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4020                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4021                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4022                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4023                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4024                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4025                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4026                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4027                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4028                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4029                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4030                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4031                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4032                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4033                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4034                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4035                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4036                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4037                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4038                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4039                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4040                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4041                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4042                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4043                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4044                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4045                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4046                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4047                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4048                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4049                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4050                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4051                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4052                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4053                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4054                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4055                           "\x2B\xC2\x59",
4056                 .ilen   = 499,
4057                 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
4058                           "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
4059                           "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
4060                           "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
4061                           "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
4062                           "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
4063                           "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
4064                           "\x01\x41\x21\x12\x38\xAB\x52\x4F"
4065                           "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
4066                           "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
4067                           "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
4068                           "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
4069                           "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
4070                           "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
4071                           "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
4072                           "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
4073                           "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
4074                           "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
4075                           "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
4076                           "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
4077                           "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
4078                           "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
4079                           "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
4080                           "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
4081                           "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
4082                           "\x23\x61\x48\xEA\x80\x04\x27\xAA"
4083                           "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
4084                           "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
4085                           "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
4086                           "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
4087                           "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
4088                           "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
4089                           "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
4090                           "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
4091                           "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
4092                           "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
4093                           "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
4094                           "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
4095                           "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
4096                           "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
4097                           "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
4098                           "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
4099                           "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
4100                           "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
4101                           "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
4102                           "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
4103                           "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
4104                           "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
4105                           "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
4106                           "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
4107                           "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
4108                           "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
4109                           "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
4110                           "\x11\xE9\x43\x83\x76\xAA\x53\x37"
4111                           "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
4112                           "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
4113                           "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
4114                           "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
4115                           "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
4116                           "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
4117                           "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
4118                           "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
4119                           "\x6C\x82\x9D",
4120                 .rlen   = 499,
4121                 .also_non_np = 1,
4122                 .np     = 2,
4123                 .tap    = { 499 - 16, 16 },
4124         },
4125 };
4126
4127 static struct cipher_testvec tf_ctr_dec_tv_template[] = {
4128         { /* Generated with Crypto++ */
4129                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4130                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4131                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4132                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4133                 .klen   = 32,
4134                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4135                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4136                 .input  = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
4137                           "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
4138                           "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
4139                           "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
4140                           "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
4141                           "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
4142                           "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
4143                           "\x01\x41\x21\x12\x38\xAB\x52\x4F"
4144                           "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
4145                           "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
4146                           "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
4147                           "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
4148                           "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
4149                           "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
4150                           "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
4151                           "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
4152                           "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
4153                           "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
4154                           "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
4155                           "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
4156                           "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
4157                           "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
4158                           "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
4159                           "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
4160                           "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
4161                           "\x23\x61\x48\xEA\x80\x04\x27\xAA"
4162                           "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
4163                           "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
4164                           "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
4165                           "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
4166                           "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
4167                           "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
4168                           "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
4169                           "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
4170                           "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
4171                           "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
4172                           "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
4173                           "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
4174                           "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
4175                           "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
4176                           "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
4177                           "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
4178                           "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
4179                           "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
4180                           "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
4181                           "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
4182                           "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
4183                           "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
4184                           "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
4185                           "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
4186                           "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
4187                           "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
4188                           "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
4189                           "\x11\xE9\x43\x83\x76\xAA\x53\x37"
4190                           "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
4191                           "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
4192                           "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
4193                           "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
4194                           "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
4195                           "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
4196                           "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
4197                           "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
4198                 .ilen   = 496,
4199                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4200                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4201                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4202                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4203                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4204                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4205                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4206                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4207                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4208                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4209                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4210                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4211                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4212                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4213                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4214                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4215                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4216                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4217                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4218                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4219                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4220                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4221                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4222                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4223                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4224                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4225                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4226                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4227                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4228                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4229                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4230                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4231                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4232                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4233                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4234                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4235                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4236                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4237                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4238                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4239                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4240                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4241                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4242                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4243                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4244                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4245                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4246                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4247                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4248                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4249                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4250                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4251                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4252                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4253                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4254                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4255                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4256                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4257                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4258                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4259                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4260                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
4261                 .rlen   = 496,
4262         }, { /* Generated with Crypto++ */
4263                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4264                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4265                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4266                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4267                 .klen   = 32,
4268                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
4269                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4270                 .input  = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
4271                           "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
4272                           "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
4273                           "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
4274                           "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
4275                           "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
4276                           "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
4277                           "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
4278                           "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
4279                           "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
4280                           "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
4281                           "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
4282                           "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
4283                           "\x39\x18\x09\xA4\x82\x59\x78\xE7"
4284                           "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
4285                           "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
4286                           "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
4287                           "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
4288                           "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
4289                           "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
4290                           "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
4291                           "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
4292                           "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
4293                           "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
4294                           "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
4295                           "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
4296                           "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
4297                           "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
4298                           "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
4299                           "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
4300                           "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
4301                           "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
4302                           "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
4303                           "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
4304                           "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
4305                           "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
4306                           "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
4307                           "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
4308                           "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
4309                           "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
4310                           "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
4311                           "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
4312                           "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
4313                           "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
4314                           "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
4315                           "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
4316                           "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
4317                           "\xDE\x55\x1B\x50\x14\x53\x44\x17"
4318                           "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
4319                           "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
4320                           "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
4321                           "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
4322                           "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
4323                           "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
4324                           "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
4325                           "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
4326                           "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
4327                           "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
4328                           "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
4329                           "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
4330                           "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
4331                           "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
4332                 .ilen   = 496,
4333                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4334                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4335                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4336                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4337                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4338                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4339                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4340                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4341                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4342                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4343                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4344                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4345                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4346                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4347                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4348                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4349                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4350                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4351                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4352                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4353                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4354                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4355                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4356                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4357                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4358                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4359                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4360                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4361                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4362                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4363                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4364                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4365                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4366                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4367                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4368                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4369                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4370                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4371                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4372                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4373                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4374                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4375                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4376                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4377                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4378                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4379                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4380                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4381                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4382                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4383                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4384                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4385                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4386                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4387                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4388                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4389                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4390                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4391                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4392                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4393                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4394                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
4395                 .rlen   = 496,
4396         }, { /* Generated with Crypto++ */
4397                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
4398                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
4399                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
4400                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
4401                 .klen   = 32,
4402                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
4403                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
4404                 .input  = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
4405                           "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
4406                           "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
4407                           "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
4408                           "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
4409                           "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
4410                           "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
4411                           "\x01\x41\x21\x12\x38\xAB\x52\x4F"
4412                           "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
4413                           "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
4414                           "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
4415                           "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
4416                           "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
4417                           "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
4418                           "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
4419                           "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
4420                           "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
4421                           "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
4422                           "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
4423                           "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
4424                           "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
4425                           "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
4426                           "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
4427                           "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
4428                           "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
4429                           "\x23\x61\x48\xEA\x80\x04\x27\xAA"
4430                           "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
4431                           "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
4432                           "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
4433                           "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
4434                           "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
4435                           "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
4436                           "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
4437                           "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
4438                           "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
4439                           "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
4440                           "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
4441                           "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
4442                           "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
4443                           "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
4444                           "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
4445                           "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
4446                           "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
4447                           "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
4448                           "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
4449                           "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
4450                           "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
4451                           "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
4452                           "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
4453                           "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
4454                           "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
4455                           "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
4456                           "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
4457                           "\x11\xE9\x43\x83\x76\xAA\x53\x37"
4458                           "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
4459                           "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
4460                           "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
4461                           "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
4462                           "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
4463                           "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
4464                           "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
4465                           "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
4466                           "\x6C\x82\x9D",
4467                 .ilen   = 499,
4468                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
4469                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
4470                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
4471                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
4472                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
4473                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
4474                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
4475                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
4476                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
4477                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
4478                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
4479                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
4480                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
4481                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
4482                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
4483                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
4484                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
4485                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
4486                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
4487                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
4488                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
4489                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
4490                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
4491                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
4492                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
4493                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
4494                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
4495                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
4496                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
4497                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
4498                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
4499                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
4500                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
4501                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
4502                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
4503                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
4504                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
4505                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
4506                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
4507                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
4508                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
4509                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
4510                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
4511                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
4512                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
4513                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
4514                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
4515                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
4516                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
4517                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
4518                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
4519                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
4520                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
4521                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
4522                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
4523                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
4524                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
4525                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
4526                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
4527                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
4528                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
4529                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
4530                           "\x2B\xC2\x59",
4531                 .rlen   = 499,
4532                 .also_non_np = 1,
4533                 .np     = 2,
4534                 .tap    = { 499 - 16, 16 },
4535         },
4536 };
4537
4538 static struct cipher_testvec tf_lrw_enc_tv_template[] = {
4539         /* Generated from AES-LRW test vectors */
4540         {
4541                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
4542                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
4543                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
4544                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
4545                 .klen   = 32,
4546                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4547                           "\x00\x00\x00\x00\x00\x00\x00\x01",
4548                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
4549                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4550                 .ilen   = 16,
4551                 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
4552                           "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
4553                 .rlen   = 16,
4554         }, {
4555                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
4556                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
4557                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
4558                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
4559                 .klen   = 32,
4560                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4561                           "\x00\x00\x00\x00\x00\x00\x00\x02",
4562                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
4563                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4564                 .ilen   = 16,
4565                 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
4566                           "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
4567                 .rlen   = 16,
4568         }, {
4569                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
4570                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
4571                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
4572                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
4573                 .klen   = 32,
4574                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4575                           "\x00\x00\x00\x02\x00\x00\x00\x00",
4576                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
4577                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4578                 .ilen   = 16,
4579                 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
4580                           "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
4581                 .rlen   = 16,
4582         }, {
4583                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
4584                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
4585                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
4586                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
4587                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
4588                 .klen   = 40,
4589                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4590                           "\x00\x00\x00\x00\x00\x00\x00\x01",
4591                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
4592                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4593                 .ilen   = 16,
4594                 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
4595                           "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
4596                 .rlen   = 16,
4597         }, {
4598                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
4599                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
4600                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
4601                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
4602                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
4603                 .klen   = 40,
4604                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4605                           "\x00\x00\x00\x02\x00\x00\x00\x00",
4606                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
4607                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4608                 .ilen   = 16,
4609                 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
4610                           "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
4611                 .rlen   = 16,
4612         }, {
4613                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4614                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4615                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4616                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4617                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4618                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4619                 .klen   = 48,
4620                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4621                           "\x00\x00\x00\x00\x00\x00\x00\x01",
4622                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
4623                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4624                 .ilen   = 16,
4625                 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
4626                           "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
4627                 .rlen   = 16,
4628         }, {
4629                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
4630                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
4631                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
4632                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
4633                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
4634                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
4635                 .klen   = 48,
4636                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4637                           "\x00\x00\x00\x02\x00\x00\x00\x00",
4638                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
4639                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4640                 .ilen   = 16,
4641                 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
4642                           "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
4643                 .rlen   = 16,
4644         }, {
4645                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4646                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4647                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4648                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4649                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4650                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4651                 .klen   = 48,
4652                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4653                           "\x00\x00\x00\x00\x00\x00\x00\x01",
4654                 .input  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
4655                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
4656                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
4657                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
4658                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
4659                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
4660                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
4661                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
4662                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
4663                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
4664                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
4665                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
4666                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
4667                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
4668                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
4669                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
4670                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
4671                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
4672                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
4673                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
4674                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
4675                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
4676                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
4677                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
4678                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
4679                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
4680                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
4681                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
4682                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
4683                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
4684                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
4685                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
4686                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
4687                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
4688                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
4689                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
4690                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
4691                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
4692                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
4693                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
4694                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
4695                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
4696                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
4697                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
4698                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
4699                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
4700                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
4701                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
4702                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
4703                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
4704                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
4705                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
4706                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
4707                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
4708                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
4709                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
4710                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
4711                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
4712                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
4713                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
4714                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
4715                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
4716                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
4717                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
4718                 .ilen   = 512,
4719                 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
4720                           "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
4721                           "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
4722                           "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
4723                           "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
4724                           "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
4725                           "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
4726                           "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
4727                           "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
4728                           "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
4729                           "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
4730                           "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
4731                           "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
4732                           "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
4733                           "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
4734                           "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
4735                           "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
4736                           "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
4737                           "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
4738                           "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
4739                           "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
4740                           "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
4741                           "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
4742                           "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
4743                           "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
4744                           "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
4745                           "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
4746                           "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
4747                           "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
4748                           "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
4749                           "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
4750                           "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
4751                           "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
4752                           "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
4753                           "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
4754                           "\x3e\xae\x71\x90\x07\x70\x1c\x38"
4755                           "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
4756                           "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
4757                           "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
4758                           "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
4759                           "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
4760                           "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
4761                           "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
4762                           "\x93\x51\x1d\x3d\x62\x59\x83\x82"
4763                           "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
4764                           "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
4765                           "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
4766                           "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
4767                           "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
4768                           "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
4769                           "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
4770                           "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
4771                           "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
4772                           "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
4773                           "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
4774                           "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
4775                           "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
4776                           "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
4777                           "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
4778                           "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
4779                           "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
4780                           "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
4781                           "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
4782                           "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
4783                 .rlen   = 512,
4784                 .also_non_np = 1,
4785                 .np     = 2,
4786                 .tap    = { 512 - 16, 16 },
4787         },
4788 };
4789
4790 static struct cipher_testvec tf_lrw_dec_tv_template[] = {
4791         /* Generated from AES-LRW test vectors */
4792         /* same as enc vectors with input and result reversed */
4793         {
4794                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
4795                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
4796                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
4797                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
4798                 .klen   = 32,
4799                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4800                           "\x00\x00\x00\x00\x00\x00\x00\x01",
4801                 .input  = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
4802                           "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
4803                 .ilen   = 16,
4804                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4805                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4806                 .rlen   = 16,
4807         }, {
4808                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
4809                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
4810                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
4811                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
4812                 .klen   = 32,
4813                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4814                           "\x00\x00\x00\x00\x00\x00\x00\x02",
4815                 .input  = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
4816                           "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
4817                 .ilen   = 16,
4818                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4819                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4820                 .rlen   = 16,
4821         }, {
4822                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
4823                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
4824                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
4825                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
4826                 .klen   = 32,
4827                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4828                           "\x00\x00\x00\x02\x00\x00\x00\x00",
4829                 .input  = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
4830                           "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
4831                 .ilen   = 16,
4832                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4833                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4834                 .rlen   = 16,
4835         }, {
4836                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
4837                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
4838                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
4839                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
4840                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
4841                 .klen   = 40,
4842                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4843                           "\x00\x00\x00\x00\x00\x00\x00\x01",
4844                 .input  = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
4845                           "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
4846                 .ilen   = 16,
4847                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4848                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4849                 .rlen   = 16,
4850         }, {
4851                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
4852                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
4853                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
4854                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
4855                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
4856                 .klen   = 40,
4857                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4858                           "\x00\x00\x00\x02\x00\x00\x00\x00",
4859                 .input  = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
4860                           "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
4861                 .ilen   = 16,
4862                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4863                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4864                 .rlen   = 16,
4865         }, {
4866                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4867                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4868                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4869                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4870                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4871                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4872                 .klen   = 48,
4873                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4874                           "\x00\x00\x00\x00\x00\x00\x00\x01",
4875                 .input  = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
4876                           "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
4877                 .ilen   = 16,
4878                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4879                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4880                 .rlen   = 16,
4881         }, {
4882                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
4883                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
4884                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
4885                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
4886                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
4887                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
4888                 .klen   = 48,
4889                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4890                           "\x00\x00\x00\x02\x00\x00\x00\x00",
4891                 .input  = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
4892                           "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
4893                 .ilen   = 16,
4894                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
4895                           "\x38\x39\x41\x42\x43\x44\x45\x46",
4896                 .rlen   = 16,
4897         }, {
4898                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
4899                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
4900                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
4901                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
4902                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
4903                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
4904                 .klen   = 48,
4905                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
4906                           "\x00\x00\x00\x00\x00\x00\x00\x01",
4907                 .input  = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
4908                           "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
4909                           "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
4910                           "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
4911                           "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
4912                           "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
4913                           "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
4914                           "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
4915                           "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
4916                           "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
4917                           "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
4918                           "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
4919                           "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
4920                           "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
4921                           "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
4922                           "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
4923                           "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
4924                           "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
4925                           "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
4926                           "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
4927                           "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
4928                           "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
4929                           "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
4930                           "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
4931                           "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
4932                           "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
4933                           "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
4934                           "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
4935                           "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
4936                           "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
4937                           "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
4938                           "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
4939                           "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
4940                           "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
4941                           "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
4942                           "\x3e\xae\x71\x90\x07\x70\x1c\x38"
4943                           "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
4944                           "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
4945                           "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
4946                           "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
4947                           "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
4948                           "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
4949                           "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
4950                           "\x93\x51\x1d\x3d\x62\x59\x83\x82"
4951                           "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
4952                           "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
4953                           "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
4954                           "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
4955                           "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
4956                           "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
4957                           "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
4958                           "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
4959                           "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
4960                           "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
4961                           "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
4962                           "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
4963                           "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
4964                           "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
4965                           "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
4966                           "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
4967                           "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
4968                           "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
4969                           "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
4970                           "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
4971                 .ilen   = 512,
4972                 .result = "\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                 .rlen   = 512,
5037                 .also_non_np = 1,
5038                 .np     = 2,
5039                 .tap    = { 512 - 16, 16 },
5040         },
5041 };
5042
5043 static struct cipher_testvec tf_xts_enc_tv_template[] = {
5044         /* Generated from AES-XTS test vectors */
5045 {
5046                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
5047                           "\x00\x00\x00\x00\x00\x00\x00\x00"
5048                           "\x00\x00\x00\x00\x00\x00\x00\x00"
5049                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5050                 .klen   = 32,
5051                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
5052                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5053                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
5054                           "\x00\x00\x00\x00\x00\x00\x00\x00"
5055                           "\x00\x00\x00\x00\x00\x00\x00\x00"
5056                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5057                 .ilen   = 32,
5058                 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
5059                           "\x30\x74\xe4\x44\x52\x77\x97\x43"
5060                           "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
5061                           "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
5062                 .rlen   = 32,
5063         }, {
5064                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
5065                           "\x11\x11\x11\x11\x11\x11\x11\x11"
5066                           "\x22\x22\x22\x22\x22\x22\x22\x22"
5067                           "\x22\x22\x22\x22\x22\x22\x22\x22",
5068                 .klen   = 32,
5069                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
5070                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5071                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
5072                           "\x44\x44\x44\x44\x44\x44\x44\x44"
5073                           "\x44\x44\x44\x44\x44\x44\x44\x44"
5074                           "\x44\x44\x44\x44\x44\x44\x44\x44",
5075                 .ilen   = 32,
5076                 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
5077                           "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
5078                           "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
5079                           "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
5080                 .rlen   = 32,
5081         }, {
5082                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
5083                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
5084                           "\x22\x22\x22\x22\x22\x22\x22\x22"
5085                           "\x22\x22\x22\x22\x22\x22\x22\x22",
5086                 .klen   = 32,
5087                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
5088                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5089                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
5090                           "\x44\x44\x44\x44\x44\x44\x44\x44"
5091                           "\x44\x44\x44\x44\x44\x44\x44\x44"
5092                           "\x44\x44\x44\x44\x44\x44\x44\x44",
5093                 .ilen   = 32,
5094                 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
5095                           "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
5096                           "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
5097                           "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
5098                 .rlen   = 32,
5099         }, {
5100                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
5101                           "\x23\x53\x60\x28\x74\x71\x35\x26"
5102                           "\x31\x41\x59\x26\x53\x58\x97\x93"
5103                           "\x23\x84\x62\x64\x33\x83\x27\x95",
5104                 .klen   = 32,
5105                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
5106                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5107                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
5108                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5109                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5110                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5111                           "\x20\x21\x22\x23\x24\x25\x26\x27"
5112                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5113                           "\x30\x31\x32\x33\x34\x35\x36\x37"
5114                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5115                           "\x40\x41\x42\x43\x44\x45\x46\x47"
5116                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5117                           "\x50\x51\x52\x53\x54\x55\x56\x57"
5118                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5119                           "\x60\x61\x62\x63\x64\x65\x66\x67"
5120                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5121                           "\x70\x71\x72\x73\x74\x75\x76\x77"
5122                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5123                           "\x80\x81\x82\x83\x84\x85\x86\x87"
5124                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5125                           "\x90\x91\x92\x93\x94\x95\x96\x97"
5126                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5127                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5128                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5129                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5130                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5131                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5132                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5133                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5134                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5135                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5136                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5137                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5138                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5139                           "\x00\x01\x02\x03\x04\x05\x06\x07"
5140                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5141                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5142                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5143                           "\x20\x21\x22\x23\x24\x25\x26\x27"
5144                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5145                           "\x30\x31\x32\x33\x34\x35\x36\x37"
5146                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5147                           "\x40\x41\x42\x43\x44\x45\x46\x47"
5148                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5149                           "\x50\x51\x52\x53\x54\x55\x56\x57"
5150                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5151                           "\x60\x61\x62\x63\x64\x65\x66\x67"
5152                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5153                           "\x70\x71\x72\x73\x74\x75\x76\x77"
5154                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5155                           "\x80\x81\x82\x83\x84\x85\x86\x87"
5156                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5157                           "\x90\x91\x92\x93\x94\x95\x96\x97"
5158                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5159                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5160                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5161                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5162                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5163                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5164                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5165                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5166                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5167                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5168                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5169                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5170                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5171                 .ilen   = 512,
5172                 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
5173                           "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
5174                           "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
5175                           "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
5176                           "\xea\x35\x35\x8c\xb2\x46\x61\x06"
5177                           "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
5178                           "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
5179                           "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
5180                           "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
5181                           "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
5182                           "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
5183                           "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
5184                           "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
5185                           "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
5186                           "\x01\x73\x68\x32\x25\x19\xfa\xfb"
5187                           "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
5188                           "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
5189                           "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
5190                           "\x39\x80\x39\x09\x97\x65\xf2\x83"
5191                           "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
5192                           "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
5193                           "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
5194                           "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
5195                           "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
5196                           "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
5197                           "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
5198                           "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
5199                           "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
5200                           "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
5201                           "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
5202                           "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
5203                           "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
5204                           "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
5205                           "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
5206                           "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
5207                           "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
5208                           "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
5209                           "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
5210                           "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
5211                           "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
5212                           "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
5213                           "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
5214                           "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
5215                           "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
5216                           "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
5217                           "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
5218                           "\x04\x39\x73\x32\xb2\x86\x79\xe7"
5219                           "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
5220                           "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
5221                           "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
5222                           "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
5223                           "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
5224                           "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
5225                           "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
5226                           "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
5227                           "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
5228                           "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
5229                           "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
5230                           "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
5231                           "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
5232                           "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
5233                           "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
5234                           "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
5235                           "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
5236                 .rlen   = 512,
5237         }, {
5238                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
5239                           "\x23\x53\x60\x28\x74\x71\x35\x26"
5240                           "\x62\x49\x77\x57\x24\x70\x93\x69"
5241                           "\x99\x59\x57\x49\x66\x96\x76\x27"
5242                           "\x31\x41\x59\x26\x53\x58\x97\x93"
5243                           "\x23\x84\x62\x64\x33\x83\x27\x95"
5244                           "\x02\x88\x41\x97\x16\x93\x99\x37"
5245                           "\x51\x05\x82\x09\x74\x94\x45\x92",
5246                 .klen   = 64,
5247                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
5248                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5249                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
5250                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5251                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5252                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5253                           "\x20\x21\x22\x23\x24\x25\x26\x27"
5254                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5255                           "\x30\x31\x32\x33\x34\x35\x36\x37"
5256                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5257                           "\x40\x41\x42\x43\x44\x45\x46\x47"
5258                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5259                           "\x50\x51\x52\x53\x54\x55\x56\x57"
5260                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5261                           "\x60\x61\x62\x63\x64\x65\x66\x67"
5262                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5263                           "\x70\x71\x72\x73\x74\x75\x76\x77"
5264                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5265                           "\x80\x81\x82\x83\x84\x85\x86\x87"
5266                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5267                           "\x90\x91\x92\x93\x94\x95\x96\x97"
5268                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5269                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5270                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5271                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5272                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5273                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5274                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5275                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5276                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5277                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5278                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5279                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5280                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5281                           "\x00\x01\x02\x03\x04\x05\x06\x07"
5282                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5283                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5284                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5285                           "\x20\x21\x22\x23\x24\x25\x26\x27"
5286                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5287                           "\x30\x31\x32\x33\x34\x35\x36\x37"
5288                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5289                           "\x40\x41\x42\x43\x44\x45\x46\x47"
5290                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5291                           "\x50\x51\x52\x53\x54\x55\x56\x57"
5292                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5293                           "\x60\x61\x62\x63\x64\x65\x66\x67"
5294                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5295                           "\x70\x71\x72\x73\x74\x75\x76\x77"
5296                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5297                           "\x80\x81\x82\x83\x84\x85\x86\x87"
5298                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5299                           "\x90\x91\x92\x93\x94\x95\x96\x97"
5300                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5301                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5302                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5303                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5304                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5305                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5306                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5307                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5308                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5309                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5310                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5311                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5312                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5313                 .ilen   = 512,
5314                 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
5315                           "\x35\x39\x71\x88\x76\x1e\xc9\xea"
5316                           "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
5317                           "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
5318                           "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
5319                           "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
5320                           "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
5321                           "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
5322                           "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
5323                           "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
5324                           "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
5325                           "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
5326                           "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
5327                           "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
5328                           "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
5329                           "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
5330                           "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
5331                           "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
5332                           "\x69\x35\x61\x86\xf8\x86\xb9\x89"
5333                           "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
5334                           "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
5335                           "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
5336                           "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
5337                           "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
5338                           "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
5339                           "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
5340                           "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
5341                           "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
5342                           "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
5343                           "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
5344                           "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
5345                           "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
5346                           "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
5347                           "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
5348                           "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
5349                           "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
5350                           "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
5351                           "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
5352                           "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
5353                           "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
5354                           "\xad\x12\x32\x31\x03\xf7\x21\xbe"
5355                           "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
5356                           "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
5357                           "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
5358                           "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
5359                           "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
5360                           "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
5361                           "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
5362                           "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
5363                           "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
5364                           "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
5365                           "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
5366                           "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
5367                           "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
5368                           "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
5369                           "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
5370                           "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
5371                           "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
5372                           "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
5373                           "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
5374                           "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
5375                           "\xf3\xea\x67\x52\x78\xc2\xce\x70"
5376                           "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
5377                           "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
5378                 .rlen   = 512,
5379                 .also_non_np = 1,
5380                 .np     = 2,
5381                 .tap    = { 512 - 16, 16 },
5382         },
5383 };
5384
5385 static struct cipher_testvec tf_xts_dec_tv_template[] = {
5386         /* Generated from AES-XTS test vectors */
5387         /* same as enc vectors with input and result reversed */
5388         {
5389                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
5390                           "\x00\x00\x00\x00\x00\x00\x00\x00"
5391                           "\x00\x00\x00\x00\x00\x00\x00\x00"
5392                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5393                 .klen   = 32,
5394                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
5395                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5396                 .input  = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
5397                           "\x30\x74\xe4\x44\x52\x77\x97\x43"
5398                           "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
5399                           "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
5400                 .ilen   = 32,
5401                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
5402                           "\x00\x00\x00\x00\x00\x00\x00\x00"
5403                           "\x00\x00\x00\x00\x00\x00\x00\x00"
5404                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5405                 .rlen   = 32,
5406         }, {
5407                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
5408                           "\x11\x11\x11\x11\x11\x11\x11\x11"
5409                           "\x22\x22\x22\x22\x22\x22\x22\x22"
5410                           "\x22\x22\x22\x22\x22\x22\x22\x22",
5411                 .klen   = 32,
5412                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
5413                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5414                 .input  = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
5415                           "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
5416                           "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
5417                           "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
5418                 .ilen   = 32,
5419                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
5420                           "\x44\x44\x44\x44\x44\x44\x44\x44"
5421                           "\x44\x44\x44\x44\x44\x44\x44\x44"
5422                           "\x44\x44\x44\x44\x44\x44\x44\x44",
5423                 .rlen   = 32,
5424         }, {
5425                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
5426                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
5427                           "\x22\x22\x22\x22\x22\x22\x22\x22"
5428                           "\x22\x22\x22\x22\x22\x22\x22\x22",
5429                 .klen   = 32,
5430                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
5431                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5432                 .input  = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
5433                           "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
5434                           "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
5435                           "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
5436                 .ilen   = 32,
5437                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
5438                           "\x44\x44\x44\x44\x44\x44\x44\x44"
5439                           "\x44\x44\x44\x44\x44\x44\x44\x44"
5440                           "\x44\x44\x44\x44\x44\x44\x44\x44",
5441                 .rlen   = 32,
5442         }, {
5443                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
5444                           "\x23\x53\x60\x28\x74\x71\x35\x26"
5445                           "\x31\x41\x59\x26\x53\x58\x97\x93"
5446                           "\x23\x84\x62\x64\x33\x83\x27\x95",
5447                 .klen   = 32,
5448                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
5449                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5450                 .input  = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
5451                           "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
5452                           "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
5453                           "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
5454                           "\xea\x35\x35\x8c\xb2\x46\x61\x06"
5455                           "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
5456                           "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
5457                           "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
5458                           "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
5459                           "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
5460                           "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
5461                           "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
5462                           "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
5463                           "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
5464                           "\x01\x73\x68\x32\x25\x19\xfa\xfb"
5465                           "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
5466                           "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
5467                           "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
5468                           "\x39\x80\x39\x09\x97\x65\xf2\x83"
5469                           "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
5470                           "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
5471                           "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
5472                           "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
5473                           "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
5474                           "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
5475                           "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
5476                           "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
5477                           "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
5478                           "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
5479                           "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
5480                           "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
5481                           "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
5482                           "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
5483                           "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
5484                           "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
5485                           "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
5486                           "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
5487                           "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
5488                           "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
5489                           "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
5490                           "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
5491                           "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
5492                           "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
5493                           "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
5494                           "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
5495                           "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
5496                           "\x04\x39\x73\x32\xb2\x86\x79\xe7"
5497                           "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
5498                           "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
5499                           "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
5500                           "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
5501                           "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
5502                           "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
5503                           "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
5504                           "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
5505                           "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
5506                           "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
5507                           "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
5508                           "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
5509                           "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
5510                           "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
5511                           "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
5512                           "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
5513                           "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
5514                 .ilen   = 512,
5515                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5516                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5517                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5518                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5519                           "\x20\x21\x22\x23\x24\x25\x26\x27"
5520                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5521                           "\x30\x31\x32\x33\x34\x35\x36\x37"
5522                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5523                           "\x40\x41\x42\x43\x44\x45\x46\x47"
5524                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5525                           "\x50\x51\x52\x53\x54\x55\x56\x57"
5526                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5527                           "\x60\x61\x62\x63\x64\x65\x66\x67"
5528                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5529                           "\x70\x71\x72\x73\x74\x75\x76\x77"
5530                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5531                           "\x80\x81\x82\x83\x84\x85\x86\x87"
5532                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5533                           "\x90\x91\x92\x93\x94\x95\x96\x97"
5534                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5535                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5536                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5537                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5538                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5539                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5540                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5541                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5542                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5543                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5544                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5545                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5546                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5547                           "\x00\x01\x02\x03\x04\x05\x06\x07"
5548                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5549                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5550                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5551                           "\x20\x21\x22\x23\x24\x25\x26\x27"
5552                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5553                           "\x30\x31\x32\x33\x34\x35\x36\x37"
5554                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5555                           "\x40\x41\x42\x43\x44\x45\x46\x47"
5556                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5557                           "\x50\x51\x52\x53\x54\x55\x56\x57"
5558                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5559                           "\x60\x61\x62\x63\x64\x65\x66\x67"
5560                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5561                           "\x70\x71\x72\x73\x74\x75\x76\x77"
5562                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5563                           "\x80\x81\x82\x83\x84\x85\x86\x87"
5564                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5565                           "\x90\x91\x92\x93\x94\x95\x96\x97"
5566                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5567                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5568                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5569                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5570                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5571                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5572                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5573                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5574                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5575                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5576                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5577                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5578                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5579                 .rlen   = 512,
5580         }, {
5581                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
5582                           "\x23\x53\x60\x28\x74\x71\x35\x26"
5583                           "\x62\x49\x77\x57\x24\x70\x93\x69"
5584                           "\x99\x59\x57\x49\x66\x96\x76\x27"
5585                           "\x31\x41\x59\x26\x53\x58\x97\x93"
5586                           "\x23\x84\x62\x64\x33\x83\x27\x95"
5587                           "\x02\x88\x41\x97\x16\x93\x99\x37"
5588                           "\x51\x05\x82\x09\x74\x94\x45\x92",
5589                 .klen   = 64,
5590                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
5591                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5592                 .input  = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
5593                           "\x35\x39\x71\x88\x76\x1e\xc9\xea"
5594                           "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
5595                           "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
5596                           "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
5597                           "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
5598                           "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
5599                           "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
5600                           "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
5601                           "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
5602                           "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
5603                           "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
5604                           "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
5605                           "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
5606                           "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
5607                           "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
5608                           "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
5609                           "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
5610                           "\x69\x35\x61\x86\xf8\x86\xb9\x89"
5611                           "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
5612                           "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
5613                           "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
5614                           "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
5615                           "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
5616                           "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
5617                           "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
5618                           "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
5619                           "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
5620                           "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
5621                           "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
5622                           "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
5623                           "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
5624                           "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
5625                           "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
5626                           "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
5627                           "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
5628                           "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
5629                           "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
5630                           "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
5631                           "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
5632                           "\xad\x12\x32\x31\x03\xf7\x21\xbe"
5633                           "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
5634                           "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
5635                           "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
5636                           "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
5637                           "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
5638                           "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
5639                           "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
5640                           "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
5641                           "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
5642                           "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
5643                           "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
5644                           "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
5645                           "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
5646                           "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
5647                           "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
5648                           "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
5649                           "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
5650                           "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
5651                           "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
5652                           "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
5653                           "\xf3\xea\x67\x52\x78\xc2\xce\x70"
5654                           "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
5655                           "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
5656                 .ilen   = 512,
5657                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5658                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5659                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5660                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5661                           "\x20\x21\x22\x23\x24\x25\x26\x27"
5662                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5663                           "\x30\x31\x32\x33\x34\x35\x36\x37"
5664                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5665                           "\x40\x41\x42\x43\x44\x45\x46\x47"
5666                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5667                           "\x50\x51\x52\x53\x54\x55\x56\x57"
5668                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5669                           "\x60\x61\x62\x63\x64\x65\x66\x67"
5670                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5671                           "\x70\x71\x72\x73\x74\x75\x76\x77"
5672                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5673                           "\x80\x81\x82\x83\x84\x85\x86\x87"
5674                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5675                           "\x90\x91\x92\x93\x94\x95\x96\x97"
5676                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5677                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5678                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5679                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5680                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5681                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5682                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5683                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5684                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5685                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5686                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5687                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5688                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
5689                           "\x00\x01\x02\x03\x04\x05\x06\x07"
5690                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5691                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5692                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
5693                           "\x20\x21\x22\x23\x24\x25\x26\x27"
5694                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
5695                           "\x30\x31\x32\x33\x34\x35\x36\x37"
5696                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
5697                           "\x40\x41\x42\x43\x44\x45\x46\x47"
5698                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
5699                           "\x50\x51\x52\x53\x54\x55\x56\x57"
5700                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
5701                           "\x60\x61\x62\x63\x64\x65\x66\x67"
5702                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
5703                           "\x70\x71\x72\x73\x74\x75\x76\x77"
5704                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
5705                           "\x80\x81\x82\x83\x84\x85\x86\x87"
5706                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
5707                           "\x90\x91\x92\x93\x94\x95\x96\x97"
5708                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
5709                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
5710                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
5711                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
5712                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
5713                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
5714                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
5715                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
5716                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
5717                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
5718                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
5719                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
5720                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
5721                 .rlen   = 512,
5722                 .also_non_np = 1,
5723                 .np     = 2,
5724                 .tap    = { 512 - 16, 16 },
5725         },
5726 };
5727
5728 /*
5729  * Serpent test vectors.  These are backwards because Serpent writes
5730  * octet sequences in right-to-left mode.
5731  */
5732 #define SERPENT_ENC_TEST_VECTORS        5
5733 #define SERPENT_DEC_TEST_VECTORS        5
5734
5735 #define TNEPRES_ENC_TEST_VECTORS        4
5736 #define TNEPRES_DEC_TEST_VECTORS        4
5737
5738 #define SERPENT_CBC_ENC_TEST_VECTORS    1
5739 #define SERPENT_CBC_DEC_TEST_VECTORS    1
5740
5741 #define SERPENT_CTR_ENC_TEST_VECTORS    2
5742 #define SERPENT_CTR_DEC_TEST_VECTORS    2
5743
5744 #define SERPENT_LRW_ENC_TEST_VECTORS    8
5745 #define SERPENT_LRW_DEC_TEST_VECTORS    8
5746
5747 #define SERPENT_XTS_ENC_TEST_VECTORS    5
5748 #define SERPENT_XTS_DEC_TEST_VECTORS    5
5749
5750 static struct cipher_testvec serpent_enc_tv_template[] = {
5751         {
5752                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
5753                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5754                 .ilen   = 16,
5755                 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
5756                           "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
5757                 .rlen   = 16,
5758         }, {
5759                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
5760                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5761                 .klen   = 16,
5762                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
5763                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5764                 .ilen   = 16,
5765                 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
5766                           "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
5767                 .rlen   = 16,
5768         }, {
5769                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
5770                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5771                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5772                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
5773                 .klen   = 32,
5774                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
5775                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5776                 .ilen   = 16,
5777                 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
5778                           "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
5779                 .rlen   = 16,
5780         }, {
5781                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
5782                 .klen   = 16,
5783                 .input  = zeroed_string,
5784                 .ilen   = 16,
5785                 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
5786                           "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
5787                 .rlen   = 16,
5788         }, { /* Generated with Crypto++ */
5789                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5790                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5791                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5792                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5793                 .klen   = 32,
5794                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5795                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5796                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5797                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5798                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5799                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5800                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5801                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5802                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5803                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5804                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5805                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5806                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5807                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5808                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5809                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5810                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5811                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
5812                 .ilen   = 144,
5813                 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
5814                           "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
5815                           "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
5816                           "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
5817                           "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
5818                           "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
5819                           "\x99\x34\x89\x5B\x54\xE9\x12\x13"
5820                           "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
5821                           "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
5822                           "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
5823                           "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
5824                           "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
5825                           "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
5826                           "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
5827                           "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
5828                           "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
5829                           "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
5830                           "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
5831                 .rlen   = 144,
5832                 .also_non_np = 1,
5833                 .np     = 2,
5834                 .tap    = { 144 - 16, 16 },
5835         },
5836 };
5837
5838 static struct cipher_testvec tnepres_enc_tv_template[] = {
5839         { /* KeySize=128, PT=0, I=1 */
5840                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
5841                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5842                 .key    = "\x80\x00\x00\x00\x00\x00\x00\x00"
5843                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5844                 .klen   = 16,
5845                 .ilen   = 16,
5846                 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
5847                           "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
5848                 .rlen   = 16,
5849         }, { /* KeySize=192, PT=0, I=1 */
5850                 .key    = "\x80\x00\x00\x00\x00\x00\x00\x00"
5851                           "\x00\x00\x00\x00\x00\x00\x00\x00"
5852                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5853                 .klen   = 24,
5854                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
5855                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5856                 .ilen   = 16,
5857                 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
5858                           "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
5859                 .rlen   = 16,
5860         }, { /* KeySize=256, PT=0, I=1 */
5861                 .key    = "\x80\x00\x00\x00\x00\x00\x00\x00"
5862                           "\x00\x00\x00\x00\x00\x00\x00\x00"
5863                           "\x00\x00\x00\x00\x00\x00\x00\x00"
5864                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5865                 .klen   = 32,
5866                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
5867                           "\x00\x00\x00\x00\x00\x00\x00\x00",
5868                 .ilen   = 16,
5869                 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
5870                           "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
5871                 .rlen   = 16,
5872         }, { /* KeySize=256, I=257 */
5873                 .key    = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
5874                           "\x17\x16\x15\x14\x13\x12\x11\x10"
5875                           "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
5876                           "\x07\x06\x05\x04\x03\x02\x01\x00",
5877                 .klen   = 32,
5878                 .input  = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
5879                           "\x07\x06\x05\x04\x03\x02\x01\x00",
5880                 .ilen   = 16,
5881                 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
5882                           "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
5883                 .rlen   = 16,
5884         },
5885 };
5886
5887
5888 static struct cipher_testvec serpent_dec_tv_template[] = {
5889         {
5890                 .input  = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
5891                           "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
5892                 .ilen   = 16,
5893                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5894                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5895                 .rlen   = 16,
5896         }, {
5897                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
5898                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5899                 .klen   = 16,
5900                 .input  = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
5901                           "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
5902                 .ilen   = 16,
5903                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5904                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5905                 .rlen   = 16,
5906         }, {
5907                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
5908                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5909                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5910                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
5911                 .klen   = 32,
5912                 .input  = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
5913                           "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
5914                 .ilen   = 16,
5915                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5916                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5917                 .rlen   = 16,
5918         }, {
5919                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
5920                 .klen   = 16,
5921                 .input  = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
5922                           "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
5923                 .ilen   = 16,
5924                 .result = zeroed_string,
5925                 .rlen   = 16,
5926         }, { /* Generated with Crypto++ */
5927                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5928                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5929                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5930                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5931                 .klen   = 32,
5932                 .input  = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
5933                           "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
5934                           "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
5935                           "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
5936                           "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
5937                           "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
5938                           "\x99\x34\x89\x5B\x54\xE9\x12\x13"
5939                           "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
5940                           "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
5941                           "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
5942                           "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
5943                           "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
5944                           "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
5945                           "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
5946                           "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
5947                           "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
5948                           "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
5949                           "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6",
5950                 .ilen   = 144,
5951                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5952                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5953                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5954                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5955                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5956                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5957                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5958                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5959                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5960                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5961                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5962                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5963                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5964                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5965                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5966                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5967                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5968                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
5969                 .rlen   = 144,
5970                 .also_non_np = 1,
5971                 .np     = 2,
5972                 .tap    = { 144 - 16, 16 },
5973         },
5974 };
5975
5976 static struct cipher_testvec tnepres_dec_tv_template[] = {
5977         {
5978                 .input  = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
5979                           "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
5980                 .ilen   = 16,
5981                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5982                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5983                 .rlen   = 16,
5984         }, {
5985                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
5986                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5987                 .klen   = 16,
5988                 .input  = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
5989                           "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
5990                 .ilen   = 16,
5991                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
5992                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
5993                 .rlen   = 16,
5994         }, {
5995                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
5996                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
5997                           "\x10\x11\x12\x13\x14\x15\x16\x17"
5998                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
5999                 .klen   = 32,
6000                 .input  = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
6001                           "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
6002                 .ilen   = 16,
6003                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
6004                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
6005                 .rlen   = 16,
6006         }, { /* KeySize=128, I=121 */
6007                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
6008                 .klen   = 16,
6009                 .input  = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
6010                           "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
6011                 .ilen   = 16,
6012                 .result = zeroed_string,
6013                 .rlen   = 16,
6014         },
6015 };
6016
6017 static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
6018         { /* Generated with Crypto++ */
6019                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6020                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6021                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6022                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6023                 .klen   = 32,
6024                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6025                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6026                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6027                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6028                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6029                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6030                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6031                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6032                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6033                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6034                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6035                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6036                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6037                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6038                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6039                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6040                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6041                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6042                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6043                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
6044                 .ilen   = 144,
6045                 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
6046                           "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
6047                           "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
6048                           "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
6049                           "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
6050                           "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
6051                           "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
6052                           "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
6053                           "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
6054                           "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
6055                           "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
6056                           "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
6057                           "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
6058                           "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
6059                           "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
6060                           "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
6061                           "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
6062                           "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
6063                 .rlen   = 144,
6064                 .also_non_np = 1,
6065                 .np     = 2,
6066                 .tap    = { 144 - 16, 16 },
6067         },
6068 };
6069
6070 static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
6071         { /* Generated with Crypto++ */
6072                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6073                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6074                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6075                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6076                 .klen   = 32,
6077                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6078                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6079                 .input  = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
6080                           "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
6081                           "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
6082                           "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
6083                           "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
6084                           "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
6085                           "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
6086                           "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
6087                           "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
6088                           "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
6089                           "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
6090                           "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
6091                           "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
6092                           "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
6093                           "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
6094                           "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
6095                           "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
6096                           "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C",
6097                 .ilen   = 144,
6098                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6099                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6100                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6101                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6102                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6103                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6104                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6105                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6106                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6107                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6108                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6109                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6110                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6111                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6112                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6113                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6114                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6115                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
6116                 .rlen   = 144,
6117                 .also_non_np = 1,
6118                 .np     = 2,
6119                 .tap    = { 144 - 16, 16 },
6120         },
6121 };
6122
6123 static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
6124         { /* Generated with Crypto++ */
6125                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6126                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6127                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6128                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6129                 .klen   = 32,
6130                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6131                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6132                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6133                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6134                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6135                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6136                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6137                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6138                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6139                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6140                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6141                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6142                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6143                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6144                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6145                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6146                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6147                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6148                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6149                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
6150                 .ilen   = 144,
6151                 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
6152                           "\x37\x69\xE3\x3A\x22\x85\x48\x46"
6153                           "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
6154                           "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
6155                           "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
6156                           "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
6157                           "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
6158                           "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
6159                           "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
6160                           "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
6161                           "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
6162                           "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
6163                           "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
6164                           "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
6165                           "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
6166                           "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
6167                           "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
6168                           "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
6169                 .rlen   = 144,
6170         }, { /* Generated with Crypto++ */
6171                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6172                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6173                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6174                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6175                 .klen   = 32,
6176                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6177                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6178                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6179                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6180                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6181                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6182                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6183                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6184                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6185                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6186                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6187                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6188                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6189                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6190                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6191                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6192                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6193                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6194                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6195                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6196                           "\xF1\x65\xFC",
6197                 .ilen   = 147,
6198                 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
6199                           "\x37\x69\xE3\x3A\x22\x85\x48\x46"
6200                           "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
6201                           "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
6202                           "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
6203                           "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
6204                           "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
6205                           "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
6206                           "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
6207                           "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
6208                           "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
6209                           "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
6210                           "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
6211                           "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
6212                           "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
6213                           "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
6214                           "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
6215                           "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
6216                           "\xE6\xD0\x97",
6217                 .rlen   = 147,
6218                 .also_non_np = 1,
6219                 .np     = 2,
6220                 .tap    = { 147 - 16, 16 },
6221         }, { /* Generated with Crypto++ */
6222                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6223                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6224                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6225                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6226                 .klen   = 32,
6227                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
6228                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6229                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6230                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6231                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6232                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6233                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6234                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6235                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6236                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6237                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6238                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6239                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6240                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6241                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6242                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6243                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6244                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6245                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6246                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6247                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6248                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6249                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6250                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6251                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6252                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6253                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6254                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6255                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6256                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6257                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6258                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6259                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6260                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6261                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6262                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6263                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6264                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6265                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6266                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6267                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6268                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6269                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6270                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6271                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6272                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6273                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6274                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6275                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6276                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6277                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6278                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6279                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6280                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6281                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6282                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6283                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6284                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6285                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6286                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6287                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6288                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6289                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6290                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6291                 .ilen   = 496,
6292                 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
6293                           "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
6294                           "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
6295                           "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
6296                           "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
6297                           "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
6298                           "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
6299                           "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
6300                           "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
6301                           "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
6302                           "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
6303                           "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
6304                           "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
6305                           "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
6306                           "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
6307                           "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
6308                           "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
6309                           "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
6310                           "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
6311                           "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
6312                           "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
6313                           "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
6314                           "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
6315                           "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
6316                           "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
6317                           "\x29\x5E\x01\x47\x13\x32\x78\xBE"
6318                           "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
6319                           "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
6320                           "\x38\x35\x11\x26\x4A\xB4\x06\x32"
6321                           "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
6322                           "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
6323                           "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
6324                           "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
6325                           "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
6326                           "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
6327                           "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
6328                           "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
6329                           "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
6330                           "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
6331                           "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
6332                           "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
6333                           "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
6334                           "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
6335                           "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
6336                           "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
6337                           "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
6338                           "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
6339                           "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
6340                           "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
6341                           "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
6342                           "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
6343                           "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
6344                           "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
6345                           "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
6346                           "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
6347                           "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
6348                           "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
6349                           "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
6350                           "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
6351                           "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
6352                           "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
6353                           "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
6354                 .rlen   = 496,
6355         },
6356 };
6357
6358 static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
6359         { /* Generated with Crypto++ */
6360                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6361                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6362                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6363                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6364                 .klen   = 32,
6365                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6366                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6367                 .input  = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
6368                           "\x37\x69\xE3\x3A\x22\x85\x48\x46"
6369                           "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
6370                           "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
6371                           "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
6372                           "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
6373                           "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
6374                           "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
6375                           "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
6376                           "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
6377                           "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
6378                           "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
6379                           "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
6380                           "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
6381                           "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
6382                           "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
6383                           "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
6384                           "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9",
6385                 .ilen   = 144,
6386                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6387                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6388                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6389                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6390                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6391                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6392                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6393                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6394                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6395                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6396                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6397                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6398                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6399                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6400                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6401                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6402                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6403                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A",
6404                 .rlen   = 144,
6405         }, { /* Generated with Crypto++ */
6406                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6407                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6408                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6409                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6410                 .klen   = 32,
6411                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
6412                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
6413                 .input  = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
6414                           "\x37\x69\xE3\x3A\x22\x85\x48\x46"
6415                           "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
6416                           "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
6417                           "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
6418                           "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
6419                           "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
6420                           "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
6421                           "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
6422                           "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
6423                           "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
6424                           "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
6425                           "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
6426                           "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
6427                           "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
6428                           "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
6429                           "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
6430                           "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
6431                           "\xE6\xD0\x97",
6432                 .ilen   = 147,
6433                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6434                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6435                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6436                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6437                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6438                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6439                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6440                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6441                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6442                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6443                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6444                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6445                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6446                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6447                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6448                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6449                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6450                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6451                           "\xF1\x65\xFC",
6452                 .rlen   = 147,
6453                 .also_non_np = 1,
6454                 .np     = 2,
6455                 .tap    = { 147 - 16, 16 },
6456         }, { /* Generated with Crypto++ */
6457                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6458                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6459                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6460                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6461                 .klen   = 32,
6462                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
6463                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6464                 .input  = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
6465                           "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
6466                           "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
6467                           "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
6468                           "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
6469                           "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
6470                           "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
6471                           "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
6472                           "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
6473                           "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
6474                           "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
6475                           "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
6476                           "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
6477                           "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
6478                           "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
6479                           "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
6480                           "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
6481                           "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
6482                           "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
6483                           "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
6484                           "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
6485                           "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
6486                           "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
6487                           "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
6488                           "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
6489                           "\x29\x5E\x01\x47\x13\x32\x78\xBE"
6490                           "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
6491                           "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
6492                           "\x38\x35\x11\x26\x4A\xB4\x06\x32"
6493                           "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
6494                           "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
6495                           "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
6496                           "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
6497                           "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
6498                           "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
6499                           "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
6500                           "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
6501                           "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
6502                           "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
6503                           "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
6504                           "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
6505                           "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
6506                           "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
6507                           "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
6508                           "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
6509                           "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
6510                           "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
6511                           "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
6512                           "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
6513                           "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
6514                           "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
6515                           "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
6516                           "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
6517                           "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
6518                           "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
6519                           "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
6520                           "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
6521                           "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
6522                           "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
6523                           "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
6524                           "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
6525                           "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
6526                 .ilen   = 496,
6527                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6528                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6529                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6530                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6531                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6532                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6533                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6534                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6535                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6536                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6537                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6538                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6539                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6540                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6541                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6542                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6543                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6544                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6545                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6546                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6547                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6548                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6549                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6550                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6551                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6552                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6553                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6554                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6555                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6556                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6557                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6558                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6559                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6560                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6561                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6562                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6563                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6564                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6565                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6566                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6567                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6568                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6569                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6570                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6571                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6572                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6573                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6574                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6575                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6576                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6577                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6578                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6579                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6580                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6581                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6582                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6583                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6584                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6585                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6586                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6587                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6588                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
6589                 .rlen   = 496,
6590         },
6591 };
6592
6593 static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
6594         /* Generated from AES-LRW test vectors */
6595         {
6596                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
6597                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
6598                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
6599                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
6600                 .klen   = 32,
6601                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6602                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6603                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6604                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6605                 .ilen   = 16,
6606                 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
6607                           "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
6608                 .rlen   = 16,
6609         }, {
6610                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
6611                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
6612                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
6613                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
6614                 .klen   = 32,
6615                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6616                           "\x00\x00\x00\x00\x00\x00\x00\x02",
6617                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6618                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6619                 .ilen   = 16,
6620                 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
6621                           "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
6622                 .rlen   = 16,
6623         }, {
6624                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
6625                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
6626                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
6627                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
6628                 .klen   = 32,
6629                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6630                           "\x00\x00\x00\x02\x00\x00\x00\x00",
6631                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6632                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6633                 .ilen   = 16,
6634                 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
6635                           "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
6636                 .rlen   = 16,
6637         }, {
6638                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
6639                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
6640                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
6641                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
6642                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
6643                 .klen   = 40,
6644                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6645                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6646                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6647                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6648                 .ilen   = 16,
6649                 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
6650                           "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
6651                 .rlen   = 16,
6652         }, {
6653                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
6654                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
6655                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
6656                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
6657                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
6658                 .klen   = 40,
6659                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6660                           "\x00\x00\x00\x02\x00\x00\x00\x00",
6661                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6662                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6663                 .ilen   = 16,
6664                 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
6665                           "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
6666                 .rlen   = 16,
6667         }, {
6668                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6669                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6670                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6671                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6672                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6673                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6674                 .klen   = 48,
6675                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6676                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6677                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6678                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6679                 .ilen   = 16,
6680                 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
6681                           "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
6682                 .rlen   = 16,
6683         }, {
6684                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
6685                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
6686                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
6687                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
6688                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
6689                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
6690                 .klen   = 48,
6691                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6692                           "\x00\x00\x00\x02\x00\x00\x00\x00",
6693                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
6694                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6695                 .ilen   = 16,
6696                 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
6697                           "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
6698                 .rlen   = 16,
6699         }, {
6700                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6701                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6702                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6703                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6704                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6705                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6706                 .klen   = 48,
6707                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6708                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6709                 .input  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
6710                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
6711                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
6712                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
6713                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
6714                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
6715                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
6716                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
6717                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
6718                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
6719                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
6720                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
6721                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
6722                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
6723                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
6724                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
6725                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
6726                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
6727                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
6728                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
6729                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
6730                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
6731                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
6732                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
6733                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
6734                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
6735                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
6736                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
6737                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
6738                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
6739                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
6740                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
6741                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
6742                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
6743                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
6744                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
6745                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
6746                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
6747                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
6748                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
6749                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
6750                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
6751                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
6752                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
6753                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
6754                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
6755                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
6756                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
6757                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
6758                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
6759                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
6760                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
6761                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
6762                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
6763                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
6764                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
6765                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
6766                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
6767                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
6768                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
6769                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
6770                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
6771                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
6772                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
6773                 .ilen   = 512,
6774                 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
6775                           "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
6776                           "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
6777                           "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
6778                           "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
6779                           "\xce\xab\xda\x33\x30\x20\x12\xfa"
6780                           "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
6781                           "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
6782                           "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
6783                           "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
6784                           "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
6785                           "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
6786                           "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
6787                           "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
6788                           "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
6789                           "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
6790                           "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
6791                           "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
6792                           "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
6793                           "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
6794                           "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
6795                           "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
6796                           "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
6797                           "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
6798                           "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
6799                           "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
6800                           "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
6801                           "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
6802                           "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
6803                           "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
6804                           "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
6805                           "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
6806                           "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
6807                           "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
6808                           "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
6809                           "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
6810                           "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
6811                           "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
6812                           "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
6813                           "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
6814                           "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
6815                           "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
6816                           "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
6817                           "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
6818                           "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
6819                           "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
6820                           "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
6821                           "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
6822                           "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
6823                           "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
6824                           "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
6825                           "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
6826                           "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
6827                           "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
6828                           "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
6829                           "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
6830                           "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
6831                           "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
6832                           "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
6833                           "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
6834                           "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
6835                           "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
6836                           "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
6837                           "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
6838                 .rlen   = 512,
6839                 .also_non_np = 1,
6840                 .np     = 2,
6841                 .tap    = { 512 - 16, 16 },
6842         },
6843 };
6844
6845 static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
6846         /* Generated from AES-LRW test vectors */
6847         /* same as enc vectors with input and result reversed */
6848         {
6849                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
6850                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
6851                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
6852                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
6853                 .klen   = 32,
6854                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6855                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6856                 .input  = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
6857                           "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
6858                 .ilen   = 16,
6859                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6860                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6861                 .rlen   = 16,
6862         }, {
6863                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
6864                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
6865                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
6866                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
6867                 .klen   = 32,
6868                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6869                           "\x00\x00\x00\x00\x00\x00\x00\x02",
6870                 .input  = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
6871                           "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
6872                 .ilen   = 16,
6873                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6874                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6875                 .rlen   = 16,
6876         }, {
6877                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
6878                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
6879                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
6880                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
6881                 .klen   = 32,
6882                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6883                           "\x00\x00\x00\x02\x00\x00\x00\x00",
6884                 .input  = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
6885                           "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
6886                 .ilen   = 16,
6887                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6888                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6889                 .rlen   = 16,
6890         }, {
6891                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
6892                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
6893                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
6894                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
6895                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
6896                 .klen   = 40,
6897                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6898                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6899                 .input  = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
6900                           "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
6901                 .ilen   = 16,
6902                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6903                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6904                 .rlen   = 16,
6905         }, {
6906                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
6907                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
6908                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
6909                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
6910                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
6911                 .klen   = 40,
6912                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6913                           "\x00\x00\x00\x02\x00\x00\x00\x00",
6914                 .input  = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
6915                           "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
6916                 .ilen   = 16,
6917                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6918                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6919                 .rlen   = 16,
6920         }, {
6921                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6922                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6923                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6924                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6925                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6926                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6927                 .klen   = 48,
6928                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6929                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6930                 .input  = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
6931                           "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
6932                 .ilen   = 16,
6933                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6934                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6935                 .rlen   = 16,
6936         }, {
6937                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
6938                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
6939                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
6940                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
6941                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
6942                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
6943                 .klen   = 48,
6944                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6945                           "\x00\x00\x00\x02\x00\x00\x00\x00",
6946                 .input  = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
6947                           "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
6948                 .ilen   = 16,
6949                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
6950                           "\x38\x39\x41\x42\x43\x44\x45\x46",
6951                 .rlen   = 16,
6952         }, {
6953                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
6954                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
6955                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
6956                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
6957                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
6958                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
6959                 .klen   = 48,
6960                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
6961                           "\x00\x00\x00\x00\x00\x00\x00\x01",
6962                 .input  = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
6963                           "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
6964                           "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
6965                           "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
6966                           "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
6967                           "\xce\xab\xda\x33\x30\x20\x12\xfa"
6968                           "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
6969                           "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
6970                           "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
6971                           "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
6972                           "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
6973                           "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
6974                           "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
6975                           "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
6976                           "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
6977                           "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
6978                           "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
6979                           "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
6980                           "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
6981                           "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
6982                           "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
6983                           "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
6984                           "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
6985                           "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
6986                           "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
6987                           "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
6988                           "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
6989                           "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
6990                           "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
6991                           "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
6992                           "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
6993                           "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
6994                           "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
6995                           "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
6996                           "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
6997                           "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
6998                           "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
6999                           "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
7000                           "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
7001                           "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
7002                           "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
7003                           "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
7004                           "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
7005                           "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
7006                           "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
7007                           "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
7008                           "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
7009                           "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
7010                           "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
7011                           "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
7012                           "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
7013                           "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
7014                           "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
7015                           "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
7016                           "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
7017                           "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
7018                           "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
7019                           "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
7020                           "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
7021                           "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
7022                           "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
7023                           "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
7024                           "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
7025                           "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
7026                 .ilen   = 512,
7027                 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
7028                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
7029                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
7030                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
7031                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
7032                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
7033                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
7034                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
7035                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
7036                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
7037                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
7038                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
7039                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
7040                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
7041                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
7042                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
7043                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
7044                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
7045                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
7046                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
7047                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
7048                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
7049                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
7050                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
7051                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
7052                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
7053                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
7054                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
7055                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
7056                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
7057                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
7058                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
7059                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
7060                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
7061                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
7062                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
7063                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
7064                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
7065                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
7066                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
7067                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
7068                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
7069                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
7070                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
7071                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
7072                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
7073                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
7074                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
7075                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
7076                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
7077                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
7078                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
7079                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
7080                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
7081                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
7082                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
7083                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
7084                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
7085                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
7086                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
7087                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
7088                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
7089                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
7090                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
7091                 .rlen   = 512,
7092                 .also_non_np = 1,
7093                 .np     = 2,
7094                 .tap    = { 512 - 16, 16 },
7095         },
7096 };
7097
7098 static struct cipher_testvec serpent_xts_enc_tv_template[] = {
7099         /* Generated from AES-XTS test vectors */
7100         {
7101                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
7102                           "\x00\x00\x00\x00\x00\x00\x00\x00"
7103                           "\x00\x00\x00\x00\x00\x00\x00\x00"
7104                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7105                 .klen   = 32,
7106                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
7107                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7108                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
7109                           "\x00\x00\x00\x00\x00\x00\x00\x00"
7110                           "\x00\x00\x00\x00\x00\x00\x00\x00"
7111                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7112                 .ilen   = 32,
7113                 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
7114                           "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
7115                           "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
7116                           "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
7117                 .rlen   = 32,
7118         }, {
7119                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
7120                           "\x11\x11\x11\x11\x11\x11\x11\x11"
7121                           "\x22\x22\x22\x22\x22\x22\x22\x22"
7122                           "\x22\x22\x22\x22\x22\x22\x22\x22",
7123                 .klen   = 32,
7124                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
7125                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7126                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
7127                           "\x44\x44\x44\x44\x44\x44\x44\x44"
7128                           "\x44\x44\x44\x44\x44\x44\x44\x44"
7129                           "\x44\x44\x44\x44\x44\x44\x44\x44",
7130                 .ilen   = 32,
7131                 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
7132                           "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
7133                           "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
7134                           "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
7135                 .rlen   = 32,
7136         }, {
7137                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
7138                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
7139                           "\x22\x22\x22\x22\x22\x22\x22\x22"
7140                           "\x22\x22\x22\x22\x22\x22\x22\x22",
7141                 .klen   = 32,
7142                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
7143                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7144                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
7145                           "\x44\x44\x44\x44\x44\x44\x44\x44"
7146                           "\x44\x44\x44\x44\x44\x44\x44\x44"
7147                           "\x44\x44\x44\x44\x44\x44\x44\x44",
7148                 .ilen   = 32,
7149                 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
7150                           "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
7151                           "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
7152                           "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
7153                 .rlen   = 32,
7154         }, {
7155                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
7156                           "\x23\x53\x60\x28\x74\x71\x35\x26"
7157                           "\x31\x41\x59\x26\x53\x58\x97\x93"
7158                           "\x23\x84\x62\x64\x33\x83\x27\x95",
7159                 .klen   = 32,
7160                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
7161                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7162                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
7163                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7164                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7165                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7166                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7167                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7168                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7169                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7170                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7171                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7172                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7173                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7174                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7175                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7176                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7177                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7178                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7179                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7180                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7181                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7182                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7183                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7184                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7185                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7186                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7187                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7188                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7189                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7190                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7191                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7192                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7193                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7194                           "\x00\x01\x02\x03\x04\x05\x06\x07"
7195                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7196                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7197                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7198                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7199                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7200                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7201                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7202                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7203                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7204                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7205                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7206                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7207                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7208                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7209                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7210                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7211                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7212                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7213                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7214                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7215                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7216                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7217                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7218                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7219                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7220                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7221                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7222                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7223                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7224                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7225                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7226                 .ilen   = 512,
7227                 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
7228                           "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
7229                           "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
7230                           "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
7231                           "\x00\x5c\x75\x14\x06\xd6\x25\x82"
7232                           "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
7233                           "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
7234                           "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
7235                           "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
7236                           "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
7237                           "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
7238                           "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
7239                           "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
7240                           "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
7241                           "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
7242                           "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
7243                           "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
7244                           "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
7245                           "\x58\xfa\x43\x91\x16\x85\x40\xbb"
7246                           "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
7247                           "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
7248                           "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
7249                           "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
7250                           "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
7251                           "\x6e\x29\x60\xbd\x10\x14\x84\x82"
7252                           "\x83\x82\x0c\x63\x73\x92\x02\x7c"
7253                           "\x55\x37\x20\x80\x17\x51\xc8\xbc"
7254                           "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
7255                           "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
7256                           "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
7257                           "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
7258                           "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
7259                           "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
7260                           "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
7261                           "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
7262                           "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
7263                           "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
7264                           "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
7265                           "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
7266                           "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
7267                           "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
7268                           "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
7269                           "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
7270                           "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
7271                           "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
7272                           "\x43\x42\x35\xd0\xcf\xec\x77\x67"
7273                           "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
7274                           "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
7275                           "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
7276                           "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
7277                           "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
7278                           "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
7279                           "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
7280                           "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
7281                           "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
7282                           "\x03\x57\xe6\x98\x52\x2f\x61\x62"
7283                           "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
7284                           "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
7285                           "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
7286                           "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
7287                           "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
7288                           "\xef\x91\x64\x1d\x18\x07\x4e\x31"
7289                           "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
7290                           "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
7291                 .rlen   = 512,
7292         }, {
7293                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
7294                           "\x23\x53\x60\x28\x74\x71\x35\x26"
7295                           "\x62\x49\x77\x57\x24\x70\x93\x69"
7296                           "\x99\x59\x57\x49\x66\x96\x76\x27"
7297                           "\x31\x41\x59\x26\x53\x58\x97\x93"
7298                           "\x23\x84\x62\x64\x33\x83\x27\x95"
7299                           "\x02\x88\x41\x97\x16\x93\x99\x37"
7300                           "\x51\x05\x82\x09\x74\x94\x45\x92",
7301                 .klen   = 64,
7302                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
7303                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7304                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
7305                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7306                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7307                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7308                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7309                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7310                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7311                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7312                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7313                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7314                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7315                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7316                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7317                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7318                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7319                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7320                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7321                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7322                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7323                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7324                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7325                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7326                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7327                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7328                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7329                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7330                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7331                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7332                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7333                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7334                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7335                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7336                           "\x00\x01\x02\x03\x04\x05\x06\x07"
7337                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7338                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7339                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7340                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7341                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7342                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7343                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7344                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7345                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7346                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7347                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7348                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7349                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7350                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7351                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7352                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7353                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7354                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7355                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7356                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7357                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7358                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7359                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7360                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7361                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7362                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7363                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7364                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7365                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7366                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7367                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7368                 .ilen   = 512,
7369                 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
7370                           "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
7371                           "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
7372                           "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
7373                           "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
7374                           "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
7375                           "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
7376                           "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
7377                           "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
7378                           "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
7379                           "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
7380                           "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
7381                           "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
7382                           "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
7383                           "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
7384                           "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
7385                           "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
7386                           "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
7387                           "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
7388                           "\xec\x9a\xda\x64\x96\xb5\x61\xff"
7389                           "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
7390                           "\x81\x85\x14\xa8\x59\xac\x8c\x94"
7391                           "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
7392                           "\x82\xc6\x4d\xca\x86\xea\x53\x28"
7393                           "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
7394                           "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
7395                           "\x05\xca\x81\x7b\xda\xa2\xde\x63"
7396                           "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
7397                           "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
7398                           "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
7399                           "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
7400                           "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
7401                           "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
7402                           "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
7403                           "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
7404                           "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
7405                           "\xfd\x43\x7d\xda\x42\x51\x87\x43"
7406                           "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
7407                           "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
7408                           "\x27\x5f\x11\xac\x71\xc7\x48\x46"
7409                           "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
7410                           "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
7411                           "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
7412                           "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
7413                           "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
7414                           "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
7415                           "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
7416                           "\x50\x88\x97\x40\x69\xb1\x37\xf5"
7417                           "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
7418                           "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
7419                           "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
7420                           "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
7421                           "\xc1\x16\x73\x50\x77\xba\xa6\x65"
7422                           "\x20\x2d\xb0\x02\x27\x89\xda\x99"
7423                           "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
7424                           "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
7425                           "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
7426                           "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
7427                           "\xa3\x0e\x33\x74\x40\x18\x39\x72"
7428                           "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
7429                           "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
7430                           "\x30\x05\xc8\x92\x98\x80\xff\x7a"
7431                           "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
7432                           "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
7433                 .rlen   = 512,
7434                 .also_non_np = 1,
7435                 .np     = 2,
7436                 .tap    = { 512 - 16, 16 },
7437         },
7438 };
7439
7440 static struct cipher_testvec serpent_xts_dec_tv_template[] = {
7441         /* Generated from AES-XTS test vectors */
7442         /* same as enc vectors with input and result reversed */
7443         {
7444                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
7445                           "\x00\x00\x00\x00\x00\x00\x00\x00"
7446                           "\x00\x00\x00\x00\x00\x00\x00\x00"
7447                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7448                 .klen   = 32,
7449                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
7450                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7451                 .input  = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
7452                           "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
7453                           "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
7454                           "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
7455                 .ilen   = 32,
7456                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
7457                           "\x00\x00\x00\x00\x00\x00\x00\x00"
7458                           "\x00\x00\x00\x00\x00\x00\x00\x00"
7459                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7460                 .rlen   = 32,
7461         }, {
7462                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
7463                           "\x11\x11\x11\x11\x11\x11\x11\x11"
7464                           "\x22\x22\x22\x22\x22\x22\x22\x22"
7465                           "\x22\x22\x22\x22\x22\x22\x22\x22",
7466                 .klen   = 32,
7467                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
7468                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7469                 .input  = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
7470                           "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
7471                           "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
7472                           "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
7473                 .ilen   = 32,
7474                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
7475                           "\x44\x44\x44\x44\x44\x44\x44\x44"
7476                           "\x44\x44\x44\x44\x44\x44\x44\x44"
7477                           "\x44\x44\x44\x44\x44\x44\x44\x44",
7478                 .rlen   = 32,
7479         }, {
7480                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
7481                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
7482                           "\x22\x22\x22\x22\x22\x22\x22\x22"
7483                           "\x22\x22\x22\x22\x22\x22\x22\x22",
7484                 .klen   = 32,
7485                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
7486                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7487                 .input  = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
7488                           "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
7489                           "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
7490                           "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
7491                 .ilen   = 32,
7492                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
7493                           "\x44\x44\x44\x44\x44\x44\x44\x44"
7494                           "\x44\x44\x44\x44\x44\x44\x44\x44"
7495                           "\x44\x44\x44\x44\x44\x44\x44\x44",
7496                 .rlen   = 32,
7497         }, {
7498                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
7499                           "\x23\x53\x60\x28\x74\x71\x35\x26"
7500                           "\x31\x41\x59\x26\x53\x58\x97\x93"
7501                           "\x23\x84\x62\x64\x33\x83\x27\x95",
7502                 .klen   = 32,
7503                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
7504                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7505                 .input  = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
7506                           "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
7507                           "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
7508                           "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
7509                           "\x00\x5c\x75\x14\x06\xd6\x25\x82"
7510                           "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
7511                           "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
7512                           "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
7513                           "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
7514                           "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
7515                           "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
7516                           "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
7517                           "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
7518                           "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
7519                           "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
7520                           "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
7521                           "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
7522                           "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
7523                           "\x58\xfa\x43\x91\x16\x85\x40\xbb"
7524                           "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
7525                           "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
7526                           "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
7527                           "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
7528                           "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
7529                           "\x6e\x29\x60\xbd\x10\x14\x84\x82"
7530                           "\x83\x82\x0c\x63\x73\x92\x02\x7c"
7531                           "\x55\x37\x20\x80\x17\x51\xc8\xbc"
7532                           "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
7533                           "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
7534                           "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
7535                           "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
7536                           "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
7537                           "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
7538                           "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
7539                           "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
7540                           "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
7541                           "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
7542                           "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
7543                           "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
7544                           "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
7545                           "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
7546                           "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
7547                           "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
7548                           "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
7549                           "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
7550                           "\x43\x42\x35\xd0\xcf\xec\x77\x67"
7551                           "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
7552                           "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
7553                           "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
7554                           "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
7555                           "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
7556                           "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
7557                           "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
7558                           "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
7559                           "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
7560                           "\x03\x57\xe6\x98\x52\x2f\x61\x62"
7561                           "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
7562                           "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
7563                           "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
7564                           "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
7565                           "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
7566                           "\xef\x91\x64\x1d\x18\x07\x4e\x31"
7567                           "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
7568                           "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
7569                 .ilen   = 512,
7570                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
7571                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7572                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7573                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7574                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7575                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7576                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7577                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7578                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7579                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7580                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7581                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7582                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7583                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7584                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7585                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7586                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7587                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7588                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7589                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7590                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7591                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7592                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7593                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7594                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7595                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7596                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7597                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7598                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7599                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7600                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7601                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7602                           "\x00\x01\x02\x03\x04\x05\x06\x07"
7603                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7604                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7605                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7606                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7607                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7608                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7609                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7610                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7611                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7612                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7613                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7614                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7615                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7616                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7617                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7618                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7619                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7620                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7621                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7622                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7623                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7624                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7625                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7626                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7627                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7628                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7629                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7630                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7631                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7632                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7633                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7634                 .rlen   = 512,
7635         }, {
7636                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
7637                           "\x23\x53\x60\x28\x74\x71\x35\x26"
7638                           "\x62\x49\x77\x57\x24\x70\x93\x69"
7639                           "\x99\x59\x57\x49\x66\x96\x76\x27"
7640                           "\x31\x41\x59\x26\x53\x58\x97\x93"
7641                           "\x23\x84\x62\x64\x33\x83\x27\x95"
7642                           "\x02\x88\x41\x97\x16\x93\x99\x37"
7643                           "\x51\x05\x82\x09\x74\x94\x45\x92",
7644                 .klen   = 64,
7645                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
7646                           "\x00\x00\x00\x00\x00\x00\x00\x00",
7647                 .input  = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
7648                           "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
7649                           "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
7650                           "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
7651                           "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
7652                           "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
7653                           "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
7654                           "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
7655                           "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
7656                           "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
7657                           "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
7658                           "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
7659                           "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
7660                           "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
7661                           "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
7662                           "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
7663                           "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
7664                           "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
7665                           "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
7666                           "\xec\x9a\xda\x64\x96\xb5\x61\xff"
7667                           "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
7668                           "\x81\x85\x14\xa8\x59\xac\x8c\x94"
7669                           "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
7670                           "\x82\xc6\x4d\xca\x86\xea\x53\x28"
7671                           "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
7672                           "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
7673                           "\x05\xca\x81\x7b\xda\xa2\xde\x63"
7674                           "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
7675                           "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
7676                           "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
7677                           "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
7678                           "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
7679                           "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
7680                           "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
7681                           "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
7682                           "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
7683                           "\xfd\x43\x7d\xda\x42\x51\x87\x43"
7684                           "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
7685                           "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
7686                           "\x27\x5f\x11\xac\x71\xc7\x48\x46"
7687                           "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
7688                           "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
7689                           "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
7690                           "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
7691                           "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
7692                           "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
7693                           "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
7694                           "\x50\x88\x97\x40\x69\xb1\x37\xf5"
7695                           "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
7696                           "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
7697                           "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
7698                           "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
7699                           "\xc1\x16\x73\x50\x77\xba\xa6\x65"
7700                           "\x20\x2d\xb0\x02\x27\x89\xda\x99"
7701                           "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
7702                           "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
7703                           "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
7704                           "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
7705                           "\xa3\x0e\x33\x74\x40\x18\x39\x72"
7706                           "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
7707                           "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
7708                           "\x30\x05\xc8\x92\x98\x80\xff\x7a"
7709                           "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
7710                           "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
7711                 .ilen   = 512,
7712                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
7713                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7714                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7715                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7716                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7717                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7718                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7719                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7720                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7721                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7722                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7723                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7724                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7725                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7726                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7727                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7728                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7729                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7730                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7731                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7732                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7733                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7734                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7735                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7736                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7737                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7738                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7739                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7740                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7741                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7742                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7743                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
7744                           "\x00\x01\x02\x03\x04\x05\x06\x07"
7745                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
7746                           "\x10\x11\x12\x13\x14\x15\x16\x17"
7747                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
7748                           "\x20\x21\x22\x23\x24\x25\x26\x27"
7749                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
7750                           "\x30\x31\x32\x33\x34\x35\x36\x37"
7751                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
7752                           "\x40\x41\x42\x43\x44\x45\x46\x47"
7753                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
7754                           "\x50\x51\x52\x53\x54\x55\x56\x57"
7755                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
7756                           "\x60\x61\x62\x63\x64\x65\x66\x67"
7757                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
7758                           "\x70\x71\x72\x73\x74\x75\x76\x77"
7759                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
7760                           "\x80\x81\x82\x83\x84\x85\x86\x87"
7761                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
7762                           "\x90\x91\x92\x93\x94\x95\x96\x97"
7763                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
7764                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
7765                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
7766                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
7767                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
7768                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
7769                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
7770                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
7771                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
7772                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
7773                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
7774                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
7775                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
7776                 .rlen   = 512,
7777                 .also_non_np = 1,
7778                 .np     = 2,
7779                 .tap    = { 512 - 16, 16 },
7780         },
7781 };
7782
7783 /* Cast6 test vectors from RFC 2612 */
7784 #define CAST6_ENC_TEST_VECTORS          4
7785 #define CAST6_DEC_TEST_VECTORS          4
7786 #define CAST6_CBC_ENC_TEST_VECTORS      1
7787 #define CAST6_CBC_DEC_TEST_VECTORS      1
7788 #define CAST6_CTR_ENC_TEST_VECTORS      2
7789 #define CAST6_CTR_DEC_TEST_VECTORS      2
7790 #define CAST6_LRW_ENC_TEST_VECTORS      1
7791 #define CAST6_LRW_DEC_TEST_VECTORS      1
7792 #define CAST6_XTS_ENC_TEST_VECTORS      1
7793 #define CAST6_XTS_DEC_TEST_VECTORS      1
7794
7795 static struct cipher_testvec cast6_enc_tv_template[] = {
7796         {
7797                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7798                           "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
7799                 .klen   = 16,
7800                 .input  = zeroed_string,
7801                 .ilen   = 16,
7802                 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
7803                           "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
7804                 .rlen   = 16,
7805         }, {
7806                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7807                           "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
7808                           "\xba\xc7\x7a\x77\x17\x94\x28\x63",
7809                 .klen   = 24,
7810                 .input  = zeroed_string,
7811                 .ilen   = 16,
7812                 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
7813                           "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
7814                 .rlen   = 16,
7815         }, {
7816                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7817                           "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
7818                           "\x8d\x7c\x47\xce\x26\x49\x08\x46"
7819                           "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
7820                 .klen   = 32,
7821                 .input  = zeroed_string,
7822                 .ilen   = 16,
7823                 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
7824                           "\xc9\x87\x01\x36\x55\x33\x17\xfa",
7825                 .rlen   = 16,
7826         }, { /* Generated from TF test vectors */
7827                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7828                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7829                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7830                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7831                 .klen   = 32,
7832                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7833                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7834                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7835                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7836                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7837                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7838                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7839                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7840                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7841                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7842                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7843                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7844                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7845                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7846                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7847                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7848                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7849                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7850                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7851                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7852                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7853                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7854                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7855                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7856                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7857                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7858                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7859                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7860                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7861                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7862                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7863                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7864                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7865                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7866                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7867                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7868                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7869                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7870                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7871                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7872                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7873                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7874                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7875                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7876                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7877                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7878                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7879                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7880                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7881                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7882                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7883                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7884                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7885                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7886                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7887                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7888                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7889                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7890                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7891                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7892                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7893                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7894                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7895                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7896                 .ilen   = 496,
7897                 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
7898                           "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
7899                           "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
7900                           "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
7901                           "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
7902                           "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
7903                           "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
7904                           "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
7905                           "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
7906                           "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
7907                           "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
7908                           "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
7909                           "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
7910                           "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
7911                           "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
7912                           "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
7913                           "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
7914                           "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
7915                           "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
7916                           "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
7917                           "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
7918                           "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
7919                           "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
7920                           "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
7921                           "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
7922                           "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
7923                           "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
7924                           "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
7925                           "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
7926                           "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
7927                           "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
7928                           "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
7929                           "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
7930                           "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
7931                           "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
7932                           "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
7933                           "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
7934                           "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
7935                           "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
7936                           "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
7937                           "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
7938                           "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
7939                           "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
7940                           "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
7941                           "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
7942                           "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
7943                           "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
7944                           "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
7945                           "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
7946                           "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
7947                           "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
7948                           "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
7949                           "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
7950                           "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
7951                           "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
7952                           "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
7953                           "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
7954                           "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
7955                           "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
7956                           "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
7957                           "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
7958                           "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
7959                 .rlen   = 496,
7960                 .also_non_np = 1,
7961                 .np     = 2,
7962                 .tap    = { 496 - 16, 16 },
7963         },
7964 };
7965
7966 static struct cipher_testvec cast6_dec_tv_template[] = {
7967         {
7968                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7969                           "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
7970                 .klen   = 16,
7971                 .input  = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
7972                           "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
7973                 .ilen   = 16,
7974                 .result = zeroed_string,
7975                 .rlen   = 16,
7976         }, {
7977                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7978                           "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
7979                           "\xba\xc7\x7a\x77\x17\x94\x28\x63",
7980                 .klen   = 24,
7981                 .input  = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
7982                           "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
7983                 .ilen   = 16,
7984                 .result = zeroed_string,
7985                 .rlen   = 16,
7986         }, {
7987                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
7988                           "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
7989                           "\x8d\x7c\x47\xce\x26\x49\x08\x46"
7990                           "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
7991                 .klen   = 32,
7992                 .input  = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
7993                           "\xc9\x87\x01\x36\x55\x33\x17\xfa",
7994                 .ilen   = 16,
7995                 .result = zeroed_string,
7996                 .rlen   = 16,
7997         }, { /* Generated from TF test vectors */
7998                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7999                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8000                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8001                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8002                 .klen   = 32,
8003                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8004                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8005                 .input  = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
8006                           "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
8007                           "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
8008                           "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
8009                           "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
8010                           "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
8011                           "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
8012                           "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
8013                           "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
8014                           "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
8015                           "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
8016                           "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
8017                           "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
8018                           "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
8019                           "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
8020                           "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
8021                           "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
8022                           "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
8023                           "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
8024                           "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
8025                           "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
8026                           "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
8027                           "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
8028                           "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
8029                           "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
8030                           "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
8031                           "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
8032                           "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
8033                           "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
8034                           "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
8035                           "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
8036                           "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
8037                           "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
8038                           "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
8039                           "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
8040                           "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
8041                           "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
8042                           "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
8043                           "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
8044                           "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
8045                           "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
8046                           "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
8047                           "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
8048                           "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
8049                           "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
8050                           "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
8051                           "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
8052                           "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
8053                           "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
8054                           "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
8055                           "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
8056                           "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
8057                           "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
8058                           "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
8059                           "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
8060                           "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
8061                           "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
8062                           "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
8063                           "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
8064                           "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
8065                           "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
8066                           "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
8067                 .ilen   = 496,
8068                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8069                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8070                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8071                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8072                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8073                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8074                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8075                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8076                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8077                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8078                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8079                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8080                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8081                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8082                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8083                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8084                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8085                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8086                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8087                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8088                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8089                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8090                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8091                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8092                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8093                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8094                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8095                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8096                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8097                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8098                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8099                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8100                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8101                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8102                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8103                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8104                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8105                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8106                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8107                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8108                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8109                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8110                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8111                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8112                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8113                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8114                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8115                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8116                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8117                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8118                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8119                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8120                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8121                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8122                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8123                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8124                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8125                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8126                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8127                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8128                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8129                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8130                 .rlen   = 496,
8131                 .also_non_np = 1,
8132                 .np     = 2,
8133                 .tap    = { 496 - 16, 16 },
8134         },
8135 };
8136
8137 static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
8138         { /* Generated from TF test vectors */
8139                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8140                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8141                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8142                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8143                 .klen   = 32,
8144                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8145                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8146                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8147                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8148                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8149                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8150                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8151                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8152                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8153                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8154                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8155                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8156                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8157                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8158                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8159                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8160                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8161                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8162                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8163                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8164                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8165                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8166                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8167                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8168                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8169                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8170                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8171                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8172                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8173                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8174                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8175                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8176                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8177                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8178                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8179                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8180                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8181                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8182                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8183                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8184                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8185                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8186                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8187                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8188                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8189                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8190                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8191                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8192                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8193                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8194                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8195                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8196                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8197                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8198                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8199                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8200                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8201                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8202                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8203                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8204                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8205                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8206                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8207                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8208                 .ilen   = 496,
8209                 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
8210                           "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
8211                           "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
8212                           "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
8213                           "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
8214                           "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
8215                           "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
8216                           "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
8217                           "\x57\x95\xE1\x21\x26\x10\x9A\x21"
8218                           "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
8219                           "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
8220                           "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
8221                           "\x23\x16\x47\x72\x81\x13\x3A\x72"
8222                           "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
8223                           "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
8224                           "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
8225                           "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
8226                           "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
8227                           "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
8228                           "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
8229                           "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
8230                           "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
8231                           "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
8232                           "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
8233                           "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
8234                           "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
8235                           "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
8236                           "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
8237                           "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
8238                           "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
8239                           "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
8240                           "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
8241                           "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
8242                           "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
8243                           "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
8244                           "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
8245                           "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
8246                           "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
8247                           "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
8248                           "\x73\x3F\x12\x91\x47\x54\xBA\x39"
8249                           "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
8250                           "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
8251                           "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
8252                           "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
8253                           "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
8254                           "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
8255                           "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
8256                           "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
8257                           "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
8258                           "\x80\x21\x83\x58\x3C\x76\xFD\x28"
8259                           "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
8260                           "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
8261                           "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
8262                           "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
8263                           "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
8264                           "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
8265                           "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
8266                           "\x56\x4D\x82\x62\x37\xA3\x48\x01"
8267                           "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
8268                           "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
8269                           "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
8270                           "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
8271                 .rlen   = 496,
8272                 .also_non_np = 1,
8273                 .np     = 2,
8274                 .tap    = { 496 - 16, 16 },
8275         },
8276 };
8277
8278 static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
8279         { /* Generated from TF test vectors */
8280                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8281                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8282                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8283                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8284                 .klen   = 32,
8285                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8286                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8287                 .input  = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
8288                           "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
8289                           "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
8290                           "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
8291                           "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
8292                           "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
8293                           "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
8294                           "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
8295                           "\x57\x95\xE1\x21\x26\x10\x9A\x21"
8296                           "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
8297                           "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
8298                           "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
8299                           "\x23\x16\x47\x72\x81\x13\x3A\x72"
8300                           "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
8301                           "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
8302                           "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
8303                           "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
8304                           "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
8305                           "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
8306                           "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
8307                           "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
8308                           "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
8309                           "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
8310                           "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
8311                           "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
8312                           "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
8313                           "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
8314                           "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
8315                           "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
8316                           "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
8317                           "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
8318                           "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
8319                           "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
8320                           "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
8321                           "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
8322                           "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
8323                           "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
8324                           "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
8325                           "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
8326                           "\x73\x3F\x12\x91\x47\x54\xBA\x39"
8327                           "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
8328                           "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
8329                           "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
8330                           "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
8331                           "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
8332                           "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
8333                           "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
8334                           "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
8335                           "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
8336                           "\x80\x21\x83\x58\x3C\x76\xFD\x28"
8337                           "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
8338                           "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
8339                           "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
8340                           "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
8341                           "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
8342                           "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
8343                           "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
8344                           "\x56\x4D\x82\x62\x37\xA3\x48\x01"
8345                           "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
8346                           "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
8347                           "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
8348                           "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
8349                 .ilen   = 496,
8350                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8351                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8352                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8353                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8354                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8355                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8356                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8357                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8358                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8359                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8360                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8361                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8362                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8363                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8364                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8365                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8366                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8367                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8368                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8369                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8370                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8371                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8372                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8373                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8374                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8375                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8376                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8377                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8378                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8379                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8380                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8381                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8382                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8383                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8384                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8385                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8386                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8387                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8388                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8389                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8390                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8391                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8392                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8393                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8394                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8395                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8396                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8397                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8398                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8399                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8400                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8401                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8402                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8403                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8404                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8405                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8406                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8407                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8408                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8409                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8410                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8411                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8412                 .rlen   = 496,
8413                 .also_non_np = 1,
8414                 .np     = 2,
8415                 .tap    = { 496 - 16, 16 },
8416         },
8417 };
8418
8419 static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
8420         { /* Generated from TF test vectors */
8421                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8422                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8423                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8424                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8425                 .klen   = 32,
8426                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8427                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8428                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8429                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8430                           "\x3A",
8431                 .ilen   = 17,
8432                 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
8433                           "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
8434                           "\x57",
8435                 .rlen   = 17,
8436         }, { /* Generated from TF test vectors */
8437                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8438                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8439                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8440                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8441                 .klen   = 32,
8442                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8443                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8444                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8445                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8446                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8447                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8448                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8449                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8450                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8451                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8452                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8453                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8454                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8455                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8456                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8457                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8458                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8459                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8460                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8461                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8462                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8463                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8464                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8465                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8466                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8467                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8468                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8469                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8470                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8471                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8472                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8473                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8474                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8475                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8476                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8477                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8478                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8479                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8480                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8481                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8482                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8483                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8484                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8485                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8486                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8487                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8488                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8489                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8490                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8491                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8492                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8493                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8494                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8495                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8496                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8497                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8498                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8499                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8500                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8501                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8502                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8503                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8504                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8505                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8506                 .ilen   = 496,
8507                 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
8508                           "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
8509                           "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
8510                           "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
8511                           "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
8512                           "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
8513                           "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
8514                           "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
8515                           "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
8516                           "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
8517                           "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
8518                           "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
8519                           "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
8520                           "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
8521                           "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
8522                           "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
8523                           "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
8524                           "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
8525                           "\x49\x61\x22\x52\x64\x8C\x46\x41"
8526                           "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
8527                           "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
8528                           "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
8529                           "\x00\x14\x15\x59\xC1\x30\x64\xAF"
8530                           "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
8531                           "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
8532                           "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
8533                           "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
8534                           "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
8535                           "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
8536                           "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
8537                           "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
8538                           "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
8539                           "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
8540                           "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
8541                           "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
8542                           "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
8543                           "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
8544                           "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
8545                           "\x60\x40\x38\x90\x20\x46\xC7\xB3"
8546                           "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
8547                           "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
8548                           "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
8549                           "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
8550                           "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
8551                           "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
8552                           "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
8553                           "\x73\xFC\x91\xAB\x79\x41\x23\x14"
8554                           "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
8555                           "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
8556                           "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
8557                           "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
8558                           "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
8559                           "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
8560                           "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
8561                           "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
8562                           "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
8563                           "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
8564                           "\x19\x35\x88\x22\x45\x59\x0E\x8F"
8565                           "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
8566                           "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
8567                           "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
8568                           "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
8569                 .rlen   = 496,
8570                 .also_non_np = 1,
8571                 .np     = 2,
8572                 .tap    = { 496 - 16, 16 },
8573         },
8574 };
8575
8576 static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
8577         { /* Generated from TF test vectors */
8578                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8579                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8580                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8581                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8582                 .klen   = 32,
8583                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8584                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8585                 .input  = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
8586                           "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
8587                           "\x57",
8588                 .ilen   = 17,
8589                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8590                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8591                           "\x3A",
8592                 .rlen   = 17,
8593         }, { /* Generated from TF test vectors */
8594                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8595                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8596                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8597                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8598                 .klen   = 32,
8599                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8600                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8601                 .input  = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
8602                           "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
8603                           "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
8604                           "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
8605                           "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
8606                           "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
8607                           "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
8608                           "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
8609                           "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
8610                           "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
8611                           "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
8612                           "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
8613                           "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
8614                           "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
8615                           "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
8616                           "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
8617                           "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
8618                           "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
8619                           "\x49\x61\x22\x52\x64\x8C\x46\x41"
8620                           "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
8621                           "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
8622                           "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
8623                           "\x00\x14\x15\x59\xC1\x30\x64\xAF"
8624                           "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
8625                           "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
8626                           "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
8627                           "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
8628                           "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
8629                           "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
8630                           "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
8631                           "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
8632                           "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
8633                           "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
8634                           "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
8635                           "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
8636                           "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
8637                           "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
8638                           "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
8639                           "\x60\x40\x38\x90\x20\x46\xC7\xB3"
8640                           "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
8641                           "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
8642                           "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
8643                           "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
8644                           "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
8645                           "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
8646                           "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
8647                           "\x73\xFC\x91\xAB\x79\x41\x23\x14"
8648                           "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
8649                           "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
8650                           "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
8651                           "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
8652                           "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
8653                           "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
8654                           "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
8655                           "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
8656                           "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
8657                           "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
8658                           "\x19\x35\x88\x22\x45\x59\x0E\x8F"
8659                           "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
8660                           "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
8661                           "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
8662                           "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
8663                 .ilen   = 496,
8664                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8665                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8666                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8667                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8668                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8669                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8670                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8671                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8672                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8673                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8674                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8675                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8676                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8677                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8678                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8679                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8680                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8681                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8682                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8683                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8684                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8685                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8686                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8687                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8688                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8689                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8690                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8691                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8692                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8693                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8694                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8695                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8696                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8697                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8698                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8699                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8700                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8701                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8702                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8703                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8704                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8705                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8706                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8707                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8708                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8709                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8710                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8711                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8712                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8713                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8714                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8715                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8716                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8717                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8718                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8719                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8720                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8721                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8722                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8723                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8724                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8725                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8726                 .rlen   = 496,
8727                 .also_non_np = 1,
8728                 .np     = 2,
8729                 .tap    = { 496 - 16, 16 },
8730         },
8731 };
8732
8733 static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
8734         { /* Generated from TF test vectors */
8735                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8736                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8737                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8738                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8739                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8740                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8741                 .klen   = 48,
8742                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8743                           "\x00\x00\x00\x00\x00\x00\x00\x01",
8744                 .input  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8745                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8746                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8747                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8748                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8749                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8750                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8751                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8752                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8753                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8754                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8755                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8756                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8757                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8758                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8759                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8760                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8761                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8762                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8763                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8764                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8765                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8766                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8767                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8768                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8769                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8770                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8771                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8772                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8773                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8774                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8775                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8776                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8777                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8778                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8779                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8780                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8781                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8782                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8783                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8784                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8785                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8786                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8787                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8788                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8789                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8790                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8791                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8792                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8793                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8794                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8795                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8796                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8797                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8798                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8799                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8800                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8801                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8802                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8803                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8804                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8805                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8806                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8807                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8808                 .ilen   = 512,
8809                 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
8810                           "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
8811                           "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
8812                           "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
8813                           "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
8814                           "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
8815                           "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
8816                           "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
8817                           "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
8818                           "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
8819                           "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
8820                           "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
8821                           "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
8822                           "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
8823                           "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
8824                           "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
8825                           "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
8826                           "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
8827                           "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
8828                           "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
8829                           "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
8830                           "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
8831                           "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
8832                           "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
8833                           "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
8834                           "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
8835                           "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
8836                           "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
8837                           "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
8838                           "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
8839                           "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
8840                           "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
8841                           "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
8842                           "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
8843                           "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
8844                           "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
8845                           "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
8846                           "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
8847                           "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
8848                           "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
8849                           "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
8850                           "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
8851                           "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
8852                           "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
8853                           "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
8854                           "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
8855                           "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
8856                           "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
8857                           "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
8858                           "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
8859                           "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
8860                           "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
8861                           "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
8862                           "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
8863                           "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
8864                           "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
8865                           "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
8866                           "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
8867                           "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
8868                           "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
8869                           "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
8870                           "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
8871                           "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
8872                           "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
8873                 .rlen   = 512,
8874                 .also_non_np = 1,
8875                 .np     = 2,
8876                 .tap    = { 512 - 16, 16 },
8877         },
8878 };
8879
8880 static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
8881         { /* Generated from TF test vectors */
8882                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8883                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8884                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8885                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8886                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8887                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8888                 .klen   = 48,
8889                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8890                           "\x00\x00\x00\x00\x00\x00\x00\x01",
8891                 .input  = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
8892                           "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
8893                           "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
8894                           "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
8895                           "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
8896                           "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
8897                           "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
8898                           "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
8899                           "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
8900                           "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
8901                           "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
8902                           "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
8903                           "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
8904                           "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
8905                           "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
8906                           "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
8907                           "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
8908                           "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
8909                           "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
8910                           "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
8911                           "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
8912                           "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
8913                           "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
8914                           "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
8915                           "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
8916                           "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
8917                           "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
8918                           "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
8919                           "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
8920                           "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
8921                           "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
8922                           "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
8923                           "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
8924                           "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
8925                           "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
8926                           "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
8927                           "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
8928                           "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
8929                           "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
8930                           "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
8931                           "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
8932                           "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
8933                           "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
8934                           "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
8935                           "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
8936                           "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
8937                           "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
8938                           "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
8939                           "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
8940                           "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
8941                           "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
8942                           "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
8943                           "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
8944                           "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
8945                           "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
8946                           "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
8947                           "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
8948                           "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
8949                           "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
8950                           "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
8951                           "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
8952                           "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
8953                           "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
8954                           "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
8955                 .ilen   = 512,
8956                 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8957                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8958                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8959                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8960                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8961                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8962                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8963                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8964                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8965                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8966                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8967                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8968                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8969                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8970                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8971                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8972                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8973                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8974                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8975                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8976                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8977                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8978                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8979                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8980                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8981                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8982                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8983                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8984                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8985                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8986                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8987                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8988                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8989                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8990                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8991                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8992                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8993                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8994                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8995                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8996                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8997                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8998                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8999                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
9000                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
9001                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
9002                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
9003                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
9004                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
9005                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
9006                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
9007                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
9008                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
9009                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
9010                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
9011                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
9012                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
9013                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
9014                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
9015                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
9016                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
9017                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
9018                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
9019                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
9020                 .rlen   = 512,
9021                 .also_non_np = 1,
9022                 .np     = 2,
9023                 .tap    = { 512 - 16, 16 },
9024         },
9025 };
9026
9027 static struct cipher_testvec cast6_xts_enc_tv_template[] = {
9028         { /* Generated from TF test vectors */
9029                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
9030                           "\x23\x53\x60\x28\x74\x71\x35\x26"
9031                           "\x62\x49\x77\x57\x24\x70\x93\x69"
9032                           "\x99\x59\x57\x49\x66\x96\x76\x27"
9033                           "\x31\x41\x59\x26\x53\x58\x97\x93"
9034                           "\x23\x84\x62\x64\x33\x83\x27\x95"
9035                           "\x02\x88\x41\x97\x16\x93\x99\x37"
9036                           "\x51\x05\x82\x09\x74\x94\x45\x92",
9037                 .klen   = 64,
9038                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
9039                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9040                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9041                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9042                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9043                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9044                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9045                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9046                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9047                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9048                           "\x40\x41\x42\x43\x44\x45\x46\x47"
9049                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9050                           "\x50\x51\x52\x53\x54\x55\x56\x57"
9051                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9052                           "\x60\x61\x62\x63\x64\x65\x66\x67"
9053                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9054                           "\x70\x71\x72\x73\x74\x75\x76\x77"
9055                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9056                           "\x80\x81\x82\x83\x84\x85\x86\x87"
9057                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9058                           "\x90\x91\x92\x93\x94\x95\x96\x97"
9059                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9060                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9061                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9062                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9063                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9064                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9065                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9066                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9067                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9068                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9069                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9070                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9071                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9072                           "\x00\x01\x02\x03\x04\x05\x06\x07"
9073                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9074                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9075                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9076                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9077                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9078                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9079                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9080                           "\x40\x41\x42\x43\x44\x45\x46\x47"
9081                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9082                           "\x50\x51\x52\x53\x54\x55\x56\x57"
9083                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9084                           "\x60\x61\x62\x63\x64\x65\x66\x67"
9085                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9086                           "\x70\x71\x72\x73\x74\x75\x76\x77"
9087                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9088                           "\x80\x81\x82\x83\x84\x85\x86\x87"
9089                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9090                           "\x90\x91\x92\x93\x94\x95\x96\x97"
9091                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9092                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9093                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9094                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9095                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9096                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9097                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9098                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9099                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9100                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9101                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9102                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9103                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9104                 .ilen   = 512,
9105                 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
9106                           "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
9107                           "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
9108                           "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
9109                           "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
9110                           "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
9111                           "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
9112                           "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
9113                           "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
9114                           "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
9115                           "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
9116                           "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
9117                           "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
9118                           "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
9119                           "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
9120                           "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
9121                           "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
9122                           "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
9123                           "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
9124                           "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
9125                           "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
9126                           "\x71\x38\x17\x91\x44\xE8\xFC\x65"
9127                           "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
9128                           "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
9129                           "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
9130                           "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
9131                           "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
9132                           "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
9133                           "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
9134                           "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
9135                           "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
9136                           "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
9137                           "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
9138                           "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
9139                           "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
9140                           "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
9141                           "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
9142                           "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
9143                           "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
9144                           "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
9145                           "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
9146                           "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
9147                           "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
9148                           "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
9149                           "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
9150                           "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
9151                           "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
9152                           "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
9153                           "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
9154                           "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
9155                           "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
9156                           "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
9157                           "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
9158                           "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
9159                           "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
9160                           "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
9161                           "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
9162                           "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
9163                           "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
9164                           "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
9165                           "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
9166                           "\x45\x72\x80\x17\x81\xBD\x9D\x62"
9167                           "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
9168                           "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
9169                 .rlen   = 512,
9170                 .also_non_np = 1,
9171                 .np     = 2,
9172                 .tap    = { 512 - 16, 16 },
9173         },
9174 };
9175
9176 static struct cipher_testvec cast6_xts_dec_tv_template[] = {
9177         { /* Generated from TF test vectors */
9178                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
9179                           "\x23\x53\x60\x28\x74\x71\x35\x26"
9180                           "\x62\x49\x77\x57\x24\x70\x93\x69"
9181                           "\x99\x59\x57\x49\x66\x96\x76\x27"
9182                           "\x31\x41\x59\x26\x53\x58\x97\x93"
9183                           "\x23\x84\x62\x64\x33\x83\x27\x95"
9184                           "\x02\x88\x41\x97\x16\x93\x99\x37"
9185                           "\x51\x05\x82\x09\x74\x94\x45\x92",
9186                 .klen   = 64,
9187                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
9188                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9189                 .input  = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
9190                           "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
9191                           "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
9192                           "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
9193                           "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
9194                           "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
9195                           "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
9196                           "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
9197                           "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
9198                           "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
9199                           "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
9200                           "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
9201                           "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
9202                           "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
9203                           "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
9204                           "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
9205                           "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
9206                           "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
9207                           "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
9208                           "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
9209                           "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
9210                           "\x71\x38\x17\x91\x44\xE8\xFC\x65"
9211                           "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
9212                           "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
9213                           "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
9214                           "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
9215                           "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
9216                           "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
9217                           "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
9218                           "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
9219                           "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
9220                           "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
9221                           "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
9222                           "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
9223                           "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
9224                           "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
9225                           "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
9226                           "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
9227                           "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
9228                           "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
9229                           "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
9230                           "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
9231                           "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
9232                           "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
9233                           "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
9234                           "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
9235                           "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
9236                           "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
9237                           "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
9238                           "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
9239                           "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
9240                           "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
9241                           "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
9242                           "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
9243                           "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
9244                           "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
9245                           "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
9246                           "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
9247                           "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
9248                           "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
9249                           "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
9250                           "\x45\x72\x80\x17\x81\xBD\x9D\x62"
9251                           "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
9252                           "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
9253                 .ilen   = 512,
9254                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9255                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9256                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9257                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9258                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9259                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9260                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9261                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9262                           "\x40\x41\x42\x43\x44\x45\x46\x47"
9263                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9264                           "\x50\x51\x52\x53\x54\x55\x56\x57"
9265                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9266                           "\x60\x61\x62\x63\x64\x65\x66\x67"
9267                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9268                           "\x70\x71\x72\x73\x74\x75\x76\x77"
9269                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9270                           "\x80\x81\x82\x83\x84\x85\x86\x87"
9271                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9272                           "\x90\x91\x92\x93\x94\x95\x96\x97"
9273                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9274                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9275                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9276                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9277                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9278                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9279                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9280                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9281                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9282                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9283                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9284                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9285                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9286                           "\x00\x01\x02\x03\x04\x05\x06\x07"
9287                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9288                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9289                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9290                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9291                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9292                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9293                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9294                           "\x40\x41\x42\x43\x44\x45\x46\x47"
9295                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9296                           "\x50\x51\x52\x53\x54\x55\x56\x57"
9297                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9298                           "\x60\x61\x62\x63\x64\x65\x66\x67"
9299                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9300                           "\x70\x71\x72\x73\x74\x75\x76\x77"
9301                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9302                           "\x80\x81\x82\x83\x84\x85\x86\x87"
9303                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9304                           "\x90\x91\x92\x93\x94\x95\x96\x97"
9305                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9306                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9307                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9308                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9309                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9310                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9311                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9312                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9313                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9314                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9315                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9316                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9317                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9318                 .rlen   = 512,
9319                 .also_non_np = 1,
9320                 .np     = 2,
9321                 .tap    = { 512 - 16, 16 },
9322         },
9323 };
9324
9325
9326 /*
9327  * AES test vectors.
9328  */
9329 #define AES_ENC_TEST_VECTORS 3
9330 #define AES_DEC_TEST_VECTORS 3
9331 #define AES_CBC_ENC_TEST_VECTORS 4
9332 #define AES_CBC_DEC_TEST_VECTORS 4
9333 #define HMAC_SHA1_AES_CBC_ENC_TEST_VECTORS 7
9334 #define HMAC_SHA256_AES_CBC_ENC_TEST_VECTORS 7
9335 #define HMAC_SHA512_AES_CBC_ENC_TEST_VECTORS 7
9336 #define AES_LRW_ENC_TEST_VECTORS 8
9337 #define AES_LRW_DEC_TEST_VECTORS 8
9338 #define AES_XTS_ENC_TEST_VECTORS 5
9339 #define AES_XTS_DEC_TEST_VECTORS 5
9340 #define AES_CTR_ENC_TEST_VECTORS 3
9341 #define AES_CTR_DEC_TEST_VECTORS 3
9342 #define AES_OFB_ENC_TEST_VECTORS 1
9343 #define AES_OFB_DEC_TEST_VECTORS 1
9344 #define AES_CTR_3686_ENC_TEST_VECTORS 7
9345 #define AES_CTR_3686_DEC_TEST_VECTORS 6
9346 #define AES_GCM_ENC_TEST_VECTORS 9
9347 #define AES_GCM_DEC_TEST_VECTORS 8
9348 #define AES_GCM_4106_ENC_TEST_VECTORS 7
9349 #define AES_GCM_4106_DEC_TEST_VECTORS 7
9350 #define AES_CCM_ENC_TEST_VECTORS 7
9351 #define AES_CCM_DEC_TEST_VECTORS 7
9352 #define AES_CCM_4309_ENC_TEST_VECTORS 7
9353 #define AES_CCM_4309_DEC_TEST_VECTORS 10
9354
9355 static struct cipher_testvec aes_enc_tv_template[] = {
9356         { /* From FIPS-197 */
9357                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
9358                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9359                 .klen   = 16,
9360                 .input  = "\x00\x11\x22\x33\x44\x55\x66\x77"
9361                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
9362                 .ilen   = 16,
9363                 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
9364                           "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
9365                 .rlen   = 16,
9366         }, {
9367                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
9368                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9369                           "\x10\x11\x12\x13\x14\x15\x16\x17",
9370                 .klen   = 24,
9371                 .input  = "\x00\x11\x22\x33\x44\x55\x66\x77"
9372                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
9373                 .ilen   = 16,
9374                 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
9375                           "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
9376                 .rlen   = 16,
9377         }, {
9378                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
9379                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9380                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9381                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9382                 .klen   = 32,
9383                 .input  = "\x00\x11\x22\x33\x44\x55\x66\x77"
9384                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
9385                 .ilen   = 16,
9386                 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
9387                           "\xea\xfc\x49\x90\x4b\x49\x60\x89",
9388                 .rlen   = 16,
9389         },
9390 };
9391
9392 static struct cipher_testvec aes_dec_tv_template[] = {
9393         { /* From FIPS-197 */
9394                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
9395                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9396                 .klen   = 16,
9397                 .input  = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
9398                           "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
9399                 .ilen   = 16,
9400                 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
9401                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
9402                 .rlen   = 16,
9403         }, {
9404                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
9405                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9406                           "\x10\x11\x12\x13\x14\x15\x16\x17",
9407                 .klen   = 24,
9408                 .input  = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
9409                           "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
9410                 .ilen   = 16,
9411                 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
9412                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
9413                 .rlen   = 16,
9414         }, {
9415                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
9416                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9417                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9418                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9419                 .klen   = 32,
9420                 .input  = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
9421                           "\xea\xfc\x49\x90\x4b\x49\x60\x89",
9422                 .ilen   = 16,
9423                 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
9424                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
9425                 .rlen   = 16,
9426         },
9427 };
9428
9429 static struct cipher_testvec aes_cbc_enc_tv_template[] = {
9430         { /* From RFC 3602 */
9431                 .key    = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
9432                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
9433                 .klen   = 16,
9434                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
9435                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
9436                 .input  = "Single block msg",
9437                 .ilen   = 16,
9438                 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
9439                           "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
9440                 .rlen   = 16,
9441         }, {
9442                 .key    = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
9443                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
9444                 .klen   = 16,
9445                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
9446                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
9447                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9448                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9449                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9450                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9451                 .ilen   = 32,
9452                 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
9453                           "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
9454                           "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
9455                           "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
9456                 .rlen   = 32,
9457         }, { /* From NIST SP800-38A */
9458                 .key    = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
9459                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
9460                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
9461                 .klen   = 24,
9462                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
9463                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9464                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9465                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9466                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9467                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9468                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9469                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9470                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9471                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9472                 .ilen   = 64,
9473                 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
9474                           "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
9475                           "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
9476                           "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
9477                           "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
9478                           "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
9479                           "\x08\xb0\xe2\x79\x88\x59\x88\x81"
9480                           "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
9481                 .rlen   = 64,
9482         }, {
9483                 .key    = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
9484                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
9485                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
9486                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
9487                 .klen   = 32,
9488                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
9489                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9490                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9491                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9492                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9493                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9494                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9495                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9496                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9497                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9498                 .ilen   = 64,
9499                 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
9500                           "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
9501                           "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
9502                           "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
9503                           "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
9504                           "\xa5\x30\xe2\x63\x04\x23\x14\x61"
9505                           "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
9506                           "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
9507                 .rlen   = 64,
9508         },
9509 };
9510
9511 static struct cipher_testvec aes_cbc_dec_tv_template[] = {
9512         { /* From RFC 3602 */
9513                 .key    = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
9514                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
9515                 .klen   = 16,
9516                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
9517                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
9518                 .input  = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
9519                           "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
9520                 .ilen   = 16,
9521                 .result = "Single block msg",
9522                 .rlen   = 16,
9523         }, {
9524                 .key    = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
9525                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
9526                 .klen   = 16,
9527                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
9528                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
9529                 .input  = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
9530                           "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
9531                           "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
9532                           "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
9533                 .ilen   = 32,
9534                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9535                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9536                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9537                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9538                 .rlen   = 32,
9539         }, { /* From NIST SP800-38A */
9540                 .key    = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
9541                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
9542                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
9543                 .klen   = 24,
9544                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
9545                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9546                 .input  = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
9547                           "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
9548                           "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
9549                           "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
9550                           "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
9551                           "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
9552                           "\x08\xb0\xe2\x79\x88\x59\x88\x81"
9553                           "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
9554                 .ilen   = 64,
9555                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9556                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9557                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9558                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9559                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9560                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9561                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9562                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9563                 .rlen   = 64,
9564         }, {
9565                 .key    = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
9566                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
9567                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
9568                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
9569                 .klen   = 32,
9570                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
9571                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9572                 .input  = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
9573                           "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
9574                           "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
9575                           "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
9576                           "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
9577                           "\xa5\x30\xe2\x63\x04\x23\x14\x61"
9578                           "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
9579                           "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
9580                 .ilen   = 64,
9581                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9582                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9583                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9584                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9585                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9586                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9587                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9588                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9589                 .rlen   = 64,
9590         },
9591 };
9592
9593 static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_template[] = {
9594         { /* RFC 3602 Case 1 */
9595 #ifdef __LITTLE_ENDIAN
9596                 .key    = "\x08\x00"            /* rta length */
9597                           "\x01\x00"            /* rta type */
9598 #else
9599                 .key    = "\x00\x08"            /* rta length */
9600                           "\x00\x01"            /* rta type */
9601 #endif
9602                           "\x00\x00\x00\x10"    /* enc key length */
9603                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9604                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9605                           "\x00\x00\x00\x00"
9606                           "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
9607                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
9608                 .klen   = 8 + 20 + 16,
9609                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
9610                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
9611                 .input  = "Single block msg",
9612                 .ilen   = 16,
9613                 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
9614                           "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
9615                           "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
9616                           "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
9617                           "\x03\x71\xa2\x06",
9618                 .rlen   = 16 + 20,
9619         }, { /* RFC 3602 Case 2 */
9620 #ifdef __LITTLE_ENDIAN
9621                 .key    = "\x08\x00"            /* rta length */
9622                           "\x01\x00"            /* rta type */
9623 #else
9624                 .key    = "\x00\x08"            /* rta length */
9625                           "\x00\x01"            /* rta type */
9626 #endif
9627                           "\x00\x00\x00\x10"    /* enc key length */
9628                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9629                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9630                           "\x30\x31\x32\x33"
9631                           "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
9632                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
9633                 .klen   = 8 + 20 + 16,
9634                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
9635                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
9636                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9637                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9638                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9639                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9640                 .ilen   = 32,
9641                 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
9642                           "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
9643                           "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
9644                           "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
9645                           "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
9646                           "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
9647                           "\x65\x39\xf8\xde",
9648                 .rlen   = 32 + 20,
9649         }, { /* RFC 3602 Case 3 */
9650 #ifdef __LITTLE_ENDIAN
9651                 .key    = "\x08\x00"            /* rta length */
9652                           "\x01\x00"            /* rta type */
9653 #else
9654                 .key    = "\x00\x08"            /* rta length */
9655                           "\x00\x01"            /* rta type */
9656 #endif
9657                           "\x00\x00\x00\x10"    /* enc key length */
9658                           "\x11\x22\x33\x44\x55\x66\x77\x88"
9659                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9660                           "\x22\x33\x44\x55"
9661                           "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
9662                           "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
9663                 .klen   = 8 + 20 + 16,
9664                 .iv     = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
9665                           "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
9666                 .input  = "This is a 48-byte message (exactly 3 AES blocks)",
9667                 .ilen   = 48,
9668                 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
9669                           "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
9670                           "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
9671                           "\x50\x69\x39\x27\x67\x72\xf8\xd5"
9672                           "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
9673                           "\x85\x79\x69\x5d\x83\xba\x26\x84"
9674                           "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
9675                           "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
9676                           "\x8d\x62\xf2\x1e",
9677                 .rlen   = 48 + 20,
9678         }, { /* RFC 3602 Case 4 */
9679 #ifdef __LITTLE_ENDIAN
9680                 .key    = "\x08\x00"            /* rta length */
9681                           "\x01\x00"            /* rta type */
9682 #else
9683                 .key    = "\x00\x08"            /* rta length */
9684                           "\x00\x01"            /* rta type */
9685 #endif
9686                           "\x00\x00\x00\x10"    /* enc key length */
9687                           "\x11\x22\x33\x44\x55\x66\x77\x88"
9688                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9689                           "\x22\x33\x44\x55"
9690                           "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
9691                           "\xbc\x46\x90\x3d\xba\x29\x03\x49",
9692                 .klen   = 8 + 20 + 16,
9693                 .iv     = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
9694                           "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
9695                 .input  = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9696                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9697                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9698                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9699                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9700                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9701                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9702                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
9703                 .ilen   = 64,
9704                 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
9705                           "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
9706                           "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
9707                           "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
9708                           "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
9709                           "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
9710                           "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
9711                           "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
9712                           "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
9713                           "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
9714                           "\x1d\xbe\xc6\xe9",
9715                 .rlen   = 64 + 20,
9716         }, { /* RFC 3602 Case 5 */
9717 #ifdef __LITTLE_ENDIAN
9718                 .key    = "\x08\x00"            /* rta length */
9719                           "\x01\x00"            /* rta type */
9720 #else
9721                 .key    = "\x00\x08"            /* rta length */
9722                           "\x00\x01"            /* rta type */
9723 #endif
9724                           "\x00\x00\x00\x10"    /* enc key length */
9725                           "\x11\x22\x33\x44\x55\x66\x77\x88"
9726                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9727                           "\x22\x33\x44\x55"
9728                           "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
9729                           "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
9730                 .klen   = 8 + 20 + 16,
9731                 .iv     = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
9732                           "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
9733                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
9734                 .alen   = 8,
9735                 .input  = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
9736                           "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
9737                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9738                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9739                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9740                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9741                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9742                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9743                           "\x01\x02\x03\x04\x05\x06\x07\x08"
9744                           "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
9745                 .ilen   = 80,
9746                 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
9747                           "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
9748                           "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
9749                           "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
9750                           "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
9751                           "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
9752                           "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
9753                           "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
9754                           "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
9755                           "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
9756                           "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
9757                           "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
9758                           "\x85\xe1\x59\xf7",
9759                 .rlen   = 80 + 20,
9760        }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
9761 #ifdef __LITTLE_ENDIAN
9762                 .key    = "\x08\x00"            /* rta length */
9763                           "\x01\x00"            /* rta type */
9764 #else
9765                 .key    = "\x00\x08"            /* rta length */
9766                           "\x00\x01"            /* rta type */
9767 #endif
9768                           "\x00\x00\x00\x18"    /* enc key length */
9769                           "\x11\x22\x33\x44\x55\x66\x77\x88"
9770                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9771                           "\x22\x33\x44\x55"
9772                           "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
9773                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
9774                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
9775                 .klen   = 8 + 20 + 24,
9776                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
9777                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9778                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9779                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9780                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9781                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9782                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9783                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9784                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9785                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9786                 .ilen   = 64,
9787                 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
9788                           "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
9789                           "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
9790                           "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
9791                           "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
9792                           "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
9793                           "\x08\xb0\xe2\x79\x88\x59\x88\x81"
9794                           "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
9795                           "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
9796                           "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
9797                           "\x47\x4c\xfc\x36",
9798                 .rlen   = 64 + 20,
9799         }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
9800 #ifdef __LITTLE_ENDIAN
9801                 .key    = "\x08\x00"            /* rta length */
9802                           "\x01\x00"            /* rta type */
9803 #else
9804                 .key    = "\x00\x08"            /* rta length */
9805                           "\x00\x01"            /* rta type */
9806 #endif
9807                           "\x00\x00\x00\x20"    /* enc key length */
9808                           "\x11\x22\x33\x44\x55\x66\x77\x88"
9809                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9810                           "\x22\x33\x44\x55"
9811                           "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
9812                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
9813                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
9814                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
9815                 .klen   = 8 + 20 + 32,
9816                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
9817                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9818                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
9819                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
9820                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
9821                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
9822                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
9823                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
9824                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
9825                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
9826                 .ilen   = 64,
9827                 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
9828                           "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
9829                           "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
9830                           "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
9831                           "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
9832                           "\xa5\x30\xe2\x63\x04\x23\x14\x61"
9833                           "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
9834                           "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
9835                           "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
9836                           "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
9837                           "\x51\xee\xd6\x4e",
9838                 .rlen   = 64 + 20,
9839         },
9840 };
9841
9842 static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_template[] = {
9843         { /* RFC 3602 Case 1 */
9844 #ifdef __LITTLE_ENDIAN
9845                 .key    = "\x08\x00"            /* rta length */
9846                           "\x01\x00"            /* rta type */
9847 #else
9848                 .key    = "\x00\x08"            /* rta length */
9849                           "\x00\x01"            /* rta type */
9850 #endif
9851                           "\x00\x00\x00\x10"    /* enc key length */
9852                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9853                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9854                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9855                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9856                           "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
9857                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
9858                 .klen   = 8 + 32 + 16,
9859                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
9860                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
9861                 .input  = "Single block msg",
9862                 .ilen   = 16,
9863                 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
9864                           "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
9865                           "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
9866                           "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
9867                           "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
9868                           "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
9869                 .rlen   = 16 + 32,
9870         }, { /* RFC 3602 Case 2 */
9871 #ifdef __LITTLE_ENDIAN
9872                 .key    = "\x08\x00"            /* rta length */
9873                           "\x01\x00"            /* rta type */
9874 #else
9875                 .key    = "\x00\x08"            /* rta length */
9876                           "\x00\x01"            /* rta type */
9877 #endif
9878                           "\x00\x00\x00\x10"    /* enc key length */
9879                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9880                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9881                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9882                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9883                           "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
9884                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
9885                 .klen   = 8 + 32 + 16,
9886                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
9887                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
9888                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9889                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9890                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9891                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9892                 .ilen   = 32,
9893                 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
9894                           "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
9895                           "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
9896                           "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
9897                           "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
9898                           "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
9899                           "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
9900                           "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
9901                 .rlen   = 32 + 32,
9902         }, { /* RFC 3602 Case 3 */
9903 #ifdef __LITTLE_ENDIAN
9904                 .key    = "\x08\x00"            /* rta length */
9905                           "\x01\x00"            /* rta type */
9906 #else
9907                 .key    = "\x00\x08"            /* rta length */
9908                           "\x00\x01"            /* rta type */
9909 #endif
9910                           "\x00\x00\x00\x10"    /* enc key length */
9911                           "\x11\x22\x33\x44\x55\x66\x77\x88"
9912                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9913                           "\x22\x33\x44\x55\x66\x77\x88\x99"
9914                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9915                           "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
9916                           "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
9917                 .klen   = 8 + 32 + 16,
9918                 .iv     = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
9919                           "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
9920                 .input  = "This is a 48-byte message (exactly 3 AES blocks)",
9921                 .ilen   = 48,
9922                 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
9923                           "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
9924                           "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
9925                           "\x50\x69\x39\x27\x67\x72\xf8\xd5"
9926                           "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
9927                           "\x85\x79\x69\x5d\x83\xba\x26\x84"
9928                           "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
9929                           "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
9930                           "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
9931                           "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
9932                 .rlen   = 48 + 32,
9933         }, { /* RFC 3602 Case 4 */
9934 #ifdef __LITTLE_ENDIAN
9935                 .key    = "\x08\x00"            /* rta length */
9936                           "\x01\x00"            /* rta type */
9937 #else
9938                 .key    = "\x00\x08"            /* rta length */
9939                           "\x00\x01"            /* rta type */
9940 #endif
9941                           "\x00\x00\x00\x10"    /* enc key length */
9942                           "\x11\x22\x33\x44\x55\x66\x77\x88"
9943                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9944                           "\x22\x33\x44\x55\x66\x77\x88\x99"
9945                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9946                           "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
9947                           "\xbc\x46\x90\x3d\xba\x29\x03\x49",
9948                 .klen   = 8 + 32 + 16,
9949                 .iv     = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
9950                           "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
9951                 .input  = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9952                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9953                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9954                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9955                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9956                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9957                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9958                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
9959                 .ilen   = 64,
9960                 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
9961                           "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
9962                           "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
9963                           "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
9964                           "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
9965                           "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
9966                           "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
9967                           "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
9968                           "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
9969                           "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
9970                           "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
9971                           "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
9972                 .rlen   = 64 + 32,
9973         }, { /* RFC 3602 Case 5 */
9974 #ifdef __LITTLE_ENDIAN
9975                 .key    = "\x08\x00"            /* rta length */
9976                           "\x01\x00"            /* rta type */
9977 #else
9978                 .key    = "\x00\x08"            /* rta length */
9979                           "\x00\x01"            /* rta type */
9980 #endif
9981                           "\x00\x00\x00\x10"    /* enc key length */
9982                           "\x11\x22\x33\x44\x55\x66\x77\x88"
9983                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
9984                           "\x22\x33\x44\x55\x66\x77\x88\x99"
9985                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
9986                           "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
9987                           "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
9988                 .klen   = 8 + 32 + 16,
9989                 .iv     = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
9990                           "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
9991                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
9992                 .alen   = 8,
9993                 .input  = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
9994                           "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
9995                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9996                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9997                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9998                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9999                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10000                           "\x30\x31\x32\x33\x34\x35\x36\x37"
10001                           "\x01\x02\x03\x04\x05\x06\x07\x08"
10002                           "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
10003                 .ilen   = 80,
10004                 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
10005                           "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
10006                           "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
10007                           "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
10008                           "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
10009                           "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
10010                           "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
10011                           "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
10012                           "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
10013                           "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
10014                           "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
10015                           "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
10016                           "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
10017                           "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
10018                 .rlen   = 80 + 32,
10019        }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
10020 #ifdef __LITTLE_ENDIAN
10021                 .key    = "\x08\x00"            /* rta length */
10022                           "\x01\x00"            /* rta type */
10023 #else
10024                 .key    = "\x00\x08"            /* rta length */
10025                           "\x00\x01"            /* rta type */
10026 #endif
10027                           "\x00\x00\x00\x18"    /* enc key length */
10028                           "\x11\x22\x33\x44\x55\x66\x77\x88"
10029                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10030                           "\x22\x33\x44\x55\x66\x77\x88\x99"
10031                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10032                           "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
10033                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
10034                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
10035                 .klen   = 8 + 32 + 24,
10036                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
10037                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10038                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10039                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10040                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10041                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10042                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10043                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10044                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10045                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10046                 .ilen   = 64,
10047                 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
10048                           "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
10049                           "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
10050                           "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
10051                           "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
10052                           "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
10053                           "\x08\xb0\xe2\x79\x88\x59\x88\x81"
10054                           "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
10055                           "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
10056                           "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
10057                           "\xca\x71\x85\x93\xf7\x85\x55\x8b"
10058                           "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
10059                 .rlen   = 64 + 32,
10060         }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
10061 #ifdef __LITTLE_ENDIAN
10062                 .key    = "\x08\x00"            /* rta length */
10063                           "\x01\x00"            /* rta type */
10064 #else
10065                 .key    = "\x00\x08"            /* rta length */
10066                           "\x00\x01"            /* rta type */
10067 #endif
10068                           "\x00\x00\x00\x20"    /* enc key length */
10069                           "\x11\x22\x33\x44\x55\x66\x77\x88"
10070                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10071                           "\x22\x33\x44\x55\x66\x77\x88\x99"
10072                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10073                           "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
10074                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
10075                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
10076                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
10077                 .klen   = 8 + 32 + 32,
10078                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
10079                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10080                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10081                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10082                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10083                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10084                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10085                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10086                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10087                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10088                 .ilen   = 64,
10089                 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
10090                           "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
10091                           "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
10092                           "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
10093                           "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
10094                           "\xa5\x30\xe2\x63\x04\x23\x14\x61"
10095                           "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
10096                           "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
10097                           "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
10098                           "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
10099                           "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
10100                           "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
10101                 .rlen   = 64 + 32,
10102         },
10103 };
10104
10105 static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_template[] = {
10106         { /* RFC 3602 Case 1 */
10107 #ifdef __LITTLE_ENDIAN
10108                 .key    = "\x08\x00"            /* rta length */
10109                           "\x01\x00"            /* rta type */
10110 #else
10111                 .key    = "\x00\x08"            /* rta length */
10112                           "\x00\x01"            /* rta type */
10113 #endif
10114                           "\x00\x00\x00\x10"    /* enc key length */
10115                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10116                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10117                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10118                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10119                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10120                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10121                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10122                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10123                           "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
10124                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
10125                 .klen   = 8 + 64 + 16,
10126                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
10127                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
10128                 .input  = "Single block msg",
10129                 .ilen   = 16,
10130                 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
10131                           "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
10132                           "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
10133                           "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
10134                           "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
10135                           "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
10136                           "\xec\xbd\x50\x08\x07\x64\x1a\x49"
10137                           "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
10138                           "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
10139                           "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
10140                 .rlen   = 16 + 64,
10141         }, { /* RFC 3602 Case 2 */
10142 #ifdef __LITTLE_ENDIAN
10143                 .key    = "\x08\x00"            /* rta length */
10144                           "\x01\x00"            /* rta type */
10145 #else
10146                 .key    = "\x00\x08"            /* rta length */
10147                           "\x00\x01"            /* rta type */
10148 #endif
10149                           "\x00\x00\x00\x10"    /* enc key length */
10150                           "\x20\x21\x22\x23\x24\x25\x26\x27"
10151                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10152                           "\x30\x31\x32\x33\x34\x35\x36\x37"
10153                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
10154                           "\x40\x41\x42\x43\x44\x45\x46\x47"
10155                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
10156                           "\x50\x51\x52\x53\x54\x55\x56\x57"
10157                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
10158                           "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
10159                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
10160                 .klen   = 8 + 64 + 16,
10161                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
10162                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
10163                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
10164                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10165                           "\x10\x11\x12\x13\x14\x15\x16\x17"
10166                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10167                 .ilen   = 32,
10168                 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
10169                           "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
10170                           "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
10171                           "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
10172                           "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
10173                           "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
10174                           "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
10175                           "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
10176                           "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
10177                           "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
10178                           "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
10179                           "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
10180                 .rlen   = 32 + 64,
10181         }, { /* RFC 3602 Case 3 */
10182 #ifdef __LITTLE_ENDIAN
10183                 .key    = "\x08\x00"            /* rta length */
10184                           "\x01\x00"            /* rta type */
10185 #else
10186                 .key    = "\x00\x08"            /* rta length */
10187                           "\x00\x01"            /* rta type */
10188 #endif
10189                           "\x00\x00\x00\x10"    /* enc key length */
10190                           "\x11\x22\x33\x44\x55\x66\x77\x88"
10191                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10192                           "\x22\x33\x44\x55\x66\x77\x88\x99"
10193                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10194                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
10195                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
10196                           "\x44\x55\x66\x77\x88\x99\xaa\xbb"
10197                           "\xcc\xdd\xee\xff\x11\x22\x33\x44"
10198                           "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
10199                           "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
10200                 .klen   = 8 + 64 + 16,
10201                 .iv     = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
10202                           "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
10203                 .input  = "This is a 48-byte message (exactly 3 AES blocks)",
10204                 .ilen   = 48,
10205                 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
10206                           "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
10207                           "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
10208                           "\x50\x69\x39\x27\x67\x72\xf8\xd5"
10209                           "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
10210                           "\x85\x79\x69\x5d\x83\xba\x26\x84"
10211                           "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
10212                           "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
10213                           "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
10214                           "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
10215                           "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
10216                           "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
10217                           "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
10218                           "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
10219                 .rlen   = 48 + 64,
10220         }, { /* RFC 3602 Case 4 */
10221 #ifdef __LITTLE_ENDIAN
10222                 .key    = "\x08\x00"            /* rta length */
10223                           "\x01\x00"            /* rta type */
10224 #else
10225                 .key    = "\x00\x08"            /* rta length */
10226                           "\x00\x01"            /* rta type */
10227 #endif
10228                           "\x00\x00\x00\x10"    /* enc key length */
10229                           "\x11\x22\x33\x44\x55\x66\x77\x88"
10230                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10231                           "\x22\x33\x44\x55\x66\x77\x88\x99"
10232                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10233                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
10234                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
10235                           "\x44\x55\x66\x77\x88\x99\xaa\xbb"
10236                           "\xcc\xdd\xee\xff\x11\x22\x33\x44"
10237                           "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
10238                           "\xbc\x46\x90\x3d\xba\x29\x03\x49",
10239                 .klen   = 8 + 64 + 16,
10240                 .iv     = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
10241                           "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
10242                 .input  = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
10243                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
10244                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
10245                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
10246                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
10247                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
10248                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
10249                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
10250                 .ilen   = 64,
10251                 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
10252                           "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
10253                           "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
10254                           "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
10255                           "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
10256                           "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
10257                           "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
10258                           "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
10259                           "\x82\xcd\x42\x28\x21\x20\x15\xcc"
10260                           "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
10261                           "\x61\x32\x82\x85\xcf\x27\xed\xb4"
10262                           "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
10263                           "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
10264                           "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
10265                           "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
10266                           "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
10267                 .rlen   = 64 + 64,
10268         }, { /* RFC 3602 Case 5 */
10269 #ifdef __LITTLE_ENDIAN
10270                 .key    = "\x08\x00"            /* rta length */
10271                           "\x01\x00"            /* rta type */
10272 #else
10273                 .key    = "\x00\x08"            /* rta length */
10274                           "\x00\x01"            /* rta type */
10275 #endif
10276                           "\x00\x00\x00\x10"    /* enc key length */
10277                           "\x11\x22\x33\x44\x55\x66\x77\x88"
10278                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10279                           "\x22\x33\x44\x55\x66\x77\x88\x99"
10280                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10281                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
10282                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
10283                           "\x44\x55\x66\x77\x88\x99\xaa\xbb"
10284                           "\xcc\xdd\xee\xff\x11\x22\x33\x44"
10285                           "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
10286                           "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
10287                 .klen   = 8 + 64 + 16,
10288                 .iv     = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
10289                           "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
10290                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01",
10291                 .alen   = 8,
10292                 .input  = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
10293                           "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
10294                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10295                           "\x10\x11\x12\x13\x14\x15\x16\x17"
10296                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10297                           "\x20\x21\x22\x23\x24\x25\x26\x27"
10298                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
10299                           "\x30\x31\x32\x33\x34\x35\x36\x37"
10300                           "\x01\x02\x03\x04\x05\x06\x07\x08"
10301                           "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
10302                 .ilen   = 80,
10303                 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
10304                           "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
10305                           "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
10306                           "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
10307                           "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
10308                           "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
10309                           "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
10310                           "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
10311                           "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
10312                           "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
10313                           "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
10314                           "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
10315                           "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
10316                           "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
10317                           "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
10318                           "\x92\x26\xc1\x76\x20\x11\xeb\xba"
10319                           "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
10320                           "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
10321                 .rlen   = 80 + 64,
10322        }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
10323 #ifdef __LITTLE_ENDIAN
10324                 .key    = "\x08\x00"            /* rta length */
10325                           "\x01\x00"            /* rta type */
10326 #else
10327                 .key    = "\x00\x08"            /* rta length */
10328                           "\x00\x01"            /* rta type */
10329 #endif
10330                           "\x00\x00\x00\x18"    /* enc key length */
10331                           "\x11\x22\x33\x44\x55\x66\x77\x88"
10332                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10333                           "\x22\x33\x44\x55\x66\x77\x88\x99"
10334                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10335                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
10336                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
10337                           "\x44\x55\x66\x77\x88\x99\xaa\xbb"
10338                           "\xcc\xdd\xee\xff\x11\x22\x33\x44"
10339                           "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
10340                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
10341                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
10342                 .klen   = 8 + 64 + 24,
10343                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
10344                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10345                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10346                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10347                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10348                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10349                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10350                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10351                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10352                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10353                 .ilen   = 64,
10354                 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
10355                           "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
10356                           "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
10357                           "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
10358                           "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
10359                           "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
10360                           "\x08\xb0\xe2\x79\x88\x59\x88\x81"
10361                           "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
10362                           "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
10363                           "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
10364                           "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
10365                           "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
10366                           "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
10367                           "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
10368                           "\x8d\x43\x98\xa7\x94\x16\x07\x02"
10369                           "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
10370                 .rlen   = 64 + 64,
10371         }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
10372 #ifdef __LITTLE_ENDIAN
10373                 .key    = "\x08\x00"            /* rta length */
10374                           "\x01\x00"            /* rta type */
10375 #else
10376                 .key    = "\x00\x08"            /* rta length */
10377                           "\x00\x01"            /* rta type */
10378 #endif
10379                           "\x00\x00\x00\x20"    /* enc key length */
10380                           "\x11\x22\x33\x44\x55\x66\x77\x88"
10381                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
10382                           "\x22\x33\x44\x55\x66\x77\x88\x99"
10383                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
10384                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
10385                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
10386                           "\x44\x55\x66\x77\x88\x99\xaa\xbb"
10387                           "\xcc\xdd\xee\xff\x11\x22\x33\x44"
10388                           "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
10389                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
10390                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
10391                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
10392                 .klen   = 8 + 64 + 32,
10393                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
10394                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10395                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
10396                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
10397                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
10398                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
10399                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
10400                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
10401                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
10402                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
10403                 .ilen   = 64,
10404                 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
10405                           "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
10406                           "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
10407                           "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
10408                           "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
10409                           "\xa5\x30\xe2\x63\x04\x23\x14\x61"
10410                           "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
10411                           "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
10412                           "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
10413                           "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
10414                           "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
10415                           "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
10416                           "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
10417                           "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
10418                           "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
10419                           "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
10420                 .rlen   = 64 + 64,
10421         },
10422 };
10423
10424 static struct cipher_testvec aes_lrw_enc_tv_template[] = {
10425         /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
10426         { /* LRW-32-AES 1 */
10427                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
10428                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
10429                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
10430                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
10431                 .klen   = 32,
10432                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10433                           "\x00\x00\x00\x00\x00\x00\x00\x01",
10434                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
10435                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10436                 .ilen   = 16,
10437                 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
10438                           "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
10439                 .rlen   = 16,
10440         }, { /* LRW-32-AES 2 */
10441                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
10442                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
10443                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
10444                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
10445                 .klen   = 32,
10446                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10447                           "\x00\x00\x00\x00\x00\x00\x00\x02",
10448                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
10449                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10450                 .ilen   = 16,
10451                 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
10452                           "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
10453                 .rlen   = 16,
10454         }, { /* LRW-32-AES 3 */
10455                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
10456                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
10457                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
10458                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
10459                 .klen   = 32,
10460                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10461                           "\x00\x00\x00\x02\x00\x00\x00\x00",
10462                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
10463                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10464                 .ilen   = 16,
10465                 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
10466                           "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
10467                 .rlen   = 16,
10468         }, { /* LRW-32-AES 4 */
10469                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
10470                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
10471                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
10472                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
10473                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
10474                 .klen   = 40,
10475                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10476                           "\x00\x00\x00\x00\x00\x00\x00\x01",
10477                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
10478                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10479                 .ilen   = 16,
10480                 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
10481                           "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
10482                 .rlen   = 16,
10483         }, { /* LRW-32-AES 5 */
10484                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
10485                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
10486                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
10487                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
10488                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
10489                 .klen   = 40,
10490                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10491                           "\x00\x00\x00\x02\x00\x00\x00\x00",
10492                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
10493                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10494                 .ilen   = 16,
10495                 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
10496                           "\xc8\x60\x48\x02\x87\xe3\x34\x06",
10497                 .rlen   = 16,
10498         }, { /* LRW-32-AES 6 */
10499                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10500                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10501                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10502                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10503                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10504                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10505                 .klen   = 48,
10506                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10507                           "\x00\x00\x00\x00\x00\x00\x00\x01",
10508                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
10509                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10510                 .ilen   = 16,
10511                 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
10512                           "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
10513                 .rlen   = 16,
10514         }, { /* LRW-32-AES 7 */
10515                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
10516                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
10517                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
10518                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
10519                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
10520                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
10521                 .klen   = 48,
10522                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10523                           "\x00\x00\x00\x02\x00\x00\x00\x00",
10524                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
10525                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10526                 .ilen   = 16,
10527                 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
10528                           "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
10529                 .rlen   = 16,
10530         }, {
10531 /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
10532                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10533                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10534                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10535                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10536                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10537                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10538                 .klen   = 48,
10539                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10540                           "\x00\x00\x00\x00\x00\x00\x00\x01",
10541                 .input  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
10542                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
10543                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
10544                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
10545                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
10546                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
10547                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
10548                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
10549                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
10550                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
10551                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
10552                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
10553                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
10554                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
10555                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
10556                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
10557                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
10558                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
10559                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
10560                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
10561                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
10562                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
10563                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
10564                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
10565                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
10566                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
10567                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
10568                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
10569                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
10570                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
10571                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
10572                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
10573                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
10574                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
10575                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
10576                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
10577                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
10578                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
10579                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
10580                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
10581                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
10582                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
10583                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
10584                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
10585                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
10586                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
10587                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
10588                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
10589                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
10590                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
10591                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
10592                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
10593                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
10594                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
10595                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
10596                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
10597                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
10598                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
10599                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
10600                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
10601                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
10602                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
10603                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
10604                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
10605                 .ilen   = 512,
10606                 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
10607                           "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
10608                           "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
10609                           "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
10610                           "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
10611                           "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
10612                           "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
10613                           "\xe8\x58\x46\x97\x39\x51\x07\xde"
10614                           "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
10615                           "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
10616                           "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
10617                           "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
10618                           "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
10619                           "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
10620                           "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
10621                           "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
10622                           "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
10623                           "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
10624                           "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
10625                           "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
10626                           "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
10627                           "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
10628                           "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
10629                           "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
10630                           "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
10631                           "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
10632                           "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
10633                           "\x41\x30\x58\xc5\x62\x74\x52\x1d"
10634                           "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
10635                           "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
10636                           "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
10637                           "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
10638                           "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
10639                           "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
10640                           "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
10641                           "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
10642                           "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
10643                           "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
10644                           "\xb8\x79\x78\x97\x94\xff\x72\x13"
10645                           "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
10646                           "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
10647                           "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
10648                           "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
10649                           "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
10650                           "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
10651                           "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
10652                           "\x1e\x86\x53\x11\x53\x94\x00\xee"
10653                           "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
10654                           "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
10655                           "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
10656                           "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
10657                           "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
10658                           "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
10659                           "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
10660                           "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
10661                           "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
10662                           "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
10663                           "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
10664                           "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
10665                           "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
10666                           "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
10667                           "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
10668                           "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
10669                           "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
10670                 .rlen   = 512,
10671                 .also_non_np = 1,
10672                 .np     = 2,
10673                 .tap    = { 512 - 16, 16 },
10674         }
10675 };
10676
10677 static struct cipher_testvec aes_lrw_dec_tv_template[] = {
10678         /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
10679         /* same as enc vectors with input and result reversed */
10680         { /* LRW-32-AES 1 */
10681                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
10682                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
10683                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
10684                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
10685                 .klen   = 32,
10686                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10687                           "\x00\x00\x00\x00\x00\x00\x00\x01",
10688                 .input  = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
10689                           "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
10690                 .ilen   = 16,
10691                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10692                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10693                 .rlen   = 16,
10694         }, { /* LRW-32-AES 2 */
10695                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
10696                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
10697                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
10698                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
10699                 .klen   = 32,
10700                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10701                           "\x00\x00\x00\x00\x00\x00\x00\x02",
10702                 .input  = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
10703                           "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
10704                 .ilen   = 16,
10705                 .result  = "\x30\x31\x32\x33\x34\x35\x36\x37"
10706                            "\x38\x39\x41\x42\x43\x44\x45\x46",
10707                 .rlen   = 16,
10708         }, { /* LRW-32-AES 3 */
10709                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
10710                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
10711                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
10712                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
10713                 .klen   = 32,
10714                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10715                           "\x00\x00\x00\x02\x00\x00\x00\x00",
10716                 .input  = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
10717                           "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
10718                 .ilen   = 16,
10719                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10720                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10721                 .rlen   = 16,
10722         }, { /* LRW-32-AES 4 */
10723                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
10724                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
10725                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
10726                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
10727                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
10728                 .klen   = 40,
10729                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10730                           "\x00\x00\x00\x00\x00\x00\x00\x01",
10731                 .input  = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
10732                           "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
10733                 .ilen   = 16,
10734                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10735                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10736                 .rlen   = 16,
10737         }, { /* LRW-32-AES 5 */
10738                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
10739                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
10740                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
10741                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
10742                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
10743                 .klen   = 40,
10744                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10745                           "\x00\x00\x00\x02\x00\x00\x00\x00",
10746                 .input  = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
10747                           "\xc8\x60\x48\x02\x87\xe3\x34\x06",
10748                 .ilen   = 16,
10749                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10750                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10751                 .rlen   = 16,
10752         }, { /* LRW-32-AES 6 */
10753                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10754                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10755                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10756                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10757                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10758                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10759                 .klen   = 48,
10760                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10761                           "\x00\x00\x00\x00\x00\x00\x00\x01",
10762                 .input  = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
10763                           "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
10764                 .ilen   = 16,
10765                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10766                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10767                 .rlen   = 16,
10768         }, { /* LRW-32-AES 7 */
10769                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
10770                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
10771                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
10772                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
10773                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
10774                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
10775                 .klen   = 48,
10776                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10777                           "\x00\x00\x00\x02\x00\x00\x00\x00",
10778                 .input  = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
10779                           "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
10780                 .ilen   = 16,
10781                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
10782                           "\x38\x39\x41\x42\x43\x44\x45\x46",
10783                 .rlen   = 16,
10784         }, {
10785 /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
10786                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
10787                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
10788                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
10789                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
10790                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
10791                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
10792                 .klen   = 48,
10793                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10794                           "\x00\x00\x00\x00\x00\x00\x00\x01",
10795                 .input  = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
10796                           "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
10797                           "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
10798                           "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
10799                           "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
10800                           "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
10801                           "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
10802                           "\xe8\x58\x46\x97\x39\x51\x07\xde"
10803                           "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
10804                           "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
10805                           "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
10806                           "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
10807                           "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
10808                           "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
10809                           "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
10810                           "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
10811                           "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
10812                           "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
10813                           "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
10814                           "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
10815                           "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
10816                           "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
10817                           "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
10818                           "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
10819                           "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
10820                           "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
10821                           "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
10822                           "\x41\x30\x58\xc5\x62\x74\x52\x1d"
10823                           "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
10824                           "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
10825                           "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
10826                           "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
10827                           "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
10828                           "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
10829                           "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
10830                           "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
10831                           "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
10832                           "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
10833                           "\xb8\x79\x78\x97\x94\xff\x72\x13"
10834                           "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
10835                           "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
10836                           "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
10837                           "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
10838                           "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
10839                           "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
10840                           "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
10841                           "\x1e\x86\x53\x11\x53\x94\x00\xee"
10842                           "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
10843                           "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
10844                           "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
10845                           "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
10846                           "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
10847                           "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
10848                           "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
10849                           "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
10850                           "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
10851                           "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
10852                           "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
10853                           "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
10854                           "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
10855                           "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
10856                           "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
10857                           "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
10858                           "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
10859                 .ilen   = 512,
10860                 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
10861                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
10862                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
10863                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
10864                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
10865                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
10866                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
10867                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
10868                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
10869                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
10870                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
10871                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
10872                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
10873                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
10874                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
10875                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
10876                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
10877                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
10878                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
10879                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
10880                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
10881                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
10882                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
10883                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
10884                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
10885                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
10886                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
10887                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
10888                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
10889                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
10890                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
10891                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
10892                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
10893                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
10894                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
10895                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
10896                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
10897                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
10898                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
10899                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
10900                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
10901                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
10902                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
10903                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
10904                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
10905                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
10906                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
10907                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
10908                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
10909                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
10910                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
10911                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
10912                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
10913                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
10914                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
10915                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
10916                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
10917                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
10918                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
10919                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
10920                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
10921                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
10922                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
10923                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
10924                 .rlen   = 512,
10925                 .also_non_np = 1,
10926                 .np     = 2,
10927                 .tap    = { 512 - 16, 16 },
10928         }
10929 };
10930
10931 static struct cipher_testvec aes_xts_enc_tv_template[] = {
10932         /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
10933         { /* XTS-AES 1 */
10934                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
10935                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10936                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10937                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10938                 .klen   = 32,
10939                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10940                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10941                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
10942                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10943                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10944                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10945                 .ilen   = 32,
10946                 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
10947                           "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
10948                           "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
10949                           "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
10950                 .rlen   = 32,
10951         }, { /* XTS-AES 2 */
10952                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
10953                           "\x11\x11\x11\x11\x11\x11\x11\x11"
10954                           "\x22\x22\x22\x22\x22\x22\x22\x22"
10955                           "\x22\x22\x22\x22\x22\x22\x22\x22",
10956                 .klen   = 32,
10957                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
10958                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10959                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
10960                           "\x44\x44\x44\x44\x44\x44\x44\x44"
10961                           "\x44\x44\x44\x44\x44\x44\x44\x44"
10962                           "\x44\x44\x44\x44\x44\x44\x44\x44",
10963                 .ilen   = 32,
10964                 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
10965                           "\x39\x33\x40\x38\xac\xef\x83\x8b"
10966                           "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
10967                           "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
10968                 .rlen   = 32,
10969         }, { /* XTS-AES 3 */
10970                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
10971                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
10972                           "\x22\x22\x22\x22\x22\x22\x22\x22"
10973                           "\x22\x22\x22\x22\x22\x22\x22\x22",
10974                 .klen   = 32,
10975                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
10976                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10977                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
10978                           "\x44\x44\x44\x44\x44\x44\x44\x44"
10979                           "\x44\x44\x44\x44\x44\x44\x44\x44"
10980                           "\x44\x44\x44\x44\x44\x44\x44\x44",
10981                 .ilen   = 32,
10982                 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
10983                           "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
10984                           "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
10985                           "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
10986                 .rlen   = 32,
10987         }, { /* XTS-AES 4 */
10988                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
10989                           "\x23\x53\x60\x28\x74\x71\x35\x26"
10990                           "\x31\x41\x59\x26\x53\x58\x97\x93"
10991                           "\x23\x84\x62\x64\x33\x83\x27\x95",
10992                 .klen   = 32,
10993                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
10994                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10995                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
10996                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10997                           "\x10\x11\x12\x13\x14\x15\x16\x17"
10998                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
10999                           "\x20\x21\x22\x23\x24\x25\x26\x27"
11000                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11001                           "\x30\x31\x32\x33\x34\x35\x36\x37"
11002                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11003                           "\x40\x41\x42\x43\x44\x45\x46\x47"
11004                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11005                           "\x50\x51\x52\x53\x54\x55\x56\x57"
11006                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11007                           "\x60\x61\x62\x63\x64\x65\x66\x67"
11008                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11009                           "\x70\x71\x72\x73\x74\x75\x76\x77"
11010                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11011                           "\x80\x81\x82\x83\x84\x85\x86\x87"
11012                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11013                           "\x90\x91\x92\x93\x94\x95\x96\x97"
11014                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11015                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11016                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11017                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11018                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11019                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11020                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11021                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11022                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11023                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11024                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11025                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11026                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11027                           "\x00\x01\x02\x03\x04\x05\x06\x07"
11028                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11029                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11030                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11031                           "\x20\x21\x22\x23\x24\x25\x26\x27"
11032                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11033                           "\x30\x31\x32\x33\x34\x35\x36\x37"
11034                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11035                           "\x40\x41\x42\x43\x44\x45\x46\x47"
11036                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11037                           "\x50\x51\x52\x53\x54\x55\x56\x57"
11038                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11039                           "\x60\x61\x62\x63\x64\x65\x66\x67"
11040                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11041                           "\x70\x71\x72\x73\x74\x75\x76\x77"
11042                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11043                           "\x80\x81\x82\x83\x84\x85\x86\x87"
11044                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11045                           "\x90\x91\x92\x93\x94\x95\x96\x97"
11046                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11047                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11048                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11049                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11050                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11051                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11052                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11053                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11054                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11055                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11056                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11057                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11058                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11059                 .ilen   = 512,
11060                 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
11061                           "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
11062                           "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
11063                           "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
11064                           "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
11065                           "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
11066                           "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
11067                           "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
11068                           "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
11069                           "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
11070                           "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
11071                           "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
11072                           "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
11073                           "\x22\x97\x61\x46\xae\x20\xce\x84"
11074                           "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
11075                           "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
11076                           "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
11077                           "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
11078                           "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
11079                           "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
11080                           "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
11081                           "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
11082                           "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
11083                           "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
11084                           "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
11085                           "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
11086                           "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
11087                           "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
11088                           "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
11089                           "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
11090                           "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
11091                           "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
11092                           "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
11093                           "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
11094                           "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
11095                           "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
11096                           "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
11097                           "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
11098                           "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
11099                           "\x55\xef\x52\x97\xca\x67\xe9\xf3"
11100                           "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
11101                           "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
11102                           "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
11103                           "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
11104                           "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
11105                           "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
11106                           "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
11107                           "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
11108                           "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
11109                           "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
11110                           "\x18\x84\x69\x77\xae\x11\x9f\x7a"
11111                           "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
11112                           "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
11113                           "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
11114                           "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
11115                           "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
11116                           "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
11117                           "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
11118                           "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
11119                           "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
11120                           "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
11121                           "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
11122                           "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
11123                           "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
11124                 .rlen   = 512,
11125         }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
11126                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
11127                           "\x23\x53\x60\x28\x74\x71\x35\x26"
11128                           "\x62\x49\x77\x57\x24\x70\x93\x69"
11129                           "\x99\x59\x57\x49\x66\x96\x76\x27"
11130                           "\x31\x41\x59\x26\x53\x58\x97\x93"
11131                           "\x23\x84\x62\x64\x33\x83\x27\x95"
11132                           "\x02\x88\x41\x97\x16\x93\x99\x37"
11133                           "\x51\x05\x82\x09\x74\x94\x45\x92",
11134                 .klen   = 64,
11135                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
11136                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11137                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11138                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11139                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
11140                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11141                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11142                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11143                           "\x20\x21\x22\x23\x24\x25\x26\x27"
11144                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11145                           "\x30\x31\x32\x33\x34\x35\x36\x37"
11146                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11147                           "\x40\x41\x42\x43\x44\x45\x46\x47"
11148                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11149                           "\x50\x51\x52\x53\x54\x55\x56\x57"
11150                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11151                           "\x60\x61\x62\x63\x64\x65\x66\x67"
11152                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11153                           "\x70\x71\x72\x73\x74\x75\x76\x77"
11154                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11155                           "\x80\x81\x82\x83\x84\x85\x86\x87"
11156                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11157                           "\x90\x91\x92\x93\x94\x95\x96\x97"
11158                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11159                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11160                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11161                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11162                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11163                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11164                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11165                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11166                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11167                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11168                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11169                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11170                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11171                           "\x00\x01\x02\x03\x04\x05\x06\x07"
11172                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11173                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11174                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11175                           "\x20\x21\x22\x23\x24\x25\x26\x27"
11176                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11177                           "\x30\x31\x32\x33\x34\x35\x36\x37"
11178                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11179                           "\x40\x41\x42\x43\x44\x45\x46\x47"
11180                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11181                           "\x50\x51\x52\x53\x54\x55\x56\x57"
11182                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11183                           "\x60\x61\x62\x63\x64\x65\x66\x67"
11184                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11185                           "\x70\x71\x72\x73\x74\x75\x76\x77"
11186                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11187                           "\x80\x81\x82\x83\x84\x85\x86\x87"
11188                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11189                           "\x90\x91\x92\x93\x94\x95\x96\x97"
11190                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11191                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11192                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11193                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11194                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11195                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11196                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11197                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11198                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11199                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11200                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11201                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11202                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11203                 .ilen   = 512,
11204                 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
11205                           "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
11206                           "\xea\x00\x80\x3f\x5e\x48\x23\x57"
11207                           "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
11208                           "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
11209                           "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
11210                           "\x68\x0a\x86\xac\x35\xad\xfc\x33"
11211                           "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
11212                           "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
11213                           "\xb1\x08\xfd\x10\x98\xba\xec\x70"
11214                           "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
11215                           "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
11216                           "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
11217                           "\xae\xba\x12\x29\x61\xd0\x3a\x75"
11218                           "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
11219                           "\x00\x02\x08\x87\x89\x14\x29\xca"
11220                           "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
11221                           "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
11222                           "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
11223                           "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
11224                           "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
11225                           "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
11226                           "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
11227                           "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
11228                           "\x93\xec\x05\xc5\x2e\x04\x93\xef"
11229                           "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
11230                           "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
11231                           "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
11232                           "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
11233                           "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
11234                           "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
11235                           "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
11236                           "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
11237                           "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
11238                           "\xbc\x48\x14\x57\x77\x8f\x61\x60"
11239                           "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
11240                           "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
11241                           "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
11242                           "\xf4\xc3\x33\xec\x44\x23\x88\x51"
11243                           "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
11244                           "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
11245                           "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
11246                           "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
11247                           "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
11248                           "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
11249                           "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
11250                           "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
11251                           "\x92\x5f\xed\xc4\xae\x74\xff\xac"
11252                           "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
11253                           "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
11254                           "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
11255                           "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
11256                           "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
11257                           "\x94\x30\x54\xff\x84\x01\x14\x93"
11258                           "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
11259                           "\x53\x76\x44\x1a\x77\xed\x43\x85"
11260                           "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
11261                           "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
11262                           "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
11263                           "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
11264                           "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
11265                           "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
11266                           "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
11267                           "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
11268                 .rlen   = 512,
11269                 .also_non_np = 1,
11270                 .np     = 2,
11271                 .tap    = { 512 - 16, 16 },
11272         }
11273 };
11274
11275 static struct cipher_testvec aes_xts_dec_tv_template[] = {
11276         /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
11277         { /* XTS-AES 1 */
11278                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
11279                           "\x00\x00\x00\x00\x00\x00\x00\x00"
11280                           "\x00\x00\x00\x00\x00\x00\x00\x00"
11281                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11282                 .klen   = 32,
11283                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11284                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11285                 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
11286                          "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
11287                          "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
11288                          "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
11289                 .ilen   = 32,
11290                 .result  = "\x00\x00\x00\x00\x00\x00\x00\x00"
11291                            "\x00\x00\x00\x00\x00\x00\x00\x00"
11292                            "\x00\x00\x00\x00\x00\x00\x00\x00"
11293                            "\x00\x00\x00\x00\x00\x00\x00\x00",
11294                 .rlen   = 32,
11295         }, { /* XTS-AES 2 */
11296                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
11297                           "\x11\x11\x11\x11\x11\x11\x11\x11"
11298                           "\x22\x22\x22\x22\x22\x22\x22\x22"
11299                           "\x22\x22\x22\x22\x22\x22\x22\x22",
11300                 .klen   = 32,
11301                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
11302                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11303                 .input  = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
11304                           "\x39\x33\x40\x38\xac\xef\x83\x8b"
11305                           "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
11306                           "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
11307                 .ilen   = 32,
11308                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
11309                           "\x44\x44\x44\x44\x44\x44\x44\x44"
11310                           "\x44\x44\x44\x44\x44\x44\x44\x44"
11311                           "\x44\x44\x44\x44\x44\x44\x44\x44",
11312                 .rlen   = 32,
11313         }, { /* XTS-AES 3 */
11314                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
11315                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
11316                           "\x22\x22\x22\x22\x22\x22\x22\x22"
11317                           "\x22\x22\x22\x22\x22\x22\x22\x22",
11318                 .klen   = 32,
11319                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
11320                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11321                 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
11322                           "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
11323                           "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
11324                           "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
11325                 .ilen   = 32,
11326                 .result  = "\x44\x44\x44\x44\x44\x44\x44\x44"
11327                           "\x44\x44\x44\x44\x44\x44\x44\x44"
11328                           "\x44\x44\x44\x44\x44\x44\x44\x44"
11329                           "\x44\x44\x44\x44\x44\x44\x44\x44",
11330                 .rlen   = 32,
11331         }, { /* XTS-AES 4 */
11332                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
11333                           "\x23\x53\x60\x28\x74\x71\x35\x26"
11334                           "\x31\x41\x59\x26\x53\x58\x97\x93"
11335                           "\x23\x84\x62\x64\x33\x83\x27\x95",
11336                 .klen   = 32,
11337                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11338                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11339                 .input  = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
11340                           "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
11341                           "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
11342                           "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
11343                           "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
11344                           "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
11345                           "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
11346                           "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
11347                           "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
11348                           "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
11349                           "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
11350                           "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
11351                           "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
11352                           "\x22\x97\x61\x46\xae\x20\xce\x84"
11353                           "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
11354                           "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
11355                           "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
11356                           "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
11357                           "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
11358                           "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
11359                           "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
11360                           "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
11361                           "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
11362                           "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
11363                           "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
11364                           "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
11365                           "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
11366                           "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
11367                           "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
11368                           "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
11369                           "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
11370                           "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
11371                           "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
11372                           "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
11373                           "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
11374                           "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
11375                           "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
11376                           "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
11377                           "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
11378                           "\x55\xef\x52\x97\xca\x67\xe9\xf3"
11379                           "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
11380                           "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
11381                           "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
11382                           "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
11383                           "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
11384                           "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
11385                           "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
11386                           "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
11387                           "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
11388                           "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
11389                           "\x18\x84\x69\x77\xae\x11\x9f\x7a"
11390                           "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
11391                           "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
11392                           "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
11393                           "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
11394                           "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
11395                           "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
11396                           "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
11397                           "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
11398                           "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
11399                           "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
11400                           "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
11401                           "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
11402                           "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
11403                 .ilen   = 512,
11404                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
11405                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11406                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11407                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11408                           "\x20\x21\x22\x23\x24\x25\x26\x27"
11409                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11410                           "\x30\x31\x32\x33\x34\x35\x36\x37"
11411                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11412                           "\x40\x41\x42\x43\x44\x45\x46\x47"
11413                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11414                           "\x50\x51\x52\x53\x54\x55\x56\x57"
11415                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11416                           "\x60\x61\x62\x63\x64\x65\x66\x67"
11417                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11418                           "\x70\x71\x72\x73\x74\x75\x76\x77"
11419                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11420                           "\x80\x81\x82\x83\x84\x85\x86\x87"
11421                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11422                           "\x90\x91\x92\x93\x94\x95\x96\x97"
11423                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11424                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11425                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11426                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11427                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11428                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11429                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11430                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11431                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11432                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11433                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11434                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11435                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11436                           "\x00\x01\x02\x03\x04\x05\x06\x07"
11437                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11438                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11439                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11440                           "\x20\x21\x22\x23\x24\x25\x26\x27"
11441                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11442                           "\x30\x31\x32\x33\x34\x35\x36\x37"
11443                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11444                           "\x40\x41\x42\x43\x44\x45\x46\x47"
11445                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11446                           "\x50\x51\x52\x53\x54\x55\x56\x57"
11447                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11448                           "\x60\x61\x62\x63\x64\x65\x66\x67"
11449                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11450                           "\x70\x71\x72\x73\x74\x75\x76\x77"
11451                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11452                           "\x80\x81\x82\x83\x84\x85\x86\x87"
11453                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11454                           "\x90\x91\x92\x93\x94\x95\x96\x97"
11455                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11456                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11457                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11458                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11459                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11460                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11461                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11462                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11463                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11464                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11465                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11466                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11467                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11468                 .rlen   = 512,
11469         }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
11470                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
11471                           "\x23\x53\x60\x28\x74\x71\x35\x26"
11472                           "\x62\x49\x77\x57\x24\x70\x93\x69"
11473                           "\x99\x59\x57\x49\x66\x96\x76\x27"
11474                           "\x31\x41\x59\x26\x53\x58\x97\x93"
11475                           "\x23\x84\x62\x64\x33\x83\x27\x95"
11476                           "\x02\x88\x41\x97\x16\x93\x99\x37"
11477                           "\x51\x05\x82\x09\x74\x94\x45\x92",
11478                 .klen   = 64,
11479                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
11480                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11481                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11482                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11483                 .input  = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
11484                           "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
11485                           "\xea\x00\x80\x3f\x5e\x48\x23\x57"
11486                           "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
11487                           "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
11488                           "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
11489                           "\x68\x0a\x86\xac\x35\xad\xfc\x33"
11490                           "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
11491                           "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
11492                           "\xb1\x08\xfd\x10\x98\xba\xec\x70"
11493                           "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
11494                           "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
11495                           "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
11496                           "\xae\xba\x12\x29\x61\xd0\x3a\x75"
11497                           "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
11498                           "\x00\x02\x08\x87\x89\x14\x29\xca"
11499                           "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
11500                           "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
11501                           "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
11502                           "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
11503                           "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
11504                           "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
11505                           "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
11506                           "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
11507                           "\x93\xec\x05\xc5\x2e\x04\x93\xef"
11508                           "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
11509                           "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
11510                           "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
11511                           "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
11512                           "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
11513                           "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
11514                           "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
11515                           "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
11516                           "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
11517                           "\xbc\x48\x14\x57\x77\x8f\x61\x60"
11518                           "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
11519                           "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
11520                           "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
11521                           "\xf4\xc3\x33\xec\x44\x23\x88\x51"
11522                           "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
11523                           "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
11524                           "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
11525                           "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
11526                           "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
11527                           "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
11528                           "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
11529                           "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
11530                           "\x92\x5f\xed\xc4\xae\x74\xff\xac"
11531                           "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
11532                           "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
11533                           "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
11534                           "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
11535                           "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
11536                           "\x94\x30\x54\xff\x84\x01\x14\x93"
11537                           "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
11538                           "\x53\x76\x44\x1a\x77\xed\x43\x85"
11539                           "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
11540                           "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
11541                           "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
11542                           "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
11543                           "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
11544                           "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
11545                           "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
11546                           "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
11547                 .ilen   = 512,
11548                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
11549                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11550                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11551                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11552                           "\x20\x21\x22\x23\x24\x25\x26\x27"
11553                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11554                           "\x30\x31\x32\x33\x34\x35\x36\x37"
11555                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11556                           "\x40\x41\x42\x43\x44\x45\x46\x47"
11557                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11558                           "\x50\x51\x52\x53\x54\x55\x56\x57"
11559                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11560                           "\x60\x61\x62\x63\x64\x65\x66\x67"
11561                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11562                           "\x70\x71\x72\x73\x74\x75\x76\x77"
11563                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11564                           "\x80\x81\x82\x83\x84\x85\x86\x87"
11565                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11566                           "\x90\x91\x92\x93\x94\x95\x96\x97"
11567                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11568                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11569                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11570                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11571                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11572                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11573                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11574                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11575                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11576                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11577                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11578                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11579                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11580                           "\x00\x01\x02\x03\x04\x05\x06\x07"
11581                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11582                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11583                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11584                           "\x20\x21\x22\x23\x24\x25\x26\x27"
11585                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11586                           "\x30\x31\x32\x33\x34\x35\x36\x37"
11587                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11588                           "\x40\x41\x42\x43\x44\x45\x46\x47"
11589                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11590                           "\x50\x51\x52\x53\x54\x55\x56\x57"
11591                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11592                           "\x60\x61\x62\x63\x64\x65\x66\x67"
11593                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11594                           "\x70\x71\x72\x73\x74\x75\x76\x77"
11595                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11596                           "\x80\x81\x82\x83\x84\x85\x86\x87"
11597                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11598                           "\x90\x91\x92\x93\x94\x95\x96\x97"
11599                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11600                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11601                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11602                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11603                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11604                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11605                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11606                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11607                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11608                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11609                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11610                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11611                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11612                 .rlen   = 512,
11613                 .also_non_np = 1,
11614                 .np     = 2,
11615                 .tap    = { 512 - 16, 16 },
11616         }
11617 };
11618
11619
11620 static struct cipher_testvec aes_ctr_enc_tv_template[] = {
11621         { /* From NIST Special Publication 800-38A, Appendix F.5 */
11622                 .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
11623                           "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
11624                 .klen   = 16,
11625                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11626                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11627                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11628                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11629                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11630                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11631                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11632                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11633                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11634                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11635                 .ilen   = 64,
11636                 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
11637                           "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
11638                           "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
11639                           "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
11640                           "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
11641                           "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
11642                           "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
11643                           "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
11644                 .rlen   = 64,
11645         }, {
11646                 .key    = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
11647                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
11648                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
11649                 .klen   = 24,
11650                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11651                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11652                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11653                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11654                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11655                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11656                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11657                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11658                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11659                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11660                 .ilen   = 64,
11661                 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
11662                           "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
11663                           "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
11664                           "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
11665                           "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
11666                           "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
11667                           "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
11668                           "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
11669                 .rlen   = 64,
11670         }, {
11671                 .key    = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
11672                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
11673                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
11674                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
11675                 .klen   = 32,
11676                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11677                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11678                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11679                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11680                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11681                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11682                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11683                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11684                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11685                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11686                 .ilen   = 64,
11687                 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
11688                           "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
11689                           "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
11690                           "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
11691                           "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
11692                           "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
11693                           "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
11694                           "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
11695                 .rlen   = 64,
11696         }
11697 };
11698
11699 static struct cipher_testvec aes_ctr_dec_tv_template[] = {
11700         { /* From NIST Special Publication 800-38A, Appendix F.5 */
11701                 .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
11702                           "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
11703                 .klen   = 16,
11704                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11705                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11706                 .input  = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
11707                           "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
11708                           "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
11709                           "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
11710                           "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
11711                           "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
11712                           "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
11713                           "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
11714                 .ilen   = 64,
11715                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11716                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11717                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11718                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11719                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11720                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11721                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11722                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11723                 .rlen   = 64,
11724         }, {
11725                 .key    = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
11726                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
11727                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
11728                 .klen   = 24,
11729                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11730                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11731                 .input  = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
11732                           "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
11733                           "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
11734                           "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
11735                           "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
11736                           "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
11737                           "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
11738                           "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
11739                 .ilen   = 64,
11740                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11741                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11742                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11743                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11744                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11745                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11746                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11747                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11748                 .rlen   = 64,
11749         }, {
11750                 .key    = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
11751                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
11752                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
11753                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
11754                 .klen   = 32,
11755                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11756                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
11757                 .input  = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
11758                           "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
11759                           "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
11760                           "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
11761                           "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
11762                           "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
11763                           "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
11764                           "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
11765                 .ilen   = 64,
11766                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
11767                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
11768                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
11769                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
11770                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
11771                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
11772                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
11773                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
11774                 .rlen   = 64,
11775         }
11776 };
11777
11778 static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
11779         { /* From RFC 3686 */
11780                 .key    = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
11781                           "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
11782                           "\x00\x00\x00\x30",
11783                 .klen   = 20,
11784                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
11785                 .input  = "Single block msg",
11786                 .ilen   = 16,
11787                 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
11788                           "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
11789                 .rlen   = 16,
11790         }, {
11791                 .key    = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
11792                           "\x43\xd6\xce\x1f\x32\x53\x91\x63"
11793                           "\x00\x6c\xb6\xdb",
11794                 .klen   = 20,
11795                 .iv     = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
11796                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
11797                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11798                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11799                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
11800                 .ilen   = 32,
11801                 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
11802                           "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
11803                           "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
11804                           "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
11805                 .rlen   = 32,
11806         }, {
11807                 .key    = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
11808                           "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
11809                           "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
11810                           "\x00\x00\x00\x48",
11811                 .klen   = 28,
11812                 .iv     = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
11813                 .input  = "Single block msg",
11814                 .ilen   = 16,
11815                 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
11816                           "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
11817                 .rlen   = 16,
11818         }, {
11819                 .key    = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
11820                           "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
11821                           "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
11822                           "\x00\x96\xb0\x3b",
11823                 .klen   = 28,
11824                 .iv     = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
11825                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
11826                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11827                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11828                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
11829                 .ilen   = 32,
11830                 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
11831                           "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
11832                           "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
11833                           "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
11834                 .rlen   = 32,
11835         }, {
11836                 .key    = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
11837                           "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
11838                           "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
11839                           "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
11840                           "\x00\x00\x00\x60",
11841                 .klen   = 36,
11842                 .iv     = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
11843                 .input  = "Single block msg",
11844                 .ilen   = 16,
11845                 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
11846                           "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
11847                 .rlen   = 16,
11848         }, {
11849                 .key    = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
11850                           "\x07\x96\x36\x58\x79\xef\xf8\x86"
11851                           "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
11852                           "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
11853                           "\x00\xfa\xac\x24",
11854                 .klen   = 36,
11855                 .iv     = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
11856                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
11857                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11858                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11859                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
11860                 .ilen   = 32,
11861                 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
11862                           "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
11863                           "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
11864                           "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
11865                 .rlen   = 32,
11866         }, {
11867         // generated using Crypto++
11868                 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
11869                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11870                         "\x10\x11\x12\x13\x14\x15\x16\x17"
11871                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11872                         "\x00\x00\x00\x00",
11873                 .klen = 32 + 4,
11874                 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
11875                 .input =
11876                         "\x00\x01\x02\x03\x04\x05\x06\x07"
11877                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11878                         "\x10\x11\x12\x13\x14\x15\x16\x17"
11879                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11880                         "\x20\x21\x22\x23\x24\x25\x26\x27"
11881                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11882                         "\x30\x31\x32\x33\x34\x35\x36\x37"
11883                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11884                         "\x40\x41\x42\x43\x44\x45\x46\x47"
11885                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11886                         "\x50\x51\x52\x53\x54\x55\x56\x57"
11887                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11888                         "\x60\x61\x62\x63\x64\x65\x66\x67"
11889                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11890                         "\x70\x71\x72\x73\x74\x75\x76\x77"
11891                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11892                         "\x80\x81\x82\x83\x84\x85\x86\x87"
11893                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11894                         "\x90\x91\x92\x93\x94\x95\x96\x97"
11895                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11896                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11897                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11898                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11899                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11900                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11901                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11902                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11903                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11904                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11905                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11906                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11907                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11908                         "\x00\x03\x06\x09\x0c\x0f\x12\x15"
11909                         "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
11910                         "\x30\x33\x36\x39\x3c\x3f\x42\x45"
11911                         "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
11912                         "\x60\x63\x66\x69\x6c\x6f\x72\x75"
11913                         "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
11914                         "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
11915                         "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
11916                         "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
11917                         "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
11918                         "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
11919                         "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
11920                         "\x20\x23\x26\x29\x2c\x2f\x32\x35"
11921                         "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
11922                         "\x50\x53\x56\x59\x5c\x5f\x62\x65"
11923                         "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
11924                         "\x80\x83\x86\x89\x8c\x8f\x92\x95"
11925                         "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
11926                         "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
11927                         "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
11928                         "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
11929                         "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
11930                         "\x10\x13\x16\x19\x1c\x1f\x22\x25"
11931                         "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
11932                         "\x40\x43\x46\x49\x4c\x4f\x52\x55"
11933                         "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
11934                         "\x70\x73\x76\x79\x7c\x7f\x82\x85"
11935                         "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
11936                         "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
11937                         "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
11938                         "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
11939                         "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
11940                         "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
11941                         "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
11942                         "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
11943                         "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
11944                         "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
11945                         "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
11946                         "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
11947                         "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
11948                         "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
11949                         "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
11950                         "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
11951                         "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
11952                         "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
11953                         "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
11954                         "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
11955                         "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
11956                         "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
11957                         "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
11958                         "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
11959                         "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
11960                         "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
11961                         "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
11962                         "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
11963                         "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
11964                         "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
11965                         "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
11966                         "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
11967                         "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
11968                         "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
11969                         "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
11970                         "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
11971                         "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
11972                         "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
11973                         "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
11974                         "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
11975                         "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
11976                         "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
11977                         "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
11978                         "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
11979                         "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
11980                         "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
11981                         "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
11982                         "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
11983                         "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
11984                         "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
11985                         "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
11986                         "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
11987                         "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
11988                         "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
11989                         "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
11990                         "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
11991                         "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
11992                         "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
11993                         "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
11994                         "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
11995                         "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
11996                         "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
11997                         "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
11998                         "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
11999                         "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
12000                         "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
12001                         "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
12002                         "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
12003                         "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
12004                         "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
12005                         "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
12006                         "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
12007                         "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
12008                         "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
12009                         "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
12010                         "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
12011                         "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
12012                         "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
12013                         "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
12014                         "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
12015                         "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
12016                         "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
12017                         "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
12018                         "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
12019                         "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
12020                         "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
12021                         "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
12022                         "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
12023                         "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
12024                         "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
12025                         "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
12026                         "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
12027                         "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
12028                         "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
12029                         "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
12030                         "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
12031                         "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
12032                         "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
12033                         "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
12034                         "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
12035                         "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
12036                         "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
12037                         "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
12038                         "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
12039                         "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
12040                         "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
12041                         "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
12042                         "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
12043                         "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
12044                         "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
12045                         "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
12046                         "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
12047                         "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
12048                         "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
12049                         "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
12050                         "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
12051                         "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
12052                         "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
12053                         "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
12054                         "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
12055                         "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
12056                         "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
12057                         "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
12058                         "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
12059                         "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
12060                         "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
12061                         "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
12062                         "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
12063                         "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
12064                         "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
12065                         "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
12066                         "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
12067                         "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
12068                         "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
12069                         "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
12070                         "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
12071                         "\x38\x45\x52\x5f\x6c\x79\x86\x93"
12072                         "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
12073                         "\x08\x15\x22\x2f\x3c\x49\x56\x63"
12074                         "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
12075                         "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
12076                         "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
12077                         "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
12078                         "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
12079                         "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
12080                         "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
12081                         "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
12082                         "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
12083                         "\x18\x25\x32\x3f\x4c\x59\x66\x73"
12084                         "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
12085                         "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
12086                         "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
12087                         "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
12088                         "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
12089                         "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
12090                         "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
12091                         "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
12092                         "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
12093                         "\x28\x35\x42\x4f\x5c\x69\x76\x83"
12094                         "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
12095                         "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
12096                         "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
12097                         "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
12098                         "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
12099                         "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
12100                         "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
12101                         "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
12102                         "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
12103                         "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
12104                         "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
12105                         "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
12106                         "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
12107                         "\x48\x57\x66\x75\x84\x93\xa2\xb1"
12108                         "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
12109                         "\x38\x47\x56\x65\x74\x83\x92\xa1"
12110                         "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
12111                         "\x28\x37\x46\x55\x64\x73\x82\x91"
12112                         "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
12113                         "\x18\x27\x36\x45\x54\x63\x72\x81"
12114                         "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
12115                         "\x08\x17\x26\x35\x44\x53\x62\x71"
12116                         "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
12117                         "\xf8\x07\x16\x25\x34\x43\x52\x61"
12118                         "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
12119                         "\xe8\xf7\x06\x15\x24\x33\x42\x51"
12120                         "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
12121                         "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
12122                         "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
12123                         "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
12124                         "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
12125                         "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
12126                         "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
12127                         "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
12128                         "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
12129                         "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
12130                         "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
12131                         "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
12132                         "\x00\x11\x22\x33\x44\x55\x66\x77"
12133                         "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
12134                         "\x10\x21\x32\x43\x54\x65\x76\x87"
12135                         "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
12136                         "\x20\x31\x42\x53\x64\x75\x86\x97"
12137                         "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
12138                         "\x30\x41\x52\x63\x74\x85\x96\xa7"
12139                         "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
12140                         "\x40\x51\x62\x73\x84\x95\xa6\xb7"
12141                         "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
12142                         "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
12143                         "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
12144                         "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
12145                         "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
12146                         "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
12147                         "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
12148                         "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
12149                         "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
12150                         "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
12151                         "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
12152                         "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
12153                         "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
12154                         "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
12155                         "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
12156                         "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
12157                         "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
12158                         "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
12159                         "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
12160                         "\xe0\xf1\x02\x13\x24\x35\x46\x57"
12161                         "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
12162                         "\xf0\x01\x12\x23\x34\x45\x56\x67"
12163                         "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
12164                         "\x00\x13\x26\x39\x4c\x5f\x72\x85"
12165                         "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
12166                         "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
12167                         "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
12168                         "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
12169                         "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
12170                         "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
12171                         "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
12172                         "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
12173                         "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
12174                         "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
12175                         "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
12176                         "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
12177                         "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
12178                         "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
12179                         "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
12180                         "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
12181                         "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
12182                         "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
12183                         "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
12184                         "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
12185                         "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
12186                         "\x10\x23\x36\x49\x5c\x6f\x82\x95"
12187                         "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
12188                         "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
12189                         "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
12190                         "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
12191                         "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
12192                         "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
12193                         "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
12194                         "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
12195                         "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
12196                         "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
12197                         "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
12198                         "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
12199                         "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
12200                         "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
12201                         "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
12202                         "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
12203                         "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
12204                         "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
12205                         "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
12206                         "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
12207                         "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
12208                         "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
12209                         "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
12210                         "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
12211                         "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
12212                         "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
12213                         "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
12214                         "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
12215                         "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
12216                         "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
12217                         "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
12218                         "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
12219                         "\x18\x2d\x42\x57\x6c\x81\x96\xab"
12220                         "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
12221                         "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
12222                         "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
12223                         "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
12224                         "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
12225                         "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
12226                         "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
12227                         "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
12228                         "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
12229                         "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
12230                         "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
12231                         "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
12232                         "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
12233                         "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
12234                         "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
12235                         "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
12236                         "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
12237                         "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
12238                         "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
12239                         "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
12240                         "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
12241                         "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
12242                         "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
12243                         "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
12244                         "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
12245                         "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
12246                         "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
12247                         "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
12248                         "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
12249                         "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
12250                         "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
12251                         "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
12252                         "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
12253                         "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
12254                         "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
12255                         "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
12256                         "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
12257                         "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
12258                         "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
12259                         "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
12260                         "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
12261                         "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
12262                         "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
12263                         "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
12264                         "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
12265                         "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
12266                         "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
12267                         "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
12268                         "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
12269                         "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
12270                         "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
12271                         "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
12272                         "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
12273                         "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
12274                         "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
12275                         "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
12276                         "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
12277                         "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
12278                         "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
12279                         "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
12280                         "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
12281                         "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
12282                         "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
12283                         "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
12284                         "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
12285                         "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
12286                         "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
12287                         "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
12288                         "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
12289                         "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
12290                         "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
12291                         "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
12292                         "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
12293                         "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
12294                         "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
12295                         "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
12296                         "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
12297                         "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
12298                         "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
12299                         "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
12300                         "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
12301                         "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
12302                         "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
12303                         "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
12304                         "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
12305                         "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
12306                         "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
12307                         "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
12308                         "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
12309                         "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
12310                         "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
12311                         "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
12312                         "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
12313                         "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
12314                         "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
12315                         "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
12316                         "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
12317                         "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
12318                         "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
12319                         "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
12320                         "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
12321                         "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
12322                         "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
12323                         "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
12324                         "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
12325                         "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
12326                         "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
12327                         "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
12328                         "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
12329                         "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
12330                         "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
12331                         "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
12332                         "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
12333                         "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
12334                         "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
12335                         "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
12336                         "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
12337                         "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
12338                         "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
12339                         "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
12340                         "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
12341                         "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
12342                         "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
12343                         "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
12344                         "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
12345                         "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
12346                         "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
12347                         "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
12348                         "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
12349                         "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
12350                         "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
12351                         "\x78\x95\xb2\xcf\xec\x09\x26\x43"
12352                         "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
12353                         "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
12354                         "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
12355                         "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
12356                         "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
12357                         "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
12358                         "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
12359                         "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
12360                         "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
12361                         "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
12362                         "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
12363                         "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
12364                         "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
12365                         "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
12366                         "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
12367                         "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
12368                         "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
12369                         "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
12370                         "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
12371                         "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
12372                         "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
12373                         "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
12374                         "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
12375                         "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
12376                         "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
12377                         "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
12378                         "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
12379                         "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
12380                         "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
12381                         "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
12382                         "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
12383                         "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
12384                         "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
12385                         "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
12386                         "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
12387                         "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
12388                         "\x00\x21\x42\x63",
12389                 .ilen = 4100,
12390                 .result =
12391                         "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
12392                         "\xae\xff\x91\x3a\x44\xcf\x38\x32"
12393                         "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
12394                         "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
12395                         "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
12396                         "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
12397                         "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
12398                         "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
12399                         "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
12400                         "\x18\xff\x75\x6d\x06\x2d\x00\xab"
12401                         "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
12402                         "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
12403                         "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
12404                         "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
12405                         "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
12406                         "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
12407                         "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
12408                         "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
12409                         "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
12410                         "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
12411                         "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
12412                         "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
12413                         "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
12414                         "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
12415                         "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
12416                         "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
12417                         "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
12418                         "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
12419                         "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
12420                         "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
12421                         "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
12422                         "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
12423                         "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
12424                         "\x6a\x25\x15\x33\x4e\x45\x08\xec"
12425                         "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
12426                         "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
12427                         "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
12428                         "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
12429                         "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
12430                         "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
12431                         "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
12432                         "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
12433                         "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
12434                         "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
12435                         "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
12436                         "\x04\x02\xef\xd3\x44\xde\x76\x31"
12437                         "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
12438                         "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
12439                         "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
12440                         "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
12441                         "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
12442                         "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
12443                         "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
12444                         "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
12445                         "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
12446                         "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
12447                         "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
12448                         "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
12449                         "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
12450                         "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
12451                         "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
12452                         "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
12453                         "\x32\x03\xed\xf0\x50\x1c\x56\x39"
12454                         "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
12455                         "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
12456                         "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
12457                         "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
12458                         "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
12459                         "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
12460                         "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
12461                         "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
12462                         "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
12463                         "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
12464                         "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
12465                         "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
12466                         "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
12467                         "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
12468                         "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
12469                         "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
12470                         "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
12471                         "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
12472                         "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
12473                         "\x69\x3a\x29\x23\xac\x86\x32\xa5"
12474                         "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
12475                         "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
12476                         "\x59\x6a\xd3\x50\x59\x43\x59\xde"
12477                         "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
12478                         "\x18\x34\x0d\x1a\x63\x33\xed\x10"
12479                         "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
12480                         "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
12481                         "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
12482                         "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
12483                         "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
12484                         "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
12485                         "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
12486                         "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
12487                         "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
12488                         "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
12489                         "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
12490                         "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
12491                         "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
12492                         "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
12493                         "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
12494                         "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
12495                         "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
12496                         "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
12497                         "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
12498                         "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
12499                         "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
12500                         "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
12501                         "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
12502                         "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
12503                         "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
12504                         "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
12505                         "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
12506                         "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
12507                         "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
12508                         "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
12509                         "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
12510                         "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
12511                         "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
12512                         "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
12513                         "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
12514                         "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
12515                         "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
12516                         "\x26\x39\x83\x94\xef\x27\xd8\x53"
12517                         "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
12518                         "\x43\x7c\x95\x0a\x53\xef\x66\xda"
12519                         "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
12520                         "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
12521                         "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
12522                         "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
12523                         "\x88\xee\x73\xcf\x66\x2f\x52\x56"
12524                         "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
12525                         "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
12526                         "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
12527                         "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
12528                         "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
12529                         "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
12530                         "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
12531                         "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
12532                         "\xba\x61\x34\x38\x7c\xda\x48\x3e"
12533                         "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
12534                         "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
12535                         "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
12536                         "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
12537                         "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
12538                         "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
12539                         "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
12540                         "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
12541                         "\x35\x12\xe3\x36\x28\x27\x36\x58"
12542                         "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
12543                         "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
12544                         "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
12545                         "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
12546                         "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
12547                         "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
12548                         "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
12549                         "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
12550                         "\x89\xf3\x78\x35\x44\x62\x78\x72"
12551                         "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
12552                         "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
12553                         "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
12554                         "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
12555                         "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
12556                         "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
12557                         "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
12558                         "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
12559                         "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
12560                         "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
12561                         "\xd2\x49\x77\x81\x6d\x90\x70\xae"
12562                         "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
12563                         "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
12564                         "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
12565                         "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
12566                         "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
12567                         "\x45\x42\x27\x75\x50\xe5\xee\xb8"
12568                         "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
12569                         "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
12570                         "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
12571                         "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
12572                         "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
12573                         "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
12574                         "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
12575                         "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
12576                         "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
12577                         "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
12578                         "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
12579                         "\xa9\x21\x2b\x92\x94\x87\x62\x57"
12580                         "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
12581                         "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
12582                         "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
12583                         "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
12584                         "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
12585                         "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
12586                         "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
12587                         "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
12588                         "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
12589                         "\x69\x34\x78\x61\x24\x21\x9c\x8a"
12590                         "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
12591                         "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
12592                         "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
12593                         "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
12594                         "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
12595                         "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
12596                         "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
12597                         "\xb1\x95\x28\x86\x20\xe9\x17\x49"
12598                         "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
12599                         "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
12600                         "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
12601                         "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
12602                         "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
12603                         "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
12604                         "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
12605                         "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
12606                         "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
12607                         "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
12608                         "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
12609                         "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
12610                         "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
12611                         "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
12612                         "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
12613                         "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
12614                         "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
12615                         "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
12616                         "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
12617                         "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
12618                         "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
12619                         "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
12620                         "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
12621                         "\x29\x90\x46\x30\x92\x69\x7d\x13"
12622                         "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
12623                         "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
12624                         "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
12625                         "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
12626                         "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
12627                         "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
12628                         "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
12629                         "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
12630                         "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
12631                         "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
12632                         "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
12633                         "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
12634                         "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
12635                         "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
12636                         "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
12637                         "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
12638                         "\x77\x65\x08\x60\x11\x76\x4c\x8d"
12639                         "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
12640                         "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
12641                         "\x03\xd1\x24\x95\xec\x6d\xab\x38"
12642                         "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
12643                         "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
12644                         "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
12645                         "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
12646                         "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
12647                         "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
12648                         "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
12649                         "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
12650                         "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
12651                         "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
12652                         "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
12653                         "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
12654                         "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
12655                         "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
12656                         "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
12657                         "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
12658                         "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
12659                         "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
12660                         "\xe5\x79\x81\x73\xcd\x43\x59\x68"
12661                         "\x73\x02\x3b\x78\x21\x72\x43\x00"
12662                         "\x49\x17\xf7\x00\xaf\x68\x24\x53"
12663                         "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
12664                         "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
12665                         "\x11\x94\x13\x69\x51\x09\x28\xde"
12666                         "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
12667                         "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
12668                         "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
12669                         "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
12670                         "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
12671                         "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
12672                         "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
12673                         "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
12674                         "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
12675                         "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
12676                         "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
12677                         "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
12678                         "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
12679                         "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
12680                         "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
12681                         "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
12682                         "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
12683                         "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
12684                         "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
12685                         "\x69\xdc\xab\x24\x57\x60\x47\xc1"
12686                         "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
12687                         "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
12688                         "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
12689                         "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
12690                         "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
12691                         "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
12692                         "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
12693                         "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
12694                         "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
12695                         "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
12696                         "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
12697                         "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
12698                         "\x85\x62\x82\x70\x18\xe2\x9a\x78"
12699                         "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
12700                         "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
12701                         "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
12702                         "\x35\xf3\x61\x06\x72\x84\xc4\x32"
12703                         "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
12704                         "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
12705                         "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
12706                         "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
12707                         "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
12708                         "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
12709                         "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
12710                         "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
12711                         "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
12712                         "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
12713                         "\x4f\x73\x38\x09\x75\x64\x48\xe0"
12714                         "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
12715                         "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
12716                         "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
12717                         "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
12718                         "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
12719                         "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
12720                         "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
12721                         "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
12722                         "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
12723                         "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
12724                         "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
12725                         "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
12726                         "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
12727                         "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
12728                         "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
12729                         "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
12730                         "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
12731                         "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
12732                         "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
12733                         "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
12734                         "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
12735                         "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
12736                         "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
12737                         "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
12738                         "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
12739                         "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
12740                         "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
12741                         "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
12742                         "\xce\x4d\x5f\x18\x60\xce\x87\x22"
12743                         "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
12744                         "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
12745                         "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
12746                         "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
12747                         "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
12748                         "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
12749                         "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
12750                         "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
12751                         "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
12752                         "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
12753                         "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
12754                         "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
12755                         "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
12756                         "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
12757                         "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
12758                         "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
12759                         "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
12760                         "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
12761                         "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
12762                         "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
12763                         "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
12764                         "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
12765                         "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
12766                         "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
12767                         "\xce\x54\xf9\x18\x58\xb5\xff\x44"
12768                         "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
12769                         "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
12770                         "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
12771                         "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
12772                         "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
12773                         "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
12774                         "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
12775                         "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
12776                         "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
12777                         "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
12778                         "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
12779                         "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
12780                         "\x0c\xd6\x04\x14\xde\x51\x74\x75"
12781                         "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
12782                         "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
12783                         "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
12784                         "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
12785                         "\x75\x46\x65\x4e\x07\x34\x37\xa3"
12786                         "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
12787                         "\x69\x24\x0e\x38\x67\x43\x8c\xde"
12788                         "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
12789                         "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
12790                         "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
12791                         "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
12792                         "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
12793                         "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
12794                         "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
12795                         "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
12796                         "\x91\x7d\x62\x64\x96\x72\xde\xfc"
12797                         "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
12798                         "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
12799                         "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
12800                         "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
12801                         "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
12802                         "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
12803                         "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
12804                         "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
12805                         "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
12806                         "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
12807                         "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
12808                         "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
12809                         "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
12810                         "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
12811                         "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
12812                         "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
12813                         "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
12814                         "\xae\xed\x39\x88\x42\x11\x3c\xed"
12815                         "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
12816                         "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
12817                         "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
12818                         "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
12819                         "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
12820                         "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
12821                         "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
12822                         "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
12823                         "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
12824                         "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
12825                         "\x34\x17\xde\xba\x47\xf1\x06\x18"
12826                         "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
12827                         "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
12828                         "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
12829                         "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
12830                         "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
12831                         "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
12832                         "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
12833                         "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
12834                         "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
12835                         "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
12836                         "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
12837                         "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
12838                         "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
12839                         "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
12840                         "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
12841                         "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
12842                         "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
12843                         "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
12844                         "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
12845                         "\x2c\x56\x39\x79\x0f\x69\x44\x75"
12846                         "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
12847                         "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
12848                         "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
12849                         "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
12850                         "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
12851                         "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
12852                         "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
12853                         "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
12854                         "\x63\x9b\xce\x61\x24\x79\xc0\x70"
12855                         "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
12856                         "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
12857                         "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
12858                         "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
12859                         "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
12860                         "\x74\x56\x58\x40\x02\x37\x52\x2c"
12861                         "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
12862                         "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
12863                         "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
12864                         "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
12865                         "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
12866                         "\xed\x38\x80\x36\x72\x43\x27\x49"
12867                         "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
12868                         "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
12869                         "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
12870                         "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
12871                         "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
12872                         "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
12873                         "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
12874                         "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
12875                         "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
12876                         "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
12877                         "\x12\xee\x30\xfe\xd8\x30\xef\x34"
12878                         "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
12879                         "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
12880                         "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
12881                         "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
12882                         "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
12883                         "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
12884                         "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
12885                         "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
12886                         "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
12887                         "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
12888                         "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
12889                         "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
12890                         "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
12891                         "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
12892                         "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
12893                         "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
12894                         "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
12895                         "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
12896                         "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
12897                         "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
12898                         "\x44\x12\xfb\x73\x77\xd4\x13\x39"
12899                         "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
12900                         "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
12901                         "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
12902                         "\x4b\xef\x31\x18\xea\xac\xb1\x84"
12903                         "\x21\xed\xda\x86",
12904                 .rlen = 4100,
12905                 .np     = 2,
12906                 .tap    = { 4064, 36 },
12907         },
12908 };
12909
12910 static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
12911         { /* From RFC 3686 */
12912                 .key    = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
12913                           "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
12914                           "\x00\x00\x00\x30",
12915                 .klen   = 20,
12916                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
12917                 .input  = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
12918                           "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
12919                 .ilen   = 16,
12920                 .result = "Single block msg",
12921                 .rlen   = 16,
12922         }, {
12923                 .key    = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
12924                           "\x43\xd6\xce\x1f\x32\x53\x91\x63"
12925                           "\x00\x6c\xb6\xdb",
12926                 .klen   = 20,
12927                 .iv     = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
12928                 .input  = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
12929                           "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
12930                           "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
12931                           "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
12932                 .ilen   = 32,
12933                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12934                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12935                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12936                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12937                 .rlen   = 32,
12938         }, {
12939                 .key    = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
12940                           "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
12941                           "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
12942                           "\x00\x00\x00\x48",
12943                 .klen   = 28,
12944                 .iv     = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
12945                 .input  = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
12946                           "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
12947                 .ilen   = 16,
12948                 .result = "Single block msg",
12949                 .rlen   = 16,
12950         }, {
12951                 .key    = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
12952                           "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
12953                           "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
12954                           "\x00\x96\xb0\x3b",
12955                 .klen   = 28,
12956                 .iv     = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
12957                 .input  = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
12958                           "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
12959                           "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
12960                           "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
12961                 .ilen   = 32,
12962                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12963                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12964                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12965                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12966                 .rlen   = 32,
12967         }, {
12968                 .key    = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
12969                           "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
12970                           "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
12971                           "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
12972                           "\x00\x00\x00\x60",
12973                 .klen   = 36,
12974                 .iv     = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
12975                 .input  = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
12976                           "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
12977                 .ilen   = 16,
12978                 .result = "Single block msg",
12979                 .rlen   = 16,
12980         }, {
12981                 .key    = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
12982                           "\x07\x96\x36\x58\x79\xef\xf8\x86"
12983                           "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
12984                           "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
12985                           "\x00\xfa\xac\x24",
12986                 .klen   = 36,
12987                 .iv     = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
12988                 .input  = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
12989                           "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
12990                           "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
12991                           "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
12992                 .ilen   = 32,
12993                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12994                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12995                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12996                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
12997                 .rlen   = 32,
12998         },
12999 };
13000
13001 static struct cipher_testvec aes_ofb_enc_tv_template[] = {
13002          /* From NIST Special Publication 800-38A, Appendix F.5 */
13003         {
13004                 .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
13005                           "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
13006                 .klen   = 16,
13007                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
13008                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13009                 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13010                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13011                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13012                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13013                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13014                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13015                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13016                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13017                 .ilen   = 64,
13018                 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
13019                           "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
13020                           "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
13021                           "\x3c\x52\xda\xc5\x4e\xd8\x25"
13022                           "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
13023                           "\x44\xf7\xa8\x22\x60\xed\xcc"
13024                           "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
13025                           "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
13026                 .rlen   = 64,
13027         }
13028 };
13029
13030 static struct cipher_testvec aes_ofb_dec_tv_template[] = {
13031          /* From NIST Special Publication 800-38A, Appendix F.5 */
13032         {
13033                 .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
13034                           "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
13035                 .klen   = 16,
13036                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
13037                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
13038                 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
13039                           "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
13040                           "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
13041                           "\x3c\x52\xda\xc5\x4e\xd8\x25"
13042                           "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
13043                           "\x44\xf7\xa8\x22\x60\xed\xcc"
13044                           "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
13045                           "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
13046                 .ilen   = 64,
13047                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
13048                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
13049                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
13050                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
13051                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
13052                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
13053                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
13054                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
13055                 .rlen   = 64,
13056         }
13057 };
13058
13059 static struct aead_testvec aes_gcm_enc_tv_template[] = {
13060         { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
13061                 .key    = zeroed_string,
13062                 .klen   = 16,
13063                 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
13064                           "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
13065                 .rlen   = 16,
13066         }, {
13067                 .key    = zeroed_string,
13068                 .klen   = 16,
13069                 .input  = zeroed_string,
13070                 .ilen   = 16,
13071                 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
13072                           "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
13073                           "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
13074                           "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
13075                 .rlen   = 32,
13076         }, {
13077                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13078                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
13079                 .klen   = 16,
13080                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13081                           "\xde\xca\xf8\x88",
13082                 .input  = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13083                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13084                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13085                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13086                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13087                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13088                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13089                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
13090                 .ilen   = 64,
13091                 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
13092                           "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
13093                           "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
13094                           "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
13095                           "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
13096                           "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
13097                           "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
13098                           "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
13099                           "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
13100                           "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
13101                 .rlen   = 80,
13102         }, {
13103                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13104                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
13105                 .klen   = 16,
13106                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13107                           "\xde\xca\xf8\x88",
13108                 .input  = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13109                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13110                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13111                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13112                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13113                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13114                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13115                           "\xba\x63\x7b\x39",
13116                 .ilen   = 60,
13117                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13118                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13119                           "\xab\xad\xda\xd2",
13120                 .alen   = 20,
13121                 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
13122                           "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
13123                           "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
13124                           "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
13125                           "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
13126                           "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
13127                           "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
13128                           "\x3d\x58\xe0\x91"
13129                           "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
13130                           "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
13131                 .rlen   = 76,
13132         }, {
13133                 .key    = zeroed_string,
13134                 .klen   = 24,
13135                 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
13136                           "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
13137                 .rlen   = 16,
13138         }, {
13139                 .key    = zeroed_string,
13140                 .klen   = 24,
13141                 .input  = zeroed_string,
13142                 .ilen   = 16,
13143                 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
13144                           "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
13145                           "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
13146                           "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
13147                 .rlen   = 32,
13148         }, {
13149                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13150                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13151                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
13152                 .klen   = 24,
13153                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13154                           "\xde\xca\xf8\x88",
13155                 .input  = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13156                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13157                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13158                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13159                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13160                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13161                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13162                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
13163                 .ilen   = 64,
13164                 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
13165                           "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
13166                           "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
13167                           "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
13168                           "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
13169                           "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
13170                           "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
13171                           "\xcc\xda\x27\x10\xac\xad\xe2\x56"
13172                           "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
13173                           "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
13174                 .rlen   = 80,
13175         }, {
13176                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13177                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13178                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
13179                 .klen   = 24,
13180                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13181                           "\xde\xca\xf8\x88",
13182                 .input  = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13183                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13184                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13185                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13186                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13187                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13188                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13189                           "\xba\x63\x7b\x39",
13190                 .ilen   = 60,
13191                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13192                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13193                           "\xab\xad\xda\xd2",
13194                 .alen   = 20,
13195                 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
13196                           "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
13197                           "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
13198                           "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
13199                           "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
13200                           "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
13201                           "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
13202                           "\xcc\xda\x27\x10"
13203                           "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
13204                           "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
13205                 .rlen   = 76,
13206                 .np     = 2,
13207                 .tap    = { 32, 28 },
13208                 .anp    = 2,
13209                 .atap   = { 8, 12 }
13210         }, {
13211                 .key    = zeroed_string,
13212                 .klen   = 32,
13213                 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
13214                           "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
13215                 .rlen   = 16,
13216         }
13217 };
13218
13219 static struct aead_testvec aes_gcm_dec_tv_template[] = {
13220         { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
13221                 .key    = zeroed_string,
13222                 .klen   = 32,
13223                 .input  = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
13224                           "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
13225                           "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
13226                           "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
13227                 .ilen   = 32,
13228                 .result  = zeroed_string,
13229                 .rlen   = 16,
13230         }, {
13231                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13232                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13233                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13234                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
13235                 .klen   = 32,
13236                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13237                           "\xde\xca\xf8\x88",
13238                 .input  = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
13239                           "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
13240                           "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
13241                           "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
13242                           "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
13243                           "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
13244                           "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
13245                           "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
13246                           "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
13247                           "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
13248                 .ilen   = 80,
13249                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13250                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13251                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13252                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13253                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13254                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13255                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13256                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
13257                 .rlen   = 64,
13258         }, {
13259                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13260                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13261                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13262                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
13263                 .klen   = 32,
13264                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13265                           "\xde\xca\xf8\x88",
13266                 .input  = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
13267                           "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
13268                           "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
13269                           "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
13270                           "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
13271                           "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
13272                           "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
13273                           "\xbc\xc9\xf6\x62"
13274                           "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
13275                           "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
13276                 .ilen   = 76,
13277                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13278                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13279                           "\xab\xad\xda\xd2",
13280                 .alen   = 20,
13281                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13282                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13283                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13284                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13285                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13286                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13287                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13288                           "\xba\x63\x7b\x39",
13289                 .rlen   = 60,
13290                 .np     = 2,
13291                 .tap    = { 48, 28 },
13292                 .anp    = 3,
13293                 .atap   = { 8, 8, 4 }
13294         }, {
13295                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13296                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
13297                 .klen   = 16,
13298                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13299                           "\xde\xca\xf8\x88",
13300                 .input  = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
13301                           "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
13302                           "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
13303                           "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
13304                           "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
13305                           "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
13306                           "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
13307                           "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
13308                           "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
13309                           "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
13310                 .ilen   = 80,
13311                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13312                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13313                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13314                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13315                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13316                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13317                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13318                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
13319                 .rlen   = 64,
13320         }, {
13321                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13322                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
13323                 .klen   = 16,
13324                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13325                           "\xde\xca\xf8\x88",
13326                 .input  = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
13327                           "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
13328                           "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
13329                           "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
13330                           "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
13331                           "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
13332                           "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
13333                           "\x3d\x58\xe0\x91"
13334                           "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
13335                           "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
13336                 .ilen   = 76,
13337                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13338                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13339                           "\xab\xad\xda\xd2",
13340                 .alen   = 20,
13341                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13342                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13343                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13344                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13345                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13346                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13347                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13348                           "\xba\x63\x7b\x39",
13349                 .rlen   = 60,
13350         }, {
13351                 .key    = zeroed_string,
13352                 .klen   = 24,
13353                 .input  = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
13354                           "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
13355                           "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
13356                           "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
13357                 .ilen   = 32,
13358                 .result  = zeroed_string,
13359                 .rlen   = 16,
13360         }, {
13361                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13362                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13363                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
13364                 .klen   = 24,
13365                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13366                           "\xde\xca\xf8\x88",
13367                 .input  = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
13368                           "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
13369                           "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
13370                           "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
13371                           "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
13372                           "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
13373                           "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
13374                           "\xcc\xda\x27\x10\xac\xad\xe2\x56"
13375                           "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
13376                           "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
13377                 .ilen   = 80,
13378                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13379                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13380                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13381                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13382                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13383                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13384                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13385                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
13386                 .rlen   = 64,
13387         }, {
13388                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13389                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13390                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
13391                 .klen   = 24,
13392                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
13393                           "\xde\xca\xf8\x88",
13394                 .input  = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
13395                           "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
13396                           "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
13397                           "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
13398                           "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
13399                           "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
13400                           "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
13401                           "\xcc\xda\x27\x10"
13402                           "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
13403                           "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
13404                 .ilen   = 76,
13405                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13406                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
13407                           "\xab\xad\xda\xd2",
13408                 .alen   = 20,
13409                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
13410                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
13411                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
13412                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
13413                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
13414                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
13415                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
13416                           "\xba\x63\x7b\x39",
13417                 .rlen   = 60,
13418         }
13419 };
13420
13421 static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
13422         { /* Generated using Crypto++ */
13423                 .key    = zeroed_string,
13424                 .klen   = 20,
13425                 .iv     = zeroed_string,
13426                 .input  = zeroed_string,
13427                 .ilen   = 16,
13428                 .assoc  = zeroed_string,
13429                 .alen   = 8,
13430                 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
13431                           "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
13432                           "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
13433                           "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
13434                 .rlen   = 32,
13435         },{
13436                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13437                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13438                           "\x00\x00\x00\x00",
13439                 .klen   = 20,
13440                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01"
13441                           "\x00\x00\x00\x00",
13442                 .input  = zeroed_string,
13443                 .ilen   = 16,
13444                 .assoc  = zeroed_string,
13445                 .alen   = 8,
13446                 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
13447                           "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
13448                           "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
13449                           "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
13450                 .rlen   = 32,
13451
13452         }, {
13453                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13454                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13455                           "\x00\x00\x00\x00",
13456                 .klen   = 20,
13457                 .iv     = zeroed_string,
13458                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
13459                           "\x01\x01\x01\x01\x01\x01\x01\x01",
13460                 .ilen   = 16,
13461                 .assoc  = zeroed_string,
13462                 .alen   = 8,
13463                 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
13464                           "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
13465                           "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
13466                           "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
13467                 .rlen   = 32,
13468         }, {
13469                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13470                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13471                           "\x00\x00\x00\x00",
13472                 .klen   = 20,
13473                 .iv     = zeroed_string,
13474                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
13475                           "\x01\x01\x01\x01\x01\x01\x01\x01",
13476                 .ilen   = 16,
13477                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01",
13478                 .alen   = 8,
13479                 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
13480                           "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
13481                           "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
13482                           "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
13483                 .rlen   = 32,
13484         }, {
13485                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13486                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13487                           "\x00\x00\x00\x00",
13488                 .klen   = 20,
13489                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01"
13490                           "\x00\x00\x00\x00",
13491                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
13492                           "\x01\x01\x01\x01\x01\x01\x01\x01",
13493                 .ilen   = 16,
13494                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01",
13495                 .alen   = 8,
13496                 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
13497                           "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
13498                           "\x64\x50\xF9\x32\x13\xFB\x74\x61"
13499                           "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
13500                 .rlen   = 32,
13501         }, {
13502                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13503                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13504                           "\x00\x00\x00\x00",
13505                 .klen   = 20,
13506                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01"
13507                           "\x00\x00\x00\x00",
13508                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
13509                           "\x01\x01\x01\x01\x01\x01\x01\x01"
13510                           "\x01\x01\x01\x01\x01\x01\x01\x01"
13511                           "\x01\x01\x01\x01\x01\x01\x01\x01"
13512                           "\x01\x01\x01\x01\x01\x01\x01\x01"
13513                           "\x01\x01\x01\x01\x01\x01\x01\x01"
13514                           "\x01\x01\x01\x01\x01\x01\x01\x01"
13515                           "\x01\x01\x01\x01\x01\x01\x01\x01",
13516                 .ilen   = 64,
13517                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01",
13518                 .alen   = 8,
13519                 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
13520                           "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
13521                           "\x98\x14\xA1\x42\x37\x80\xFD\x90"
13522                           "\x68\x12\x01\xA8\x91\x89\xB9\x83"
13523                           "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
13524                           "\x94\x5F\x18\x12\xBA\x27\x09\x39"
13525                           "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
13526                           "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
13527                           "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
13528                           "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
13529                 .rlen   = 80,
13530         }, {
13531                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
13532                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13533                           "\x00\x00\x00\x00",
13534                 .klen   = 20,
13535                 .iv     = "\x00\x00\x45\x67\x89\xab\xcd\xef"
13536                           "\x00\x00\x00\x00",
13537                 .input  = "\xff\xff\xff\xff\xff\xff\xff\xff"
13538                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13539                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13540                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13541                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13542                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13543                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13544                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13545                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13546                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13547                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13548                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13549                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13550                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13551                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13552                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13553                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13554                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13555                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13556                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13557                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13558                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13559                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13560                           "\xff\xff\xff\xff\xff\xff\xff\xff",
13561                 .ilen   = 192,
13562                 .assoc  = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
13563                           "\xaa\xaa\xaa\xaa",
13564                 .alen   = 12,
13565                 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
13566                           "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
13567                           "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
13568                           "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
13569                           "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
13570                           "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
13571                           "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
13572                           "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
13573                           "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
13574                           "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
13575                           "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
13576                           "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
13577                           "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
13578                           "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
13579                           "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
13580                           "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
13581                           "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
13582                           "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
13583                           "\x7E\x13\x06\x82\x08\x17\xA4\x35"
13584                           "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
13585                           "\xA3\x05\x38\x95\x20\x1A\x47\x04"
13586                           "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
13587                           "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
13588                           "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
13589                           "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
13590                           "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
13591                 .rlen   = 208,
13592         }
13593 };
13594
13595 static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
13596         { /* Generated using Crypto++ */
13597                 .key    = zeroed_string,
13598                 .klen   = 20,
13599                 .iv     = zeroed_string,
13600                 .input  = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
13601                           "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
13602                           "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
13603                           "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
13604                 .ilen   = 32,
13605                 .assoc  = zeroed_string,
13606                 .alen   = 8,
13607                 .result = zeroed_string,
13608                 .rlen   = 16,
13609
13610         },{
13611                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13612                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13613                           "\x00\x00\x00\x00",
13614                 .klen   = 20,
13615                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01"
13616                           "\x00\x00\x00\x00",
13617                 .input  = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
13618                           "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
13619                           "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
13620                           "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
13621                 .ilen   = 32,
13622                 .assoc  = zeroed_string,
13623                 .alen   = 8,
13624                 .result = zeroed_string,
13625                 .rlen   = 16,
13626         }, {
13627                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13628                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13629                           "\x00\x00\x00\x00",
13630                 .klen   = 20,
13631                 .iv     = zeroed_string,
13632                 .input  = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
13633                           "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
13634                           "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
13635                           "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
13636                 .ilen   = 32,
13637                 .assoc  = zeroed_string,
13638                 .alen   = 8,
13639                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
13640                           "\x01\x01\x01\x01\x01\x01\x01\x01",
13641                 .rlen   = 16,
13642         }, {
13643                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13644                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13645                           "\x00\x00\x00\x00",
13646                 .klen   = 20,
13647                 .iv     = zeroed_string,
13648                 .input  = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
13649                           "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
13650                           "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
13651                           "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
13652                 .ilen   = 32,
13653                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01",
13654                 .alen   = 8,
13655                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
13656                           "\x01\x01\x01\x01\x01\x01\x01\x01",
13657                 .rlen   = 16,
13658
13659         }, {
13660                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13661                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13662                           "\x00\x00\x00\x00",
13663                 .klen   = 20,
13664                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01"
13665                           "\x00\x00\x00\x00",
13666                 .input  = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
13667                           "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
13668                           "\x64\x50\xF9\x32\x13\xFB\x74\x61"
13669                           "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
13670                 .ilen   = 32,
13671                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01",
13672                 .alen   = 8,
13673                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
13674                           "\x01\x01\x01\x01\x01\x01\x01\x01",
13675                 .rlen   = 16,
13676         }, {
13677                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
13678                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
13679                           "\x00\x00\x00\x00",
13680                 .klen   = 20,
13681                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01"
13682                           "\x00\x00\x00\x00",
13683                 .input  = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
13684                           "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
13685                           "\x98\x14\xA1\x42\x37\x80\xFD\x90"
13686                           "\x68\x12\x01\xA8\x91\x89\xB9\x83"
13687                           "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
13688                           "\x94\x5F\x18\x12\xBA\x27\x09\x39"
13689                           "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
13690                           "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
13691                           "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
13692                           "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
13693                 .ilen   = 80,
13694                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01",
13695                 .alen   = 8,
13696                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
13697                           "\x01\x01\x01\x01\x01\x01\x01\x01"
13698                           "\x01\x01\x01\x01\x01\x01\x01\x01"
13699                           "\x01\x01\x01\x01\x01\x01\x01\x01"
13700                           "\x01\x01\x01\x01\x01\x01\x01\x01"
13701                           "\x01\x01\x01\x01\x01\x01\x01\x01"
13702                           "\x01\x01\x01\x01\x01\x01\x01\x01"
13703                           "\x01\x01\x01\x01\x01\x01\x01\x01",
13704                 .rlen   = 64,
13705         }, {
13706                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
13707                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13708                           "\x00\x00\x00\x00",
13709                 .klen   = 20,
13710                 .iv     = "\x00\x00\x45\x67\x89\xab\xcd\xef"
13711                           "\x00\x00\x00\x00",
13712                 .input  = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
13713                           "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
13714                           "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
13715                           "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
13716                           "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
13717                           "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
13718                           "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
13719                           "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
13720                           "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
13721                           "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
13722                           "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
13723                           "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
13724                           "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
13725                           "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
13726                           "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
13727                           "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
13728                           "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
13729                           "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
13730                           "\x7E\x13\x06\x82\x08\x17\xA4\x35"
13731                           "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
13732                           "\xA3\x05\x38\x95\x20\x1A\x47\x04"
13733                           "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
13734                           "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
13735                           "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
13736                           "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
13737                           "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
13738                 .ilen   = 208,
13739                 .assoc  = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
13740                           "\xaa\xaa\xaa\xaa",
13741                 .alen   = 12,
13742                 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
13743                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13744                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13745                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13746                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13747                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13748                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13749                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13750                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13751                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13752                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13753                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13754                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13755                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13756                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13757                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13758                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13759                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13760                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13761                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13762                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13763                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13764                           "\xff\xff\xff\xff\xff\xff\xff\xff"
13765                           "\xff\xff\xff\xff\xff\xff\xff\xff",
13766                 .rlen   = 192,
13767
13768         }
13769 };
13770
13771 static struct aead_testvec aes_ccm_enc_tv_template[] = {
13772         { /* From RFC 3610 */
13773                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13774                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13775                 .klen   = 16,
13776                 .iv     = "\x01\x00\x00\x00\x03\x02\x01\x00"
13777                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13778                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07",
13779                 .alen   = 8,
13780                 .input  = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13781                           "\x10\x11\x12\x13\x14\x15\x16\x17"
13782                           "\x18\x19\x1a\x1b\x1c\x1d\x1e",
13783                 .ilen   = 23,
13784                 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
13785                           "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
13786                           "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
13787                           "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
13788                 .rlen   = 31,
13789         }, {
13790                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13791                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13792                 .klen   = 16,
13793                 .iv     = "\x01\x00\x00\x00\x07\x06\x05\x04"
13794                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13795                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
13796                           "\x08\x09\x0a\x0b",
13797                 .alen   = 12,
13798                 .input  = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
13799                           "\x14\x15\x16\x17\x18\x19\x1a\x1b"
13800                           "\x1c\x1d\x1e\x1f",
13801                 .ilen   = 20,
13802                 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
13803                           "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
13804                           "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
13805                           "\x7d\x9c\x2d\x93",
13806                 .rlen   = 28,
13807         }, {
13808                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13809                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13810                 .klen   = 16,
13811                 .iv     = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
13812                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13813                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07",
13814                 .alen   = 8,
13815                 .input  = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13816                           "\x10\x11\x12\x13\x14\x15\x16\x17"
13817                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13818                           "\x20",
13819                 .ilen   = 25,
13820                 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
13821                           "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
13822                           "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
13823                           "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
13824                           "\x7e\x5f\x4e",
13825                 .rlen   = 35,
13826         }, {
13827                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13828                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13829                 .klen   = 16,
13830                 .iv     = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
13831                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13832                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
13833                           "\x08\x09\x0a\x0b",
13834                 .alen   = 12,
13835                 .input  = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
13836                           "\x14\x15\x16\x17\x18\x19\x1a\x1b"
13837                           "\x1c\x1d\x1e",
13838                 .ilen   = 19,
13839                 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
13840                           "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
13841                           "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
13842                           "\x4d\x99\x99\x88\xdd",
13843                 .rlen   = 29,
13844         }, {
13845                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13846                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13847                 .klen   = 16,
13848                 .iv     = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
13849                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13850                 .assoc  = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
13851                 .alen   = 8,
13852                 .input  = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
13853                           "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
13854                           "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
13855                 .ilen   = 24,
13856                 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
13857                           "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
13858                           "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
13859                           "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
13860                 .rlen   = 32,
13861         }, {
13862                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13863                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13864                 .klen   = 16,
13865                 .iv     = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
13866                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13867                 .assoc  = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
13868                           "\x20\xea\x60\xc0",
13869                 .alen   = 12,
13870                 .input  = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
13871                           "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
13872                           "\x3a\x80\x3b\xa8\x7f",
13873                 .ilen   = 21,
13874                 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
13875                           "\x55\x94\xc5\x92\x51\xe6\x03\x57"
13876                           "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
13877                           "\x5a\xe0\x70\x45\x51",
13878                 .rlen   = 29,
13879         }, {
13880                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13881                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13882                 .klen   = 16,
13883                 .iv     = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
13884                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13885                 .assoc  = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
13886                 .alen   = 8,
13887                 .input  = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
13888                           "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
13889                           "\x98\x09\xd6\x7d\xbe\xdd\x18",
13890                 .ilen   = 23,
13891                 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
13892                           "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
13893                           "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
13894                           "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
13895                           "\xba",
13896                 .rlen   = 33,
13897         },
13898 };
13899
13900 static struct aead_testvec aes_ccm_dec_tv_template[] = {
13901         { /* From RFC 3610 */
13902                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13903                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13904                 .klen   = 16,
13905                 .iv     = "\x01\x00\x00\x00\x03\x02\x01\x00"
13906                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13907                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07",
13908                 .alen   = 8,
13909                 .input  = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
13910                           "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
13911                           "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
13912                           "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
13913                 .ilen   = 31,
13914                 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13915                           "\x10\x11\x12\x13\x14\x15\x16\x17"
13916                           "\x18\x19\x1a\x1b\x1c\x1d\x1e",
13917                 .rlen   = 23,
13918         }, {
13919                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13920                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13921                 .klen   = 16,
13922                 .iv     = "\x01\x00\x00\x00\x07\x06\x05\x04"
13923                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13924                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
13925                           "\x08\x09\x0a\x0b",
13926                 .alen   = 12,
13927                 .input  = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
13928                           "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
13929                           "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
13930                           "\x7d\x9c\x2d\x93",
13931                 .ilen   = 28,
13932                 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
13933                           "\x14\x15\x16\x17\x18\x19\x1a\x1b"
13934                           "\x1c\x1d\x1e\x1f",
13935                 .rlen   = 20,
13936         }, {
13937                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13938                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13939                 .klen   = 16,
13940                 .iv     = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
13941                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13942                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07",
13943                 .alen   = 8,
13944                 .input  = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
13945                           "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
13946                           "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
13947                           "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
13948                           "\x7e\x5f\x4e",
13949                 .ilen   = 35,
13950                 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13951                           "\x10\x11\x12\x13\x14\x15\x16\x17"
13952                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13953                           "\x20",
13954                 .rlen   = 25,
13955         }, {
13956                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13957                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
13958                 .klen   = 16,
13959                 .iv     = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
13960                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
13961                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
13962                           "\x08\x09\x0a\x0b",
13963                 .alen   = 12,
13964                 .input  = "\x07\x34\x25\x94\x15\x77\x85\x15"
13965                           "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
13966                           "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
13967                           "\x4d\x99\x99\x88\xdd",
13968                 .ilen   = 29,
13969                 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
13970                           "\x14\x15\x16\x17\x18\x19\x1a\x1b"
13971                           "\x1c\x1d\x1e",
13972                 .rlen   = 19,
13973         }, {
13974                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13975                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13976                 .klen   = 16,
13977                 .iv     = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
13978                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13979                 .assoc  = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
13980                 .alen   = 8,
13981                 .input  = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
13982                           "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
13983                           "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
13984                           "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
13985                 .ilen   = 32,
13986                 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
13987                           "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
13988                           "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
13989                 .rlen   = 24,
13990         }, {
13991                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
13992                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
13993                 .klen   = 16,
13994                 .iv     = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
13995                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
13996                 .assoc  = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
13997                           "\x20\xea\x60\xc0",
13998                 .alen   = 12,
13999                 .input  = "\x00\x97\x69\xec\xab\xdf\x48\x62"
14000                           "\x55\x94\xc5\x92\x51\xe6\x03\x57"
14001                           "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
14002                           "\x5a\xe0\x70\x45\x51",
14003                 .ilen   = 29,
14004                 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
14005                           "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
14006                           "\x3a\x80\x3b\xa8\x7f",
14007                 .rlen   = 21,
14008         }, {
14009                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
14010                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
14011                 .klen   = 16,
14012                 .iv     = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
14013                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
14014                 .assoc  = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
14015                 .alen   = 8,
14016                 .input  = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
14017                           "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
14018                           "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
14019                           "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
14020                           "\xba",
14021                 .ilen   = 33,
14022                 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
14023                           "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
14024                           "\x98\x09\xd6\x7d\xbe\xdd\x18",
14025                 .rlen   = 23,
14026         },
14027 };
14028
14029 /*
14030  * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
14031  * use a 13-byte nonce, we only support an 11-byte nonce. Similarly, all of
14032  * Special Publication 800-38C's test vectors also use nonce lengths our
14033  * implementation doesn't support. The following are taken from fips cavs
14034  * fax files on hand at Red Hat.
14035  *
14036  * nb: actual key lengths are (klen - 3), the last 3 bytes are actually
14037  * part of the nonce which combine w/the iv, but need to be input this way.
14038  */
14039 static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
14040         {
14041                 .key    = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
14042                           "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e"
14043                           "\x96\xac\x59",
14044                 .klen   = 19,
14045                 .iv     = "\x30\x07\xa1\xe2\xa2\xc7\x55\x24",
14046                 .alen   = 0,
14047                 .input  = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
14048                           "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
14049                           "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
14050                           "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
14051                 .ilen   = 32,
14052                 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
14053                           "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
14054                           "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
14055                           "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
14056                           "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
14057                           "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
14058                 .rlen   = 48,
14059         }, {
14060                 .key    = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
14061                           "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3"
14062                           "\x4f\xa3\x19",
14063                 .klen   = 19,
14064                 .iv     = "\xd3\x01\x5a\xd8\x30\x60\x15\x56",
14065                 .assoc  = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
14066                           "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
14067                           "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
14068                           "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
14069                 .alen   = 32,
14070                 .input  = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
14071                           "\xa9\x28\x63\xba\x12\xa3\x14\x85"
14072                           "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
14073                           "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
14074                 .ilen   = 32,
14075                 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
14076                           "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
14077                           "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
14078                           "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
14079                           "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
14080                           "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
14081                 .rlen   = 48,
14082         }, {
14083                 .key    = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
14084                           "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
14085                           "\x53\x14\x73\x66\x8d\x88\xf6\x80"
14086                           "\xa0\x20\x35",
14087                 .klen   = 27,
14088                 .iv     = "\x26\xf2\x21\x8d\x50\x20\xda\xe2",
14089                 .assoc  = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
14090                           "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
14091                           "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
14092                           "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
14093                 .alen   = 32,
14094                 .ilen   = 0,
14095                 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
14096                           "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
14097                 .rlen   = 16,
14098         }, {
14099                 .key    = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
14100                           "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
14101                           "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01"
14102                           "\xd6\x3c\x8c",
14103                 .klen   = 27,
14104                 .iv     = "\x86\x84\xb6\xcd\xef\x09\x2e\x94",
14105                 .assoc  = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
14106                           "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
14107                           "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
14108                           "\xe3\x00\x73\x69\x84\x69\x87\x79",
14109                 .alen   = 32,
14110                 .input  = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
14111                           "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
14112                           "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
14113                           "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
14114                 .ilen   = 32,
14115                 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
14116                           "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
14117                           "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
14118                           "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
14119                           "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
14120                           "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
14121                 .rlen   = 48,
14122         }, {
14123                 .key    = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
14124                           "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
14125                           "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
14126                           "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b"
14127                           "\x1e\x29\x91",
14128                 .klen   = 35,
14129                 .iv     = "\xad\x8e\xc1\x53\x0a\xcf\x2d\xbe",
14130                 .assoc  = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
14131                           "\x78\x2b\x94\x02\x29\x0f\x42\x27"
14132                           "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
14133                           "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
14134                 .alen   = 32,
14135                 .input  = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
14136                           "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
14137                           "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
14138                           "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
14139                 .ilen   = 32,
14140                 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
14141                           "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
14142                           "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
14143                           "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
14144                           "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
14145                 .rlen   = 40,
14146         }, {
14147                 .key    = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
14148                           "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
14149                           "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
14150                           "\x09\x75\x9a\x9b\x3c\x9b\x27\x39"
14151                           "\xf9\xd9\x4e",
14152                 .klen   = 35,
14153                 .iv     = "\x63\xb5\x3d\x9d\x43\xf6\x1e\x50",
14154                 .assoc  = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
14155                           "\x13\x02\x01\x0c\x83\x4c\x96\x35"
14156                           "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
14157                           "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
14158                 .alen   = 32,
14159                 .input  = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
14160                           "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
14161                           "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
14162                           "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
14163                 .ilen   = 32,
14164                 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
14165                           "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
14166                           "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
14167                           "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
14168                           "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
14169                           "\x7b\x72\x8a\xf7",
14170                 .rlen   = 44,
14171         }, {
14172                 .key    = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
14173                           "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
14174                           "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
14175                           "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b"
14176                           "\x24\xa7\x8b",
14177                 .klen   = 35,
14178                 .iv     = "\x07\xcb\xcc\x0e\xe6\x33\xbf\xf5",
14179                 .assoc  = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
14180                           "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
14181                           "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
14182                           "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
14183                 .alen   = 32,
14184                 .input  = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
14185                           "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
14186                           "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
14187                           "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
14188                 .ilen   = 32,
14189                 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
14190                           "\xef\xbb\x80\x21\x04\x6c\x58\x09"
14191                           "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
14192                           "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
14193                           "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
14194                           "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
14195                 .rlen   = 48,
14196         },
14197 };
14198
14199 static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[] = {
14200         {
14201                 .key    = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
14202                           "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
14203                           "\xc6\xfb\x7d",
14204                 .klen   = 19,
14205                 .iv     = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
14206                 .alen   = 0,
14207                 .input  = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
14208                 .ilen   = 8,
14209                 .result = "\x00",
14210                 .rlen   = 0,
14211                 .novrfy = 1,
14212         }, {
14213                 .key    = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
14214                           "\xff\x80\x2e\x48\x7d\x82\xf8\xb9"
14215                           "\xaf\x94\x87",
14216                 .klen   = 19,
14217                 .iv     = "\x78\x35\x82\x81\x7f\x88\x94\x68",
14218                 .alen   = 0,
14219                 .input  = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
14220                 .ilen   = 8,
14221                 .result = "\x00",
14222                 .rlen   = 0,
14223         }, {
14224                 .key    = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
14225                           "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
14226                           "\xc6\xfb\x7d",
14227                 .klen   = 19,
14228                 .iv     = "\x80\x0d\x13\xab\xd8\xa6\xb2\xd8",
14229                 .assoc  = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
14230                           "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
14231                           "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
14232                           "\xd8\x94\x99\x91\x81\x54\x62\x57",
14233                 .alen   = 32,
14234                 .input  = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
14235                           "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
14236                           "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
14237                           "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
14238                           "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
14239                           "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
14240                 .ilen   = 48,
14241                 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
14242                           "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
14243                           "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
14244                           "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
14245                 .rlen   = 32,
14246                 .novrfy = 1,
14247         }, {
14248                 .key    = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
14249                           "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8"
14250                           "\x05\xe0\xc9",
14251                 .klen   = 19,
14252                 .iv     = "\x0f\xed\x34\xea\x97\xd4\x3b\xdf",
14253                 .assoc  = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
14254                           "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
14255                           "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
14256                           "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
14257                 .alen   = 32,
14258                 .input  = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
14259                           "\xad\x83\x52\x6d\x71\x03\x25\x1c"
14260                           "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
14261                           "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
14262                           "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
14263                           "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
14264                 .ilen   = 48,
14265                 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
14266                           "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
14267                           "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
14268                           "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
14269                 .rlen   = 32,
14270         }, {
14271                 .key    = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
14272                           "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
14273                           "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
14274                           "\xee\x49\x83",
14275                 .klen   = 27,
14276                 .iv     = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
14277                 .assoc  = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
14278                           "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
14279                           "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
14280                           "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
14281                 .alen   = 32,
14282                 .input  = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
14283                 .ilen   = 8,
14284                 .result = "\x00",
14285                 .rlen   = 0,
14286         }, {
14287                 .key    = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
14288                           "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
14289                           "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
14290                           "\xee\x49\x83",
14291                 .klen   = 27,
14292                 .iv     = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
14293                 .assoc  = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
14294                           "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
14295                           "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
14296                           "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
14297                 .alen   = 32,
14298                 .input  = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
14299                           "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
14300                           "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
14301                           "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
14302                           "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
14303                 .ilen   = 40,
14304                 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
14305                           "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
14306                           "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
14307                           "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
14308                 .rlen   = 32,
14309         }, {
14310                 .key    = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
14311                           "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
14312                           "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
14313                           "\xd1\xfc\x57",
14314                 .klen   = 27,
14315                 .iv     = "\x9c\xfe\xb8\x9c\xad\x71\xaa\x1f",
14316                 .assoc  = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
14317                           "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
14318                           "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
14319                           "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
14320                 .alen   = 32,
14321                 .input  = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
14322                           "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
14323                           "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
14324                           "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
14325                           "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
14326                           "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
14327                 .ilen   = 48,
14328                 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
14329                           "\x99\x2a\xa8\xca\x04\x25\x45\x90"
14330                           "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
14331                           "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
14332                 .rlen   = 32,
14333                 .novrfy = 1,
14334         }, {
14335                 .key    = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
14336                           "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
14337                           "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
14338                           "\x0e\x85\xbc\x33\xad\x0f\x2b\xff"
14339                           "\xee\x49\x83",
14340                 .klen   = 35,
14341                 .iv     = "\xe9\xa9\xff\xe9\x57\xba\xfd\x9e",
14342                 .alen   = 0,
14343                 .input  = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
14344                 .ilen   = 8,
14345                 .result = "\x00",
14346                 .rlen   = 0,
14347         }, {
14348                 .key    = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
14349                           "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
14350                           "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
14351                           "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb"
14352                           "\x85\x34\x66",
14353                 .klen   = 35,
14354                 .iv     = "\x42\xc8\x92\x0f\x36\x58\xe0\x6b",
14355                 .alen   = 0,
14356                 .input  = "\x48\x01\x5e\x02\x24\x04\x66\x47"
14357                           "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
14358                           "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
14359                           "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
14360                           "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
14361                           "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
14362                 .ilen   = 48,
14363                 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
14364                           "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
14365                           "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
14366                           "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
14367                 .rlen   = 32,
14368                 .novrfy = 1,
14369         }, {
14370                 .key    = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
14371                           "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
14372                           "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
14373                           "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b"
14374                           "\xcf\x76\x3f",
14375                 .klen   = 35,
14376                 .iv     = "\xd9\x95\x75\x8f\x44\x89\x40\x7b",
14377                 .assoc  = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
14378                           "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
14379                           "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
14380                           "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
14381                 .alen   = 32,
14382                 .input  = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
14383                           "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
14384                           "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
14385                           "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
14386                           "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
14387                           "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
14388                 .ilen   = 48,
14389                 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
14390                           "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
14391                           "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
14392                           "\x04\x49\x3b\x19\x93\x57\x25\x5d",
14393                 .rlen   = 32,
14394         },
14395 };
14396
14397 /*
14398  * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
14399  * test vectors, taken from Appendix B.2.9 and B.2.10:
14400  *     http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
14401  * Only AES-128 is supported at this time.
14402  */
14403 #define ANSI_CPRNG_AES_TEST_VECTORS     6
14404
14405 static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
14406         {
14407                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
14408                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
14409                 .klen   = 16,
14410                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
14411                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
14412                 .dtlen  = 16,
14413                 .v      = "\x80\x00\x00\x00\x00\x00\x00\x00"
14414                           "\x00\x00\x00\x00\x00\x00\x00\x00",
14415                 .vlen   = 16,
14416                 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
14417                           "\x84\x79\x66\x85\xc1\x2f\x76\x41",
14418                 .rlen   = 16,
14419                 .loops  = 1,
14420         }, {
14421                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
14422                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
14423                 .klen   = 16,
14424                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
14425                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
14426                 .dtlen  = 16,
14427                 .v      = "\xc0\x00\x00\x00\x00\x00\x00\x00"
14428                           "\x00\x00\x00\x00\x00\x00\x00\x00",
14429                 .vlen   = 16,
14430                 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
14431                           "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
14432                 .rlen   = 16,
14433                 .loops  = 1,
14434         }, {
14435                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
14436                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
14437                 .klen   = 16,
14438                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
14439                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
14440                 .dtlen  = 16,
14441                 .v      = "\xe0\x00\x00\x00\x00\x00\x00\x00"
14442                           "\x00\x00\x00\x00\x00\x00\x00\x00",
14443                 .vlen   = 16,
14444                 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
14445                           "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
14446                 .rlen   = 16,
14447                 .loops  = 1,
14448         }, {
14449                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
14450                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
14451                 .klen   = 16,
14452                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
14453                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
14454                 .dtlen  = 16,
14455                 .v      = "\xf0\x00\x00\x00\x00\x00\x00\x00"
14456                           "\x00\x00\x00\x00\x00\x00\x00\x00",
14457                 .vlen   = 16,
14458                 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
14459                           "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
14460                 .rlen   = 16,
14461                 .loops  = 1,
14462         }, {
14463                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
14464                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
14465                 .klen   = 16,
14466                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
14467                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
14468                 .dtlen  = 16,
14469                 .v      = "\xf8\x00\x00\x00\x00\x00\x00\x00"
14470                           "\x00\x00\x00\x00\x00\x00\x00\x00",
14471                 .vlen   = 16,
14472                 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
14473                           "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
14474                 .rlen   = 16,
14475                 .loops  = 1,
14476         }, {    /* Monte Carlo Test */
14477                 .key    = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
14478                           "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
14479                 .klen   = 16,
14480                 .dt     = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
14481                           "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
14482                 .dtlen  = 16,
14483                 .v      = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
14484                           "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
14485                 .vlen   = 16,
14486                 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
14487                           "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
14488                 .rlen   = 16,
14489                 .loops  = 10000,
14490         },
14491 };
14492
14493 /* Cast5 test vectors from RFC 2144 */
14494 #define CAST5_ENC_TEST_VECTORS          4
14495 #define CAST5_DEC_TEST_VECTORS          4
14496 #define CAST5_CBC_ENC_TEST_VECTORS      1
14497 #define CAST5_CBC_DEC_TEST_VECTORS      1
14498 #define CAST5_CTR_ENC_TEST_VECTORS      2
14499 #define CAST5_CTR_DEC_TEST_VECTORS      2
14500
14501 static struct cipher_testvec cast5_enc_tv_template[] = {
14502         {
14503                 .key    = "\x01\x23\x45\x67\x12\x34\x56\x78"
14504                           "\x23\x45\x67\x89\x34\x56\x78\x9a",
14505                 .klen   = 16,
14506                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14507                 .ilen   = 8,
14508                 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
14509                 .rlen   = 8,
14510         }, {
14511                 .key    = "\x01\x23\x45\x67\x12\x34\x56\x78"
14512                           "\x23\x45",
14513                 .klen   = 10,
14514                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14515                 .ilen   = 8,
14516                 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
14517                 .rlen   = 8,
14518         }, {
14519                 .key    = "\x01\x23\x45\x67\x12",
14520                 .klen   = 5,
14521                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14522                 .ilen   = 8,
14523                 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
14524                 .rlen   = 8,
14525         }, { /* Generated from TF test vectors */
14526                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
14527                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14528                 .klen   = 16,
14529                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14530                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
14531                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
14532                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
14533                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
14534                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
14535                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
14536                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
14537                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
14538                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
14539                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
14540                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
14541                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
14542                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
14543                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
14544                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
14545                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
14546                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
14547                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
14548                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
14549                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
14550                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
14551                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
14552                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
14553                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
14554                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
14555                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
14556                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
14557                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
14558                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
14559                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
14560                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
14561                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
14562                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
14563                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
14564                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
14565                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
14566                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
14567                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
14568                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
14569                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
14570                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
14571                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
14572                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
14573                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
14574                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
14575                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
14576                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
14577                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
14578                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
14579                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
14580                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
14581                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
14582                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
14583                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
14584                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
14585                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
14586                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
14587                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
14588                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
14589                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
14590                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14591                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14592                 .ilen   = 496,
14593                 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
14594                           "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
14595                           "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
14596                           "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
14597                           "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
14598                           "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
14599                           "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
14600                           "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
14601                           "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
14602                           "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
14603                           "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
14604                           "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
14605                           "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
14606                           "\xED\x34\x35\x78\x6B\x91\xC9\x32"
14607                           "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
14608                           "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
14609                           "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
14610                           "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
14611                           "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
14612                           "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
14613                           "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
14614                           "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
14615                           "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
14616                           "\x78\x75\x37\x55\xC1\xF5\x90\x40"
14617                           "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
14618                           "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
14619                           "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
14620                           "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
14621                           "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
14622                           "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
14623                           "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
14624                           "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
14625                           "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
14626                           "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
14627                           "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
14628                           "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
14629                           "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
14630                           "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
14631                           "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
14632                           "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
14633                           "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
14634                           "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
14635                           "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
14636                           "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
14637                           "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
14638                           "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
14639                           "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
14640                           "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
14641                           "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
14642                           "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
14643                           "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
14644                           "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
14645                           "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
14646                           "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
14647                           "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
14648                           "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
14649                           "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
14650                           "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
14651                           "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
14652                           "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
14653                           "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
14654                           "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
14655                 .rlen   = 496,
14656                 .also_non_np = 1,
14657                 .np     = 2,
14658                 .tap    = { 496 - 16, 16 },
14659         },
14660 };
14661
14662 static struct cipher_testvec cast5_dec_tv_template[] = {
14663         {
14664                 .key    = "\x01\x23\x45\x67\x12\x34\x56\x78"
14665                           "\x23\x45\x67\x89\x34\x56\x78\x9a",
14666                 .klen   = 16,
14667                 .input  = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
14668                 .ilen   = 8,
14669                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14670                 .rlen   = 8,
14671         }, {
14672                 .key    = "\x01\x23\x45\x67\x12\x34\x56\x78"
14673                           "\x23\x45",
14674                 .klen   = 10,
14675                 .input  = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
14676                 .ilen   = 8,
14677                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14678                 .rlen   = 8,
14679         }, {
14680                 .key    = "\x01\x23\x45\x67\x12",
14681                 .klen   = 5,
14682                 .input  = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
14683                 .ilen   = 8,
14684                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14685                 .rlen   = 8,
14686         }, { /* Generated from TF test vectors */
14687                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
14688                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14689                 .klen   = 16,
14690                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14691                 .input  = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
14692                           "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
14693                           "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
14694                           "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
14695                           "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
14696                           "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
14697                           "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
14698                           "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
14699                           "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
14700                           "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
14701                           "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
14702                           "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
14703                           "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
14704                           "\xED\x34\x35\x78\x6B\x91\xC9\x32"
14705                           "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
14706                           "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
14707                           "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
14708                           "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
14709                           "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
14710                           "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
14711                           "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
14712                           "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
14713                           "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
14714                           "\x78\x75\x37\x55\xC1\xF5\x90\x40"
14715                           "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
14716                           "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
14717                           "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
14718                           "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
14719                           "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
14720                           "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
14721                           "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
14722                           "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
14723                           "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
14724                           "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
14725                           "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
14726                           "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
14727                           "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
14728                           "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
14729                           "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
14730                           "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
14731                           "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
14732                           "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
14733                           "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
14734                           "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
14735                           "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
14736                           "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
14737                           "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
14738                           "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
14739                           "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
14740                           "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
14741                           "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
14742                           "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
14743                           "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
14744                           "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
14745                           "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
14746                           "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
14747                           "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
14748                           "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
14749                           "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
14750                           "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
14751                           "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
14752                           "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
14753                 .ilen   = 496,
14754                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
14755                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
14756                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
14757                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
14758                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
14759                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
14760                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
14761                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
14762                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
14763                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
14764                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
14765                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
14766                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
14767                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
14768                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
14769                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
14770                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
14771                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
14772                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
14773                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
14774                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
14775                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
14776                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
14777                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
14778                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
14779                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
14780                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
14781                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
14782                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
14783                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
14784                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
14785                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
14786                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
14787                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
14788                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
14789                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
14790                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
14791                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
14792                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
14793                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
14794                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
14795                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
14796                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
14797                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
14798                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
14799                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
14800                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
14801                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
14802                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
14803                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
14804                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
14805                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
14806                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
14807                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
14808                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
14809                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
14810                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
14811                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
14812                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
14813                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
14814                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14815                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14816                 .rlen   = 496,
14817                 .also_non_np = 1,
14818                 .np     = 2,
14819                 .tap    = { 496 - 16, 16 },
14820         },
14821 };
14822
14823 static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
14824         { /* Generated from TF test vectors */
14825                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
14826                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14827                 .klen   = 16,
14828                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14829                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
14830                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
14831                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
14832                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
14833                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
14834                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
14835                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
14836                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
14837                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
14838                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
14839                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
14840                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
14841                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
14842                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
14843                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
14844                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
14845                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
14846                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
14847                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
14848                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
14849                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
14850                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
14851                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
14852                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
14853                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
14854                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
14855                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
14856                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
14857                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
14858                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
14859                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
14860                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
14861                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
14862                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
14863                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
14864                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
14865                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
14866                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
14867                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
14868                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
14869                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
14870                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
14871                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
14872                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
14873                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
14874                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
14875                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
14876                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
14877                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
14878                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
14879                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
14880                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
14881                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
14882                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
14883                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
14884                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
14885                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
14886                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
14887                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
14888                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
14889                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
14890                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
14891                 .ilen   = 496,
14892                 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
14893                           "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
14894                           "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
14895                           "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
14896                           "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
14897                           "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
14898                           "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
14899                           "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
14900                           "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
14901                           "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
14902                           "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
14903                           "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
14904                           "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
14905                           "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
14906                           "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
14907                           "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
14908                           "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
14909                           "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
14910                           "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
14911                           "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
14912                           "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
14913                           "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
14914                           "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
14915                           "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
14916                           "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
14917                           "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
14918                           "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
14919                           "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
14920                           "\x90\x12\x37\x49\x27\x98\x69\x18"
14921                           "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
14922                           "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
14923                           "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
14924                           "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
14925                           "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
14926                           "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
14927                           "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
14928                           "\x03\x55\x0E\x02\x41\x4A\x45\x06"
14929                           "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
14930                           "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
14931                           "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
14932                           "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
14933                           "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
14934                           "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
14935                           "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
14936                           "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
14937                           "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
14938                           "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
14939                           "\x11\xB4\x18\x17\x1A\x65\x92\x56"
14940                           "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
14941                           "\x1A\x01\x22\x45\x17\x62\x52\x6C"
14942                           "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
14943                           "\x32\x66\x6F\x23\x7F\x94\x36\x88"
14944                           "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
14945                           "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
14946                           "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
14947                           "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
14948                           "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
14949                           "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
14950                           "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
14951                           "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
14952                           "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
14953                           "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
14954                 .rlen   = 496,
14955                 .also_non_np = 1,
14956                 .np     = 2,
14957                 .tap    = { 496 - 16, 16 },
14958         },
14959 };
14960
14961 static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
14962         { /* Generated from TF test vectors */
14963                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
14964                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
14965                 .klen   = 16,
14966                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
14967                 .input  = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
14968                           "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
14969                           "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
14970                           "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
14971                           "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
14972                           "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
14973                           "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
14974                           "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
14975                           "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
14976                           "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
14977                           "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
14978                           "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
14979                           "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
14980                           "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
14981                           "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
14982                           "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
14983                           "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
14984                           "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
14985                           "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
14986                           "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
14987                           "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
14988                           "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
14989                           "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
14990                           "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
14991                           "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
14992                           "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
14993                           "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
14994                           "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
14995                           "\x90\x12\x37\x49\x27\x98\x69\x18"
14996                           "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
14997                           "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
14998                           "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
14999                           "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
15000                           "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
15001                           "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
15002                           "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
15003                           "\x03\x55\x0E\x02\x41\x4A\x45\x06"
15004                           "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
15005                           "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
15006                           "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
15007                           "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
15008                           "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
15009                           "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
15010                           "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
15011                           "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
15012                           "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
15013                           "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
15014                           "\x11\xB4\x18\x17\x1A\x65\x92\x56"
15015                           "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
15016                           "\x1A\x01\x22\x45\x17\x62\x52\x6C"
15017                           "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
15018                           "\x32\x66\x6F\x23\x7F\x94\x36\x88"
15019                           "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
15020                           "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
15021                           "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
15022                           "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
15023                           "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
15024                           "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
15025                           "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
15026                           "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
15027                           "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
15028                           "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
15029                 .ilen   = 496,
15030                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15031                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15032                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15033                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15034                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15035                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15036                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
15037                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
15038                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
15039                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
15040                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
15041                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
15042                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
15043                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
15044                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
15045                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
15046                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
15047                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
15048                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
15049                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
15050                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
15051                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
15052                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
15053                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
15054                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
15055                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
15056                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
15057                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
15058                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
15059                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
15060                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
15061                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
15062                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
15063                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
15064                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
15065                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
15066                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
15067                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
15068                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
15069                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
15070                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
15071                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
15072                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
15073                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
15074                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
15075                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
15076                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
15077                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
15078                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
15079                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
15080                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
15081                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
15082                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
15083                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
15084                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
15085                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
15086                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
15087                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
15088                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
15089                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
15090                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
15091                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
15092                 .rlen   = 496,
15093                 .also_non_np = 1,
15094                 .np     = 2,
15095                 .tap    = { 496 - 16, 16 },
15096         },
15097 };
15098
15099 static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
15100         { /* Generated from TF test vectors */
15101                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15102                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
15103                 .klen   = 16,
15104                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
15105                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15106                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15107                           "\x3A",
15108                 .ilen   = 17,
15109                 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
15110                           "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
15111                           "\x0C",
15112                 .rlen   = 17,
15113         }, { /* Generated from TF test vectors */
15114                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15115                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
15116                 .klen   = 16,
15117                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
15118                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15119                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15120                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15121                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15122                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15123                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15124                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
15125                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
15126                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
15127                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
15128                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
15129                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
15130                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
15131                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
15132                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
15133                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
15134                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
15135                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
15136                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
15137                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
15138                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
15139                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
15140                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
15141                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
15142                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
15143                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
15144                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
15145                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
15146                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
15147                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
15148                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
15149                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
15150                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
15151                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
15152                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
15153                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
15154                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
15155                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
15156                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
15157                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
15158                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
15159                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
15160                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
15161                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
15162                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
15163                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
15164                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
15165                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
15166                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
15167                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
15168                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
15169                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
15170                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
15171                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
15172                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
15173                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
15174                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
15175                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
15176                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
15177                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
15178                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
15179                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
15180                 .ilen   = 496,
15181                 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
15182                           "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
15183                           "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
15184                           "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
15185                           "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
15186                           "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
15187                           "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
15188                           "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
15189                           "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
15190                           "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
15191                           "\x88\x18\x52\x56\x48\x58\xD1\x6B"
15192                           "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
15193                           "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
15194                           "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
15195                           "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
15196                           "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
15197                           "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
15198                           "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
15199                           "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
15200                           "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
15201                           "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
15202                           "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
15203                           "\x44\x67\x90\x20\xAC\x41\xDF\x43"
15204                           "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
15205                           "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
15206                           "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
15207                           "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
15208                           "\xAE\x59\x0F\x07\x88\x79\x53\x26"
15209                           "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
15210                           "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
15211                           "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
15212                           "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
15213                           "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
15214                           "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
15215                           "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
15216                           "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
15217                           "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
15218                           "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
15219                           "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
15220                           "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
15221                           "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
15222                           "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
15223                           "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
15224                           "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
15225                           "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
15226                           "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
15227                           "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
15228                           "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
15229                           "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
15230                           "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
15231                           "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
15232                           "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
15233                           "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
15234                           "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
15235                           "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
15236                           "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
15237                           "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
15238                           "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
15239                           "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
15240                           "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
15241                           "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
15242                           "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
15243                 .rlen   = 496,
15244                 .also_non_np = 1,
15245                 .np     = 2,
15246                 .tap    = { 496 - 16, 16 },
15247         },
15248 };
15249
15250 static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
15251         { /* Generated from TF test vectors */
15252                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15253                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
15254                 .klen   = 16,
15255                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
15256                 .input  = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
15257                           "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
15258                           "\x0C",
15259                 .ilen   = 17,
15260                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15261                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15262                           "\x3A",
15263                 .rlen   = 17,
15264         }, { /* Generated from TF test vectors */
15265                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
15266                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
15267                 .klen   = 16,
15268                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
15269                 .input  = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
15270                           "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
15271                           "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
15272                           "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
15273                           "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
15274                           "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
15275                           "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
15276                           "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
15277                           "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
15278                           "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
15279                           "\x88\x18\x52\x56\x48\x58\xD1\x6B"
15280                           "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
15281                           "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
15282                           "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
15283                           "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
15284                           "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
15285                           "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
15286                           "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
15287                           "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
15288                           "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
15289                           "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
15290                           "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
15291                           "\x44\x67\x90\x20\xAC\x41\xDF\x43"
15292                           "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
15293                           "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
15294                           "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
15295                           "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
15296                           "\xAE\x59\x0F\x07\x88\x79\x53\x26"
15297                           "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
15298                           "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
15299                           "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
15300                           "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
15301                           "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
15302                           "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
15303                           "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
15304                           "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
15305                           "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
15306                           "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
15307                           "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
15308                           "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
15309                           "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
15310                           "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
15311                           "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
15312                           "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
15313                           "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
15314                           "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
15315                           "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
15316                           "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
15317                           "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
15318                           "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
15319                           "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
15320                           "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
15321                           "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
15322                           "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
15323                           "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
15324                           "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
15325                           "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
15326                           "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
15327                           "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
15328                           "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
15329                           "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
15330                           "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
15331                 .ilen   = 496,
15332                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
15333                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
15334                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
15335                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
15336                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
15337                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
15338                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
15339                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
15340                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
15341                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
15342                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
15343                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
15344                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
15345                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
15346                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
15347                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
15348                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
15349                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
15350                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
15351                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
15352                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
15353                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
15354                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
15355                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
15356                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
15357                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
15358                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
15359                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
15360                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
15361                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
15362                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
15363                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
15364                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
15365                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
15366                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
15367                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
15368                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
15369                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
15370                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
15371                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
15372                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
15373                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
15374                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
15375                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
15376                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
15377                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
15378                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
15379                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
15380                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
15381                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
15382                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
15383                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
15384                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
15385                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
15386                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
15387                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
15388                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
15389                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
15390                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
15391                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
15392                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
15393                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
15394                 .rlen   = 496,
15395                 .also_non_np = 1,
15396                 .np     = 2,
15397                 .tap    = { 496 - 16, 16 },
15398         },
15399 };
15400
15401 /*
15402  * ARC4 test vectors from OpenSSL
15403  */
15404 #define ARC4_ENC_TEST_VECTORS   7
15405 #define ARC4_DEC_TEST_VECTORS   7
15406
15407 static struct cipher_testvec arc4_enc_tv_template[] = {
15408         {
15409                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15410                 .klen   = 8,
15411                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15412                 .ilen   = 8,
15413                 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
15414                 .rlen   = 8,
15415         }, {
15416                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15417                 .klen   = 8,
15418                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
15419                 .ilen   = 8,
15420                 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
15421                 .rlen   = 8,
15422         }, {
15423                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
15424                 .klen   = 8,
15425                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
15426                 .ilen   = 8,
15427                 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
15428                 .rlen   = 8,
15429         }, {
15430                 .key    = "\xef\x01\x23\x45",
15431                 .klen   = 4,
15432                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
15433                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15434                           "\x00\x00\x00\x00",
15435                 .ilen   = 20,
15436                 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
15437                           "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
15438                           "\x36\xb6\x78\x58",
15439                 .rlen   = 20,
15440         }, {
15441                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15442                 .klen   = 8,
15443                 .input  = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
15444                           "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
15445                           "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
15446                           "\x12\x34\x56\x78",
15447                 .ilen   = 28,
15448                 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
15449                           "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
15450                           "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
15451                           "\x40\x01\x1e\xcf",
15452                 .rlen   = 28,
15453         }, {
15454                 .key    = "\xef\x01\x23\x45",
15455                 .klen   = 4,
15456                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
15457                           "\x00\x00",
15458                 .ilen   = 10,
15459                 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
15460                           "\xbd\x61",
15461                 .rlen   = 10,
15462         }, {
15463                 .key    = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
15464                         "\x00\x00\x00\x00\x00\x00\x00\x00",
15465                 .klen   = 16,
15466                 .input  = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
15467                 .ilen   = 8,
15468                 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
15469                 .rlen   = 8,
15470         },
15471 };
15472
15473 static struct cipher_testvec arc4_dec_tv_template[] = {
15474         {
15475                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15476                 .klen   = 8,
15477                 .input  = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
15478                 .ilen   = 8,
15479                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15480                 .rlen   = 8,
15481         }, {
15482                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15483                 .klen   = 8,
15484                 .input  = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
15485                 .ilen   = 8,
15486                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
15487                 .rlen   = 8,
15488         }, {
15489                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
15490                 .klen   = 8,
15491                 .input  = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
15492                 .ilen   = 8,
15493                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
15494                 .rlen   = 8,
15495         }, {
15496                 .key    = "\xef\x01\x23\x45",
15497                 .klen   = 4,
15498                 .input  = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
15499                           "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
15500                           "\x36\xb6\x78\x58",
15501                 .ilen   = 20,
15502                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
15503                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15504                           "\x00\x00\x00\x00",
15505                 .rlen   = 20,
15506         }, {
15507                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15508                 .klen   = 8,
15509                 .input  = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
15510                           "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
15511                           "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
15512                           "\x40\x01\x1e\xcf",
15513                 .ilen   = 28,
15514                 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
15515                           "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
15516                           "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
15517                           "\x12\x34\x56\x78",
15518                 .rlen   = 28,
15519         }, {
15520                 .key    = "\xef\x01\x23\x45",
15521                 .klen   = 4,
15522                 .input  = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
15523                           "\xbd\x61",
15524                 .ilen   = 10,
15525                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
15526                           "\x00\x00",
15527                 .rlen   = 10,
15528         }, {
15529                 .key    = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
15530                         "\x00\x00\x00\x00\x00\x00\x00\x00",
15531                 .klen   = 16,
15532                 .input  = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
15533                 .ilen   = 8,
15534                 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
15535                 .rlen   = 8,
15536         },
15537 };
15538
15539 /*
15540  * TEA test vectors
15541  */
15542 #define TEA_ENC_TEST_VECTORS    4
15543 #define TEA_DEC_TEST_VECTORS    4
15544
15545 static struct cipher_testvec tea_enc_tv_template[] = {
15546         {
15547                 .key    = zeroed_string,
15548                 .klen   = 16,
15549                 .input  = zeroed_string,
15550                 .ilen   = 8,
15551                 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
15552                 .rlen   = 8,
15553         }, {
15554                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
15555                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
15556                 .klen   = 16,
15557                 .input  = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
15558                 .ilen   = 8,
15559                 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
15560                 .rlen   = 8,
15561         }, {
15562                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
15563                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
15564                 .klen   = 16,
15565                 .input  = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
15566                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
15567                 .ilen   = 16,
15568                 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
15569                           "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
15570                 .rlen   = 16,
15571         }, {
15572                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
15573                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
15574                 .klen   = 16,
15575                 .input  = "\x54\x65\x61\x20\x69\x73\x20\x67"
15576                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
15577                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
15578                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
15579                 .ilen   = 32,
15580                 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
15581                           "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
15582                           "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
15583                           "\x07\x89\x73\xc2\x45\x92\xc6\x90",
15584                 .rlen   = 32,
15585         }
15586 };
15587
15588 static struct cipher_testvec tea_dec_tv_template[] = {
15589         {
15590                 .key    = zeroed_string,
15591                 .klen   = 16,
15592                 .input  = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
15593                 .ilen   = 8,
15594                 .result = zeroed_string,
15595                 .rlen   = 8,
15596         }, {
15597                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
15598                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
15599                 .klen   = 16,
15600                 .input  = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
15601                 .ilen   = 8,
15602                 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
15603                 .rlen   = 8,
15604         }, {
15605                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
15606                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
15607                 .klen   = 16,
15608                 .input  = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
15609                           "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
15610                 .ilen   = 16,
15611                 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
15612                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
15613                 .rlen   = 16,
15614         }, {
15615                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
15616                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
15617                 .klen   = 16,
15618                 .input  = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
15619                           "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
15620                           "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
15621                           "\x07\x89\x73\xc2\x45\x92\xc6\x90",
15622                 .ilen   = 32,
15623                 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
15624                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
15625                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
15626                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
15627                 .rlen   = 32,
15628         }
15629 };
15630
15631 /*
15632  * XTEA test vectors
15633  */
15634 #define XTEA_ENC_TEST_VECTORS   4
15635 #define XTEA_DEC_TEST_VECTORS   4
15636
15637 static struct cipher_testvec xtea_enc_tv_template[] = {
15638         {
15639                 .key    = zeroed_string,
15640                 .klen   = 16,
15641                 .input  = zeroed_string,
15642                 .ilen   = 8,
15643                 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
15644                 .rlen   = 8,
15645         }, {
15646                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
15647                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
15648                 .klen   = 16,
15649                 .input  = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
15650                 .ilen   = 8,
15651                 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
15652                 .rlen   = 8,
15653         }, {
15654                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
15655                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
15656                 .klen   = 16,
15657                 .input  = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
15658                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
15659                 .ilen   = 16,
15660                 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
15661                           "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
15662                 .rlen   = 16,
15663         }, {
15664                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
15665                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
15666                 .klen   = 16,
15667                 .input  = "\x54\x65\x61\x20\x69\x73\x20\x67"
15668                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
15669                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
15670                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
15671                 .ilen   = 32,
15672                 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
15673                           "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
15674                           "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
15675                           "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
15676                 .rlen   = 32,
15677         }
15678 };
15679
15680 static struct cipher_testvec xtea_dec_tv_template[] = {
15681         {
15682                 .key    = zeroed_string,
15683                 .klen   = 16,
15684                 .input  = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
15685                 .ilen   = 8,
15686                 .result = zeroed_string,
15687                 .rlen   = 8,
15688         }, {
15689                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
15690                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
15691                 .klen   = 16,
15692                 .input  = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
15693                 .ilen   = 8,
15694                 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
15695                 .rlen   = 8,
15696         }, {
15697                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
15698                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
15699                 .klen   = 16,
15700                 .input  = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
15701                           "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
15702                 .ilen   = 16,
15703                 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
15704                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
15705                 .rlen   = 16,
15706         }, {
15707                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
15708                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
15709                 .klen   = 16,
15710                 .input  = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
15711                           "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
15712                           "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
15713                           "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
15714                 .ilen   = 32,
15715                 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
15716                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
15717                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
15718                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
15719                 .rlen   = 32,
15720         }
15721 };
15722
15723 /*
15724  * KHAZAD test vectors.
15725  */
15726 #define KHAZAD_ENC_TEST_VECTORS 5
15727 #define KHAZAD_DEC_TEST_VECTORS 5
15728
15729 static struct cipher_testvec khazad_enc_tv_template[] = {
15730         {
15731                 .key    = "\x80\x00\x00\x00\x00\x00\x00\x00"
15732                           "\x00\x00\x00\x00\x00\x00\x00\x00",
15733                 .klen   = 16,
15734                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
15735                 .ilen   = 8,
15736                 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
15737                 .rlen   = 8,
15738         }, {
15739                 .key    = "\x38\x38\x38\x38\x38\x38\x38\x38"
15740                           "\x38\x38\x38\x38\x38\x38\x38\x38",
15741                 .klen   = 16,
15742                 .input  = "\x38\x38\x38\x38\x38\x38\x38\x38",
15743                 .ilen   = 8,
15744                 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
15745                 .rlen   = 8,
15746         }, {
15747                 .key    = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
15748                         "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
15749                 .klen   = 16,
15750                 .input  = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
15751                 .ilen   = 8,
15752                 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
15753                 .rlen   = 8,
15754         }, {
15755                 .key    = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15756                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15757                 .klen   = 16,
15758                 .input  = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15759                 .ilen   = 8,
15760                 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
15761                 .rlen   = 8,
15762         }, {
15763                 .key    = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15764                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15765                 .klen   = 16,
15766                 .input  = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15767                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15768                 .ilen   = 16,
15769                 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
15770                         "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
15771                 .rlen   = 16,
15772         },
15773 };
15774
15775 static struct cipher_testvec khazad_dec_tv_template[] = {
15776         {
15777                 .key    = "\x80\x00\x00\x00\x00\x00\x00\x00"
15778                           "\x00\x00\x00\x00\x00\x00\x00\x00",
15779                 .klen   = 16,
15780                 .input  = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
15781                 .ilen   = 8,
15782                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
15783                 .rlen   = 8,
15784         }, {
15785                 .key    = "\x38\x38\x38\x38\x38\x38\x38\x38"
15786                           "\x38\x38\x38\x38\x38\x38\x38\x38",
15787                 .klen   = 16,
15788                 .input  = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
15789                 .ilen   = 8,
15790                 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
15791                 .rlen   = 8,
15792         }, {
15793                 .key    = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
15794                         "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
15795                 .klen   = 16,
15796                 .input  = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
15797                 .ilen   = 8,
15798                 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
15799                 .rlen   = 8,
15800         }, {
15801                 .key    = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15802                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15803                 .klen   = 16,
15804                 .input  = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
15805                 .ilen   = 8,
15806                 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15807                 .rlen   = 8,
15808         }, {
15809                 .key    = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15810                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15811                 .klen   = 16,
15812                 .input  = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
15813                         "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
15814                 .ilen   = 16,
15815                 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
15816                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
15817                 .rlen   = 16,
15818         },
15819 };
15820
15821 /*
15822  * Anubis test vectors.
15823  */
15824
15825 #define ANUBIS_ENC_TEST_VECTORS                 5
15826 #define ANUBIS_DEC_TEST_VECTORS                 5
15827 #define ANUBIS_CBC_ENC_TEST_VECTORS             2
15828 #define ANUBIS_CBC_DEC_TEST_VECTORS             2
15829
15830 static struct cipher_testvec anubis_enc_tv_template[] = {
15831         {
15832                 .key    = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15833                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15834                 .klen   = 16,
15835                 .input  = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15836                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15837                 .ilen   = 16,
15838                 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
15839                           "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
15840                 .rlen   = 16,
15841         }, {
15842
15843                 .key    = "\x03\x03\x03\x03\x03\x03\x03\x03"
15844                           "\x03\x03\x03\x03\x03\x03\x03\x03"
15845                           "\x03\x03\x03\x03",
15846                 .klen   = 20,
15847                 .input  = "\x03\x03\x03\x03\x03\x03\x03\x03"
15848                           "\x03\x03\x03\x03\x03\x03\x03\x03",
15849                 .ilen   = 16,
15850                 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
15851                           "\x87\x41\x6f\x82\x0a\x98\x64\xae",
15852                 .rlen   = 16,
15853         }, {
15854                 .key    = "\x24\x24\x24\x24\x24\x24\x24\x24"
15855                           "\x24\x24\x24\x24\x24\x24\x24\x24"
15856                           "\x24\x24\x24\x24\x24\x24\x24\x24"
15857                           "\x24\x24\x24\x24",
15858                 .klen   = 28,
15859                 .input  = "\x24\x24\x24\x24\x24\x24\x24\x24"
15860                           "\x24\x24\x24\x24\x24\x24\x24\x24",
15861                 .ilen   = 16,
15862                 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
15863                           "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
15864                 .rlen   = 16,
15865         }, {
15866                 .key    = "\x25\x25\x25\x25\x25\x25\x25\x25"
15867                           "\x25\x25\x25\x25\x25\x25\x25\x25"
15868                           "\x25\x25\x25\x25\x25\x25\x25\x25"
15869                           "\x25\x25\x25\x25\x25\x25\x25\x25",
15870                 .klen   = 32,
15871                 .input  = "\x25\x25\x25\x25\x25\x25\x25\x25"
15872                           "\x25\x25\x25\x25\x25\x25\x25\x25",
15873                 .ilen   = 16,
15874                 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
15875                         "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
15876                 .rlen   = 16,
15877         }, {
15878                 .key    = "\x35\x35\x35\x35\x35\x35\x35\x35"
15879                           "\x35\x35\x35\x35\x35\x35\x35\x35"
15880                           "\x35\x35\x35\x35\x35\x35\x35\x35"
15881                           "\x35\x35\x35\x35\x35\x35\x35\x35"
15882                           "\x35\x35\x35\x35\x35\x35\x35\x35",
15883                 .klen   = 40,
15884                 .input  = "\x35\x35\x35\x35\x35\x35\x35\x35"
15885                           "\x35\x35\x35\x35\x35\x35\x35\x35",
15886                 .ilen   = 16,
15887                 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
15888                           "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
15889                 .rlen   = 16,
15890         },
15891 };
15892
15893 static struct cipher_testvec anubis_dec_tv_template[] = {
15894         {
15895                 .key    = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15896                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15897                 .klen   = 16,
15898                 .input  = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
15899                           "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
15900                 .ilen   = 16,
15901                 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15902                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15903                 .rlen   = 16,
15904         }, {
15905
15906                 .key    = "\x03\x03\x03\x03\x03\x03\x03\x03"
15907                           "\x03\x03\x03\x03\x03\x03\x03\x03"
15908                           "\x03\x03\x03\x03",
15909                 .klen   = 20,
15910                 .input  = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
15911                           "\x87\x41\x6f\x82\x0a\x98\x64\xae",
15912                 .ilen   = 16,
15913                 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
15914                           "\x03\x03\x03\x03\x03\x03\x03\x03",
15915                 .rlen   = 16,
15916         }, {
15917                 .key    = "\x24\x24\x24\x24\x24\x24\x24\x24"
15918                           "\x24\x24\x24\x24\x24\x24\x24\x24"
15919                           "\x24\x24\x24\x24\x24\x24\x24\x24"
15920                           "\x24\x24\x24\x24",
15921                 .klen   = 28,
15922                 .input  = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
15923                           "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
15924                 .ilen   = 16,
15925                 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
15926                           "\x24\x24\x24\x24\x24\x24\x24\x24",
15927                 .rlen   = 16,
15928         }, {
15929                 .key    = "\x25\x25\x25\x25\x25\x25\x25\x25"
15930                           "\x25\x25\x25\x25\x25\x25\x25\x25"
15931                           "\x25\x25\x25\x25\x25\x25\x25\x25"
15932                           "\x25\x25\x25\x25\x25\x25\x25\x25",
15933                 .klen   = 32,
15934                 .input  = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
15935                         "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
15936                 .ilen   = 16,
15937                 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
15938                           "\x25\x25\x25\x25\x25\x25\x25\x25",
15939                 .rlen   = 16,
15940         }, {
15941                 .key    = "\x35\x35\x35\x35\x35\x35\x35\x35"
15942                           "\x35\x35\x35\x35\x35\x35\x35\x35"
15943                           "\x35\x35\x35\x35\x35\x35\x35\x35"
15944                           "\x35\x35\x35\x35\x35\x35\x35\x35"
15945                           "\x35\x35\x35\x35\x35\x35\x35\x35",
15946                 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
15947                          "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
15948                 .klen   = 40,
15949                 .ilen   = 16,
15950                 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
15951                           "\x35\x35\x35\x35\x35\x35\x35\x35",
15952                 .rlen   = 16,
15953         },
15954 };
15955
15956 static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
15957         {
15958                 .key    = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15959                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15960                 .klen   = 16,
15961                 .input  = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15962                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15963                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15964                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15965                 .ilen   = 32,
15966                 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
15967                           "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
15968                           "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
15969                           "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
15970                 .rlen   = 32,
15971         }, {
15972                 .key    = "\x35\x35\x35\x35\x35\x35\x35\x35"
15973                           "\x35\x35\x35\x35\x35\x35\x35\x35"
15974                           "\x35\x35\x35\x35\x35\x35\x35\x35"
15975                           "\x35\x35\x35\x35\x35\x35\x35\x35"
15976                           "\x35\x35\x35\x35\x35\x35\x35\x35",
15977                 .klen   = 40,
15978                 .input  = "\x35\x35\x35\x35\x35\x35\x35\x35"
15979                           "\x35\x35\x35\x35\x35\x35\x35\x35"
15980                           "\x35\x35\x35\x35\x35\x35\x35\x35"
15981                           "\x35\x35\x35\x35\x35\x35\x35\x35",
15982                 .ilen   = 32,
15983                 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
15984                           "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
15985                           "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
15986                           "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
15987                 .rlen   = 32,
15988         },
15989 };
15990
15991 static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
15992         {
15993                 .key    = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
15994                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
15995                 .klen   = 16,
15996                 .input  = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
15997                           "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
15998                           "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
15999                           "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
16000                 .ilen   = 32,
16001                 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16002                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16003                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
16004                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
16005                 .rlen   = 32,
16006         }, {
16007                 .key    = "\x35\x35\x35\x35\x35\x35\x35\x35"
16008                           "\x35\x35\x35\x35\x35\x35\x35\x35"
16009                           "\x35\x35\x35\x35\x35\x35\x35\x35"
16010                           "\x35\x35\x35\x35\x35\x35\x35\x35"
16011                           "\x35\x35\x35\x35\x35\x35\x35\x35",
16012                 .klen   = 40,
16013                 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
16014                           "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
16015                           "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
16016                           "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
16017                 .ilen   = 32,
16018                 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
16019                           "\x35\x35\x35\x35\x35\x35\x35\x35"
16020                           "\x35\x35\x35\x35\x35\x35\x35\x35"
16021                           "\x35\x35\x35\x35\x35\x35\x35\x35",
16022                 .rlen   = 32,
16023         },
16024 };
16025
16026 /*
16027  * XETA test vectors
16028  */
16029 #define XETA_ENC_TEST_VECTORS   4
16030 #define XETA_DEC_TEST_VECTORS   4
16031
16032 static struct cipher_testvec xeta_enc_tv_template[] = {
16033         {
16034                 .key    = zeroed_string,
16035                 .klen   = 16,
16036                 .input  = zeroed_string,
16037                 .ilen   = 8,
16038                 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
16039                 .rlen   = 8,
16040         }, {
16041                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
16042                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
16043                 .klen   = 16,
16044                 .input  = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
16045                 .ilen   = 8,
16046                 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
16047                 .rlen   = 8,
16048         }, {
16049                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
16050                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
16051                 .klen   = 16,
16052                 .input  = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
16053                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
16054                 .ilen   = 16,
16055                 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
16056                           "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
16057                 .rlen   = 16,
16058         }, {
16059                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
16060                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
16061                 .klen   = 16,
16062                 .input  = "\x54\x65\x61\x20\x69\x73\x20\x67"
16063                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
16064                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
16065                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
16066                 .ilen   = 32,
16067                 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
16068                           "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
16069                           "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
16070                           "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
16071                 .rlen   = 32,
16072         }
16073 };
16074
16075 static struct cipher_testvec xeta_dec_tv_template[] = {
16076         {
16077                 .key    = zeroed_string,
16078                 .klen   = 16,
16079                 .input  = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
16080                 .ilen   = 8,
16081                 .result = zeroed_string,
16082                 .rlen   = 8,
16083         }, {
16084                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
16085                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
16086                 .klen   = 16,
16087                 .input  = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
16088                 .ilen   = 8,
16089                 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
16090                 .rlen   = 8,
16091         }, {
16092                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
16093                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
16094                 .klen   = 16,
16095                 .input  = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
16096                           "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
16097                 .ilen   = 16,
16098                 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
16099                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
16100                 .rlen   = 16,
16101         }, {
16102                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
16103                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
16104                 .klen   = 16,
16105                 .input  = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
16106                           "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
16107                           "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
16108                           "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
16109                 .ilen   = 32,
16110                 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
16111                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
16112                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
16113                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
16114                 .rlen   = 32,
16115         }
16116 };
16117
16118 /*
16119  * FCrypt test vectors
16120  */
16121 #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
16122 #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
16123
16124 static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
16125         { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
16126                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
16127                 .klen   = 8,
16128                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
16129                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
16130                 .ilen   = 8,
16131                 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
16132                 .rlen   = 8,
16133         }, {
16134                 .key    = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
16135                 .klen   = 8,
16136                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
16137                 .input  = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
16138                 .ilen   = 8,
16139                 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
16140                 .rlen   = 8,
16141         }, { /* From Arla */
16142                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
16143                 .klen   = 8,
16144                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16145                 .input  = "The quick brown fox jumps over the lazy dogs.\0\0",
16146                 .ilen   = 48,
16147                 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
16148                           "\xee\xac\x98\x62\x44\x51\xe4\x84"
16149                           "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
16150                           "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
16151                           "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
16152                           "\xf8\x91\x3c\xac\x44\x22\x92\xef",
16153                 .rlen   = 48,
16154         }, {
16155                 .key    = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16156                 .klen   = 8,
16157                 .iv     = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
16158                 .input  = "The quick brown fox jumps over the lazy dogs.\0\0",
16159                 .ilen   = 48,
16160                 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
16161                           "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
16162                           "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
16163                           "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
16164                           "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
16165                           "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
16166                 .rlen   = 48,
16167         }, { /* split-page version */
16168                 .key    = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16169                 .klen   = 8,
16170                 .iv     = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
16171                 .input  = "The quick brown fox jumps over the lazy dogs.\0\0",
16172                 .ilen   = 48,
16173                 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
16174                           "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
16175                           "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
16176                           "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
16177                           "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
16178                           "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
16179                 .rlen   = 48,
16180                 .np     = 2,
16181                 .tap    = { 20, 28 },
16182         }
16183 };
16184
16185 static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
16186         { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
16187                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
16188                 .klen   = 8,
16189                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
16190                 .input  = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
16191                 .ilen   = 8,
16192                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
16193                 .rlen   = 8,
16194         }, {
16195                 .key    = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
16196                 .klen   = 8,
16197                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
16198                 .input  = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
16199                 .ilen   = 8,
16200                 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
16201                 .rlen   = 8,
16202         }, { /* From Arla */
16203                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
16204                 .klen   = 8,
16205                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16206                 .input  = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
16207                           "\xee\xac\x98\x62\x44\x51\xe4\x84"
16208                           "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
16209                           "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
16210                           "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
16211                           "\xf8\x91\x3c\xac\x44\x22\x92\xef",
16212                 .ilen   = 48,
16213                 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
16214                 .rlen   = 48,
16215         }, {
16216                 .key    = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16217                 .klen   = 8,
16218                 .iv     = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
16219                 .input  = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
16220                           "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
16221                           "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
16222                           "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
16223                           "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
16224                           "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
16225                 .ilen   = 48,
16226                 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
16227                 .rlen   = 48,
16228         }, { /* split-page version */
16229                 .key    = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16230                 .klen   = 8,
16231                 .iv     = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
16232                 .input  = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
16233                           "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
16234                           "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
16235                           "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
16236                           "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
16237                           "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
16238                 .ilen   = 48,
16239                 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
16240                 .rlen   = 48,
16241                 .np     = 2,
16242                 .tap    = { 20, 28 },
16243         }
16244 };
16245
16246 /*
16247  * CAMELLIA test vectors.
16248  */
16249 #define CAMELLIA_ENC_TEST_VECTORS 4
16250 #define CAMELLIA_DEC_TEST_VECTORS 4
16251 #define CAMELLIA_CBC_ENC_TEST_VECTORS 3
16252 #define CAMELLIA_CBC_DEC_TEST_VECTORS 3
16253 #define CAMELLIA_CTR_ENC_TEST_VECTORS 2
16254 #define CAMELLIA_CTR_DEC_TEST_VECTORS 2
16255 #define CAMELLIA_LRW_ENC_TEST_VECTORS 8
16256 #define CAMELLIA_LRW_DEC_TEST_VECTORS 8
16257 #define CAMELLIA_XTS_ENC_TEST_VECTORS 5
16258 #define CAMELLIA_XTS_DEC_TEST_VECTORS 5
16259
16260 static struct cipher_testvec camellia_enc_tv_template[] = {
16261         {
16262                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16263                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16264                 .klen   = 16,
16265                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16266                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16267                 .ilen   = 16,
16268                 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
16269                           "\x08\x57\x06\x56\x48\xea\xbe\x43",
16270                 .rlen   = 16,
16271         }, {
16272                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16273                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
16274                           "\x00\x11\x22\x33\x44\x55\x66\x77",
16275                 .klen   = 24,
16276                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16277                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16278                 .ilen   = 16,
16279                 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
16280                           "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
16281                 .rlen   = 16,
16282         }, {
16283                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16284                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
16285                           "\x00\x11\x22\x33\x44\x55\x66\x77"
16286                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
16287                 .klen   = 32,
16288                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16289                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16290                 .ilen   = 16,
16291                 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
16292                           "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
16293                 .rlen   = 16,
16294         },
16295         { /* Generated with Crypto++ */
16296                 .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
16297                           "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
16298                           "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
16299                           "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
16300                 .klen   = 32,
16301                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16302                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16303                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16304                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16305                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
16306                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
16307                 .ilen   = 48,
16308                 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
16309                           "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
16310                           "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
16311                           "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
16312                           "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
16313                           "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
16314                 .rlen   = 48,
16315                 .also_non_np = 1,
16316                 .np     = 2,
16317                 .tap    = { 48 - 16, 16 },
16318         },
16319 };
16320
16321 static struct cipher_testvec camellia_dec_tv_template[] = {
16322         {
16323                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16324                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16325                 .klen   = 16,
16326                 .input  = "\x67\x67\x31\x38\x54\x96\x69\x73"
16327                           "\x08\x57\x06\x56\x48\xea\xbe\x43",
16328                 .ilen   = 16,
16329                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16330                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16331                 .rlen   = 16,
16332         }, {
16333                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16334                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
16335                           "\x00\x11\x22\x33\x44\x55\x66\x77",
16336                 .klen   = 24,
16337                 .input  = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
16338                           "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
16339                 .ilen   = 16,
16340                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16341                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16342                 .rlen   = 16,
16343         }, {
16344                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16345                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
16346                           "\x00\x11\x22\x33\x44\x55\x66\x77"
16347                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
16348                 .klen   = 32,
16349                 .input  = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
16350                           "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
16351                 .ilen   = 16,
16352                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
16353                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
16354                 .rlen   = 16,
16355         },
16356         { /* Generated with Crypto++ */
16357                 .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
16358                           "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
16359                           "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
16360                           "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
16361                 .klen   = 32,
16362                 .input  = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
16363                           "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
16364                           "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
16365                           "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
16366                           "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
16367                           "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A",
16368                 .ilen   = 48,
16369                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16370                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16371                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16372                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16373                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
16374                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
16375                 .rlen   = 48,
16376                 .also_non_np = 1,
16377                 .np     = 2,
16378                 .tap    = { 48 - 16, 16 },
16379         },
16380 };
16381
16382 static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
16383         {
16384                 .key    = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
16385                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
16386                 .klen   = 16,
16387                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
16388                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
16389                 .input  = "Single block msg",
16390                 .ilen   = 16,
16391                 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
16392                           "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
16393                 .rlen   = 16,
16394         }, {
16395                 .key    = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
16396                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
16397                 .klen   = 16,
16398                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
16399                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
16400                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
16401                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16402                           "\x10\x11\x12\x13\x14\x15\x16\x17"
16403                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
16404                 .ilen   = 32,
16405                 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
16406                           "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
16407                           "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
16408                           "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
16409                 .rlen   = 32,
16410         },
16411         { /* Generated with Crypto++ */
16412                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16413                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
16414                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
16415                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
16416                 .klen   = 32,
16417                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
16418                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
16419                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16420                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16421                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16422                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16423                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
16424                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
16425                 .ilen   = 48,
16426                 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
16427                           "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
16428                           "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
16429                           "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
16430                           "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
16431                           "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
16432                 .rlen   = 48,
16433                 .also_non_np = 1,
16434                 .np     = 2,
16435                 .tap    = { 48 - 16, 16 },
16436         },
16437 };
16438
16439 static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
16440         {
16441                 .key    = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
16442                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
16443                 .klen   = 16,
16444                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
16445                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
16446                 .input  = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
16447                           "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
16448                 .ilen   = 16,
16449                 .result = "Single block msg",
16450                 .rlen   = 16,
16451         }, {
16452                 .key    = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
16453                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
16454                 .klen   = 16,
16455                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
16456                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
16457                 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
16458                           "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
16459                           "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
16460                           "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
16461                 .ilen   = 32,
16462                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
16463                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
16464                           "\x10\x11\x12\x13\x14\x15\x16\x17"
16465                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
16466                 .rlen   = 32,
16467         },
16468         { /* Generated with Crypto++ */
16469                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16470                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
16471                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
16472                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
16473                 .klen   = 32,
16474                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
16475                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
16476                 .input  = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
16477                           "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
16478                           "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
16479                           "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
16480                           "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
16481                           "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01",
16482                 .ilen   = 48,
16483                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16484                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16485                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16486                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16487                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
16488                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
16489                 .rlen   = 48,
16490                 .also_non_np = 1,
16491                 .np     = 2,
16492                 .tap    = { 48 - 16, 16 },
16493         },
16494 };
16495
16496 static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
16497         { /* Generated with Crypto++ */
16498                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16499                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
16500                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
16501                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
16502                 .klen   = 32,
16503                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
16504                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
16505                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16506                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16507                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16508                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16509                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
16510                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
16511                 .ilen   = 48,
16512                 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
16513                           "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
16514                           "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
16515                           "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
16516                           "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
16517                           "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
16518                 .rlen   = 48,
16519         },
16520         { /* Generated with Crypto++ */
16521                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16522                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
16523                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
16524                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
16525                 .klen   = 32,
16526                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
16527                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
16528                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16529                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16530                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16531                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16532                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
16533                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
16534                           "\xDF\x76\x0D",
16535                 .ilen   = 51,
16536                 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
16537                           "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
16538                           "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
16539                           "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
16540                           "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
16541                           "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
16542                           "\x1E\x43\xEF",
16543                 .rlen   = 51,
16544                 .also_non_np = 1,
16545                 .np     = 2,
16546                 .tap    = { 51 - 16, 16 },
16547         }, { /* Generated with Crypto++ */
16548                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16549                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
16550                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
16551                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
16552                 .klen   = 32,
16553                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
16554                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
16555                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16556                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16557                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16558                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16559                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
16560                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
16561                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
16562                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
16563                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
16564                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
16565                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
16566                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
16567                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
16568                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
16569                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
16570                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
16571                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
16572                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
16573                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
16574                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
16575                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
16576                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
16577                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
16578                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
16579                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
16580                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
16581                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
16582                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
16583                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
16584                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
16585                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
16586                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
16587                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
16588                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
16589                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
16590                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
16591                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
16592                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
16593                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
16594                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
16595                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
16596                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
16597                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
16598                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
16599                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
16600                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
16601                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
16602                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
16603                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
16604                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
16605                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
16606                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
16607                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
16608                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
16609                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
16610                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
16611                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
16612                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
16613                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
16614                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
16615                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
16616                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
16617                 .ilen   = 496,
16618                 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
16619                           "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
16620                           "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
16621                           "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
16622                           "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
16623                           "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
16624                           "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
16625                           "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
16626                           "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
16627                           "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
16628                           "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
16629                           "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
16630                           "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
16631                           "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
16632                           "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
16633                           "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
16634                           "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
16635                           "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
16636                           "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
16637                           "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
16638                           "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
16639                           "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
16640                           "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
16641                           "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
16642                           "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
16643                           "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
16644                           "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
16645                           "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
16646                           "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
16647                           "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
16648                           "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
16649                           "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
16650                           "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
16651                           "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
16652                           "\x93\x78\x86\x05\x69\x46\xD0\xC5"
16653                           "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
16654                           "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
16655                           "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
16656                           "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
16657                           "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
16658                           "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
16659                           "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
16660                           "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
16661                           "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
16662                           "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
16663                           "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
16664                           "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
16665                           "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
16666                           "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
16667                           "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
16668                           "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
16669                           "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
16670                           "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
16671                           "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
16672                           "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
16673                           "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
16674                           "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
16675                           "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
16676                           "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
16677                           "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
16678                           "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
16679                           "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C",
16680                 .rlen   = 496,
16681         },
16682 };
16683
16684 static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
16685         { /* Generated with Crypto++ */
16686                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16687                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
16688                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
16689                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
16690                 .klen   = 32,
16691                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
16692                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
16693                 .input  = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
16694                           "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
16695                           "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
16696                           "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
16697                           "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
16698                           "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C",
16699                 .ilen   = 48,
16700                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16701                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16702                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16703                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16704                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
16705                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48",
16706                 .rlen   = 48,
16707         },
16708         { /* Generated with Crypto++ */
16709                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16710                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
16711                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
16712                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
16713                 .klen   = 32,
16714                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
16715                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
16716                 .input  = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
16717                           "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
16718                           "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
16719                           "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
16720                           "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
16721                           "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
16722                           "\x1E\x43\xEF",
16723                 .ilen   = 51,
16724                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16725                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16726                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16727                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16728                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
16729                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
16730                           "\xDF\x76\x0D",
16731                 .rlen   = 51,
16732                 .also_non_np = 1,
16733                 .np     = 2,
16734                 .tap    = { 51 - 16, 16 },
16735         }, { /* Generated with Crypto++ */
16736                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
16737                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
16738                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
16739                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
16740                 .klen   = 32,
16741                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
16742                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
16743                 .input  = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
16744                           "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
16745                           "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
16746                           "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
16747                           "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
16748                           "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
16749                           "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
16750                           "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
16751                           "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
16752                           "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
16753                           "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
16754                           "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
16755                           "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
16756                           "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
16757                           "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
16758                           "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
16759                           "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
16760                           "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
16761                           "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
16762                           "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
16763                           "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
16764                           "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
16765                           "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
16766                           "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
16767                           "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
16768                           "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
16769                           "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
16770                           "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
16771                           "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
16772                           "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
16773                           "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
16774                           "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
16775                           "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
16776                           "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
16777                           "\x93\x78\x86\x05\x69\x46\xD0\xC5"
16778                           "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
16779                           "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
16780                           "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
16781                           "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
16782                           "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
16783                           "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
16784                           "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
16785                           "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
16786                           "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
16787                           "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
16788                           "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
16789                           "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
16790                           "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
16791                           "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
16792                           "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
16793                           "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
16794                           "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
16795                           "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
16796                           "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
16797                           "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
16798                           "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
16799                           "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
16800                           "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
16801                           "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
16802                           "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
16803                           "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
16804                           "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C",
16805                 .ilen   = 496,
16806                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
16807                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
16808                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
16809                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
16810                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
16811                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
16812                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
16813                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
16814                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
16815                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
16816                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
16817                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
16818                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
16819                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
16820                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
16821                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
16822                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
16823                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
16824                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
16825                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
16826                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
16827                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
16828                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
16829                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
16830                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
16831                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
16832                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
16833                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
16834                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
16835                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
16836                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
16837                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
16838                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
16839                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
16840                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
16841                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
16842                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
16843                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
16844                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
16845                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
16846                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
16847                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
16848                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
16849                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
16850                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
16851                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
16852                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
16853                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
16854                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
16855                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
16856                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
16857                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
16858                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
16859                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
16860                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
16861                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
16862                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
16863                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
16864                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
16865                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
16866                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
16867                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
16868                 .rlen   = 496,
16869         },
16870 };
16871
16872 static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
16873         /* Generated from AES-LRW test vectors */
16874         {
16875                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16876                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16877                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16878                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16879                 .klen   = 32,
16880                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16881                           "\x00\x00\x00\x00\x00\x00\x00\x01",
16882                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16883                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16884                 .ilen   = 16,
16885                 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
16886                           "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
16887                 .rlen   = 16,
16888         }, {
16889                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16890                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16891                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16892                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16893                 .klen   = 32,
16894                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16895                           "\x00\x00\x00\x00\x00\x00\x00\x02",
16896                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16897                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16898                 .ilen   = 16,
16899                 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
16900                           "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
16901                 .rlen   = 16,
16902         }, {
16903                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16904                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16905                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16906                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16907                 .klen   = 32,
16908                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16909                           "\x00\x00\x00\x02\x00\x00\x00\x00",
16910                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16911                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16912                 .ilen   = 16,
16913                 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
16914                           "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
16915                 .rlen   = 16,
16916         }, {
16917                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16918                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16919                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16920                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16921                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16922                 .klen   = 40,
16923                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16924                           "\x00\x00\x00\x00\x00\x00\x00\x01",
16925                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16926                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16927                 .ilen   = 16,
16928                 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
16929                           "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
16930                 .rlen   = 16,
16931         }, {
16932                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16933                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16934                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16935                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16936                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16937                 .klen   = 40,
16938                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16939                           "\x00\x00\x00\x02\x00\x00\x00\x00",
16940                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16941                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16942                 .ilen   = 16,
16943                 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
16944                           "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
16945                 .rlen   = 16,
16946         }, {
16947                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16948                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16949                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16950                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16951                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16952                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16953                 .klen   = 48,
16954                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16955                           "\x00\x00\x00\x00\x00\x00\x00\x01",
16956                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16957                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16958                 .ilen   = 16,
16959                 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
16960                           "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
16961                 .rlen   = 16,
16962         }, {
16963                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16964                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16965                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16966                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16967                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16968                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16969                 .klen   = 48,
16970                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16971                           "\x00\x00\x00\x02\x00\x00\x00\x00",
16972                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16973                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16974                 .ilen   = 16,
16975                 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
16976                           "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
16977                 .rlen   = 16,
16978         }, {
16979                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16980                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16981                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16982                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16983                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16984                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16985                 .klen   = 48,
16986                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16987                           "\x00\x00\x00\x00\x00\x00\x00\x01",
16988                 .input  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16989                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16990                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16991                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16992                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16993                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16994                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16995                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16996                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16997                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16998                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16999                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
17000                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
17001                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
17002                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
17003                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
17004                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
17005                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
17006                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
17007                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
17008                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
17009                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
17010                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
17011                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
17012                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
17013                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
17014                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
17015                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
17016                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
17017                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
17018                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
17019                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
17020                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
17021                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
17022                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
17023                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
17024                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
17025                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
17026                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
17027                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
17028                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
17029                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
17030                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
17031                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
17032                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
17033                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
17034                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
17035                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
17036                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
17037                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
17038                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
17039                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
17040                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
17041                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
17042                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
17043                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
17044                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
17045                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
17046                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
17047                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
17048                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
17049                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
17050                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
17051                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
17052                 .ilen   = 512,
17053                 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
17054                           "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
17055                           "\x67\x76\xac\x2c\xd2\x63\x18\x93"
17056                           "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
17057                           "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
17058                           "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
17059                           "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
17060                           "\x62\xdd\x78\x81\xea\x1d\xef\x04"
17061                           "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
17062                           "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
17063                           "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
17064                           "\x40\x41\x69\xaa\x71\xc0\x37\xec"
17065                           "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
17066                           "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
17067                           "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
17068                           "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
17069                           "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
17070                           "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
17071                           "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
17072                           "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
17073                           "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
17074                           "\x42\x08\x40\x82\x06\x1c\x2d\x55"
17075                           "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
17076                           "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
17077                           "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
17078                           "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
17079                           "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
17080                           "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
17081                           "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
17082                           "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
17083                           "\xed\x14\xa9\x57\x19\x63\x40\x04"
17084                           "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
17085                           "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
17086                           "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
17087                           "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
17088                           "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
17089                           "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
17090                           "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
17091                           "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
17092                           "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
17093                           "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
17094                           "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
17095                           "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
17096                           "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
17097                           "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
17098                           "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
17099                           "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
17100                           "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
17101                           "\x35\xa5\x83\x04\x84\x01\x99\x56"
17102                           "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
17103                           "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
17104                           "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
17105                           "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
17106                           "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
17107                           "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
17108                           "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
17109                           "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
17110                           "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
17111                           "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
17112                           "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
17113                           "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
17114                           "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
17115                           "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
17116                           "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
17117                 .rlen   = 512,
17118                 .also_non_np = 1,
17119                 .np     = 2,
17120                 .tap    = { 512 - 16, 16 },
17121         },
17122 };
17123
17124 static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
17125         /* Generated from AES-LRW test vectors */
17126         /* same as enc vectors with input and result reversed */
17127         {
17128                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
17129                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
17130                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
17131                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
17132                 .klen   = 32,
17133                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17134                           "\x00\x00\x00\x00\x00\x00\x00\x01",
17135                 .input  = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
17136                           "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
17137                 .ilen   = 16,
17138                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17139                           "\x38\x39\x41\x42\x43\x44\x45\x46",
17140                 .rlen   = 16,
17141         }, {
17142                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
17143                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
17144                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
17145                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
17146                 .klen   = 32,
17147                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17148                           "\x00\x00\x00\x00\x00\x00\x00\x02",
17149                 .input  = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
17150                           "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
17151                 .ilen   = 16,
17152                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17153                           "\x38\x39\x41\x42\x43\x44\x45\x46",
17154                 .rlen   = 16,
17155         }, {
17156                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
17157                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
17158                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
17159                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
17160                 .klen   = 32,
17161                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17162                           "\x00\x00\x00\x02\x00\x00\x00\x00",
17163                 .input  = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
17164                           "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
17165                 .ilen   = 16,
17166                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17167                           "\x38\x39\x41\x42\x43\x44\x45\x46",
17168                 .rlen   = 16,
17169         }, {
17170                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
17171                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
17172                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
17173                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
17174                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
17175                 .klen   = 40,
17176                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17177                           "\x00\x00\x00\x00\x00\x00\x00\x01",
17178                 .input  = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
17179                           "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
17180                 .ilen   = 16,
17181                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17182                           "\x38\x39\x41\x42\x43\x44\x45\x46",
17183                 .rlen   = 16,
17184         }, {
17185                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
17186                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
17187                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
17188                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
17189                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
17190                 .klen   = 40,
17191                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17192                           "\x00\x00\x00\x02\x00\x00\x00\x00",
17193                 .input  = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
17194                           "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
17195                 .ilen   = 16,
17196                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17197                           "\x38\x39\x41\x42\x43\x44\x45\x46",
17198                 .rlen   = 16,
17199         }, {
17200                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17201                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17202                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17203                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17204                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17205                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17206                 .klen   = 48,
17207                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17208                           "\x00\x00\x00\x00\x00\x00\x00\x01",
17209                 .input  = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
17210                           "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
17211                 .ilen   = 16,
17212                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17213                           "\x38\x39\x41\x42\x43\x44\x45\x46",
17214                 .rlen   = 16,
17215         }, {
17216                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
17217                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
17218                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
17219                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
17220                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
17221                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
17222                 .klen   = 48,
17223                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17224                           "\x00\x00\x00\x02\x00\x00\x00\x00",
17225                 .input  = "\x04\xab\x28\x37\x31\x7a\x26\xab"
17226                           "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
17227                 .ilen   = 16,
17228                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17229                           "\x38\x39\x41\x42\x43\x44\x45\x46",
17230                 .rlen   = 16,
17231         }, {
17232                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17233                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17234                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17235                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17236                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17237                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17238                 .klen   = 48,
17239                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17240                           "\x00\x00\x00\x00\x00\x00\x00\x01",
17241                 .input  = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
17242                           "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
17243                           "\x67\x76\xac\x2c\xd2\x63\x18\x93"
17244                           "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
17245                           "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
17246                           "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
17247                           "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
17248                           "\x62\xdd\x78\x81\xea\x1d\xef\x04"
17249                           "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
17250                           "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
17251                           "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
17252                           "\x40\x41\x69\xaa\x71\xc0\x37\xec"
17253                           "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
17254                           "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
17255                           "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
17256                           "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
17257                           "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
17258                           "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
17259                           "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
17260                           "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
17261                           "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
17262                           "\x42\x08\x40\x82\x06\x1c\x2d\x55"
17263                           "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
17264                           "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
17265                           "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
17266                           "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
17267                           "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
17268                           "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
17269                           "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
17270                           "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
17271                           "\xed\x14\xa9\x57\x19\x63\x40\x04"
17272                           "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
17273                           "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
17274                           "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
17275                           "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
17276                           "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
17277                           "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
17278                           "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
17279                           "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
17280                           "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
17281                           "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
17282                           "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
17283                           "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
17284                           "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
17285                           "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
17286                           "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
17287                           "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
17288                           "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
17289                           "\x35\xa5\x83\x04\x84\x01\x99\x56"
17290                           "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
17291                           "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
17292                           "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
17293                           "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
17294                           "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
17295                           "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
17296                           "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
17297                           "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
17298                           "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
17299                           "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
17300                           "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
17301                           "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
17302                           "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
17303                           "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
17304                           "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
17305                 .ilen   = 512,
17306                 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
17307                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
17308                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
17309                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
17310                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
17311                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
17312                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
17313                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
17314                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
17315                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
17316                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
17317                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
17318                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
17319                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
17320                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
17321                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
17322                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
17323                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
17324                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
17325                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
17326                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
17327                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
17328                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
17329                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
17330                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
17331                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
17332                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
17333                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
17334                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
17335                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
17336                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
17337                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
17338                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
17339                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
17340                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
17341                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
17342                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
17343                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
17344                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
17345                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
17346                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
17347                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
17348                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
17349                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
17350                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
17351                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
17352                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
17353                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
17354                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
17355                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
17356                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
17357                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
17358                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
17359                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
17360                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
17361                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
17362                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
17363                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
17364                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
17365                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
17366                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
17367                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
17368                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
17369                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
17370                 .rlen   = 512,
17371                 .also_non_np = 1,
17372                 .np     = 2,
17373                 .tap    = { 512 - 16, 16 },
17374         },
17375 };
17376
17377 static struct cipher_testvec camellia_xts_enc_tv_template[] = {
17378         /* Generated from AES-XTS test vectors */
17379         {
17380                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
17381                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17382                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17383                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17384                 .klen   = 32,
17385                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17386                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17387                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
17388                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17389                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17390                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17391                 .ilen   = 32,
17392                 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
17393                           "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
17394                           "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
17395                           "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
17396                 .rlen   = 32,
17397         }, {
17398                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
17399                           "\x11\x11\x11\x11\x11\x11\x11\x11"
17400                           "\x22\x22\x22\x22\x22\x22\x22\x22"
17401                           "\x22\x22\x22\x22\x22\x22\x22\x22",
17402                 .klen   = 32,
17403                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
17404                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17405                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
17406                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17407                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17408                           "\x44\x44\x44\x44\x44\x44\x44\x44",
17409                 .ilen   = 32,
17410                 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
17411                           "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
17412                           "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
17413                           "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
17414                 .rlen   = 32,
17415         }, {
17416                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17417                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17418                           "\x22\x22\x22\x22\x22\x22\x22\x22"
17419                           "\x22\x22\x22\x22\x22\x22\x22\x22",
17420                 .klen   = 32,
17421                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
17422                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17423                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
17424                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17425                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17426                           "\x44\x44\x44\x44\x44\x44\x44\x44",
17427                 .ilen   = 32,
17428                 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
17429                           "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
17430                           "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
17431                           "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
17432                 .rlen   = 32,
17433         }, {
17434                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
17435                           "\x23\x53\x60\x28\x74\x71\x35\x26"
17436                           "\x31\x41\x59\x26\x53\x58\x97\x93"
17437                           "\x23\x84\x62\x64\x33\x83\x27\x95",
17438                 .klen   = 32,
17439                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17440                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17441                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
17442                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17443                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17444                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17445                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17446                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17447                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17448                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17449                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17450                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17451                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17452                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17453                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17454                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17455                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17456                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17457                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17458                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17459                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17460                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17461                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17462                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17463                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17464                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17465                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17466                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17467                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17468                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17469                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17470                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17471                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17472                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17473                           "\x00\x01\x02\x03\x04\x05\x06\x07"
17474                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17475                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17476                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17477                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17478                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17479                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17480                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17481                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17482                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17483                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17484                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17485                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17486                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17487                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17488                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17489                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17490                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17491                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17492                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17493                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17494                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17495                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17496                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17497                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17498                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17499                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17500                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17501                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17502                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17503                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17504                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17505                 .ilen   = 512,
17506                 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
17507                           "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
17508                           "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
17509                           "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
17510                           "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
17511                           "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
17512                           "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
17513                           "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
17514                           "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
17515                           "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
17516                           "\x08\xda\x76\x00\x65\xcf\x7b\x31"
17517                           "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
17518                           "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
17519                           "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
17520                           "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
17521                           "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
17522                           "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
17523                           "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
17524                           "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
17525                           "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
17526                           "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
17527                           "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
17528                           "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
17529                           "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
17530                           "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
17531                           "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
17532                           "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
17533                           "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
17534                           "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
17535                           "\x16\x31\xb2\x47\x91\x67\xaa\x28"
17536                           "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
17537                           "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
17538                           "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
17539                           "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
17540                           "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
17541                           "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
17542                           "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
17543                           "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
17544                           "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
17545                           "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
17546                           "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
17547                           "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
17548                           "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
17549                           "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
17550                           "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
17551                           "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
17552                           "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
17553                           "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
17554                           "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
17555                           "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
17556                           "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
17557                           "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
17558                           "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
17559                           "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
17560                           "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
17561                           "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
17562                           "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
17563                           "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
17564                           "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
17565                           "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
17566                           "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
17567                           "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
17568                           "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
17569                           "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
17570                 .rlen   = 512,
17571         }, {
17572                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
17573                           "\x23\x53\x60\x28\x74\x71\x35\x26"
17574                           "\x62\x49\x77\x57\x24\x70\x93\x69"
17575                           "\x99\x59\x57\x49\x66\x96\x76\x27"
17576                           "\x31\x41\x59\x26\x53\x58\x97\x93"
17577                           "\x23\x84\x62\x64\x33\x83\x27\x95"
17578                           "\x02\x88\x41\x97\x16\x93\x99\x37"
17579                           "\x51\x05\x82\x09\x74\x94\x45\x92",
17580                 .klen   = 64,
17581                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
17582                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17583                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
17584                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17585                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17586                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17587                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17588                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17589                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17590                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17591                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17592                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17593                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17594                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17595                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17596                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17597                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17598                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17599                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17600                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17601                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17602                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17603                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17604                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17605                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17606                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17607                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17608                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17609                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17610                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17611                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17612                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17613                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17614                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17615                           "\x00\x01\x02\x03\x04\x05\x06\x07"
17616                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17617                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17618                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17619                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17620                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17621                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17622                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17623                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17624                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17625                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17626                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17627                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17628                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17629                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17630                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17631                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17632                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17633                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17634                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17635                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17636                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17637                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17638                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17639                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17640                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17641                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17642                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17643                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17644                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17645                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17646                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17647                 .ilen   = 512,
17648                 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
17649                           "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
17650                           "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
17651                           "\xf1\x74\xac\x96\x05\x7b\x32\xca"
17652                           "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
17653                           "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
17654                           "\x97\x07\x82\xf0\x07\x12\x38\x0a"
17655                           "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
17656                           "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
17657                           "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
17658                           "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
17659                           "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
17660                           "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
17661                           "\x41\x82\x0c\x45\x39\x35\xa8\x75"
17662                           "\x03\x29\x01\x84\x8c\xab\x48\xbe"
17663                           "\x11\x56\x22\x67\xb7\x67\x1a\x09"
17664                           "\xa1\x72\x25\x41\x3c\x39\x65\x80"
17665                           "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
17666                           "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
17667                           "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
17668                           "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
17669                           "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
17670                           "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
17671                           "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
17672                           "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
17673                           "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
17674                           "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
17675                           "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
17676                           "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
17677                           "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
17678                           "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
17679                           "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
17680                           "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
17681                           "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
17682                           "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
17683                           "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
17684                           "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
17685                           "\xef\x38\x52\x18\x0e\x29\x7e\xef"
17686                           "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
17687                           "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
17688                           "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
17689                           "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
17690                           "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
17691                           "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
17692                           "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
17693                           "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
17694                           "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
17695                           "\x21\x17\xf8\x59\x15\x24\x64\x22"
17696                           "\x57\x48\x80\xd5\x3d\x92\x30\x07"
17697                           "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
17698                           "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
17699                           "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
17700                           "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
17701                           "\x6b\x84\xf3\x00\xba\x52\x05\x02"
17702                           "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
17703                           "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
17704                           "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
17705                           "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
17706                           "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
17707                           "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
17708                           "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
17709                           "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
17710                           "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
17711                           "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
17712                 .rlen   = 512,
17713                 .also_non_np = 1,
17714                 .np     = 2,
17715                 .tap    = { 512 - 16, 16 },
17716         },
17717 };
17718
17719 static struct cipher_testvec camellia_xts_dec_tv_template[] = {
17720         /* Generated from AES-XTS test vectors */
17721         /* same as enc vectors with input and result reversed */
17722         {
17723                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
17724                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17725                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17726                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17727                 .klen   = 32,
17728                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17729                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17730                 .input  = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
17731                           "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
17732                           "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
17733                           "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
17734                 .ilen   = 32,
17735                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
17736                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17737                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17738                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17739                 .rlen   = 32,
17740         }, {
17741                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
17742                           "\x11\x11\x11\x11\x11\x11\x11\x11"
17743                           "\x22\x22\x22\x22\x22\x22\x22\x22"
17744                           "\x22\x22\x22\x22\x22\x22\x22\x22",
17745                 .klen   = 32,
17746                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
17747                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17748                 .input  = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
17749                           "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
17750                           "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
17751                           "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
17752                 .ilen   = 32,
17753                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17754                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17755                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17756                           "\x44\x44\x44\x44\x44\x44\x44\x44",
17757                 .rlen   = 32,
17758         }, {
17759                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17760                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17761                           "\x22\x22\x22\x22\x22\x22\x22\x22"
17762                           "\x22\x22\x22\x22\x22\x22\x22\x22",
17763                 .klen   = 32,
17764                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
17765                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17766                 .input  = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
17767                           "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
17768                           "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
17769                           "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
17770                 .ilen   = 32,
17771                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17772                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17773                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17774                           "\x44\x44\x44\x44\x44\x44\x44\x44",
17775                 .rlen   = 32,
17776         }, {
17777                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
17778                           "\x23\x53\x60\x28\x74\x71\x35\x26"
17779                           "\x31\x41\x59\x26\x53\x58\x97\x93"
17780                           "\x23\x84\x62\x64\x33\x83\x27\x95",
17781                 .klen   = 32,
17782                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17783                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17784                 .input  = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
17785                           "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
17786                           "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
17787                           "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
17788                           "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
17789                           "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
17790                           "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
17791                           "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
17792                           "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
17793                           "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
17794                           "\x08\xda\x76\x00\x65\xcf\x7b\x31"
17795                           "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
17796                           "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
17797                           "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
17798                           "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
17799                           "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
17800                           "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
17801                           "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
17802                           "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
17803                           "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
17804                           "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
17805                           "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
17806                           "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
17807                           "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
17808                           "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
17809                           "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
17810                           "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
17811                           "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
17812                           "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
17813                           "\x16\x31\xb2\x47\x91\x67\xaa\x28"
17814                           "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
17815                           "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
17816                           "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
17817                           "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
17818                           "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
17819                           "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
17820                           "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
17821                           "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
17822                           "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
17823                           "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
17824                           "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
17825                           "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
17826                           "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
17827                           "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
17828                           "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
17829                           "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
17830                           "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
17831                           "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
17832                           "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
17833                           "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
17834                           "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
17835                           "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
17836                           "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
17837                           "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
17838                           "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
17839                           "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
17840                           "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
17841                           "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
17842                           "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
17843                           "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
17844                           "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
17845                           "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
17846                           "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
17847                           "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
17848                 .ilen   = 512,
17849                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17850                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17851                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17852                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17853                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17854                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17855                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17856                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17857                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17858                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17859                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17860                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17861                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17862                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17863                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17864                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17865                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17866                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17867                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17868                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17869                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17870                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17871                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17872                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17873                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17874                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17875                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17876                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17877                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17878                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17879                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17880                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17881                           "\x00\x01\x02\x03\x04\x05\x06\x07"
17882                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17883                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17884                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17885                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17886                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17887                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17888                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17889                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17890                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17891                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17892                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17893                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17894                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17895                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17896                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17897                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17898                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17899                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17900                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17901                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17902                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17903                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17904                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17905                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17906                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17907                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17908                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17909                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17910                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17911                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17912                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17913                 .rlen   = 512,
17914         }, {
17915                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
17916                           "\x23\x53\x60\x28\x74\x71\x35\x26"
17917                           "\x62\x49\x77\x57\x24\x70\x93\x69"
17918                           "\x99\x59\x57\x49\x66\x96\x76\x27"
17919                           "\x31\x41\x59\x26\x53\x58\x97\x93"
17920                           "\x23\x84\x62\x64\x33\x83\x27\x95"
17921                           "\x02\x88\x41\x97\x16\x93\x99\x37"
17922                           "\x51\x05\x82\x09\x74\x94\x45\x92",
17923                 .klen   = 64,
17924                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
17925                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17926                 .input  = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
17927                           "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
17928                           "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
17929                           "\xf1\x74\xac\x96\x05\x7b\x32\xca"
17930                           "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
17931                           "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
17932                           "\x97\x07\x82\xf0\x07\x12\x38\x0a"
17933                           "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
17934                           "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
17935                           "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
17936                           "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
17937                           "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
17938                           "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
17939                           "\x41\x82\x0c\x45\x39\x35\xa8\x75"
17940                           "\x03\x29\x01\x84\x8c\xab\x48\xbe"
17941                           "\x11\x56\x22\x67\xb7\x67\x1a\x09"
17942                           "\xa1\x72\x25\x41\x3c\x39\x65\x80"
17943                           "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
17944                           "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
17945                           "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
17946                           "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
17947                           "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
17948                           "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
17949                           "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
17950                           "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
17951                           "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
17952                           "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
17953                           "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
17954                           "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
17955                           "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
17956                           "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
17957                           "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
17958                           "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
17959                           "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
17960                           "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
17961                           "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
17962                           "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
17963                           "\xef\x38\x52\x18\x0e\x29\x7e\xef"
17964                           "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
17965                           "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
17966                           "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
17967                           "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
17968                           "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
17969                           "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
17970                           "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
17971                           "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
17972                           "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
17973                           "\x21\x17\xf8\x59\x15\x24\x64\x22"
17974                           "\x57\x48\x80\xd5\x3d\x92\x30\x07"
17975                           "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
17976                           "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
17977                           "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
17978                           "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
17979                           "\x6b\x84\xf3\x00\xba\x52\x05\x02"
17980                           "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
17981                           "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
17982                           "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
17983                           "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
17984                           "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
17985                           "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
17986                           "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
17987                           "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
17988                           "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
17989                           "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
17990                 .ilen   = 512,
17991                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17992                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17993                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17994                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17995                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17996                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17997                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17998                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17999                           "\x40\x41\x42\x43\x44\x45\x46\x47"
18000                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18001                           "\x50\x51\x52\x53\x54\x55\x56\x57"
18002                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18003                           "\x60\x61\x62\x63\x64\x65\x66\x67"
18004                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18005                           "\x70\x71\x72\x73\x74\x75\x76\x77"
18006                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18007                           "\x80\x81\x82\x83\x84\x85\x86\x87"
18008                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18009                           "\x90\x91\x92\x93\x94\x95\x96\x97"
18010                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18011                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18012                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18013                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18014                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18015                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18016                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18017                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18018                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18019                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18020                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18021                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18022                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18023                           "\x00\x01\x02\x03\x04\x05\x06\x07"
18024                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18025                           "\x10\x11\x12\x13\x14\x15\x16\x17"
18026                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18027                           "\x20\x21\x22\x23\x24\x25\x26\x27"
18028                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18029                           "\x30\x31\x32\x33\x34\x35\x36\x37"
18030                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18031                           "\x40\x41\x42\x43\x44\x45\x46\x47"
18032                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18033                           "\x50\x51\x52\x53\x54\x55\x56\x57"
18034                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18035                           "\x60\x61\x62\x63\x64\x65\x66\x67"
18036                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18037                           "\x70\x71\x72\x73\x74\x75\x76\x77"
18038                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18039                           "\x80\x81\x82\x83\x84\x85\x86\x87"
18040                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18041                           "\x90\x91\x92\x93\x94\x95\x96\x97"
18042                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18043                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18044                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18045                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18046                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18047                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18048                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18049                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18050                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18051                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18052                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18053                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18054                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18055                 .rlen   = 512,
18056                 .also_non_np = 1,
18057                 .np     = 2,
18058                 .tap    = { 512 - 16, 16 },
18059         },
18060 };
18061
18062 /*
18063  * SEED test vectors
18064  */
18065 #define SEED_ENC_TEST_VECTORS   4
18066 #define SEED_DEC_TEST_VECTORS   4
18067
18068 static struct cipher_testvec seed_enc_tv_template[] = {
18069         {
18070                 .key    = zeroed_string,
18071                 .klen   = 16,
18072                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
18073                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
18074                 .ilen   = 16,
18075                 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
18076                           "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
18077                 .rlen   = 16,
18078         }, {
18079                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
18080                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
18081                 .klen   = 16,
18082                 .input  = zeroed_string,
18083                 .ilen   = 16,
18084                 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
18085                           "\x84\x48\x35\x97\xe4\x37\x0f\x43",
18086                 .rlen   = 16,
18087         }, {
18088                 .key    = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
18089                           "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
18090                 .klen   = 16,
18091                 .input  = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
18092                           "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
18093                 .ilen   = 16,
18094                 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
18095                           "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
18096                 .rlen   = 16,
18097         }, {
18098                 .key    = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
18099                           "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
18100                 .klen   = 16,
18101                 .input  = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
18102                           "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
18103                 .ilen   = 16,
18104                 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
18105                           "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
18106                 .rlen   = 16,
18107         }
18108 };
18109
18110 static struct cipher_testvec seed_dec_tv_template[] = {
18111         {
18112                 .key    = zeroed_string,
18113                 .klen   = 16,
18114                 .input  = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
18115                           "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
18116                 .ilen   = 16,
18117                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
18118                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
18119                 .rlen   = 16,
18120         }, {
18121                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
18122                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
18123                 .klen   = 16,
18124                 .input  = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
18125                           "\x84\x48\x35\x97\xe4\x37\x0f\x43",
18126                 .ilen   = 16,
18127                 .result = zeroed_string,
18128                 .rlen   = 16,
18129         }, {
18130                 .key    = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
18131                           "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
18132                 .klen   = 16,
18133                 .input  = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
18134                           "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
18135                 .ilen   = 16,
18136                 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
18137                           "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
18138                 .rlen   = 16,
18139         }, {
18140                 .key    = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
18141                           "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
18142                 .klen   = 16,
18143                 .input  = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
18144                           "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
18145                 .ilen   = 16,
18146                 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
18147                           "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
18148                 .rlen   = 16,
18149         }
18150 };
18151
18152 #define SALSA20_STREAM_ENC_TEST_VECTORS 5
18153 static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
18154         /*
18155         * Testvectors from verified.test-vectors submitted to ECRYPT.
18156         * They are truncated to size 39, 64, 111, 129 to test a variety
18157         * of input length.
18158         */
18159         { /* Set 3, vector 0 */
18160                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
18161                         "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
18162                 .klen   = 16,
18163                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
18164                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
18165                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18166                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18167                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18168                         "\x00\x00\x00\x00\x00\x00\x00",
18169                 .ilen   = 39,
18170                 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
18171                          "\x68\x02\x41\x0C\x68\x86\x88\x89"
18172                          "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
18173                          "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
18174                          "\x58\x3F\x52\x79\x70\xEB\xC1",
18175                 .rlen   = 39,
18176         }, { /* Set 5, vector 0 */
18177                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
18178                         "\x00\x00\x00\x00\x00\x00\x00\x00",
18179                 .klen   = 16,
18180                 .iv     = "\x80\x00\x00\x00\x00\x00\x00\x00",
18181                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
18182                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18183                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18184                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18185                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18186                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18187                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18188                         "\x00\x00\x00\x00\x00\x00\x00\x00",
18189                 .ilen   = 64,
18190                 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
18191                          "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
18192                          "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
18193                          "\x46\x26\xBF\x44\x3F\x21\x97\x76"
18194                          "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
18195                          "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
18196                          "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
18197                          "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
18198                 .rlen   = 64,
18199         }, { /* Set 3, vector 27 */
18200                 .key    = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
18201                         "\x23\x24\x25\x26\x27\x28\x29\x2A"
18202                         "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
18203                         "\x33\x34\x35\x36\x37\x38\x39\x3A",
18204                 .klen   = 32,
18205                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
18206                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
18207                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18208                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18209                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18210                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18211                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18212                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18213                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18214                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18215                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18216                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18217                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18218                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18219                         "\x00\x00\x00\x00\x00\x00\x00",
18220                 .ilen   = 111,
18221                 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
18222                          "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
18223                          "\x87\xD9\x47\xF8\x28\x91\x35\x98"
18224                          "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
18225                          "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
18226                          "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
18227                          "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
18228                          "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
18229                          "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
18230                          "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
18231                          "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
18232                          "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
18233                          "\x95\x46\x45\x54\xE9\x75\x03\x08"
18234                          "\x44\xAF\xE5\x8A\x81\x12\x09",
18235                 .rlen   = 111,
18236         }, { /* Set 5, vector 27 */
18237                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
18238                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18239                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18240                         "\x00\x00\x00\x00\x00\x00\x00\x00",
18241                 .klen   = 32,
18242                 .iv     = "\x00\x00\x00\x10\x00\x00\x00\x00",
18243                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
18244                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18245                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18246                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18247                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18248                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18249                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18250                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18251                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18252                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18253                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18254                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18255                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18256                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18257                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18258                         "\x00\x00\x00\x00\x00\x00\x00\x00"
18259                         "\x00",
18260                 .ilen   = 129,
18261                 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
18262                          "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
18263                          "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
18264                          "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
18265                          "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
18266                          "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
18267                          "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
18268                          "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
18269                          "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
18270                          "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
18271                          "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
18272                          "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
18273                          "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
18274                          "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
18275                          "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
18276                          "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
18277                          "\x5A",
18278                 .rlen   = 129,
18279         }, { /* large test vector generated using Crypto++ */
18280                 .key =  "\x00\x01\x02\x03\x04\x05\x06\x07"
18281                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18282                         "\x10\x11\x12\x13\x14\x15\x16\x17"
18283                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18284                 .klen = 32,
18285                 .iv =   "\x00\x00\x00\x00\x00\x00\x00\x00"
18286                         "\x00\x00\x00\x00\x00\x00\x00\x00",
18287                 .input =
18288                         "\x00\x01\x02\x03\x04\x05\x06\x07"
18289                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18290                         "\x10\x11\x12\x13\x14\x15\x16\x17"
18291                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18292                         "\x20\x21\x22\x23\x24\x25\x26\x27"
18293                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18294                         "\x30\x31\x32\x33\x34\x35\x36\x37"
18295                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18296                         "\x40\x41\x42\x43\x44\x45\x46\x47"
18297                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18298                         "\x50\x51\x52\x53\x54\x55\x56\x57"
18299                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18300                         "\x60\x61\x62\x63\x64\x65\x66\x67"
18301                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18302                         "\x70\x71\x72\x73\x74\x75\x76\x77"
18303                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18304                         "\x80\x81\x82\x83\x84\x85\x86\x87"
18305                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18306                         "\x90\x91\x92\x93\x94\x95\x96\x97"
18307                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18308                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18309                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18310                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18311                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18312                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18313                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18314                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18315                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18316                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18317                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18318                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18319                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18320                         "\x00\x03\x06\x09\x0c\x0f\x12\x15"
18321                         "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
18322                         "\x30\x33\x36\x39\x3c\x3f\x42\x45"
18323                         "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
18324                         "\x60\x63\x66\x69\x6c\x6f\x72\x75"
18325                         "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
18326                         "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
18327                         "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
18328                         "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
18329                         "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
18330                         "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
18331                         "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
18332                         "\x20\x23\x26\x29\x2c\x2f\x32\x35"
18333                         "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
18334                         "\x50\x53\x56\x59\x5c\x5f\x62\x65"
18335                         "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
18336                         "\x80\x83\x86\x89\x8c\x8f\x92\x95"
18337                         "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
18338                         "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
18339                         "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
18340                         "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
18341                         "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
18342                         "\x10\x13\x16\x19\x1c\x1f\x22\x25"
18343                         "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
18344                         "\x40\x43\x46\x49\x4c\x4f\x52\x55"
18345                         "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
18346                         "\x70\x73\x76\x79\x7c\x7f\x82\x85"
18347                         "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
18348                         "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
18349                         "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
18350                         "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
18351                         "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
18352                         "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
18353                         "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
18354                         "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
18355                         "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
18356                         "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
18357                         "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
18358                         "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
18359                         "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
18360                         "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
18361                         "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
18362                         "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
18363                         "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
18364                         "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
18365                         "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
18366                         "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
18367                         "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
18368                         "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
18369                         "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
18370                         "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
18371                         "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
18372                         "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
18373                         "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
18374                         "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
18375                         "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
18376                         "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
18377                         "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
18378                         "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
18379                         "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
18380                         "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
18381                         "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
18382                         "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
18383                         "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
18384                         "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
18385                         "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
18386                         "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
18387                         "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
18388                         "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
18389                         "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
18390                         "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
18391                         "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
18392                         "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
18393                         "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
18394                         "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
18395                         "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
18396                         "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
18397                         "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
18398                         "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
18399                         "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
18400                         "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
18401                         "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
18402                         "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
18403                         "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
18404                         "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
18405                         "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
18406                         "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
18407                         "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
18408                         "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
18409                         "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
18410                         "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
18411                         "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
18412                         "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
18413                         "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
18414                         "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
18415                         "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
18416                         "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
18417                         "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
18418                         "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
18419                         "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
18420                         "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
18421                         "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
18422                         "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
18423                         "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
18424                         "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
18425                         "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
18426                         "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
18427                         "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
18428                         "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
18429                         "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
18430                         "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
18431                         "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
18432                         "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
18433                         "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
18434                         "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
18435                         "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
18436                         "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
18437                         "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
18438                         "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
18439                         "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
18440                         "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
18441                         "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
18442                         "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
18443                         "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
18444                         "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
18445                         "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
18446                         "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
18447                         "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
18448                         "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
18449                         "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
18450                         "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
18451                         "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
18452                         "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
18453                         "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
18454                         "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
18455                         "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
18456                         "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
18457                         "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
18458                         "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
18459                         "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
18460                         "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
18461                         "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
18462                         "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
18463                         "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
18464                         "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
18465                         "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
18466                         "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
18467                         "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
18468                         "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
18469                         "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
18470                         "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
18471                         "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
18472                         "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
18473                         "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
18474                         "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
18475                         "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
18476                         "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
18477                         "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
18478                         "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
18479                         "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
18480                         "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
18481                         "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
18482                         "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
18483                         "\x38\x45\x52\x5f\x6c\x79\x86\x93"
18484                         "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
18485                         "\x08\x15\x22\x2f\x3c\x49\x56\x63"
18486                         "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
18487                         "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
18488                         "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
18489                         "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
18490                         "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
18491                         "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
18492                         "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
18493                         "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
18494                         "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
18495                         "\x18\x25\x32\x3f\x4c\x59\x66\x73"
18496                         "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
18497                         "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
18498                         "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
18499                         "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
18500                         "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
18501                         "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
18502                         "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
18503                         "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
18504                         "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
18505                         "\x28\x35\x42\x4f\x5c\x69\x76\x83"
18506                         "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
18507                         "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
18508                         "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
18509                         "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
18510                         "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
18511                         "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
18512                         "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
18513                         "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
18514                         "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
18515                         "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
18516                         "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
18517                         "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
18518                         "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
18519                         "\x48\x57\x66\x75\x84\x93\xa2\xb1"
18520                         "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
18521                         "\x38\x47\x56\x65\x74\x83\x92\xa1"
18522                         "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
18523                         "\x28\x37\x46\x55\x64\x73\x82\x91"
18524                         "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
18525                         "\x18\x27\x36\x45\x54\x63\x72\x81"
18526                         "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
18527                         "\x08\x17\x26\x35\x44\x53\x62\x71"
18528                         "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
18529                         "\xf8\x07\x16\x25\x34\x43\x52\x61"
18530                         "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
18531                         "\xe8\xf7\x06\x15\x24\x33\x42\x51"
18532                         "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
18533                         "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
18534                         "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
18535                         "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
18536                         "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
18537                         "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
18538                         "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
18539                         "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
18540                         "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
18541                         "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
18542                         "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
18543                         "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
18544                         "\x00\x11\x22\x33\x44\x55\x66\x77"
18545                         "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
18546                         "\x10\x21\x32\x43\x54\x65\x76\x87"
18547                         "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
18548                         "\x20\x31\x42\x53\x64\x75\x86\x97"
18549                         "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
18550                         "\x30\x41\x52\x63\x74\x85\x96\xa7"
18551                         "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
18552                         "\x40\x51\x62\x73\x84\x95\xa6\xb7"
18553                         "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
18554                         "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
18555                         "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
18556                         "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
18557                         "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
18558                         "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
18559                         "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
18560                         "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
18561                         "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
18562                         "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
18563                         "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
18564                         "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
18565                         "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
18566                         "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
18567                         "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
18568                         "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
18569                         "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
18570                         "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
18571                         "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
18572                         "\xe0\xf1\x02\x13\x24\x35\x46\x57"
18573                         "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
18574                         "\xf0\x01\x12\x23\x34\x45\x56\x67"
18575                         "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
18576                         "\x00\x13\x26\x39\x4c\x5f\x72\x85"
18577                         "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
18578                         "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
18579                         "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
18580                         "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
18581                         "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
18582                         "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
18583                         "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
18584                         "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
18585                         "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
18586                         "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
18587                         "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
18588                         "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
18589                         "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
18590                         "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
18591                         "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
18592                         "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
18593                         "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
18594                         "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
18595                         "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
18596                         "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
18597                         "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
18598                         "\x10\x23\x36\x49\x5c\x6f\x82\x95"
18599                         "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
18600                         "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
18601                         "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
18602                         "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
18603                         "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
18604                         "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
18605                         "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
18606                         "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
18607                         "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
18608                         "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
18609                         "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
18610                         "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
18611                         "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
18612                         "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
18613                         "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
18614                         "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
18615                         "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
18616                         "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
18617                         "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
18618                         "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
18619                         "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
18620                         "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
18621                         "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
18622                         "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
18623                         "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
18624                         "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
18625                         "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
18626                         "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
18627                         "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
18628                         "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
18629                         "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
18630                         "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
18631                         "\x18\x2d\x42\x57\x6c\x81\x96\xab"
18632                         "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
18633                         "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
18634                         "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
18635                         "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
18636                         "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
18637                         "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
18638                         "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
18639                         "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
18640                         "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
18641                         "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
18642                         "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
18643                         "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
18644                         "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
18645                         "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
18646                         "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
18647                         "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
18648                         "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
18649                         "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
18650                         "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
18651                         "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
18652                         "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
18653                         "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
18654                         "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
18655                         "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
18656                         "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
18657                         "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
18658                         "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
18659                         "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
18660                         "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
18661                         "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
18662                         "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
18663                         "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
18664                         "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
18665                         "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
18666                         "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
18667                         "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
18668                         "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
18669                         "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
18670                         "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
18671                         "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
18672                         "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
18673                         "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
18674                         "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
18675                         "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
18676                         "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
18677                         "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
18678                         "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
18679                         "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
18680                         "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
18681                         "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
18682                         "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
18683                         "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
18684                         "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
18685                         "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
18686                         "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
18687                         "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
18688                         "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
18689                         "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
18690                         "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
18691                         "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
18692                         "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
18693                         "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
18694                         "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
18695                         "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
18696                         "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
18697                         "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
18698                         "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
18699                         "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
18700                         "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
18701                         "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
18702                         "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
18703                         "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
18704                         "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
18705                         "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
18706                         "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
18707                         "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
18708                         "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
18709                         "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
18710                         "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
18711                         "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
18712                         "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
18713                         "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
18714                         "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
18715                         "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
18716                         "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
18717                         "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
18718                         "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
18719                         "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
18720                         "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
18721                         "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
18722                         "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
18723                         "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
18724                         "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
18725                         "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
18726                         "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
18727                         "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
18728                         "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
18729                         "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
18730                         "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
18731                         "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
18732                         "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
18733                         "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
18734                         "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
18735                         "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
18736                         "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
18737                         "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
18738                         "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
18739                         "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
18740                         "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
18741                         "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
18742                         "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
18743                         "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
18744                         "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
18745                         "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
18746                         "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
18747                         "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
18748                         "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
18749                         "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
18750                         "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
18751                         "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
18752                         "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
18753                         "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
18754                         "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
18755                         "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
18756                         "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
18757                         "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
18758                         "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
18759                         "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
18760                         "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
18761                         "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
18762                         "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
18763                         "\x78\x95\xb2\xcf\xec\x09\x26\x43"
18764                         "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
18765                         "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
18766                         "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
18767                         "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
18768                         "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
18769                         "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
18770                         "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
18771                         "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
18772                         "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
18773                         "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
18774                         "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
18775                         "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
18776                         "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
18777                         "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
18778                         "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
18779                         "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
18780                         "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
18781                         "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
18782                         "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
18783                         "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
18784                         "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
18785                         "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
18786                         "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
18787                         "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
18788                         "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
18789                         "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
18790                         "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
18791                         "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
18792                         "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
18793                         "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
18794                         "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
18795                         "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
18796                         "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
18797                         "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
18798                         "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
18799                         "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
18800                         "\x00\x21\x42\x63",
18801                 .ilen = 4100,
18802                 .result =
18803                         "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
18804                         "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
18805                         "\x29\x01\xce\x98\x55\x53\xf9\x0c"
18806                         "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
18807                         "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
18808                         "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
18809                         "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
18810                         "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
18811                         "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
18812                         "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
18813                         "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
18814                         "\xbb\xde\x56\x86\xab\x65\x21\x30"
18815                         "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
18816                         "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
18817                         "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
18818                         "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
18819                         "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
18820                         "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
18821                         "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
18822                         "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
18823                         "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
18824                         "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
18825                         "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
18826                         "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
18827                         "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
18828                         "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
18829                         "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
18830                         "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
18831                         "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
18832                         "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
18833                         "\x45\xff\x3f\xce\x55\xf6\x95\x10"
18834                         "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
18835                         "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
18836                         "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
18837                         "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
18838                         "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
18839                         "\x62\x08\x18\x7a\x25\x49\x28\xac"
18840                         "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
18841                         "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
18842                         "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
18843                         "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
18844                         "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
18845                         "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
18846                         "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
18847                         "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
18848                         "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
18849                         "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
18850                         "\x33\xee\x14\x19\x22\x52\x89\xa7"
18851                         "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
18852                         "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
18853                         "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
18854                         "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
18855                         "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
18856                         "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
18857                         "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
18858                         "\x04\x07\x08\x52\xe6\xc0\xda\x93"
18859                         "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
18860                         "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
18861                         "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
18862                         "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
18863                         "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
18864                         "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
18865                         "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
18866                         "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
18867                         "\x5a\x90\xae\x75\x0a\x74\x18\x89"
18868                         "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
18869                         "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
18870                         "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
18871                         "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
18872                         "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
18873                         "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
18874                         "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
18875                         "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
18876                         "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
18877                         "\x49\x97\x33\xab\x36\x14\x0a\x70"
18878                         "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
18879                         "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
18880                         "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
18881                         "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
18882                         "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
18883                         "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
18884                         "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
18885                         "\x47\x13\x28\x73\x3c\xbb\x00\x90"
18886                         "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
18887                         "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
18888                         "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
18889                         "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
18890                         "\xad\x04\x07\xae\x22\x90\x4a\x93"
18891                         "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
18892                         "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
18893                         "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
18894                         "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
18895                         "\x53\xf9\x80\x10\xde\x80\xa2\x41"
18896                         "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
18897                         "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
18898                         "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
18899                         "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
18900                         "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
18901                         "\xde\xff\x07\x44\xdd\x56\x1b\xad"
18902                         "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
18903                         "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
18904                         "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
18905                         "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
18906                         "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
18907                         "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
18908                         "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
18909                         "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
18910                         "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
18911                         "\x23\xf8\x66\x18\x14\x28\x34\x0f"
18912                         "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
18913                         "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
18914                         "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
18915                         "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
18916                         "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
18917                         "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
18918                         "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
18919                         "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
18920                         "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
18921                         "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
18922                         "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
18923                         "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
18924                         "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
18925                         "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
18926                         "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
18927                         "\xca\x8e\x61\x87\xde\xad\x80\xd2"
18928                         "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
18929                         "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
18930                         "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
18931                         "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
18932                         "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
18933                         "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
18934                         "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
18935                         "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
18936                         "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
18937                         "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
18938                         "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
18939                         "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
18940                         "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
18941                         "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
18942                         "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
18943                         "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
18944                         "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
18945                         "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
18946                         "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
18947                         "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
18948                         "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
18949                         "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
18950                         "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
18951                         "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
18952                         "\x54\xda\x24\x6a\xc4\x41\x65\x46"
18953                         "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
18954                         "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
18955                         "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
18956                         "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
18957                         "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
18958                         "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
18959                         "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
18960                         "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
18961                         "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
18962                         "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
18963                         "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
18964                         "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
18965                         "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
18966                         "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
18967                         "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
18968                         "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
18969                         "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
18970                         "\xef\xcc\xa7\xec\xab\x43\x09\x18"
18971                         "\xd3\xab\x68\xd1\x07\x99\x44\x47"
18972                         "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
18973                         "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
18974                         "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
18975                         "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
18976                         "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
18977                         "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
18978                         "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
18979                         "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
18980                         "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
18981                         "\x71\x6e\x9f\x58\x15\x67\x72\x87"
18982                         "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
18983                         "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
18984                         "\xba\x41\x54\xac\xf0\xfc\x59\x12"
18985                         "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
18986                         "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
18987                         "\x2e\x53\x49\x97\x94\x33\xae\x40"
18988                         "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
18989                         "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
18990                         "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
18991                         "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
18992                         "\xce\x87\xad\xcc\x72\x05\x00\x29"
18993                         "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
18994                         "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
18995                         "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
18996                         "\xac\xc0\x79\x50\x69\xca\x59\x32"
18997                         "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
18998                         "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
18999                         "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
19000                         "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
19001                         "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
19002                         "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
19003                         "\x05\x68\x6b\xab\xe3\x41\x49\xed"
19004                         "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
19005                         "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
19006                         "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
19007                         "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
19008                         "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
19009                         "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
19010                         "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
19011                         "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
19012                         "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
19013                         "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
19014                         "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
19015                         "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
19016                         "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
19017                         "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
19018                         "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
19019                         "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
19020                         "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
19021                         "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
19022                         "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
19023                         "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
19024                         "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
19025                         "\x85\x75\xe6\x43\xf6\x87\x08\x68"
19026                         "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
19027                         "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
19028                         "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
19029                         "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
19030                         "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
19031                         "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
19032                         "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
19033                         "\xaf\x55\xeb\x22\xac\x93\x68\x32"
19034                         "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
19035                         "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
19036                         "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
19037                         "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
19038                         "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
19039                         "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
19040                         "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
19041                         "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
19042                         "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
19043                         "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
19044                         "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
19045                         "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
19046                         "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
19047                         "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
19048                         "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
19049                         "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
19050                         "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
19051                         "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
19052                         "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
19053                         "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
19054                         "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
19055                         "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
19056                         "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
19057                         "\x38\x55\xab\x33\x26\xef\x9f\x43"
19058                         "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
19059                         "\x58\x09\x09\x1b\xc3\x65\x46\x46"
19060                         "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
19061                         "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
19062                         "\x63\x86\xf2\x03\x67\x45\xd2\x72"
19063                         "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
19064                         "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
19065                         "\x2b\x82\x39\xbd\x69\x54\xed\x62"
19066                         "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
19067                         "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
19068                         "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
19069                         "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
19070                         "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
19071                         "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
19072                         "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
19073                         "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
19074                         "\x55\xad\xa4\xd1\x22\x54\x70\x94"
19075                         "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
19076                         "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
19077                         "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
19078                         "\x62\x36\x43\xb2\x82\x15\x75\x50"
19079                         "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
19080                         "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
19081                         "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
19082                         "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
19083                         "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
19084                         "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
19085                         "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
19086                         "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
19087                         "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
19088                         "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
19089                         "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
19090                         "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
19091                         "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
19092                         "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
19093                         "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
19094                         "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
19095                         "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
19096                         "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
19097                         "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
19098                         "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
19099                         "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
19100                         "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
19101                         "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
19102                         "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
19103                         "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
19104                         "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
19105                         "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
19106                         "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
19107                         "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
19108                         "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
19109                         "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
19110                         "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
19111                         "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
19112                         "\x42\x19\x23\x7d\xc8\x73\xee\x25"
19113                         "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
19114                         "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
19115                         "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
19116                         "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
19117                         "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
19118                         "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
19119                         "\xdb\x87\xee\xef\x55\x89\x2a\x59"
19120                         "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
19121                         "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
19122                         "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
19123                         "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
19124                         "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
19125                         "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
19126                         "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
19127                         "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
19128                         "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
19129                         "\xae\xab\x86\x09\x89\xc9\xc2\x40"
19130                         "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
19131                         "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
19132                         "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
19133                         "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
19134                         "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
19135                         "\x95\xd9\x34\x34\x86\xc6\x41\x94"
19136                         "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
19137                         "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
19138                         "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
19139                         "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
19140                         "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
19141                         "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
19142                         "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
19143                         "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
19144                         "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
19145                         "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
19146                         "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
19147                         "\xa7\x33\x34\x86\xca\xe4\x96\x23"
19148                         "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
19149                         "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
19150                         "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
19151                         "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
19152                         "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
19153                         "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
19154                         "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
19155                         "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
19156                         "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
19157                         "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
19158                         "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
19159                         "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
19160                         "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
19161                         "\x68\xc8\x7f\x51\x22\x42\xef\x49"
19162                         "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
19163                         "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
19164                         "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
19165                         "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
19166                         "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
19167                         "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
19168                         "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
19169                         "\x73\x2e\x71\x79\x16\x06\x63\x28"
19170                         "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
19171                         "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
19172                         "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
19173                         "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
19174                         "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
19175                         "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
19176                         "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
19177                         "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
19178                         "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
19179                         "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
19180                         "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
19181                         "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
19182                         "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
19183                         "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
19184                         "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
19185                         "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
19186                         "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
19187                         "\x19\x07\xaf\x90\x62\x5c\x68\x98"
19188                         "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
19189                         "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
19190                         "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
19191                         "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
19192                         "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
19193                         "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
19194                         "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
19195                         "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
19196                         "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
19197                         "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
19198                         "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
19199                         "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
19200                         "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
19201                         "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
19202                         "\x21\x33\x44\xfe\x7f\x35\x32\x93"
19203                         "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
19204                         "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
19205                         "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
19206                         "\x64\xf0\x48\xe5\x57\x99\xee\x75"
19207                         "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
19208                         "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
19209                         "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
19210                         "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
19211                         "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
19212                         "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
19213                         "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
19214                         "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
19215                         "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
19216                         "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
19217                         "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
19218                         "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
19219                         "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
19220                         "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
19221                         "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
19222                         "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
19223                         "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
19224                         "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
19225                         "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
19226                         "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
19227                         "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
19228                         "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
19229                         "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
19230                         "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
19231                         "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
19232                         "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
19233                         "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
19234                         "\x56\xf5\x4e\x01\x35\x27\x45\x77"
19235                         "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
19236                         "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
19237                         "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
19238                         "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
19239                         "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
19240                         "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
19241                         "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
19242                         "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
19243                         "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
19244                         "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
19245                         "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
19246                         "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
19247                         "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
19248                         "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
19249                         "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
19250                         "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
19251                         "\x87\x8f\x03\x21\x28\x95\x0c\x89"
19252                         "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
19253                         "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
19254                         "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
19255                         "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
19256                         "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
19257                         "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
19258                         "\x85\x73\x78\x45\x20\x7f\xae\x13"
19259                         "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
19260                         "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
19261                         "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
19262                         "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
19263                         "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
19264                         "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
19265                         "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
19266                         "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
19267                         "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
19268                         "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
19269                         "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
19270                         "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
19271                         "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
19272                         "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
19273                         "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
19274                         "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
19275                         "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
19276                         "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
19277                         "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
19278                         "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
19279                         "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
19280                         "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
19281                         "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
19282                         "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
19283                         "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
19284                         "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
19285                         "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
19286                         "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
19287                         "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
19288                         "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
19289                         "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
19290                         "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
19291                         "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
19292                         "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
19293                         "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
19294                         "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
19295                         "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
19296                         "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
19297                         "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
19298                         "\x6e\x12\x17\x72\x63\x57\xc7\xba"
19299                         "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
19300                         "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
19301                         "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
19302                         "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
19303                         "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
19304                         "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
19305                         "\x0c\x24\x43\x31\x40\x57\xf1\x72"
19306                         "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
19307                         "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
19308                         "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
19309                         "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
19310                         "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
19311                         "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
19312                         "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
19313                         "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
19314                         "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
19315                         "\xaf\xdf\x11\x95",
19316                 .rlen   = 4100,
19317                 .np     = 2,
19318                 .tap    = { 4064, 36 },
19319         },
19320 };
19321
19322 /*
19323  * CTS (Cipher Text Stealing) mode tests
19324  */
19325 #define CTS_MODE_ENC_TEST_VECTORS 6
19326 #define CTS_MODE_DEC_TEST_VECTORS 6
19327 static struct cipher_testvec cts_mode_enc_tv_template[] = {
19328         { /* from rfc3962 */
19329                 .klen   = 16,
19330                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
19331                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
19332                 .ilen   = 17,
19333                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
19334                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
19335                           "\x20",
19336                 .rlen   = 17,
19337                 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
19338                           "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
19339                           "\x97",
19340         }, {
19341                 .klen   = 16,
19342                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
19343                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
19344                 .ilen   = 31,
19345                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
19346                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
19347                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
19348                           "\x20\x47\x61\x75\x27\x73\x20",
19349                 .rlen   = 31,
19350                 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
19351                           "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
19352                           "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
19353                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
19354         }, {
19355                 .klen   = 16,
19356                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
19357                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
19358                 .ilen   = 32,
19359                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
19360                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
19361                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
19362                           "\x20\x47\x61\x75\x27\x73\x20\x43",
19363                 .rlen   = 32,
19364                 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
19365                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
19366                           "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
19367                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
19368         }, {
19369                 .klen   = 16,
19370                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
19371                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
19372                 .ilen   = 47,
19373                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
19374                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
19375                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
19376                           "\x20\x47\x61\x75\x27\x73\x20\x43"
19377                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
19378                           "\x70\x6c\x65\x61\x73\x65\x2c",
19379                 .rlen   = 47,
19380                 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
19381                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
19382                           "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
19383                           "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
19384                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
19385                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
19386         }, {
19387                 .klen   = 16,
19388                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
19389                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
19390                 .ilen   = 48,
19391                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
19392                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
19393                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
19394                           "\x20\x47\x61\x75\x27\x73\x20\x43"
19395                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
19396                           "\x70\x6c\x65\x61\x73\x65\x2c\x20",
19397                 .rlen   = 48,
19398                 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
19399                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
19400                           "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
19401                           "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
19402                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
19403                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
19404         }, {
19405                 .klen   = 16,
19406                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
19407                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
19408                 .ilen   = 64,
19409                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
19410                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
19411                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
19412                           "\x20\x47\x61\x75\x27\x73\x20\x43"
19413                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
19414                           "\x70\x6c\x65\x61\x73\x65\x2c\x20"
19415                           "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
19416                           "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
19417                 .rlen   = 64,
19418                 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
19419                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
19420                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
19421                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
19422                           "\x48\x07\xef\xe8\x36\xee\x89\xa5"
19423                           "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
19424                           "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
19425                           "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
19426         }
19427 };
19428
19429 static struct cipher_testvec cts_mode_dec_tv_template[] = {
19430         { /* from rfc3962 */
19431                 .klen   = 16,
19432                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
19433                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
19434                 .rlen   = 17,
19435                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
19436                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
19437                           "\x20",
19438                 .ilen   = 17,
19439                 .input  = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
19440                           "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
19441                           "\x97",
19442         }, {
19443                 .klen   = 16,
19444                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
19445                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
19446                 .rlen   = 31,
19447                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
19448                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
19449                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
19450                           "\x20\x47\x61\x75\x27\x73\x20",
19451                 .ilen   = 31,
19452                 .input  = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
19453                           "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
19454                           "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
19455                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
19456         }, {
19457                 .klen   = 16,
19458                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
19459                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
19460                 .rlen   = 32,
19461                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
19462                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
19463                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
19464                           "\x20\x47\x61\x75\x27\x73\x20\x43",
19465                 .ilen   = 32,
19466                 .input  = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
19467                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
19468                           "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
19469                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
19470         }, {
19471                 .klen   = 16,
19472                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
19473                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
19474                 .rlen   = 47,
19475                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
19476                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
19477                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
19478                           "\x20\x47\x61\x75\x27\x73\x20\x43"
19479                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
19480                           "\x70\x6c\x65\x61\x73\x65\x2c",
19481                 .ilen   = 47,
19482                 .input  = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
19483                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
19484                           "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
19485                           "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
19486                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
19487                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
19488         }, {
19489                 .klen   = 16,
19490                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
19491                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
19492                 .rlen   = 48,
19493                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
19494                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
19495                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
19496                           "\x20\x47\x61\x75\x27\x73\x20\x43"
19497                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
19498                           "\x70\x6c\x65\x61\x73\x65\x2c\x20",
19499                 .ilen   = 48,
19500                 .input  = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
19501                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
19502                           "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
19503                           "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
19504                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
19505                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
19506         }, {
19507                 .klen   = 16,
19508                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
19509                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
19510                 .rlen   = 64,
19511                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
19512                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
19513                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
19514                           "\x20\x47\x61\x75\x27\x73\x20\x43"
19515                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
19516                           "\x70\x6c\x65\x61\x73\x65\x2c\x20"
19517                           "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
19518                           "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
19519                 .ilen   = 64,
19520                 .input  = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
19521                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
19522                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
19523                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
19524                           "\x48\x07\xef\xe8\x36\xee\x89\xa5"
19525                           "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
19526                           "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
19527                           "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
19528         }
19529 };
19530
19531 /*
19532  * Compression stuff.
19533  */
19534 #define COMP_BUF_SIZE           512
19535
19536 struct comp_testvec {
19537         int inlen, outlen;
19538         char input[COMP_BUF_SIZE];
19539         char output[COMP_BUF_SIZE];
19540 };
19541
19542 struct pcomp_testvec {
19543         void *params;
19544         unsigned int paramsize;
19545         int inlen, outlen;
19546         char input[COMP_BUF_SIZE];
19547         char output[COMP_BUF_SIZE];
19548 };
19549
19550 /*
19551  * Deflate test vectors (null-terminated strings).
19552  * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
19553  */
19554
19555 #define DEFLATE_COMP_TEST_VECTORS 2
19556 #define DEFLATE_DECOMP_TEST_VECTORS 2
19557
19558 static struct comp_testvec deflate_comp_tv_template[] = {
19559         {
19560                 .inlen  = 70,
19561                 .outlen = 38,
19562                 .input  = "Join us now and share the software "
19563                         "Join us now and share the software ",
19564                 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
19565                           "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
19566                           "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
19567                           "\x48\x55\x28\xce\x4f\x2b\x29\x07"
19568                           "\x71\xbc\x08\x2b\x01\x00",
19569         }, {
19570                 .inlen  = 191,
19571                 .outlen = 122,
19572                 .input  = "This document describes a compression method based on the DEFLATE"
19573                         "compression algorithm.  This document defines the application of "
19574                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
19575                 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
19576                           "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
19577                           "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
19578                           "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
19579                           "\x68\x12\x51\xae\x76\x67\xd6\x27"
19580                           "\x19\x88\x1a\xde\x85\xab\x21\xf2"
19581                           "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
19582                           "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
19583                           "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
19584                           "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
19585                           "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
19586                           "\x52\x37\xed\x0e\x52\x6b\x59\x02"
19587                           "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
19588                           "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
19589                           "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
19590                           "\xfa\x02",
19591         },
19592 };
19593
19594 static struct comp_testvec deflate_decomp_tv_template[] = {
19595         {
19596                 .inlen  = 122,
19597                 .outlen = 191,
19598                 .input  = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
19599                           "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
19600                           "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
19601                           "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
19602                           "\x68\x12\x51\xae\x76\x67\xd6\x27"
19603                           "\x19\x88\x1a\xde\x85\xab\x21\xf2"
19604                           "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
19605                           "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
19606                           "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
19607                           "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
19608                           "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
19609                           "\x52\x37\xed\x0e\x52\x6b\x59\x02"
19610                           "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
19611                           "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
19612                           "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
19613                           "\xfa\x02",
19614                 .output = "This document describes a compression method based on the DEFLATE"
19615                         "compression algorithm.  This document defines the application of "
19616                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
19617         }, {
19618                 .inlen  = 38,
19619                 .outlen = 70,
19620                 .input  = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
19621                           "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
19622                           "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
19623                           "\x48\x55\x28\xce\x4f\x2b\x29\x07"
19624                           "\x71\xbc\x08\x2b\x01\x00",
19625                 .output = "Join us now and share the software "
19626                         "Join us now and share the software ",
19627         },
19628 };
19629
19630 #define ZLIB_COMP_TEST_VECTORS 2
19631 #define ZLIB_DECOMP_TEST_VECTORS 2
19632
19633 static const struct {
19634         struct nlattr nla;
19635         int val;
19636 } deflate_comp_params[] = {
19637         {
19638                 .nla = {
19639                         .nla_len        = NLA_HDRLEN + sizeof(int),
19640                         .nla_type       = ZLIB_COMP_LEVEL,
19641                 },
19642                 .val                    = Z_DEFAULT_COMPRESSION,
19643         }, {
19644                 .nla = {
19645                         .nla_len        = NLA_HDRLEN + sizeof(int),
19646                         .nla_type       = ZLIB_COMP_METHOD,
19647                 },
19648                 .val                    = Z_DEFLATED,
19649         }, {
19650                 .nla = {
19651                         .nla_len        = NLA_HDRLEN + sizeof(int),
19652                         .nla_type       = ZLIB_COMP_WINDOWBITS,
19653                 },
19654                 .val                    = -11,
19655         }, {
19656                 .nla = {
19657                         .nla_len        = NLA_HDRLEN + sizeof(int),
19658                         .nla_type       = ZLIB_COMP_MEMLEVEL,
19659                 },
19660                 .val                    = MAX_MEM_LEVEL,
19661         }, {
19662                 .nla = {
19663                         .nla_len        = NLA_HDRLEN + sizeof(int),
19664                         .nla_type       = ZLIB_COMP_STRATEGY,
19665                 },
19666                 .val                    = Z_DEFAULT_STRATEGY,
19667         }
19668 };
19669
19670 static const struct {
19671         struct nlattr nla;
19672         int val;
19673 } deflate_decomp_params[] = {
19674         {
19675                 .nla = {
19676                         .nla_len        = NLA_HDRLEN + sizeof(int),
19677                         .nla_type       = ZLIB_DECOMP_WINDOWBITS,
19678                 },
19679                 .val                    = -11,
19680         }
19681 };
19682
19683 static struct pcomp_testvec zlib_comp_tv_template[] = {
19684         {
19685                 .params = &deflate_comp_params,
19686                 .paramsize = sizeof(deflate_comp_params),
19687                 .inlen  = 70,
19688                 .outlen = 38,
19689                 .input  = "Join us now and share the software "
19690                         "Join us now and share the software ",
19691                 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
19692                           "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
19693                           "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
19694                           "\x48\x55\x28\xce\x4f\x2b\x29\x07"
19695                           "\x71\xbc\x08\x2b\x01\x00",
19696         }, {
19697                 .params = &deflate_comp_params,
19698                 .paramsize = sizeof(deflate_comp_params),
19699                 .inlen  = 191,
19700                 .outlen = 122,
19701                 .input  = "This document describes a compression method based on the DEFLATE"
19702                         "compression algorithm.  This document defines the application of "
19703                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
19704                 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
19705                           "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
19706                           "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
19707                           "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
19708                           "\x68\x12\x51\xae\x76\x67\xd6\x27"
19709                           "\x19\x88\x1a\xde\x85\xab\x21\xf2"
19710                           "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
19711                           "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
19712                           "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
19713                           "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
19714                           "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
19715                           "\x52\x37\xed\x0e\x52\x6b\x59\x02"
19716                           "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
19717                           "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
19718                           "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
19719                           "\xfa\x02",
19720         },
19721 };
19722
19723 static struct pcomp_testvec zlib_decomp_tv_template[] = {
19724         {
19725                 .params = &deflate_decomp_params,
19726                 .paramsize = sizeof(deflate_decomp_params),
19727                 .inlen  = 122,
19728                 .outlen = 191,
19729                 .input  = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
19730                           "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
19731                           "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
19732                           "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
19733                           "\x68\x12\x51\xae\x76\x67\xd6\x27"
19734                           "\x19\x88\x1a\xde\x85\xab\x21\xf2"
19735                           "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
19736                           "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
19737                           "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
19738                           "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
19739                           "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
19740                           "\x52\x37\xed\x0e\x52\x6b\x59\x02"
19741                           "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
19742                           "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
19743                           "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
19744                           "\xfa\x02",
19745                 .output = "This document describes a compression method based on the DEFLATE"
19746                         "compression algorithm.  This document defines the application of "
19747                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
19748         }, {
19749                 .params = &deflate_decomp_params,
19750                 .paramsize = sizeof(deflate_decomp_params),
19751                 .inlen  = 38,
19752                 .outlen = 70,
19753                 .input  = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
19754                           "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
19755                           "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
19756                           "\x48\x55\x28\xce\x4f\x2b\x29\x07"
19757                           "\x71\xbc\x08\x2b\x01\x00",
19758                 .output = "Join us now and share the software "
19759                         "Join us now and share the software ",
19760         },
19761 };
19762
19763 /*
19764  * LZO test vectors (null-terminated strings).
19765  */
19766 #define LZO_COMP_TEST_VECTORS 2
19767 #define LZO_DECOMP_TEST_VECTORS 2
19768
19769 static struct comp_testvec lzo_comp_tv_template[] = {
19770         {
19771                 .inlen  = 70,
19772                 .outlen = 46,
19773                 .input  = "Join us now and share the software "
19774                         "Join us now and share the software ",
19775                 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
19776                         "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
19777                         "\x64\x20\x73\x68\x61\x72\x65\x20"
19778                         "\x74\x68\x65\x20\x73\x6f\x66\x74"
19779                         "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
19780                         "\x3d\x88\x00\x11\x00\x00",
19781         }, {
19782                 .inlen  = 159,
19783                 .outlen = 133,
19784                 .input  = "This document describes a compression method based on the LZO "
19785                         "compression algorithm.  This document defines the application of "
19786                         "the LZO algorithm used in UBIFS.",
19787                 .output = "\x00\x2b\x54\x68\x69\x73\x20\x64"
19788                           "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
19789                           "\x64\x65\x73\x63\x72\x69\x62\x65"
19790                           "\x73\x20\x61\x20\x63\x6f\x6d\x70"
19791                           "\x72\x65\x73\x73\x69\x6f\x6e\x20"
19792                           "\x6d\x65\x74\x68\x6f\x64\x20\x62"
19793                           "\x61\x73\x65\x64\x20\x6f\x6e\x20"
19794                           "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
19795                           "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
19796                           "\x69\x74\x68\x6d\x2e\x20\x20\x54"
19797                           "\x68\x69\x73\x2a\x54\x01\x02\x66"
19798                           "\x69\x6e\x65\x73\x94\x06\x05\x61"
19799                           "\x70\x70\x6c\x69\x63\x61\x74\x76"
19800                           "\x0a\x6f\x66\x88\x02\x60\x09\x27"
19801                           "\xf0\x00\x0c\x20\x75\x73\x65\x64"
19802                           "\x20\x69\x6e\x20\x55\x42\x49\x46"
19803                           "\x53\x2e\x11\x00\x00",
19804         },
19805 };
19806
19807 static struct comp_testvec lzo_decomp_tv_template[] = {
19808         {
19809                 .inlen  = 133,
19810                 .outlen = 159,
19811                 .input  = "\x00\x2b\x54\x68\x69\x73\x20\x64"
19812                           "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
19813                           "\x64\x65\x73\x63\x72\x69\x62\x65"
19814                           "\x73\x20\x61\x20\x63\x6f\x6d\x70"
19815                           "\x72\x65\x73\x73\x69\x6f\x6e\x20"
19816                           "\x6d\x65\x74\x68\x6f\x64\x20\x62"
19817                           "\x61\x73\x65\x64\x20\x6f\x6e\x20"
19818                           "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
19819                           "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
19820                           "\x69\x74\x68\x6d\x2e\x20\x20\x54"
19821                           "\x68\x69\x73\x2a\x54\x01\x02\x66"
19822                           "\x69\x6e\x65\x73\x94\x06\x05\x61"
19823                           "\x70\x70\x6c\x69\x63\x61\x74\x76"
19824                           "\x0a\x6f\x66\x88\x02\x60\x09\x27"
19825                           "\xf0\x00\x0c\x20\x75\x73\x65\x64"
19826                           "\x20\x69\x6e\x20\x55\x42\x49\x46"
19827                           "\x53\x2e\x11\x00\x00",
19828                 .output = "This document describes a compression method based on the LZO "
19829                         "compression algorithm.  This document defines the application of "
19830                         "the LZO algorithm used in UBIFS.",
19831         }, {
19832                 .inlen  = 46,
19833                 .outlen = 70,
19834                 .input  = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
19835                           "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
19836                           "\x64\x20\x73\x68\x61\x72\x65\x20"
19837                           "\x74\x68\x65\x20\x73\x6f\x66\x74"
19838                           "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
19839                           "\x3d\x88\x00\x11\x00\x00",
19840                 .output = "Join us now and share the software "
19841                         "Join us now and share the software ",
19842         },
19843 };
19844
19845 /*
19846  * Michael MIC test vectors from IEEE 802.11i
19847  */
19848 #define MICHAEL_MIC_TEST_VECTORS 6
19849
19850 static struct hash_testvec michael_mic_tv_template[] = {
19851         {
19852                 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
19853                 .ksize = 8,
19854                 .plaintext = zeroed_string,
19855                 .psize = 0,
19856                 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
19857         },
19858         {
19859                 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
19860                 .ksize = 8,
19861                 .plaintext = "M",
19862                 .psize = 1,
19863                 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
19864         },
19865         {
19866                 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
19867                 .ksize = 8,
19868                 .plaintext = "Mi",
19869                 .psize = 2,
19870                 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
19871         },
19872         {
19873                 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
19874                 .ksize = 8,
19875                 .plaintext = "Mic",
19876                 .psize = 3,
19877                 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
19878         },
19879         {
19880                 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
19881                 .ksize = 8,
19882                 .plaintext = "Mich",
19883                 .psize = 4,
19884                 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
19885         },
19886         {
19887                 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
19888                 .ksize = 8,
19889                 .plaintext = "Michael",
19890                 .psize = 7,
19891                 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
19892         }
19893 };
19894
19895 /*
19896  * CRC32C test vectors
19897  */
19898 #define CRC32C_TEST_VECTORS 14
19899
19900 static struct hash_testvec crc32c_tv_template[] = {
19901         {
19902                 .psize = 0,
19903                 .digest = "\x00\x00\x00\x00",
19904         },
19905         {
19906                 .key = "\x87\xa9\xcb\xed",
19907                 .ksize = 4,
19908                 .psize = 0,
19909                 .digest = "\x78\x56\x34\x12",
19910         },
19911         {
19912                 .key = "\xff\xff\xff\xff",
19913                 .ksize = 4,
19914                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
19915                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
19916                              "\x11\x12\x13\x14\x15\x16\x17\x18"
19917                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
19918                              "\x21\x22\x23\x24\x25\x26\x27\x28",
19919                 .psize = 40,
19920                 .digest = "\x7f\x15\x2c\x0e",
19921         },
19922         {
19923                 .key = "\xff\xff\xff\xff",
19924                 .ksize = 4,
19925                 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
19926                              "\x31\x32\x33\x34\x35\x36\x37\x38"
19927                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
19928                              "\x41\x42\x43\x44\x45\x46\x47\x48"
19929                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
19930                 .psize = 40,
19931                 .digest = "\xf6\xeb\x80\xe9",
19932         },
19933         {
19934                 .key = "\xff\xff\xff\xff",
19935                 .ksize = 4,
19936                 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
19937                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
19938                              "\x61\x62\x63\x64\x65\x66\x67\x68"
19939                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
19940                              "\x71\x72\x73\x74\x75\x76\x77\x78",
19941                 .psize = 40,
19942                 .digest = "\xed\xbd\x74\xde",
19943         },
19944         {
19945                 .key = "\xff\xff\xff\xff",
19946                 .ksize = 4,
19947                 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
19948                              "\x81\x82\x83\x84\x85\x86\x87\x88"
19949                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
19950                              "\x91\x92\x93\x94\x95\x96\x97\x98"
19951                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
19952                 .psize = 40,
19953                 .digest = "\x62\xc8\x79\xd5",
19954         },
19955         {
19956                 .key = "\xff\xff\xff\xff",
19957                 .ksize = 4,
19958                 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
19959                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
19960                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
19961                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
19962                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
19963                 .psize = 40,
19964                 .digest = "\xd0\x9a\x97\xba",
19965         },
19966         {
19967                 .key = "\xff\xff\xff\xff",
19968                 .ksize = 4,
19969                 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
19970                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
19971                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
19972                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
19973                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
19974                 .psize = 40,
19975                 .digest = "\x13\xd9\x29\x2b",
19976         },
19977         {
19978                 .key = "\x80\xea\xd3\xf1",
19979                 .ksize = 4,
19980                 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
19981                              "\x31\x32\x33\x34\x35\x36\x37\x38"
19982                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
19983                              "\x41\x42\x43\x44\x45\x46\x47\x48"
19984                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
19985                 .psize = 40,
19986                 .digest = "\x0c\xb5\xe2\xa2",
19987         },
19988         {
19989                 .key = "\xf3\x4a\x1d\x5d",
19990                 .ksize = 4,
19991                 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
19992                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
19993                              "\x61\x62\x63\x64\x65\x66\x67\x68"
19994                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
19995                              "\x71\x72\x73\x74\x75\x76\x77\x78",
19996                 .psize = 40,
19997                 .digest = "\xd1\x7f\xfb\xa6",
19998         },
19999         {
20000                 .key = "\x2e\x80\x04\x59",
20001                 .ksize = 4,
20002                 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
20003                              "\x81\x82\x83\x84\x85\x86\x87\x88"
20004                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
20005                              "\x91\x92\x93\x94\x95\x96\x97\x98"
20006                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
20007                 .psize = 40,
20008                 .digest = "\x59\x33\xe6\x7a",
20009         },
20010         {
20011                 .key = "\xa6\xcc\x19\x85",
20012                 .ksize = 4,
20013                 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
20014                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
20015                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
20016                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
20017                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
20018                 .psize = 40,
20019                 .digest = "\xbe\x03\x01\xd2",
20020         },
20021         {
20022                 .key = "\x41\xfc\xfe\x2d",
20023                 .ksize = 4,
20024                 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
20025                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
20026                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
20027                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
20028                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
20029                 .psize = 40,
20030                 .digest = "\x75\xd3\xc5\x24",
20031         },
20032         {
20033                 .key = "\xff\xff\xff\xff",
20034                 .ksize = 4,
20035                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
20036                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
20037                              "\x11\x12\x13\x14\x15\x16\x17\x18"
20038                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
20039                              "\x21\x22\x23\x24\x25\x26\x27\x28"
20040                              "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
20041                              "\x31\x32\x33\x34\x35\x36\x37\x38"
20042                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
20043                              "\x41\x42\x43\x44\x45\x46\x47\x48"
20044                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
20045                              "\x51\x52\x53\x54\x55\x56\x57\x58"
20046                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
20047                              "\x61\x62\x63\x64\x65\x66\x67\x68"
20048                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
20049                              "\x71\x72\x73\x74\x75\x76\x77\x78"
20050                              "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
20051                              "\x81\x82\x83\x84\x85\x86\x87\x88"
20052                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
20053                              "\x91\x92\x93\x94\x95\x96\x97\x98"
20054                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
20055                              "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
20056                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
20057                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
20058                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
20059                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
20060                              "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
20061                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
20062                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
20063                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
20064                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
20065                 .psize = 240,
20066                 .digest = "\x75\xd3\xc5\x24",
20067                 .np = 2,
20068                 .tap = { 31, 209 }
20069         },
20070 };
20071
20072 /*
20073  * Blakcifn CRC test vectors
20074  */
20075 #define BFIN_CRC_TEST_VECTORS 6
20076
20077 static struct hash_testvec bfin_crc_tv_template[] = {
20078         {
20079                 .psize = 0,
20080                 .digest = "\x00\x00\x00\x00",
20081         },
20082         {
20083                 .key = "\x87\xa9\xcb\xed",
20084                 .ksize = 4,
20085                 .psize = 0,
20086                 .digest = "\x87\xa9\xcb\xed",
20087         },
20088         {
20089                 .key = "\xff\xff\xff\xff",
20090                 .ksize = 4,
20091                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
20092                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
20093                              "\x11\x12\x13\x14\x15\x16\x17\x18"
20094                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
20095                              "\x21\x22\x23\x24\x25\x26\x27\x28",
20096                 .psize = 40,
20097                 .digest = "\x84\x0c\x8d\xa2",
20098         },
20099         {
20100                 .key = "\xff\xff\xff\xff",
20101                 .ksize = 4,
20102                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
20103                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
20104                              "\x11\x12\x13\x14\x15\x16\x17\x18"
20105                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
20106                              "\x21\x22\x23\x24\x25\x26",
20107                 .psize = 38,
20108                 .digest = "\x8c\x58\xec\xb7",
20109         },
20110         {
20111                 .key = "\xff\xff\xff\xff",
20112                 .ksize = 4,
20113                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
20114                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
20115                              "\x11\x12\x13\x14\x15\x16\x17\x18"
20116                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
20117                              "\x21\x22\x23\x24\x25\x26\x27",
20118                 .psize = 39,
20119                 .digest = "\xdc\x50\x28\x7b",
20120         },
20121         {
20122                 .key = "\xff\xff\xff\xff",
20123                 .ksize = 4,
20124                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
20125                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
20126                              "\x11\x12\x13\x14\x15\x16\x17\x18"
20127                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
20128                              "\x21\x22\x23\x24\x25\x26\x27\x28"
20129                              "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
20130                              "\x31\x32\x33\x34\x35\x36\x37\x38"
20131                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
20132                              "\x41\x42\x43\x44\x45\x46\x47\x48"
20133                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
20134                              "\x51\x52\x53\x54\x55\x56\x57\x58"
20135                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
20136                              "\x61\x62\x63\x64\x65\x66\x67\x68"
20137                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
20138                              "\x71\x72\x73\x74\x75\x76\x77\x78"
20139                              "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
20140                              "\x81\x82\x83\x84\x85\x86\x87\x88"
20141                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
20142                              "\x91\x92\x93\x94\x95\x96\x97\x98"
20143                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
20144                              "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
20145                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
20146                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
20147                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
20148                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
20149                              "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
20150                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
20151                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
20152                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
20153                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
20154                 .psize = 240,
20155                 .digest = "\x10\x19\x4a\x5c",
20156                 .np = 2,
20157                 .tap = { 31, 209 }
20158         },
20159
20160 };
20161
20162 #endif  /* _CRYPTO_TESTMGR_H */