Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-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              160
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 short psize;
45         unsigned char np;
46         unsigned char ksize;
47 };
48
49 /*
50  * cipher_testvec:      structure to describe a cipher test
51  * @key:        A pointer to a key used by the test
52  * @klen:       The length of @key
53  * @iv:         A pointer to the IV used by the test
54  * @input:      A pointer to data used as input
55  * @ilen        The length of data in @input
56  * @result:     A pointer to what the test need to produce
57  * @rlen:       The length of data in @result
58  * @fail:       If set to one, the test need to fail
59  * @wk:         Does the test need CRYPTO_TFM_REQ_WEAK_KEY
60  *              ( e.g. test needs to fail due to a weak key )
61  * @np:         numbers of SG to distribute data in (from 1 to MAX_TAP)
62  * @tap:        How to distribute data in @np SGs
63  * @also_non_np:        if set to 1, the test will be also done without
64  *                      splitting data in @np SGs
65  */
66
67 struct cipher_testvec {
68         char *key;
69         char *iv;
70         char *input;
71         char *result;
72         unsigned short tap[MAX_TAP];
73         int np;
74         unsigned char also_non_np;
75         bool fail;
76         unsigned char wk; /* weak key flag */
77         unsigned char klen;
78         unsigned short ilen;
79         unsigned short rlen;
80 };
81
82 struct aead_testvec {
83         char *key;
84         char *iv;
85         char *input;
86         char *assoc;
87         char *result;
88         unsigned char tap[MAX_TAP];
89         unsigned char atap[MAX_TAP];
90         int np;
91         int anp;
92         bool fail;
93         unsigned char novrfy;   /* ccm dec verification failure expected */
94         unsigned char wk; /* weak key flag */
95         unsigned char klen;
96         unsigned short ilen;
97         unsigned short alen;
98         unsigned short rlen;
99 };
100
101 struct cprng_testvec {
102         char *key;
103         char *dt;
104         char *v;
105         char *result;
106         unsigned char klen;
107         unsigned short dtlen;
108         unsigned short vlen;
109         unsigned short rlen;
110         unsigned short loops;
111 };
112
113 struct drbg_testvec {
114         unsigned char *entropy;
115         size_t entropylen;
116         unsigned char *entpra;
117         unsigned char *entprb;
118         size_t entprlen;
119         unsigned char *addtla;
120         unsigned char *addtlb;
121         size_t addtllen;
122         unsigned char *pers;
123         size_t perslen;
124         unsigned char *expected;
125         size_t expectedlen;
126 };
127
128 struct akcipher_testvec {
129         unsigned char *key;
130         unsigned char *m;
131         unsigned char *c;
132         unsigned int key_len;
133         unsigned int m_size;
134         unsigned int c_size;
135         bool public_key_vec;
136 };
137
138 static char zeroed_string[48];
139
140 /*
141  * RSA test vectors. Borrowed from openSSL.
142  */
143 #ifdef CONFIG_CRYPTO_FIPS
144 #define RSA_TEST_VECTORS        2
145 #else
146 #define RSA_TEST_VECTORS        4
147 #endif
148 static struct akcipher_testvec rsa_tv_template[] = {
149         {
150 #ifndef CONFIG_CRYPTO_FIPS
151         .key =
152         "\x30\x81\x88" /* sequence of 136 bytes */
153         "\x02\x41" /* modulus - integer of 65 bytes */
154         "\x00\xAA\x36\xAB\xCE\x88\xAC\xFD\xFF\x55\x52\x3C\x7F\xC4\x52\x3F"
155         "\x90\xEF\xA0\x0D\xF3\x77\x4A\x25\x9F\x2E\x62\xB4\xC5\xD9\x9C\xB5"
156         "\xAD\xB3\x00\xA0\x28\x5E\x53\x01\x93\x0E\x0C\x70\xFB\x68\x76\x93"
157         "\x9C\xE6\x16\xCE\x62\x4A\x11\xE0\x08\x6D\x34\x1E\xBC\xAC\xA0\xA1"
158         "\xF5"
159         "\x02\x01\x11" /* public key - integer of 1 byte */
160         "\x02\x40" /* private key - integer of 64 bytes */
161         "\x0A\x03\x37\x48\x62\x64\x87\x69\x5F\x5F\x30\xBC\x38\xB9\x8B\x44"
162         "\xC2\xCD\x2D\xFF\x43\x40\x98\xCD\x20\xD8\xA1\x38\xD0\x90\xBF\x64"
163         "\x79\x7C\x3F\xA7\xA2\xCD\xCB\x3C\xD1\xE0\xBD\xBA\x26\x54\xB4\xF9"
164         "\xDF\x8E\x8A\xE5\x9D\x73\x3D\x9F\x33\xB3\x01\x62\x4A\xFD\x1D\x51",
165         .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
166         .c =
167         "\x63\x1c\xcd\x7b\xe1\x7e\xe4\xde\xc9\xa8\x89\xa1\x74\xcb\x3c\x63"
168         "\x7d\x24\xec\x83\xc3\x15\xe4\x7f\x73\x05\x34\xd1\xec\x22\xbb\x8a"
169         "\x5e\x32\x39\x6d\xc1\x1d\x7d\x50\x3b\x9f\x7a\xad\xf0\x2e\x25\x53"
170         "\x9f\x6e\xbd\x4c\x55\x84\x0c\x9b\xcf\x1a\x4b\x51\x1e\x9e\x0c\x06",
171         .key_len = 139,
172         .m_size = 8,
173         .c_size = 64,
174         }, {
175         .key =
176         "\x30\x82\x01\x0B" /* sequence of 267 bytes */
177         "\x02\x81\x81" /* modulus - integer of 129 bytes */
178         "\x00\xBB\xF8\x2F\x09\x06\x82\xCE\x9C\x23\x38\xAC\x2B\x9D\xA8\x71"
179         "\xF7\x36\x8D\x07\xEE\xD4\x10\x43\xA4\x40\xD6\xB6\xF0\x74\x54\xF5"
180         "\x1F\xB8\xDF\xBA\xAF\x03\x5C\x02\xAB\x61\xEA\x48\xCE\xEB\x6F\xCD"
181         "\x48\x76\xED\x52\x0D\x60\xE1\xEC\x46\x19\x71\x9D\x8A\x5B\x8B\x80"
182         "\x7F\xAF\xB8\xE0\xA3\xDF\xC7\x37\x72\x3E\xE6\xB4\xB7\xD9\x3A\x25"
183         "\x84\xEE\x6A\x64\x9D\x06\x09\x53\x74\x88\x34\xB2\x45\x45\x98\x39"
184         "\x4E\xE0\xAA\xB1\x2D\x7B\x61\xA5\x1F\x52\x7A\x9A\x41\xF6\xC1\x68"
185         "\x7F\xE2\x53\x72\x98\xCA\x2A\x8F\x59\x46\xF8\xE5\xFD\x09\x1D\xBD"
186         "\xCB"
187         "\x02\x01\x11" /* public key - integer of 1 byte */
188         "\x02\x81\x81"  /* private key - integer of 129 bytes */
189         "\x00\xA5\xDA\xFC\x53\x41\xFA\xF2\x89\xC4\xB9\x88\xDB\x30\xC1\xCD"
190         "\xF8\x3F\x31\x25\x1E\x06\x68\xB4\x27\x84\x81\x38\x01\x57\x96\x41"
191         "\xB2\x94\x10\xB3\xC7\x99\x8D\x6B\xC4\x65\x74\x5E\x5C\x39\x26\x69"
192         "\xD6\x87\x0D\xA2\xC0\x82\xA9\x39\xE3\x7F\xDC\xB8\x2E\xC9\x3E\xDA"
193         "\xC9\x7F\xF3\xAD\x59\x50\xAC\xCF\xBC\x11\x1C\x76\xF1\xA9\x52\x94"
194         "\x44\xE5\x6A\xAF\x68\xC5\x6C\x09\x2C\xD3\x8D\xC3\xBE\xF5\xD2\x0A"
195         "\x93\x99\x26\xED\x4F\x74\xA1\x3E\xDD\xFB\xE1\xA1\xCE\xCC\x48\x94"
196         "\xAF\x94\x28\xC2\xB7\xB8\x88\x3F\xE4\x46\x3A\x4B\xC8\x5B\x1C\xB3"
197         "\xC1",
198         .key_len = 271,
199         .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
200         .c =
201         "\x74\x1b\x55\xac\x47\xb5\x08\x0a\x6e\x2b\x2d\xf7\x94\xb8\x8a\x95"
202         "\xed\xa3\x6b\xc9\x29\xee\xb2\x2c\x80\xc3\x39\x3b\x8c\x62\x45\x72"
203         "\xc2\x7f\x74\x81\x91\x68\x44\x48\x5a\xdc\xa0\x7e\xa7\x0b\x05\x7f"
204         "\x0e\xa0\x6c\xe5\x8f\x19\x4d\xce\x98\x47\x5f\xbd\x5f\xfe\xe5\x34"
205         "\x59\x89\xaf\xf0\xba\x44\xd7\xf1\x1a\x50\x72\xef\x5e\x4a\xb6\xb7"
206         "\x54\x34\xd1\xc4\x83\x09\xdf\x0f\x91\x5f\x7d\x91\x70\x2f\xd4\x13"
207         "\xcc\x5e\xa4\x6c\xc3\x4d\x28\xef\xda\xaf\xec\x14\x92\xfc\xa3\x75"
208         "\x13\xb4\xc1\xa1\x11\xfc\x40\x2f\x4c\x9d\xdf\x16\x76\x11\x20\x6b",
209         .m_size = 8,
210         .c_size = 128,
211         }, {
212 #endif
213         .key =
214         "\x30\x82\x02\x0D" /* sequence of 525 bytes */
215         "\x02\x82\x01\x00" /* modulus - integer of 256 bytes */
216         "\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
217         "\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
218         "\xC6\x67\xFF\x1D\x1E\x3C\x1D\xC1\xB5\x5F\x6C\xC0\xB2\x07\x3A\x6D"
219         "\x41\xE4\x25\x99\xAC\xFC\xD2\x0F\x02\xD3\xD1\x54\x06\x1A\x51\x77"
220         "\xBD\xB6\xBF\xEA\xA7\x5C\x06\xA9\x5D\x69\x84\x45\xD7\xF5\x05\xBA"
221         "\x47\xF0\x1B\xD7\x2B\x24\xEC\xCB\x9B\x1B\x10\x8D\x81\xA0\xBE\xB1"
222         "\x8C\x33\xE4\x36\xB8\x43\xEB\x19\x2A\x81\x8D\xDE\x81\x0A\x99\x48"
223         "\xB6\xF6\xBC\xCD\x49\x34\x3A\x8F\x26\x94\xE3\x28\x82\x1A\x7C\x8F"
224         "\x59\x9F\x45\xE8\x5D\x1A\x45\x76\x04\x56\x05\xA1\xD0\x1B\x8C\x77"
225         "\x6D\xAF\x53\xFA\x71\xE2\x67\xE0\x9A\xFE\x03\xA9\x85\xD2\xC9\xAA"
226         "\xBA\x2A\xBC\xF4\xA0\x08\xF5\x13\x98\x13\x5D\xF0\xD9\x33\x34\x2A"
227         "\x61\xC3\x89\x55\xF0\xAE\x1A\x9C\x22\xEE\x19\x05\x8D\x32\xFE\xEC"
228         "\x9C\x84\xBA\xB7\xF9\x6C\x3A\x4F\x07\xFC\x45\xEB\x12\xE5\x7B\xFD"
229         "\x55\xE6\x29\x69\xD1\xC2\xE8\xB9\x78\x59\xF6\x79\x10\xC6\x4E\xEB"
230         "\x6A\x5E\xB9\x9A\xC7\xC4\x5B\x63\xDA\xA3\x3F\x5E\x92\x7A\x81\x5E"
231         "\xD6\xB0\xE2\x62\x8F\x74\x26\xC2\x0C\xD3\x9A\x17\x47\xE6\x8E\xAB"
232         "\x02\x03\x01\x00\x01" /* public key - integer of 3 bytes */
233         "\x02\x82\x01\x00" /* private key - integer of 256 bytes */
234         "\x52\x41\xF4\xDA\x7B\xB7\x59\x55\xCA\xD4\x2F\x0F\x3A\xCB\xA4\x0D"
235         "\x93\x6C\xCC\x9D\xC1\xB2\xFB\xFD\xAE\x40\x31\xAC\x69\x52\x21\x92"
236         "\xB3\x27\xDF\xEA\xEE\x2C\x82\xBB\xF7\x40\x32\xD5\x14\xC4\x94\x12"
237         "\xEC\xB8\x1F\xCA\x59\xE3\xC1\x78\xF3\x85\xD8\x47\xA5\xD7\x02\x1A"
238         "\x65\x79\x97\x0D\x24\xF4\xF0\x67\x6E\x75\x2D\xBF\x10\x3D\xA8\x7D"
239         "\xEF\x7F\x60\xE4\xE6\x05\x82\x89\x5D\xDF\xC6\xD2\x6C\x07\x91\x33"
240         "\x98\x42\xF0\x02\x00\x25\x38\xC5\x85\x69\x8A\x7D\x2F\x95\x6C\x43"
241         "\x9A\xB8\x81\xE2\xD0\x07\x35\xAA\x05\x41\xC9\x1E\xAF\xE4\x04\x3B"
242         "\x19\xB8\x73\xA2\xAC\x4B\x1E\x66\x48\xD8\x72\x1F\xAC\xF6\xCB\xBC"
243         "\x90\x09\xCA\xEC\x0C\xDC\xF9\x2C\xD7\xEB\xAE\xA3\xA4\x47\xD7\x33"
244         "\x2F\x8A\xCA\xBC\x5E\xF0\x77\xE4\x97\x98\x97\xC7\x10\x91\x7D\x2A"
245         "\xA6\xFF\x46\x83\x97\xDE\xE9\xE2\x17\x03\x06\x14\xE2\xD7\xB1\x1D"
246         "\x77\xAF\x51\x27\x5B\x5E\x69\xB8\x81\xE6\x11\xC5\x43\x23\x81\x04"
247         "\x62\xFF\xE9\x46\xB8\xD8\x44\xDB\xA5\xCC\x31\x54\x34\xCE\x3E\x82"
248         "\xD6\xBF\x7A\x0B\x64\x21\x6D\x88\x7E\x5B\x45\x12\x1E\x63\x8D\x49"
249         "\xA7\x1D\xD9\x1E\x06\xCD\xE8\xBA\x2C\x8C\x69\x32\xEA\xBE\x60\x71",
250         .key_len = 529,
251         .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
252         .c =
253         "\xb2\x97\x76\xb4\xae\x3e\x38\x3c\x7e\x64\x1f\xcc\xa2\x7f\xf6\xbe"
254         "\xcf\x49\xbc\x48\xd3\x6c\x8f\x0a\x0e\xc1\x73\xbd\x7b\x55\x79\x36"
255         "\x0e\xa1\x87\x88\xb9\x2c\x90\xa6\x53\x5e\xe9\xef\xc4\xe2\x4d\xdd"
256         "\xf7\xa6\x69\x82\x3f\x56\xa4\x7b\xfb\x62\xe0\xae\xb8\xd3\x04\xb3"
257         "\xac\x5a\x15\x2a\xe3\x19\x9b\x03\x9a\x0b\x41\xda\x64\xec\x0a\x69"
258         "\xfc\xf2\x10\x92\xf3\xc1\xbf\x84\x7f\xfd\x2c\xae\xc8\xb5\xf6\x41"
259         "\x70\xc5\x47\x03\x8a\xf8\xff\x6f\x3f\xd2\x6f\x09\xb4\x22\xf3\x30"
260         "\xbe\xa9\x85\xcb\x9c\x8d\xf9\x8f\xeb\x32\x91\xa2\x25\x84\x8f\xf5"
261         "\xdc\xc7\x06\x9c\x2d\xe5\x11\x2c\x09\x09\x87\x09\xa9\xf6\x33\x73"
262         "\x90\xf1\x60\xf2\x65\xdd\x30\xa5\x66\xce\x62\x7b\xd0\xf8\x2d\x3d"
263         "\x19\x82\x77\xe3\x0a\x5f\x75\x2f\x8e\xb1\xe5\xe8\x91\x35\x1b\x3b"
264         "\x33\xb7\x66\x92\xd1\xf2\x8e\x6f\xe5\x75\x0c\xad\x36\xfb\x4e\xd0"
265         "\x66\x61\xbd\x49\xfe\xf4\x1a\xa2\x2b\x49\xfe\x03\x4c\x74\x47\x8d"
266         "\x9a\x66\xb2\x49\x46\x4d\x77\xea\x33\x4d\x6b\x3c\xb4\x49\x4a\xc6"
267         "\x7d\x3d\xb5\xb9\x56\x41\x15\x67\x0f\x94\x3c\x93\x65\x27\xe0\x21"
268         "\x5d\x59\xc3\x62\xd5\xa6\xda\x38\x26\x22\x5e\x34\x1c\x94\xaf\x98",
269         .m_size = 8,
270         .c_size = 256,
271         }, {
272         .key =
273         "\x30\x82\x01\x09" /* sequence of 265 bytes */
274         "\x02\x82\x01\x00" /* modulus - integer of 256 bytes */
275         "\xDB\x10\x1A\xC2\xA3\xF1\xDC\xFF\x13\x6B\xED\x44\xDF\xF0\x02\x6D"
276         "\x13\xC7\x88\xDA\x70\x6B\x54\xF1\xE8\x27\xDC\xC3\x0F\x99\x6A\xFA"
277         "\xC6\x67\xFF\x1D\x1E\x3C\x1D\xC1\xB5\x5F\x6C\xC0\xB2\x07\x3A\x6D"
278         "\x41\xE4\x25\x99\xAC\xFC\xD2\x0F\x02\xD3\xD1\x54\x06\x1A\x51\x77"
279         "\xBD\xB6\xBF\xEA\xA7\x5C\x06\xA9\x5D\x69\x84\x45\xD7\xF5\x05\xBA"
280         "\x47\xF0\x1B\xD7\x2B\x24\xEC\xCB\x9B\x1B\x10\x8D\x81\xA0\xBE\xB1"
281         "\x8C\x33\xE4\x36\xB8\x43\xEB\x19\x2A\x81\x8D\xDE\x81\x0A\x99\x48"
282         "\xB6\xF6\xBC\xCD\x49\x34\x3A\x8F\x26\x94\xE3\x28\x82\x1A\x7C\x8F"
283         "\x59\x9F\x45\xE8\x5D\x1A\x45\x76\x04\x56\x05\xA1\xD0\x1B\x8C\x77"
284         "\x6D\xAF\x53\xFA\x71\xE2\x67\xE0\x9A\xFE\x03\xA9\x85\xD2\xC9\xAA"
285         "\xBA\x2A\xBC\xF4\xA0\x08\xF5\x13\x98\x13\x5D\xF0\xD9\x33\x34\x2A"
286         "\x61\xC3\x89\x55\xF0\xAE\x1A\x9C\x22\xEE\x19\x05\x8D\x32\xFE\xEC"
287         "\x9C\x84\xBA\xB7\xF9\x6C\x3A\x4F\x07\xFC\x45\xEB\x12\xE5\x7B\xFD"
288         "\x55\xE6\x29\x69\xD1\xC2\xE8\xB9\x78\x59\xF6\x79\x10\xC6\x4E\xEB"
289         "\x6A\x5E\xB9\x9A\xC7\xC4\x5B\x63\xDA\xA3\x3F\x5E\x92\x7A\x81\x5E"
290         "\xD6\xB0\xE2\x62\x8F\x74\x26\xC2\x0C\xD3\x9A\x17\x47\xE6\x8E\xAB"
291         "\x02\x03\x01\x00\x01", /* public key - integer of 3 bytes */
292         .key_len = 269,
293         .m = "\x54\x85\x9b\x34\x2c\x49\xea\x2a",
294         .c =
295         "\xb2\x97\x76\xb4\xae\x3e\x38\x3c\x7e\x64\x1f\xcc\xa2\x7f\xf6\xbe"
296         "\xcf\x49\xbc\x48\xd3\x6c\x8f\x0a\x0e\xc1\x73\xbd\x7b\x55\x79\x36"
297         "\x0e\xa1\x87\x88\xb9\x2c\x90\xa6\x53\x5e\xe9\xef\xc4\xe2\x4d\xdd"
298         "\xf7\xa6\x69\x82\x3f\x56\xa4\x7b\xfb\x62\xe0\xae\xb8\xd3\x04\xb3"
299         "\xac\x5a\x15\x2a\xe3\x19\x9b\x03\x9a\x0b\x41\xda\x64\xec\x0a\x69"
300         "\xfc\xf2\x10\x92\xf3\xc1\xbf\x84\x7f\xfd\x2c\xae\xc8\xb5\xf6\x41"
301         "\x70\xc5\x47\x03\x8a\xf8\xff\x6f\x3f\xd2\x6f\x09\xb4\x22\xf3\x30"
302         "\xbe\xa9\x85\xcb\x9c\x8d\xf9\x8f\xeb\x32\x91\xa2\x25\x84\x8f\xf5"
303         "\xdc\xc7\x06\x9c\x2d\xe5\x11\x2c\x09\x09\x87\x09\xa9\xf6\x33\x73"
304         "\x90\xf1\x60\xf2\x65\xdd\x30\xa5\x66\xce\x62\x7b\xd0\xf8\x2d\x3d"
305         "\x19\x82\x77\xe3\x0a\x5f\x75\x2f\x8e\xb1\xe5\xe8\x91\x35\x1b\x3b"
306         "\x33\xb7\x66\x92\xd1\xf2\x8e\x6f\xe5\x75\x0c\xad\x36\xfb\x4e\xd0"
307         "\x66\x61\xbd\x49\xfe\xf4\x1a\xa2\x2b\x49\xfe\x03\x4c\x74\x47\x8d"
308         "\x9a\x66\xb2\x49\x46\x4d\x77\xea\x33\x4d\x6b\x3c\xb4\x49\x4a\xc6"
309         "\x7d\x3d\xb5\xb9\x56\x41\x15\x67\x0f\x94\x3c\x93\x65\x27\xe0\x21"
310         "\x5d\x59\xc3\x62\xd5\xa6\xda\x38\x26\x22\x5e\x34\x1c\x94\xaf\x98",
311         .m_size = 8,
312         .c_size = 256,
313         .public_key_vec = true,
314         }
315 };
316
317 /*
318  * MD4 test vectors from RFC1320
319  */
320 #define MD4_TEST_VECTORS        7
321
322 static struct hash_testvec md4_tv_template [] = {
323         {
324                 .plaintext = "",
325                 .digest = "\x31\xd6\xcf\xe0\xd1\x6a\xe9\x31"
326                           "\xb7\x3c\x59\xd7\xe0\xc0\x89\xc0",
327         }, {
328                 .plaintext = "a",
329                 .psize  = 1,
330                 .digest = "\xbd\xe5\x2c\xb3\x1d\xe3\x3e\x46"
331                           "\x24\x5e\x05\xfb\xdb\xd6\xfb\x24",
332         }, {
333                 .plaintext = "abc",
334                 .psize  = 3,
335                 .digest = "\xa4\x48\x01\x7a\xaf\x21\xd8\x52"
336                           "\x5f\xc1\x0a\xe8\x7a\xa6\x72\x9d",
337         }, {
338                 .plaintext = "message digest",
339                 .psize  = 14,
340                 .digest = "\xd9\x13\x0a\x81\x64\x54\x9f\xe8"
341                         "\x18\x87\x48\x06\xe1\xc7\x01\x4b",
342         }, {
343                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
344                 .psize  = 26,
345                 .digest = "\xd7\x9e\x1c\x30\x8a\xa5\xbb\xcd"
346                           "\xee\xa8\xed\x63\xdf\x41\x2d\xa9",
347                 .np     = 2,
348                 .tap    = { 13, 13 },
349         }, {
350                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
351                 .psize  = 62,
352                 .digest = "\x04\x3f\x85\x82\xf2\x41\xdb\x35"
353                           "\x1c\xe6\x27\xe1\x53\xe7\xf0\xe4",
354         }, {
355                 .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
356                            "45678901234567890",
357                 .psize  = 80,
358                 .digest = "\xe3\x3b\x4d\xdc\x9c\x38\xf2\x19"
359                           "\x9c\x3e\x7b\x16\x4f\xcc\x05\x36",
360         },
361 };
362
363 /*
364  * MD5 test vectors from RFC1321
365  */
366 #define MD5_TEST_VECTORS        7
367
368 static struct hash_testvec md5_tv_template[] = {
369         {
370                 .digest = "\xd4\x1d\x8c\xd9\x8f\x00\xb2\x04"
371                           "\xe9\x80\x09\x98\xec\xf8\x42\x7e",
372         }, {
373                 .plaintext = "a",
374                 .psize  = 1,
375                 .digest = "\x0c\xc1\x75\xb9\xc0\xf1\xb6\xa8"
376                           "\x31\xc3\x99\xe2\x69\x77\x26\x61",
377         }, {
378                 .plaintext = "abc",
379                 .psize  = 3,
380                 .digest = "\x90\x01\x50\x98\x3c\xd2\x4f\xb0"
381                           "\xd6\x96\x3f\x7d\x28\xe1\x7f\x72",
382         }, {
383                 .plaintext = "message digest",
384                 .psize  = 14,
385                 .digest = "\xf9\x6b\x69\x7d\x7c\xb7\x93\x8d"
386                           "\x52\x5a\x2f\x31\xaa\xf1\x61\xd0",
387         }, {
388                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
389                 .psize  = 26,
390                 .digest = "\xc3\xfc\xd3\xd7\x61\x92\xe4\x00"
391                           "\x7d\xfb\x49\x6c\xca\x67\xe1\x3b",
392                 .np     = 2,
393                 .tap    = {13, 13}
394         }, {
395                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
396                 .psize  = 62,
397                 .digest = "\xd1\x74\xab\x98\xd2\x77\xd9\xf5"
398                           "\xa5\x61\x1c\x2c\x9f\x41\x9d\x9f",
399         }, {
400                 .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
401                            "345678901234567890",
402                 .psize  = 80,
403                 .digest = "\x57\xed\xf4\xa2\x2b\xe3\xc9\x55"
404                           "\xac\x49\xda\x2e\x21\x07\xb6\x7a",
405         }
406
407 };
408
409 /*
410  * RIPEMD-128 test vectors from ISO/IEC 10118-3:2004(E)
411  */
412 #define RMD128_TEST_VECTORS     10
413
414 static struct hash_testvec rmd128_tv_template[] = {
415         {
416                 .digest = "\xcd\xf2\x62\x13\xa1\x50\xdc\x3e"
417                           "\xcb\x61\x0f\x18\xf6\xb3\x8b\x46",
418         }, {
419                 .plaintext = "a",
420                 .psize  = 1,
421                 .digest = "\x86\xbe\x7a\xfa\x33\x9d\x0f\xc7"
422                           "\xcf\xc7\x85\xe7\x2f\x57\x8d\x33",
423         }, {
424                 .plaintext = "abc",
425                 .psize  = 3,
426                 .digest = "\xc1\x4a\x12\x19\x9c\x66\xe4\xba"
427                           "\x84\x63\x6b\x0f\x69\x14\x4c\x77",
428         }, {
429                 .plaintext = "message digest",
430                 .psize  = 14,
431                 .digest = "\x9e\x32\x7b\x3d\x6e\x52\x30\x62"
432                           "\xaf\xc1\x13\x2d\x7d\xf9\xd1\xb8",
433         }, {
434                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
435                 .psize  = 26,
436                 .digest = "\xfd\x2a\xa6\x07\xf7\x1d\xc8\xf5"
437                           "\x10\x71\x49\x22\xb3\x71\x83\x4e",
438         }, {
439                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
440                              "fghijklmnopqrstuvwxyz0123456789",
441                 .psize  = 62,
442                 .digest = "\xd1\xe9\x59\xeb\x17\x9c\x91\x1f"
443                           "\xae\xa4\x62\x4c\x60\xc5\xc7\x02",
444         }, {
445                 .plaintext = "1234567890123456789012345678901234567890"
446                              "1234567890123456789012345678901234567890",
447                 .psize  = 80,
448                 .digest = "\x3f\x45\xef\x19\x47\x32\xc2\xdb"
449                           "\xb2\xc4\xa2\xc7\x69\x79\x5f\xa3",
450         }, {
451                 .plaintext = "abcdbcdecdefdefgefghfghighij"
452                              "hijkijkljklmklmnlmnomnopnopq",
453                 .psize  = 56,
454                 .digest = "\xa1\xaa\x06\x89\xd0\xfa\xfa\x2d"
455                           "\xdc\x22\xe8\x8b\x49\x13\x3a\x06",
456                 .np     = 2,
457                 .tap    = { 28, 28 },
458         }, {
459                 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
460                              "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
461                              "lmnopqrsmnopqrstnopqrstu",
462                 .psize  = 112,
463                 .digest = "\xd4\xec\xc9\x13\xe1\xdf\x77\x6b"
464                           "\xf4\x8d\xe9\xd5\x5b\x1f\x25\x46",
465         }, {
466                 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
467                 .psize  = 32,
468                 .digest = "\x13\xfc\x13\xe8\xef\xff\x34\x7d"
469                           "\xe1\x93\xff\x46\xdb\xac\xcf\xd4",
470         }
471 };
472
473 /*
474  * RIPEMD-160 test vectors from ISO/IEC 10118-3:2004(E)
475  */
476 #define RMD160_TEST_VECTORS     10
477
478 static struct hash_testvec rmd160_tv_template[] = {
479         {
480                 .digest = "\x9c\x11\x85\xa5\xc5\xe9\xfc\x54\x61\x28"
481                           "\x08\x97\x7e\xe8\xf5\x48\xb2\x25\x8d\x31",
482         }, {
483                 .plaintext = "a",
484                 .psize  = 1,
485                 .digest = "\x0b\xdc\x9d\x2d\x25\x6b\x3e\xe9\xda\xae"
486                           "\x34\x7b\xe6\xf4\xdc\x83\x5a\x46\x7f\xfe",
487         }, {
488                 .plaintext = "abc",
489                 .psize  = 3,
490                 .digest = "\x8e\xb2\x08\xf7\xe0\x5d\x98\x7a\x9b\x04"
491                           "\x4a\x8e\x98\xc6\xb0\x87\xf1\x5a\x0b\xfc",
492         }, {
493                 .plaintext = "message digest",
494                 .psize  = 14,
495                 .digest = "\x5d\x06\x89\xef\x49\xd2\xfa\xe5\x72\xb8"
496                           "\x81\xb1\x23\xa8\x5f\xfa\x21\x59\x5f\x36",
497         }, {
498                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
499                 .psize  = 26,
500                 .digest = "\xf7\x1c\x27\x10\x9c\x69\x2c\x1b\x56\xbb"
501                           "\xdc\xeb\x5b\x9d\x28\x65\xb3\x70\x8d\xbc",
502         }, {
503                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
504                              "fghijklmnopqrstuvwxyz0123456789",
505                 .psize  = 62,
506                 .digest = "\xb0\xe2\x0b\x6e\x31\x16\x64\x02\x86\xed"
507                           "\x3a\x87\xa5\x71\x30\x79\xb2\x1f\x51\x89",
508         }, {
509                 .plaintext = "1234567890123456789012345678901234567890"
510                              "1234567890123456789012345678901234567890",
511                 .psize  = 80,
512                 .digest = "\x9b\x75\x2e\x45\x57\x3d\x4b\x39\xf4\xdb"
513                           "\xd3\x32\x3c\xab\x82\xbf\x63\x32\x6b\xfb",
514         }, {
515                 .plaintext = "abcdbcdecdefdefgefghfghighij"
516                              "hijkijkljklmklmnlmnomnopnopq",
517                 .psize  = 56,
518                 .digest = "\x12\xa0\x53\x38\x4a\x9c\x0c\x88\xe4\x05"
519                           "\xa0\x6c\x27\xdc\xf4\x9a\xda\x62\xeb\x2b",
520                 .np     = 2,
521                 .tap    = { 28, 28 },
522         }, {
523                 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghi"
524                              "jklmghijklmnhijklmnoijklmnopjklmnopqklmnopqr"
525                              "lmnopqrsmnopqrstnopqrstu",
526                 .psize  = 112,
527                 .digest = "\x6f\x3f\xa3\x9b\x6b\x50\x3c\x38\x4f\x91"
528                           "\x9a\x49\xa7\xaa\x5c\x2c\x08\xbd\xfb\x45",
529         }, {
530                 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
531                 .psize  = 32,
532                 .digest = "\x94\xc2\x64\x11\x54\x04\xe6\x33\x79\x0d"
533                           "\xfc\xc8\x7b\x58\x7d\x36\x77\x06\x7d\x9f",
534         }
535 };
536
537 /*
538  * RIPEMD-256 test vectors
539  */
540 #define RMD256_TEST_VECTORS     8
541
542 static struct hash_testvec rmd256_tv_template[] = {
543         {
544                 .digest = "\x02\xba\x4c\x4e\x5f\x8e\xcd\x18"
545                           "\x77\xfc\x52\xd6\x4d\x30\xe3\x7a"
546                           "\x2d\x97\x74\xfb\x1e\x5d\x02\x63"
547                           "\x80\xae\x01\x68\xe3\xc5\x52\x2d",
548         }, {
549                 .plaintext = "a",
550                 .psize  = 1,
551                 .digest = "\xf9\x33\x3e\x45\xd8\x57\xf5\xd9"
552                           "\x0a\x91\xba\xb7\x0a\x1e\xba\x0c"
553                           "\xfb\x1b\xe4\xb0\x78\x3c\x9a\xcf"
554                           "\xcd\x88\x3a\x91\x34\x69\x29\x25",
555         }, {
556                 .plaintext = "abc",
557                 .psize  = 3,
558                 .digest = "\xaf\xbd\x6e\x22\x8b\x9d\x8c\xbb"
559                           "\xce\xf5\xca\x2d\x03\xe6\xdb\xa1"
560                           "\x0a\xc0\xbc\x7d\xcb\xe4\x68\x0e"
561                           "\x1e\x42\xd2\xe9\x75\x45\x9b\x65",
562         }, {
563                 .plaintext = "message digest",
564                 .psize  = 14,
565                 .digest = "\x87\xe9\x71\x75\x9a\x1c\xe4\x7a"
566                           "\x51\x4d\x5c\x91\x4c\x39\x2c\x90"
567                           "\x18\xc7\xc4\x6b\xc1\x44\x65\x55"
568                           "\x4a\xfc\xdf\x54\xa5\x07\x0c\x0e",
569         }, {
570                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
571                 .psize  = 26,
572                 .digest = "\x64\x9d\x30\x34\x75\x1e\xa2\x16"
573                           "\x77\x6b\xf9\xa1\x8a\xcc\x81\xbc"
574                           "\x78\x96\x11\x8a\x51\x97\x96\x87"
575                           "\x82\xdd\x1f\xd9\x7d\x8d\x51\x33",
576         }, {
577                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
578                              "fghijklmnopqrstuvwxyz0123456789",
579                 .psize  = 62,
580                 .digest = "\x57\x40\xa4\x08\xac\x16\xb7\x20"
581                           "\xb8\x44\x24\xae\x93\x1c\xbb\x1f"
582                           "\xe3\x63\xd1\xd0\xbf\x40\x17\xf1"
583                           "\xa8\x9f\x7e\xa6\xde\x77\xa0\xb8",
584         }, {
585                 .plaintext = "1234567890123456789012345678901234567890"
586                              "1234567890123456789012345678901234567890",
587                 .psize  = 80,
588                 .digest = "\x06\xfd\xcc\x7a\x40\x95\x48\xaa"
589                           "\xf9\x13\x68\xc0\x6a\x62\x75\xb5"
590                           "\x53\xe3\xf0\x99\xbf\x0e\xa4\xed"
591                           "\xfd\x67\x78\xdf\x89\xa8\x90\xdd",
592         }, {
593                 .plaintext = "abcdbcdecdefdefgefghfghighij"
594                              "hijkijkljklmklmnlmnomnopnopq",
595                 .psize  = 56,
596                 .digest = "\x38\x43\x04\x55\x83\xaa\xc6\xc8"
597                           "\xc8\xd9\x12\x85\x73\xe7\xa9\x80"
598                           "\x9a\xfb\x2a\x0f\x34\xcc\xc3\x6e"
599                           "\xa9\xe7\x2f\x16\xf6\x36\x8e\x3f",
600                 .np     = 2,
601                 .tap    = { 28, 28 },
602         }
603 };
604
605 /*
606  * RIPEMD-320 test vectors
607  */
608 #define RMD320_TEST_VECTORS     8
609
610 static struct hash_testvec rmd320_tv_template[] = {
611         {
612                 .digest = "\x22\xd6\x5d\x56\x61\x53\x6c\xdc\x75\xc1"
613                           "\xfd\xf5\xc6\xde\x7b\x41\xb9\xf2\x73\x25"
614                           "\xeb\xc6\x1e\x85\x57\x17\x7d\x70\x5a\x0e"
615                           "\xc8\x80\x15\x1c\x3a\x32\xa0\x08\x99\xb8",
616         }, {
617                 .plaintext = "a",
618                 .psize  = 1,
619                 .digest = "\xce\x78\x85\x06\x38\xf9\x26\x58\xa5\xa5"
620                           "\x85\x09\x75\x79\x92\x6d\xda\x66\x7a\x57"
621                           "\x16\x56\x2c\xfc\xf6\xfb\xe7\x7f\x63\x54"
622                           "\x2f\x99\xb0\x47\x05\xd6\x97\x0d\xff\x5d",
623         }, {
624                 .plaintext = "abc",
625                 .psize  = 3,
626                 .digest = "\xde\x4c\x01\xb3\x05\x4f\x89\x30\xa7\x9d"
627                           "\x09\xae\x73\x8e\x92\x30\x1e\x5a\x17\x08"
628                           "\x5b\xef\xfd\xc1\xb8\xd1\x16\x71\x3e\x74"
629                           "\xf8\x2f\xa9\x42\xd6\x4c\xdb\xc4\x68\x2d",
630         }, {
631                 .plaintext = "message digest",
632                 .psize  = 14,
633                 .digest = "\x3a\x8e\x28\x50\x2e\xd4\x5d\x42\x2f\x68"
634                           "\x84\x4f\x9d\xd3\x16\xe7\xb9\x85\x33\xfa"
635                           "\x3f\x2a\x91\xd2\x9f\x84\xd4\x25\xc8\x8d"
636                           "\x6b\x4e\xff\x72\x7d\xf6\x6a\x7c\x01\x97",
637         }, {
638                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
639                 .psize  = 26,
640                 .digest = "\xca\xbd\xb1\x81\x0b\x92\x47\x0a\x20\x93"
641                           "\xaa\x6b\xce\x05\x95\x2c\x28\x34\x8c\xf4"
642                           "\x3f\xf6\x08\x41\x97\x51\x66\xbb\x40\xed"
643                           "\x23\x40\x04\xb8\x82\x44\x63\xe6\xb0\x09",
644         }, {
645                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcde"
646                              "fghijklmnopqrstuvwxyz0123456789",
647                 .psize  = 62,
648                 .digest = "\xed\x54\x49\x40\xc8\x6d\x67\xf2\x50\xd2"
649                           "\x32\xc3\x0b\x7b\x3e\x57\x70\xe0\xc6\x0c"
650                           "\x8c\xb9\xa4\xca\xfe\x3b\x11\x38\x8a\xf9"
651                           "\x92\x0e\x1b\x99\x23\x0b\x84\x3c\x86\xa4",
652         }, {
653                 .plaintext = "1234567890123456789012345678901234567890"
654                              "1234567890123456789012345678901234567890",
655                 .psize  = 80,
656                 .digest = "\x55\x78\x88\xaf\x5f\x6d\x8e\xd6\x2a\xb6"
657                           "\x69\x45\xc6\xd2\xa0\xa4\x7e\xcd\x53\x41"
658                           "\xe9\x15\xeb\x8f\xea\x1d\x05\x24\x95\x5f"
659                           "\x82\x5d\xc7\x17\xe4\xa0\x08\xab\x2d\x42",
660         }, {
661                 .plaintext = "abcdbcdecdefdefgefghfghighij"
662                              "hijkijkljklmklmnlmnomnopnopq",
663                 .psize  = 56,
664                 .digest = "\xd0\x34\xa7\x95\x0c\xf7\x22\x02\x1b\xa4"
665                           "\xb8\x4d\xf7\x69\xa5\xde\x20\x60\xe2\x59"
666                           "\xdf\x4c\x9b\xb4\xa4\x26\x8c\x0e\x93\x5b"
667                           "\xbc\x74\x70\xa9\x69\xc9\xd0\x72\xa1\xac",
668                 .np     = 2,
669                 .tap    = { 28, 28 },
670         }
671 };
672
673 #define CRCT10DIF_TEST_VECTORS  3
674 static struct hash_testvec crct10dif_tv_template[] = {
675         {
676                 .plaintext = "abc",
677                 .psize  = 3,
678 #ifdef __LITTLE_ENDIAN
679                 .digest = "\x3b\x44",
680 #else
681                 .digest = "\x44\x3b",
682 #endif
683         }, {
684                 .plaintext = "1234567890123456789012345678901234567890"
685                              "123456789012345678901234567890123456789",
686                 .psize  = 79,
687 #ifdef __LITTLE_ENDIAN
688                 .digest = "\x70\x4b",
689 #else
690                 .digest = "\x4b\x70",
691 #endif
692         }, {
693                 .plaintext =
694                 "abcddddddddddddddddddddddddddddddddddddddddddddddddddddd",
695                 .psize  = 56,
696 #ifdef __LITTLE_ENDIAN
697                 .digest = "\xe3\x9c",
698 #else
699                 .digest = "\x9c\xe3",
700 #endif
701                 .np     = 2,
702                 .tap    = { 28, 28 }
703         }
704 };
705
706 /*
707  * SHA1 test vectors  from from FIPS PUB 180-1
708  * Long vector from CAVS 5.0
709  */
710 #define SHA1_TEST_VECTORS       6
711
712 static struct hash_testvec sha1_tv_template[] = {
713         {
714                 .plaintext = "",
715                 .psize  = 0,
716                 .digest = "\xda\x39\xa3\xee\x5e\x6b\x4b\x0d\x32\x55"
717                           "\xbf\xef\x95\x60\x18\x90\xaf\xd8\x07\x09",
718         }, {
719                 .plaintext = "abc",
720                 .psize  = 3,
721                 .digest = "\xa9\x99\x3e\x36\x47\x06\x81\x6a\xba\x3e"
722                           "\x25\x71\x78\x50\xc2\x6c\x9c\xd0\xd8\x9d",
723         }, {
724                 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
725                 .psize  = 56,
726                 .digest = "\x84\x98\x3e\x44\x1c\x3b\xd2\x6e\xba\xae"
727                           "\x4a\xa1\xf9\x51\x29\xe5\xe5\x46\x70\xf1",
728                 .np     = 2,
729                 .tap    = { 28, 28 }
730         }, {
731                 .plaintext = "\xec\x29\x56\x12\x44\xed\xe7\x06"
732                              "\xb6\xeb\x30\xa1\xc3\x71\xd7\x44"
733                              "\x50\xa1\x05\xc3\xf9\x73\x5f\x7f"
734                              "\xa9\xfe\x38\xcf\x67\xf3\x04\xa5"
735                              "\x73\x6a\x10\x6e\x92\xe1\x71\x39"
736                              "\xa6\x81\x3b\x1c\x81\xa4\xf3\xd3"
737                              "\xfb\x95\x46\xab\x42\x96\xfa\x9f"
738                              "\x72\x28\x26\xc0\x66\x86\x9e\xda"
739                              "\xcd\x73\xb2\x54\x80\x35\x18\x58"
740                              "\x13\xe2\x26\x34\xa9\xda\x44\x00"
741                              "\x0d\x95\xa2\x81\xff\x9f\x26\x4e"
742                              "\xcc\xe0\xa9\x31\x22\x21\x62\xd0"
743                              "\x21\xcc\xa2\x8d\xb5\xf3\xc2\xaa"
744                              "\x24\x94\x5a\xb1\xe3\x1c\xb4\x13"
745                              "\xae\x29\x81\x0f\xd7\x94\xca\xd5"
746                              "\xdf\xaf\x29\xec\x43\xcb\x38\xd1"
747                              "\x98\xfe\x4a\xe1\xda\x23\x59\x78"
748                              "\x02\x21\x40\x5b\xd6\x71\x2a\x53"
749                              "\x05\xda\x4b\x1b\x73\x7f\xce\x7c"
750                              "\xd2\x1c\x0e\xb7\x72\x8d\x08\x23"
751                              "\x5a\x90\x11",
752                 .psize  = 163,
753                 .digest = "\x97\x01\x11\xc4\xe7\x7b\xcc\x88\xcc\x20"
754                           "\x45\x9c\x02\xb6\x9b\x4a\xa8\xf5\x82\x17",
755                 .np     = 4,
756                 .tap    = { 63, 64, 31, 5 }
757         }, {
758                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
759                 .psize  = 64,
760                 .digest = "\xc8\x71\xf6\x9a\x63\xcc\xa9\x84\x84\x82"
761                           "\x64\xe7\x79\x95\x5d\xd7\x19\x41\x7c\x91",
762         }, {
763                 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
764                              "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
765                              "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
766                              "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
767                              "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
768                              "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
769                              "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
770                              "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
771                              "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
772                              "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
773                              "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
774                              "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
775                              "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
776                              "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
777                              "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
778                              "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
779                              "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
780                              "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
781                              "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
782                              "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
783                              "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
784                              "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
785                              "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
786                              "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
787                              "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
788                              "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
789                              "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
790                              "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
791                              "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
792                              "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
793                              "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
794                              "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
795                              "\x53\xea\x81\x18\x8c\x23\xba\x2e"
796                              "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
797                              "\x37\xce\x42\xd9\x70\x07\x7b\x12"
798                              "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
799                              "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
800                              "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
801                              "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
802                              "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
803                              "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
804                              "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
805                              "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
806                              "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
807                              "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
808                              "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
809                              "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
810                              "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
811                              "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
812                              "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
813                              "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
814                              "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
815                              "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
816                              "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
817                              "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
818                              "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
819                              "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
820                              "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
821                              "\x38\xcf\x43\xda\x71\x08\x7c\x13"
822                              "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
823                              "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
824                              "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
825                              "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
826                              "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
827                              "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
828                              "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
829                              "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
830                              "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
831                              "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
832                              "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
833                              "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
834                              "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
835                              "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
836                              "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
837                              "\xef\x63\xfa\x91\x05\x9c\x33\xca"
838                              "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
839                              "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
840                              "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
841                              "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
842                              "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
843                              "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
844                              "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
845                              "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
846                              "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
847                              "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
848                              "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
849                              "\xde\x75\x0c\x80\x17\xae\x22\xb9"
850                              "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
851                              "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
852                              "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
853                              "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
854                              "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
855                              "\x67\xfe\x72\x09\xa0\x14\xab\x42"
856                              "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
857                              "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
858                              "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
859                              "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
860                              "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
861                              "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
862                              "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
863                              "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
864                              "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
865                              "\x95\x09\xa0\x37\xce\x42\xd9\x70"
866                              "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
867                              "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
868                              "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
869                              "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
870                              "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
871                              "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
872                              "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
873                              "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
874                              "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
875                              "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
876                              "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
877                              "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
878                              "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
879                              "\x68\xff\x73\x0a\xa1\x15\xac\x43"
880                              "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
881                              "\x29\xc0\x57\xee\x62\xf9\x90\x04"
882                              "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
883                              "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
884                              "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
885                              "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
886                              "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
887                              "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
888                              "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
889                              "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
890                              "\x08\x7c\x13\xaa\x1e\xb5\x4c",
891                 .psize     = 1023,
892                 .digest    = "\xb8\xe3\x54\xed\xc5\xfc\xef\xa4"
893                              "\x55\x73\x4a\x81\x99\xe4\x47\x2a"
894                              "\x30\xd6\xc9\x85",
895         }
896 };
897
898
899 /*
900  * SHA224 test vectors from from FIPS PUB 180-2
901  */
902 #define SHA224_TEST_VECTORS     5
903
904 static struct hash_testvec sha224_tv_template[] = {
905         {
906                 .plaintext = "",
907                 .psize  = 0,
908                 .digest = "\xd1\x4a\x02\x8c\x2a\x3a\x2b\xc9"
909                           "\x47\x61\x02\xbb\x28\x82\x34\xc4"
910                           "\x15\xa2\xb0\x1f\x82\x8e\xa6\x2a"
911                           "\xc5\xb3\xe4\x2f",
912         }, {
913                 .plaintext = "abc",
914                 .psize  = 3,
915                 .digest = "\x23\x09\x7D\x22\x34\x05\xD8\x22"
916                           "\x86\x42\xA4\x77\xBD\xA2\x55\xB3"
917                           "\x2A\xAD\xBC\xE4\xBD\xA0\xB3\xF7"
918                           "\xE3\x6C\x9D\xA7",
919         }, {
920                 .plaintext =
921                 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
922                 .psize  = 56,
923                 .digest = "\x75\x38\x8B\x16\x51\x27\x76\xCC"
924                           "\x5D\xBA\x5D\xA1\xFD\x89\x01\x50"
925                           "\xB0\xC6\x45\x5C\xB4\xF5\x8B\x19"
926                           "\x52\x52\x25\x25",
927                 .np     = 2,
928                 .tap    = { 28, 28 }
929         }, {
930                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
931                 .psize  = 64,
932                 .digest = "\xc4\xdb\x2b\x3a\x58\xc3\x99\x01"
933                           "\x42\xfd\x10\x92\xaa\x4e\x04\x08"
934                           "\x58\xbb\xbb\xe8\xf8\x14\xa7\x0c"
935                           "\xef\x3b\xcb\x0e",
936         }, {
937                 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
938                              "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
939                              "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
940                              "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
941                              "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
942                              "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
943                              "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
944                              "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
945                              "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
946                              "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
947                              "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
948                              "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
949                              "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
950                              "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
951                              "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
952                              "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
953                              "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
954                              "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
955                              "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
956                              "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
957                              "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
958                              "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
959                              "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
960                              "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
961                              "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
962                              "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
963                              "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
964                              "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
965                              "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
966                              "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
967                              "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
968                              "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
969                              "\x53\xea\x81\x18\x8c\x23\xba\x2e"
970                              "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
971                              "\x37\xce\x42\xd9\x70\x07\x7b\x12"
972                              "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
973                              "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
974                              "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
975                              "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
976                              "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
977                              "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
978                              "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
979                              "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
980                              "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
981                              "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
982                              "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
983                              "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
984                              "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
985                              "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
986                              "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
987                              "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
988                              "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
989                              "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
990                              "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
991                              "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
992                              "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
993                              "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
994                              "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
995                              "\x38\xcf\x43\xda\x71\x08\x7c\x13"
996                              "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
997                              "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
998                              "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
999                              "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1000                              "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1001                              "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1002                              "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1003                              "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1004                              "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1005                              "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1006                              "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1007                              "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1008                              "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1009                              "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1010                              "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1011                              "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1012                              "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1013                              "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1014                              "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1015                              "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1016                              "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1017                              "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1018                              "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1019                              "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1020                              "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1021                              "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1022                              "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1023                              "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1024                              "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1025                              "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1026                              "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1027                              "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1028                              "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1029                              "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1030                              "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1031                              "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1032                              "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1033                              "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1034                              "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1035                              "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1036                              "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1037                              "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1038                              "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1039                              "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1040                              "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1041                              "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1042                              "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1043                              "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1044                              "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1045                              "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1046                              "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1047                              "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1048                              "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1049                              "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1050                              "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1051                              "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1052                              "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1053                              "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1054                              "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1055                              "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1056                              "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1057                              "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1058                              "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1059                              "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1060                              "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1061                              "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1062                              "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1063                              "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1064                              "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1065                 .psize     = 1023,
1066                 .digest    = "\x98\x43\x07\x63\x75\xe0\xa7\x1c"
1067                              "\x78\xb1\x8b\xfd\x04\xf5\x2d\x91"
1068                              "\x20\x48\xa4\x28\xff\x55\xb1\xd3"
1069                              "\xe6\xf9\x4f\xcc",
1070         }
1071 };
1072
1073 /*
1074  * SHA256 test vectors from from NIST
1075  */
1076 #define SHA256_TEST_VECTORS     5
1077
1078 static struct hash_testvec sha256_tv_template[] = {
1079         {
1080                 .plaintext = "",
1081                 .psize  = 0,
1082                 .digest = "\xe3\xb0\xc4\x42\x98\xfc\x1c\x14"
1083                           "\x9a\xfb\xf4\xc8\x99\x6f\xb9\x24"
1084                           "\x27\xae\x41\xe4\x64\x9b\x93\x4c"
1085                           "\xa4\x95\x99\x1b\x78\x52\xb8\x55",
1086         }, {
1087                 .plaintext = "abc",
1088                 .psize  = 3,
1089                 .digest = "\xba\x78\x16\xbf\x8f\x01\xcf\xea"
1090                           "\x41\x41\x40\xde\x5d\xae\x22\x23"
1091                           "\xb0\x03\x61\xa3\x96\x17\x7a\x9c"
1092                           "\xb4\x10\xff\x61\xf2\x00\x15\xad",
1093         }, {
1094                 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1095                 .psize  = 56,
1096                 .digest = "\x24\x8d\x6a\x61\xd2\x06\x38\xb8"
1097                           "\xe5\xc0\x26\x93\x0c\x3e\x60\x39"
1098                           "\xa3\x3c\xe4\x59\x64\xff\x21\x67"
1099                           "\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
1100                 .np     = 2,
1101                 .tap    = { 28, 28 }
1102         }, {
1103                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1104                 .psize  = 64,
1105                 .digest = "\xb5\xfe\xad\x56\x7d\xff\xcb\xa4"
1106                           "\x2c\x32\x29\x32\x19\xbb\xfb\xfa"
1107                           "\xd6\xff\x94\xa3\x72\x91\x85\x66"
1108                           "\x3b\xa7\x87\x77\x58\xa3\x40\x3a",
1109         }, {
1110                 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1111                              "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1112                              "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1113                              "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1114                              "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1115                              "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1116                              "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1117                              "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1118                              "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1119                              "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1120                              "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1121                              "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1122                              "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1123                              "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1124                              "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1125                              "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1126                              "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1127                              "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1128                              "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1129                              "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1130                              "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1131                              "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1132                              "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1133                              "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1134                              "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1135                              "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1136                              "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1137                              "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1138                              "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1139                              "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1140                              "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1141                              "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1142                              "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1143                              "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1144                              "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1145                              "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1146                              "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1147                              "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1148                              "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1149                              "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1150                              "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1151                              "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1152                              "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1153                              "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1154                              "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1155                              "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1156                              "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1157                              "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1158                              "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1159                              "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1160                              "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1161                              "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1162                              "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1163                              "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1164                              "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1165                              "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1166                              "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1167                              "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1168                              "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1169                              "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1170                              "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1171                              "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1172                              "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1173                              "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1174                              "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1175                              "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1176                              "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1177                              "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1178                              "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1179                              "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1180                              "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1181                              "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1182                              "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1183                              "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1184                              "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1185                              "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1186                              "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1187                              "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1188                              "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1189                              "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1190                              "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1191                              "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1192                              "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1193                              "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1194                              "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1195                              "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1196                              "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1197                              "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1198                              "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1199                              "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1200                              "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1201                              "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1202                              "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1203                              "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1204                              "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1205                              "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1206                              "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1207                              "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1208                              "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1209                              "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1210                              "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1211                              "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1212                              "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1213                              "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1214                              "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1215                              "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1216                              "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1217                              "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1218                              "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1219                              "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1220                              "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1221                              "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1222                              "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1223                              "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1224                              "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1225                              "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1226                              "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1227                              "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1228                              "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1229                              "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1230                              "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1231                              "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1232                              "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1233                              "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1234                              "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1235                              "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1236                              "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1237                              "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1238                 .psize     = 1023,
1239                 .digest    = "\xc5\xce\x0c\xca\x01\x4f\x53\x3a"
1240                              "\x32\x32\x17\xcc\xd4\x6a\x71\xa9"
1241                              "\xf3\xed\x50\x10\x64\x8e\x06\xbe"
1242                              "\x9b\x4a\xa6\xbb\x05\x89\x59\x51",
1243         }
1244 };
1245
1246 /*
1247  * SHA384 test vectors from from NIST and kerneli
1248  */
1249 #define SHA384_TEST_VECTORS     6
1250
1251 static struct hash_testvec sha384_tv_template[] = {
1252         {
1253                 .plaintext = "",
1254                 .psize  = 0,
1255                 .digest = "\x38\xb0\x60\xa7\x51\xac\x96\x38"
1256                           "\x4c\xd9\x32\x7e\xb1\xb1\xe3\x6a"
1257                           "\x21\xfd\xb7\x11\x14\xbe\x07\x43"
1258                           "\x4c\x0c\xc7\xbf\x63\xf6\xe1\xda"
1259                           "\x27\x4e\xde\xbf\xe7\x6f\x65\xfb"
1260                           "\xd5\x1a\xd2\xf1\x48\x98\xb9\x5b",
1261         }, {
1262                 .plaintext= "abc",
1263                 .psize  = 3,
1264                 .digest = "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b"
1265                           "\xb5\xa0\x3d\x69\x9a\xc6\x50\x07"
1266                           "\x27\x2c\x32\xab\x0e\xde\xd1\x63"
1267                           "\x1a\x8b\x60\x5a\x43\xff\x5b\xed"
1268                           "\x80\x86\x07\x2b\xa1\xe7\xcc\x23"
1269                           "\x58\xba\xec\xa1\x34\xc8\x25\xa7",
1270         }, {
1271                 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1272                 .psize  = 56,
1273                 .digest = "\x33\x91\xfd\xdd\xfc\x8d\xc7\x39"
1274                           "\x37\x07\xa6\x5b\x1b\x47\x09\x39"
1275                           "\x7c\xf8\xb1\xd1\x62\xaf\x05\xab"
1276                           "\xfe\x8f\x45\x0d\xe5\xf3\x6b\xc6"
1277                           "\xb0\x45\x5a\x85\x20\xbc\x4e\x6f"
1278                           "\x5f\xe9\x5b\x1f\xe3\xc8\x45\x2b",
1279         }, {
1280                 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1281                            "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1282                 .psize  = 112,
1283                 .digest = "\x09\x33\x0c\x33\xf7\x11\x47\xe8"
1284                           "\x3d\x19\x2f\xc7\x82\xcd\x1b\x47"
1285                           "\x53\x11\x1b\x17\x3b\x3b\x05\xd2"
1286                           "\x2f\xa0\x80\x86\xe3\xb0\xf7\x12"
1287                           "\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9"
1288                           "\x66\xc3\xe9\xfa\x91\x74\x60\x39",
1289         }, {
1290                 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1291                            "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1292                 .psize  = 104,
1293                 .digest = "\x3d\x20\x89\x73\xab\x35\x08\xdb"
1294                           "\xbd\x7e\x2c\x28\x62\xba\x29\x0a"
1295                           "\xd3\x01\x0e\x49\x78\xc1\x98\xdc"
1296                           "\x4d\x8f\xd0\x14\xe5\x82\x82\x3a"
1297                           "\x89\xe1\x6f\x9b\x2a\x7b\xbc\x1a"
1298                           "\xc9\x38\xe2\xd1\x99\xe8\xbe\xa4",
1299                 .np     = 4,
1300                 .tap    = { 26, 26, 26, 26 }
1301         }, {
1302                 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1303                              "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1304                              "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1305                              "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1306                              "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1307                              "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1308                              "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1309                              "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1310                              "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1311                              "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1312                              "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1313                              "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1314                              "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1315                              "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1316                              "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1317                              "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1318                              "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1319                              "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1320                              "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1321                              "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1322                              "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1323                              "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1324                              "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1325                              "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1326                              "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1327                              "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1328                              "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1329                              "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1330                              "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1331                              "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1332                              "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1333                              "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1334                              "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1335                              "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1336                              "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1337                              "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1338                              "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1339                              "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1340                              "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1341                              "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1342                              "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1343                              "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1344                              "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1345                              "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1346                              "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1347                              "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1348                              "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1349                              "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1350                              "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1351                              "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1352                              "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1353                              "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1354                              "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1355                              "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1356                              "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1357                              "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1358                              "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1359                              "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1360                              "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1361                              "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1362                              "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1363                              "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1364                              "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1365                              "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1366                              "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1367                              "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1368                              "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1369                              "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1370                              "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1371                              "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1372                              "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1373                              "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1374                              "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1375                              "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1376                              "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1377                              "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1378                              "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1379                              "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1380                              "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1381                              "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1382                              "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1383                              "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1384                              "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1385                              "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1386                              "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1387                              "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1388                              "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1389                              "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1390                              "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1391                              "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1392                              "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1393                              "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1394                              "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1395                              "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1396                              "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1397                              "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1398                              "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1399                              "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1400                              "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1401                              "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1402                              "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1403                              "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1404                              "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1405                              "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1406                              "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1407                              "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1408                              "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1409                              "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1410                              "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1411                              "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1412                              "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1413                              "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1414                              "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1415                              "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1416                              "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1417                              "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1418                              "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1419                              "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1420                              "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1421                              "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1422                              "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1423                              "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1424                              "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1425                              "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1426                              "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1427                              "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1428                              "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1429                              "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1430                 .psize     = 1023,
1431                 .digest    = "\x4d\x97\x23\xc8\xea\x7a\x7c\x15"
1432                              "\xb8\xff\x97\x9c\xf5\x13\x4f\x31"
1433                              "\xde\x67\xf7\x24\x73\xcd\x70\x1c"
1434                              "\x03\x4a\xba\x8a\x87\x49\xfe\xdc"
1435                              "\x75\x29\x62\x83\xae\x3f\x17\xab"
1436                              "\xfd\x10\x4d\x8e\x17\x1c\x1f\xca",
1437         }
1438 };
1439
1440 /*
1441  * SHA512 test vectors from from NIST and kerneli
1442  */
1443 #define SHA512_TEST_VECTORS     6
1444
1445 static struct hash_testvec sha512_tv_template[] = {
1446         {
1447                 .plaintext = "",
1448                 .psize  = 0,
1449                 .digest = "\xcf\x83\xe1\x35\x7e\xef\xb8\xbd"
1450                           "\xf1\x54\x28\x50\xd6\x6d\x80\x07"
1451                           "\xd6\x20\xe4\x05\x0b\x57\x15\xdc"
1452                           "\x83\xf4\xa9\x21\xd3\x6c\xe9\xce"
1453                           "\x47\xd0\xd1\x3c\x5d\x85\xf2\xb0"
1454                           "\xff\x83\x18\xd2\x87\x7e\xec\x2f"
1455                           "\x63\xb9\x31\xbd\x47\x41\x7a\x81"
1456                           "\xa5\x38\x32\x7a\xf9\x27\xda\x3e",
1457         }, {
1458                 .plaintext = "abc",
1459                 .psize  = 3,
1460                 .digest = "\xdd\xaf\x35\xa1\x93\x61\x7a\xba"
1461                           "\xcc\x41\x73\x49\xae\x20\x41\x31"
1462                           "\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2"
1463                           "\x0a\x9e\xee\xe6\x4b\x55\xd3\x9a"
1464                           "\x21\x92\x99\x2a\x27\x4f\xc1\xa8"
1465                           "\x36\xba\x3c\x23\xa3\xfe\xeb\xbd"
1466                           "\x45\x4d\x44\x23\x64\x3c\xe8\x0e"
1467                           "\x2a\x9a\xc9\x4f\xa5\x4c\xa4\x9f",
1468         }, {
1469                 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
1470                 .psize  = 56,
1471                 .digest = "\x20\x4a\x8f\xc6\xdd\xa8\x2f\x0a"
1472                           "\x0c\xed\x7b\xeb\x8e\x08\xa4\x16"
1473                           "\x57\xc1\x6e\xf4\x68\xb2\x28\xa8"
1474                           "\x27\x9b\xe3\x31\xa7\x03\xc3\x35"
1475                           "\x96\xfd\x15\xc1\x3b\x1b\x07\xf9"
1476                           "\xaa\x1d\x3b\xea\x57\x78\x9c\xa0"
1477                           "\x31\xad\x85\xc7\xa7\x1d\xd7\x03"
1478                           "\x54\xec\x63\x12\x38\xca\x34\x45",
1479         }, {
1480                 .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
1481                            "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
1482                 .psize  = 112,
1483                 .digest = "\x8e\x95\x9b\x75\xda\xe3\x13\xda"
1484                           "\x8c\xf4\xf7\x28\x14\xfc\x14\x3f"
1485                           "\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1"
1486                           "\x72\x99\xae\xad\xb6\x88\x90\x18"
1487                           "\x50\x1d\x28\x9e\x49\x00\xf7\xe4"
1488                           "\x33\x1b\x99\xde\xc4\xb5\x43\x3a"
1489                           "\xc7\xd3\x29\xee\xb6\xdd\x26\x54"
1490                           "\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
1491         }, {
1492                 .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
1493                            "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
1494                 .psize  = 104,
1495                 .digest = "\x93\x0d\x0c\xef\xcb\x30\xff\x11"
1496                           "\x33\xb6\x89\x81\x21\xf1\xcf\x3d"
1497                           "\x27\x57\x8a\xfc\xaf\xe8\x67\x7c"
1498                           "\x52\x57\xcf\x06\x99\x11\xf7\x5d"
1499                           "\x8f\x58\x31\xb5\x6e\xbf\xda\x67"
1500                           "\xb2\x78\xe6\x6d\xff\x8b\x84\xfe"
1501                           "\x2b\x28\x70\xf7\x42\xa5\x80\xd8"
1502                           "\xed\xb4\x19\x87\x23\x28\x50\xc9",
1503                 .np     = 4,
1504                 .tap    = { 26, 26, 26, 26 }
1505         }, {
1506                 .plaintext = "\x08\x9f\x13\xaa\x41\xd8\x4c\xe3"
1507                              "\x7a\x11\x85\x1c\xb3\x27\xbe\x55"
1508                              "\xec\x60\xf7\x8e\x02\x99\x30\xc7"
1509                              "\x3b\xd2\x69\x00\x74\x0b\xa2\x16"
1510                              "\xad\x44\xdb\x4f\xe6\x7d\x14\x88"
1511                              "\x1f\xb6\x2a\xc1\x58\xef\x63\xfa"
1512                              "\x91\x05\x9c\x33\xca\x3e\xd5\x6c"
1513                              "\x03\x77\x0e\xa5\x19\xb0\x47\xde"
1514                              "\x52\xe9\x80\x17\x8b\x22\xb9\x2d"
1515                              "\xc4\x5b\xf2\x66\xfd\x94\x08\x9f"
1516                              "\x36\xcd\x41\xd8\x6f\x06\x7a\x11"
1517                              "\xa8\x1c\xb3\x4a\xe1\x55\xec\x83"
1518                              "\x1a\x8e\x25\xbc\x30\xc7\x5e\xf5"
1519                              "\x69\x00\x97\x0b\xa2\x39\xd0\x44"
1520                              "\xdb\x72\x09\x7d\x14\xab\x1f\xb6"
1521                              "\x4d\xe4\x58\xef\x86\x1d\x91\x28"
1522                              "\xbf\x33\xca\x61\xf8\x6c\x03\x9a"
1523                              "\x0e\xa5\x3c\xd3\x47\xde\x75\x0c"
1524                              "\x80\x17\xae\x22\xb9\x50\xe7\x5b"
1525                              "\xf2\x89\x20\x94\x2b\xc2\x36\xcd"
1526                              "\x64\xfb\x6f\x06\x9d\x11\xa8\x3f"
1527                              "\xd6\x4a\xe1\x78\x0f\x83\x1a\xb1"
1528                              "\x25\xbc\x53\xea\x5e\xf5\x8c\x00"
1529                              "\x97\x2e\xc5\x39\xd0\x67\xfe\x72"
1530                              "\x09\xa0\x14\xab\x42\xd9\x4d\xe4"
1531                              "\x7b\x12\x86\x1d\xb4\x28\xbf\x56"
1532                              "\xed\x61\xf8\x8f\x03\x9a\x31\xc8"
1533                              "\x3c\xd3\x6a\x01\x75\x0c\xa3\x17"
1534                              "\xae\x45\xdc\x50\xe7\x7e\x15\x89"
1535                              "\x20\xb7\x2b\xc2\x59\xf0\x64\xfb"
1536                              "\x92\x06\x9d\x34\xcb\x3f\xd6\x6d"
1537                              "\x04\x78\x0f\xa6\x1a\xb1\x48\xdf"
1538                              "\x53\xea\x81\x18\x8c\x23\xba\x2e"
1539                              "\xc5\x5c\xf3\x67\xfe\x95\x09\xa0"
1540                              "\x37\xce\x42\xd9\x70\x07\x7b\x12"
1541                              "\xa9\x1d\xb4\x4b\xe2\x56\xed\x84"
1542                              "\x1b\x8f\x26\xbd\x31\xc8\x5f\xf6"
1543                              "\x6a\x01\x98\x0c\xa3\x3a\xd1\x45"
1544                              "\xdc\x73\x0a\x7e\x15\xac\x20\xb7"
1545                              "\x4e\xe5\x59\xf0\x87\x1e\x92\x29"
1546                              "\xc0\x34\xcb\x62\xf9\x6d\x04\x9b"
1547                              "\x0f\xa6\x3d\xd4\x48\xdf\x76\x0d"
1548                              "\x81\x18\xaf\x23\xba\x51\xe8\x5c"
1549                              "\xf3\x8a\x21\x95\x2c\xc3\x37\xce"
1550                              "\x65\xfc\x70\x07\x9e\x12\xa9\x40"
1551                              "\xd7\x4b\xe2\x79\x10\x84\x1b\xb2"
1552                              "\x26\xbd\x54\xeb\x5f\xf6\x8d\x01"
1553                              "\x98\x2f\xc6\x3a\xd1\x68\xff\x73"
1554                              "\x0a\xa1\x15\xac\x43\xda\x4e\xe5"
1555                              "\x7c\x13\x87\x1e\xb5\x29\xc0\x57"
1556                              "\xee\x62\xf9\x90\x04\x9b\x32\xc9"
1557                              "\x3d\xd4\x6b\x02\x76\x0d\xa4\x18"
1558                              "\xaf\x46\xdd\x51\xe8\x7f\x16\x8a"
1559                              "\x21\xb8\x2c\xc3\x5a\xf1\x65\xfc"
1560                              "\x93\x07\x9e\x35\xcc\x40\xd7\x6e"
1561                              "\x05\x79\x10\xa7\x1b\xb2\x49\xe0"
1562                              "\x54\xeb\x82\x19\x8d\x24\xbb\x2f"
1563                              "\xc6\x5d\xf4\x68\xff\x96\x0a\xa1"
1564                              "\x38\xcf\x43\xda\x71\x08\x7c\x13"
1565                              "\xaa\x1e\xb5\x4c\xe3\x57\xee\x85"
1566                              "\x1c\x90\x27\xbe\x32\xc9\x60\xf7"
1567                              "\x6b\x02\x99\x0d\xa4\x3b\xd2\x46"
1568                              "\xdd\x74\x0b\x7f\x16\xad\x21\xb8"
1569                              "\x4f\xe6\x5a\xf1\x88\x1f\x93\x2a"
1570                              "\xc1\x35\xcc\x63\xfa\x6e\x05\x9c"
1571                              "\x10\xa7\x3e\xd5\x49\xe0\x77\x0e"
1572                              "\x82\x19\xb0\x24\xbb\x52\xe9\x5d"
1573                              "\xf4\x8b\x22\x96\x2d\xc4\x38\xcf"
1574                              "\x66\xfd\x71\x08\x9f\x13\xaa\x41"
1575                              "\xd8\x4c\xe3\x7a\x11\x85\x1c\xb3"
1576                              "\x27\xbe\x55\xec\x60\xf7\x8e\x02"
1577                              "\x99\x30\xc7\x3b\xd2\x69\x00\x74"
1578                              "\x0b\xa2\x16\xad\x44\xdb\x4f\xe6"
1579                              "\x7d\x14\x88\x1f\xb6\x2a\xc1\x58"
1580                              "\xef\x63\xfa\x91\x05\x9c\x33\xca"
1581                              "\x3e\xd5\x6c\x03\x77\x0e\xa5\x19"
1582                              "\xb0\x47\xde\x52\xe9\x80\x17\x8b"
1583                              "\x22\xb9\x2d\xc4\x5b\xf2\x66\xfd"
1584                              "\x94\x08\x9f\x36\xcd\x41\xd8\x6f"
1585                              "\x06\x7a\x11\xa8\x1c\xb3\x4a\xe1"
1586                              "\x55\xec\x83\x1a\x8e\x25\xbc\x30"
1587                              "\xc7\x5e\xf5\x69\x00\x97\x0b\xa2"
1588                              "\x39\xd0\x44\xdb\x72\x09\x7d\x14"
1589                              "\xab\x1f\xb6\x4d\xe4\x58\xef\x86"
1590                              "\x1d\x91\x28\xbf\x33\xca\x61\xf8"
1591                              "\x6c\x03\x9a\x0e\xa5\x3c\xd3\x47"
1592                              "\xde\x75\x0c\x80\x17\xae\x22\xb9"
1593                              "\x50\xe7\x5b\xf2\x89\x20\x94\x2b"
1594                              "\xc2\x36\xcd\x64\xfb\x6f\x06\x9d"
1595                              "\x11\xa8\x3f\xd6\x4a\xe1\x78\x0f"
1596                              "\x83\x1a\xb1\x25\xbc\x53\xea\x5e"
1597                              "\xf5\x8c\x00\x97\x2e\xc5\x39\xd0"
1598                              "\x67\xfe\x72\x09\xa0\x14\xab\x42"
1599                              "\xd9\x4d\xe4\x7b\x12\x86\x1d\xb4"
1600                              "\x28\xbf\x56\xed\x61\xf8\x8f\x03"
1601                              "\x9a\x31\xc8\x3c\xd3\x6a\x01\x75"
1602                              "\x0c\xa3\x17\xae\x45\xdc\x50\xe7"
1603                              "\x7e\x15\x89\x20\xb7\x2b\xc2\x59"
1604                              "\xf0\x64\xfb\x92\x06\x9d\x34\xcb"
1605                              "\x3f\xd6\x6d\x04\x78\x0f\xa6\x1a"
1606                              "\xb1\x48\xdf\x53\xea\x81\x18\x8c"
1607                              "\x23\xba\x2e\xc5\x5c\xf3\x67\xfe"
1608                              "\x95\x09\xa0\x37\xce\x42\xd9\x70"
1609                              "\x07\x7b\x12\xa9\x1d\xb4\x4b\xe2"
1610                              "\x56\xed\x84\x1b\x8f\x26\xbd\x31"
1611                              "\xc8\x5f\xf6\x6a\x01\x98\x0c\xa3"
1612                              "\x3a\xd1\x45\xdc\x73\x0a\x7e\x15"
1613                              "\xac\x20\xb7\x4e\xe5\x59\xf0\x87"
1614                              "\x1e\x92\x29\xc0\x34\xcb\x62\xf9"
1615                              "\x6d\x04\x9b\x0f\xa6\x3d\xd4\x48"
1616                              "\xdf\x76\x0d\x81\x18\xaf\x23\xba"
1617                              "\x51\xe8\x5c\xf3\x8a\x21\x95\x2c"
1618                              "\xc3\x37\xce\x65\xfc\x70\x07\x9e"
1619                              "\x12\xa9\x40\xd7\x4b\xe2\x79\x10"
1620                              "\x84\x1b\xb2\x26\xbd\x54\xeb\x5f"
1621                              "\xf6\x8d\x01\x98\x2f\xc6\x3a\xd1"
1622                              "\x68\xff\x73\x0a\xa1\x15\xac\x43"
1623                              "\xda\x4e\xe5\x7c\x13\x87\x1e\xb5"
1624                              "\x29\xc0\x57\xee\x62\xf9\x90\x04"
1625                              "\x9b\x32\xc9\x3d\xd4\x6b\x02\x76"
1626                              "\x0d\xa4\x18\xaf\x46\xdd\x51\xe8"
1627                              "\x7f\x16\x8a\x21\xb8\x2c\xc3\x5a"
1628                              "\xf1\x65\xfc\x93\x07\x9e\x35\xcc"
1629                              "\x40\xd7\x6e\x05\x79\x10\xa7\x1b"
1630                              "\xb2\x49\xe0\x54\xeb\x82\x19\x8d"
1631                              "\x24\xbb\x2f\xc6\x5d\xf4\x68\xff"
1632                              "\x96\x0a\xa1\x38\xcf\x43\xda\x71"
1633                              "\x08\x7c\x13\xaa\x1e\xb5\x4c",
1634                 .psize     = 1023,
1635                 .digest    = "\x76\xc9\xd4\x91\x7a\x5f\x0f\xaa"
1636                              "\x13\x39\xf3\x01\x7a\xfa\xe5\x41"
1637                              "\x5f\x0b\xf8\xeb\x32\xfc\xbf\xb0"
1638                              "\xfa\x8c\xcd\x17\x83\xe2\xfa\xeb"
1639                              "\x1c\x19\xde\xe2\x75\xdc\x34\x64"
1640                              "\x5f\x35\x9c\x61\x2f\x10\xf9\xec"
1641                              "\x59\xca\x9d\xcc\x25\x0c\x43\xba"
1642                              "\x85\xa8\xf8\xfe\xb5\x24\xb2\xee",
1643         }
1644 };
1645
1646
1647 /*
1648  * WHIRLPOOL test vectors from Whirlpool package
1649  * by Vincent Rijmen and Paulo S. L. M. Barreto as part of the NESSIE
1650  * submission
1651  */
1652 #define WP512_TEST_VECTORS      8
1653
1654 static struct hash_testvec wp512_tv_template[] = {
1655         {
1656                 .plaintext = "",
1657                 .psize  = 0,
1658                 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1659                           "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1660                           "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1661                           "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
1662                           "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
1663                           "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57"
1664                           "\xEA\x89\x64\xE5\x9B\x63\xD9\x37"
1665                           "\x08\xB1\x38\xCC\x42\xA6\x6E\xB3",
1666
1667
1668         }, {
1669                 .plaintext = "a",
1670                 .psize  = 1,
1671                 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1672                           "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1673                           "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1674                           "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
1675                           "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
1676                           "\x3A\x42\x39\x1A\x39\x14\x5A\x59"
1677                           "\x1A\x92\x20\x0D\x56\x01\x95\xE5"
1678                           "\x3B\x47\x85\x84\xFD\xAE\x23\x1A",
1679         }, {
1680                 .plaintext = "abc",
1681                 .psize  = 3,
1682                 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1683                           "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1684                           "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1685                           "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
1686                           "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
1687                           "\x7D\x0E\x34\x95\x71\x14\xCB\xD6"
1688                           "\xC7\x97\xFC\x9D\x95\xD8\xB5\x82"
1689                           "\xD2\x25\x29\x20\x76\xD4\xEE\xF5",
1690         }, {
1691                 .plaintext = "message digest",
1692                 .psize  = 14,
1693                 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1694                           "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1695                           "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1696                           "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
1697                           "\x84\x21\x55\x76\x59\xEF\x55\xC1"
1698                           "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6"
1699                           "\x92\xED\x92\x00\x52\x83\x8F\x33"
1700                           "\x62\xE8\x6D\xBD\x37\xA8\x90\x3E",
1701         }, {
1702                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1703                 .psize  = 26,
1704                 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1705                           "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1706                           "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1707                           "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
1708                           "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
1709                           "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6"
1710                           "\xF6\x8F\x67\x3E\x72\x07\x86\x5D"
1711                           "\x5D\x98\x19\xA3\xDB\xA4\xEB\x3B",
1712         }, {
1713                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1714                            "abcdefghijklmnopqrstuvwxyz0123456789",
1715                 .psize  = 62,
1716                 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1717                           "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1718                           "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1719                           "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
1720                           "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
1721                           "\xB7\xCB\x57\x21\x1B\x92\x81\xA6"
1722                           "\x55\x17\xCC\x87\x9D\x7B\x96\x21"
1723                           "\x42\xC6\x5F\x5A\x7A\xF0\x14\x67",
1724         }, {
1725                 .plaintext = "1234567890123456789012345678901234567890"
1726                            "1234567890123456789012345678901234567890",
1727                 .psize  = 80,
1728                 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1729                           "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1730                           "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1731                           "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
1732                           "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
1733                           "\x38\xCD\x04\x7B\x26\x81\xA5\x1A"
1734                           "\x2C\x60\x48\x1E\x88\xC5\xA2\x0B"
1735                           "\x2C\x2A\x80\xCF\x3A\x9A\x08\x3B",
1736         }, {
1737                 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1738                 .psize  = 32,
1739                 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1740                           "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1741                           "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1742                           "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
1743                           "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
1744                           "\x7B\x94\x76\x39\xFE\x05\x0B\x56"
1745                           "\x93\x9B\xAA\xA0\xAD\xFF\x9A\xE6"
1746                           "\x74\x5B\x7B\x18\x1C\x3B\xE3\xFD",
1747         },
1748 };
1749
1750 #define WP384_TEST_VECTORS      8
1751
1752 static struct hash_testvec wp384_tv_template[] = {
1753         {
1754                 .plaintext = "",
1755                 .psize  = 0,
1756                 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1757                           "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1758                           "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1759                           "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7"
1760                           "\x3E\x83\xBE\x69\x8B\x28\x8F\xEB"
1761                           "\xCF\x88\xE3\xE0\x3C\x4F\x07\x57",
1762
1763
1764         }, {
1765                 .plaintext = "a",
1766                 .psize  = 1,
1767                 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1768                           "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1769                           "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1770                           "\x73\xC4\x50\x01\xD0\x08\x7B\x42"
1771                           "\xD1\x1B\xC6\x45\x41\x3A\xEF\xF6"
1772                           "\x3A\x42\x39\x1A\x39\x14\x5A\x59",
1773         }, {
1774                 .plaintext = "abc",
1775                 .psize  = 3,
1776                 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1777                           "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1778                           "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1779                           "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C"
1780                           "\x71\x81\xEE\xBD\xB6\xC5\x7E\x27"
1781                           "\x7D\x0E\x34\x95\x71\x14\xCB\xD6",
1782         }, {
1783                 .plaintext = "message digest",
1784                 .psize  = 14,
1785                 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1786                           "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1787                           "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1788                           "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B"
1789                           "\x84\x21\x55\x76\x59\xEF\x55\xC1"
1790                           "\x06\xB4\xB5\x2A\xC5\xA4\xAA\xA6",
1791         }, {
1792                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1793                 .psize  = 26,
1794                 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1795                           "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1796                           "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1797                           "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B"
1798                           "\x08\xBF\x2A\x92\x51\xC3\x0B\x6A"
1799                           "\x0B\x8A\xAE\x86\x17\x7A\xB4\xA6",
1800         }, {
1801                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1802                            "abcdefghijklmnopqrstuvwxyz0123456789",
1803                 .psize  = 62,
1804                 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1805                           "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1806                           "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1807                           "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E"
1808                           "\x08\xEB\xA2\x66\x29\x12\x9D\x8F"
1809                           "\xB7\xCB\x57\x21\x1B\x92\x81\xA6",
1810         }, {
1811                 .plaintext = "1234567890123456789012345678901234567890"
1812                            "1234567890123456789012345678901234567890",
1813                 .psize  = 80,
1814                 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1815                           "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1816                           "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1817                           "\x54\x9C\x4A\xFA\xDB\x60\x14\x29"
1818                           "\x4D\x5B\xD8\xDF\x2A\x6C\x44\xE5"
1819                           "\x38\xCD\x04\x7B\x26\x81\xA5\x1A",
1820         }, {
1821                 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1822                 .psize  = 32,
1823                 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1824                           "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1825                           "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1826                           "\x07\xC5\x62\xF9\x88\xE9\x5C\x69"
1827                           "\x16\xBD\xC8\x03\x1B\xC5\xBE\x1B"
1828                           "\x7B\x94\x76\x39\xFE\x05\x0B\x56",
1829         },
1830 };
1831
1832 #define WP256_TEST_VECTORS      8
1833
1834 static struct hash_testvec wp256_tv_template[] = {
1835         {
1836                 .plaintext = "",
1837                 .psize  = 0,
1838                 .digest = "\x19\xFA\x61\xD7\x55\x22\xA4\x66"
1839                           "\x9B\x44\xE3\x9C\x1D\x2E\x17\x26"
1840                           "\xC5\x30\x23\x21\x30\xD4\x07\xF8"
1841                           "\x9A\xFE\xE0\x96\x49\x97\xF7\xA7",
1842
1843
1844         }, {
1845                 .plaintext = "a",
1846                 .psize  = 1,
1847                 .digest = "\x8A\xCA\x26\x02\x79\x2A\xEC\x6F"
1848                           "\x11\xA6\x72\x06\x53\x1F\xB7\xD7"
1849                           "\xF0\xDF\xF5\x94\x13\x14\x5E\x69"
1850                           "\x73\xC4\x50\x01\xD0\x08\x7B\x42",
1851         }, {
1852                 .plaintext = "abc",
1853                 .psize  = 3,
1854                 .digest = "\x4E\x24\x48\xA4\xC6\xF4\x86\xBB"
1855                           "\x16\xB6\x56\x2C\x73\xB4\x02\x0B"
1856                           "\xF3\x04\x3E\x3A\x73\x1B\xCE\x72"
1857                           "\x1A\xE1\xB3\x03\xD9\x7E\x6D\x4C",
1858         }, {
1859                 .plaintext = "message digest",
1860                 .psize  = 14,
1861                 .digest = "\x37\x8C\x84\xA4\x12\x6E\x2D\xC6"
1862                           "\xE5\x6D\xCC\x74\x58\x37\x7A\xAC"
1863                           "\x83\x8D\x00\x03\x22\x30\xF5\x3C"
1864                           "\xE1\xF5\x70\x0C\x0F\xFB\x4D\x3B",
1865         }, {
1866                 .plaintext = "abcdefghijklmnopqrstuvwxyz",
1867                 .psize  = 26,
1868                 .digest = "\xF1\xD7\x54\x66\x26\x36\xFF\xE9"
1869                           "\x2C\x82\xEB\xB9\x21\x2A\x48\x4A"
1870                           "\x8D\x38\x63\x1E\xAD\x42\x38\xF5"
1871                           "\x44\x2E\xE1\x3B\x80\x54\xE4\x1B",
1872         }, {
1873                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
1874                            "abcdefghijklmnopqrstuvwxyz0123456789",
1875                 .psize  = 62,
1876                 .digest = "\xDC\x37\xE0\x08\xCF\x9E\xE6\x9B"
1877                           "\xF1\x1F\x00\xED\x9A\xBA\x26\x90"
1878                           "\x1D\xD7\xC2\x8C\xDE\xC0\x66\xCC"
1879                           "\x6A\xF4\x2E\x40\xF8\x2F\x3A\x1E",
1880         }, {
1881                 .plaintext = "1234567890123456789012345678901234567890"
1882                            "1234567890123456789012345678901234567890",
1883                 .psize  = 80,
1884                 .digest = "\x46\x6E\xF1\x8B\xAB\xB0\x15\x4D"
1885                           "\x25\xB9\xD3\x8A\x64\x14\xF5\xC0"
1886                           "\x87\x84\x37\x2B\xCC\xB2\x04\xD6"
1887                           "\x54\x9C\x4A\xFA\xDB\x60\x14\x29",
1888         }, {
1889                 .plaintext = "abcdbcdecdefdefgefghfghighijhijk",
1890                 .psize  = 32,
1891                 .digest = "\x2A\x98\x7E\xA4\x0F\x91\x70\x61"
1892                           "\xF5\xD6\xF0\xA0\xE4\x64\x4F\x48"
1893                           "\x8A\x7A\x5A\x52\xDE\xEE\x65\x62"
1894                           "\x07\xC5\x62\xF9\x88\xE9\x5C\x69",
1895         },
1896 };
1897
1898 /*
1899  * TIGER test vectors from Tiger website
1900  */
1901 #define TGR192_TEST_VECTORS     6
1902
1903 static struct hash_testvec tgr192_tv_template[] = {
1904         {
1905                 .plaintext = "",
1906                 .psize  = 0,
1907                 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1908                           "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
1909                           "\xf3\x73\xde\x2d\x49\x58\x4e\x7a",
1910         }, {
1911                 .plaintext = "abc",
1912                 .psize  = 3,
1913                 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1914                           "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
1915                           "\x93\x5f\x7b\x95\x1c\x13\x29\x51",
1916         }, {
1917                 .plaintext = "Tiger",
1918                 .psize  = 5,
1919                 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1920                           "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
1921                           "\x37\x79\x0c\x11\x6f\x9d\x2b\xdf",
1922         }, {
1923                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1924                 .psize  = 64,
1925                 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1926                           "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
1927                           "\xb5\x86\x44\x50\x34\xa5\xa3\x86",
1928         }, {
1929                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1930                 .psize  = 64,
1931                 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1932                           "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
1933                           "\x57\x89\x65\x65\x97\x5f\x91\x97",
1934         }, {
1935                 .plaintext = "Tiger - A Fast New Hash Function, "
1936                            "by Ross Anderson and Eli Biham, "
1937                            "proceedings of Fast Software Encryption 3, "
1938                            "Cambridge, 1996.",
1939                 .psize  = 125,
1940                 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1941                           "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1942                           "\xdd\x68\x15\x1d\x50\x39\x74\xfc",
1943         },
1944 };
1945
1946 #define TGR160_TEST_VECTORS     6
1947
1948 static struct hash_testvec tgr160_tv_template[] = {
1949         {
1950                 .plaintext = "",
1951                 .psize  = 0,
1952                 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1953                           "\x16\x16\x6e\x76\xb1\xbb\x92\x5f"
1954                           "\xf3\x73\xde\x2d",
1955         }, {
1956                 .plaintext = "abc",
1957                 .psize  = 3,
1958                 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
1959                           "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf"
1960                           "\x93\x5f\x7b\x95",
1961         }, {
1962                 .plaintext = "Tiger",
1963                 .psize  = 5,
1964                 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
1965                           "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec"
1966                           "\x37\x79\x0c\x11",
1967         }, {
1968                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
1969                 .psize  = 64,
1970                 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
1971                           "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e"
1972                           "\xb5\x86\x44\x50",
1973         }, {
1974                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
1975                 .psize  = 64,
1976                 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
1977                           "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9"
1978                           "\x57\x89\x65\x65",
1979         }, {
1980                 .plaintext = "Tiger - A Fast New Hash Function, "
1981                            "by Ross Anderson and Eli Biham, "
1982                            "proceedings of Fast Software Encryption 3, "
1983                            "Cambridge, 1996.",
1984                 .psize  = 125,
1985                 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
1986                           "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24"
1987                           "\xdd\x68\x15\x1d",
1988         },
1989 };
1990
1991 #define TGR128_TEST_VECTORS     6
1992
1993 static struct hash_testvec tgr128_tv_template[] = {
1994         {
1995                 .plaintext = "",
1996                 .psize  = 0,
1997                 .digest = "\x24\xf0\x13\x0c\x63\xac\x93\x32"
1998                           "\x16\x16\x6e\x76\xb1\xbb\x92\x5f",
1999         }, {
2000                 .plaintext = "abc",
2001                 .psize  = 3,
2002                 .digest = "\xf2\x58\xc1\xe8\x84\x14\xab\x2a"
2003                           "\x52\x7a\xb5\x41\xff\xc5\xb8\xbf",
2004         }, {
2005                 .plaintext = "Tiger",
2006                 .psize  = 5,
2007                 .digest = "\x9f\x00\xf5\x99\x07\x23\x00\xdd"
2008                           "\x27\x6a\xbb\x38\xc8\xeb\x6d\xec",
2009         }, {
2010                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-",
2011                 .psize  = 64,
2012                 .digest = "\x87\xfb\x2a\x90\x83\x85\x1c\xf7"
2013                           "\x47\x0d\x2c\xf8\x10\xe6\xdf\x9e",
2014         }, {
2015                 .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZ=abcdefghijklmnopqrstuvwxyz+0123456789",
2016                 .psize  = 64,
2017                 .digest = "\x46\x7d\xb8\x08\x63\xeb\xce\x48"
2018                           "\x8d\xf1\xcd\x12\x61\x65\x5d\xe9",
2019         }, {
2020                 .plaintext = "Tiger - A Fast New Hash Function, "
2021                            "by Ross Anderson and Eli Biham, "
2022                            "proceedings of Fast Software Encryption 3, "
2023                            "Cambridge, 1996.",
2024                 .psize  = 125,
2025                 .digest = "\x3d\x9a\xeb\x03\xd1\xbd\x1a\x63"
2026                           "\x57\xb2\x77\x4d\xfd\x6d\x5b\x24",
2027         },
2028 };
2029
2030 #define GHASH_TEST_VECTORS 6
2031
2032 static struct hash_testvec ghash_tv_template[] =
2033 {
2034         {
2035                 .key    = "\xdf\xa6\xbf\x4d\xed\x81\xdb\x03"
2036                           "\xff\xca\xff\x95\xf8\x30\xf0\x61",
2037                 .ksize  = 16,
2038                 .plaintext = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
2039                              "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
2040                 .psize  = 16,
2041                 .digest = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
2042                           "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
2043         }, {
2044                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2045                           "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2046                 .ksize  = 16,
2047                 .plaintext = "what do ya want for nothing?",
2048                 .psize  = 28,
2049                 .digest = "\x3e\x1f\x5c\x4d\x65\xf0\xef\xce"
2050                           "\x0d\x61\x06\x27\x66\x51\xd5\xe2",
2051                 .np     = 2,
2052                 .tap    = {14, 14}
2053         }, {
2054                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2055                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2056                 .ksize  = 16,
2057                 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2058                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2059                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2060                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2061                 .psize  = 50,
2062                 .digest = "\xfb\x49\x8a\x36\xe1\x96\xe1\x96"
2063                           "\xe1\x96\xe1\x96\xe1\x96\xe1\x96",
2064         }, {
2065                 .key    = "\xda\x53\xeb\x0a\xd2\xc5\x5b\xb6"
2066                           "\x4f\xc4\x80\x2c\xc3\xfe\xda\x60",
2067                 .ksize  = 16,
2068                 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2069                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2070                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2071                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2072                 .psize  = 50,
2073                 .digest = "\x2b\x5c\x0c\x7f\x52\xd1\x60\xc2"
2074                           "\x49\xed\x6e\x32\x7a\xa9\xbe\x08",
2075         }, {
2076                 .key    = "\x95\x2b\x2a\x56\xa5\x60\x04a\xc0"
2077                           "\xb3\x2b\x66\x56\xa0\x5b\x40\xb6",
2078                 .ksize  = 16,
2079                 .plaintext = "Test With Truncation",
2080                 .psize  = 20,
2081                 .digest = "\xf8\x94\x87\x2a\x4b\x63\x99\x28"
2082                           "\x23\xf7\x93\xf7\x19\xf5\x96\xd9",
2083         }, {
2084                 .key    = "\x0a\x1b\x2c\x3d\x4e\x5f\x64\x71"
2085                         "\x82\x93\xa4\xb5\xc6\xd7\xe8\xf9",
2086                 .ksize  = 16,
2087                 .plaintext = "\x56\x6f\x72\x20\x6c\x61\x75\x74"
2088                         "\x65\x72\x20\x4c\x61\x75\x73\x63"
2089                         "\x68\x65\x6e\x20\x75\x6e\x64\x20"
2090                         "\x53\x74\x61\x75\x6e\x65\x6e\x20"
2091                         "\x73\x65\x69\x20\x73\x74\x69\x6c"
2092                         "\x6c\x2c\x0a\x64\x75\x20\x6d\x65"
2093                         "\x69\x6e\x20\x74\x69\x65\x66\x74"
2094                         "\x69\x65\x66\x65\x73\x20\x4c\x65"
2095                         "\x62\x65\x6e\x3b\x0a\x64\x61\x73"
2096                         "\x73\x20\x64\x75\x20\x77\x65\x69"
2097                         "\xc3\x9f\x74\x20\x77\x61\x73\x20"
2098                         "\x64\x65\x72\x20\x57\x69\x6e\x64"
2099                         "\x20\x64\x69\x72\x20\x77\x69\x6c"
2100                         "\x6c\x2c\x0a\x65\x68\x20\x6e\x6f"
2101                         "\x63\x68\x20\x64\x69\x65\x20\x42"
2102                         "\x69\x72\x6b\x65\x6e\x20\x62\x65"
2103                         "\x62\x65\x6e\x2e\x0a\x0a\x55\x6e"
2104                         "\x64\x20\x77\x65\x6e\x6e\x20\x64"
2105                         "\x69\x72\x20\x65\x69\x6e\x6d\x61"
2106                         "\x6c\x20\x64\x61\x73\x20\x53\x63"
2107                         "\x68\x77\x65\x69\x67\x65\x6e\x20"
2108                         "\x73\x70\x72\x61\x63\x68\x2c\x0a"
2109                         "\x6c\x61\x73\x73\x20\x64\x65\x69"
2110                         "\x6e\x65\x20\x53\x69\x6e\x6e\x65"
2111                         "\x20\x62\x65\x73\x69\x65\x67\x65"
2112                         "\x6e\x2e\x0a\x4a\x65\x64\x65\x6d"
2113                         "\x20\x48\x61\x75\x63\x68\x65\x20"
2114                         "\x67\x69\x62\x74\x20\x64\x69\x63"
2115                         "\x68\x2c\x20\x67\x69\x62\x20\x6e"
2116                         "\x61\x63\x68\x2c\x0a\x65\x72\x20"
2117                         "\x77\x69\x72\x64\x20\x64\x69\x63"
2118                         "\x68\x20\x6c\x69\x65\x62\x65\x6e"
2119                         "\x20\x75\x6e\x64\x20\x77\x69\x65"
2120                         "\x67\x65\x6e\x2e\x0a\x0a\x55\x6e"
2121                         "\x64\x20\x64\x61\x6e\x6e\x20\x6d"
2122                         "\x65\x69\x6e\x65\x20\x53\x65\x65"
2123                         "\x6c\x65\x20\x73\x65\x69\x74\x20"
2124                         "\x77\x65\x69\x74\x2c\x20\x73\x65"
2125                         "\x69\x20\x77\x65\x69\x74\x2c\x0a"
2126                         "\x64\x61\x73\x73\x20\x64\x69\x72"
2127                         "\x20\x64\x61\x73\x20\x4c\x65\x62"
2128                         "\x65\x6e\x20\x67\x65\x6c\x69\x6e"
2129                         "\x67\x65\x2c\x0a\x62\x72\x65\x69"
2130                         "\x74\x65\x20\x64\x69\x63\x68\x20"
2131                         "\x77\x69\x65\x20\x65\x69\x6e\x20"
2132                         "\x46\x65\x69\x65\x72\x6b\x6c\x65"
2133                         "\x69\x64\x0a\xc3\xbc\x62\x65\x72"
2134                         "\x20\x64\x69\x65\x20\x73\x69\x6e"
2135                         "\x6e\x65\x6e\x64\x65\x6e\x20\x44"
2136                         "\x69\x6e\x67\x65\x2e\x2e\x2e\x0a",
2137                 .psize  = 400,
2138                 .digest = "\xad\xb1\xc1\xe9\x56\x70\x31\x1d"
2139                         "\xbb\x5b\xdf\x5e\x70\x72\x1a\x57",
2140         },
2141 };
2142
2143 /*
2144  * HMAC-MD5 test vectors from RFC2202
2145  * (These need to be fixed to not use strlen).
2146  */
2147 #define HMAC_MD5_TEST_VECTORS   7
2148
2149 static struct hash_testvec hmac_md5_tv_template[] =
2150 {
2151         {
2152                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2153                 .ksize  = 16,
2154                 .plaintext = "Hi There",
2155                 .psize  = 8,
2156                 .digest = "\x92\x94\x72\x7a\x36\x38\xbb\x1c"
2157                           "\x13\xf4\x8e\xf8\x15\x8b\xfc\x9d",
2158         }, {
2159                 .key    = "Jefe",
2160                 .ksize  = 4,
2161                 .plaintext = "what do ya want for nothing?",
2162                 .psize  = 28,
2163                 .digest = "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03"
2164                           "\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
2165                 .np     = 2,
2166                 .tap    = {14, 14}
2167         }, {
2168                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2169                 .ksize  = 16,
2170                 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2171                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2172                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2173                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2174                 .psize  = 50,
2175                 .digest = "\x56\xbe\x34\x52\x1d\x14\x4c\x88"
2176                           "\xdb\xb8\xc7\x33\xf0\xe8\xb3\xf6",
2177         }, {
2178                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
2179                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2180                           "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2181                 .ksize  = 25,
2182                 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2183                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2184                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2185                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2186                 .psize  = 50,
2187                 .digest = "\x69\x7e\xaf\x0a\xca\x3a\x3a\xea"
2188                           "\x3a\x75\x16\x47\x46\xff\xaa\x79",
2189         }, {
2190                 .key    = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2191                 .ksize  = 16,
2192                 .plaintext = "Test With Truncation",
2193                 .psize  = 20,
2194                 .digest = "\x56\x46\x1e\xf2\x34\x2e\xdc\x00"
2195                           "\xf9\xba\xb9\x95\x69\x0e\xfd\x4c",
2196         }, {
2197                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2198                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2199                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2200                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2201                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2202                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2203                         "\xaa\xaa",
2204                 .ksize  = 80,
2205                 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2206                 .psize  = 54,
2207                 .digest = "\x6b\x1a\xb7\xfe\x4b\xd7\xbf\x8f"
2208                           "\x0b\x62\xe6\xce\x61\xb9\xd0\xcd",
2209         }, {
2210                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2211                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2212                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2213                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2214                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2215                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2216                         "\xaa\xaa",
2217                 .ksize  = 80,
2218                 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2219                            "Block-Size Data",
2220                 .psize  = 73,
2221                 .digest = "\x6f\x63\x0f\xad\x67\xcd\xa0\xee"
2222                           "\x1f\xb1\xf5\x62\xdb\x3a\xa5\x3e",
2223         },
2224 };
2225
2226 /*
2227  * HMAC-RIPEMD128 test vectors from RFC2286
2228  */
2229 #define HMAC_RMD128_TEST_VECTORS        7
2230
2231 static struct hash_testvec hmac_rmd128_tv_template[] = {
2232         {
2233                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2234                 .ksize  = 16,
2235                 .plaintext = "Hi There",
2236                 .psize  = 8,
2237                 .digest = "\xfb\xf6\x1f\x94\x92\xaa\x4b\xbf"
2238                           "\x81\xc1\x72\xe8\x4e\x07\x34\xdb",
2239         }, {
2240                 .key    = "Jefe",
2241                 .ksize  = 4,
2242                 .plaintext = "what do ya want for nothing?",
2243                 .psize  = 28,
2244                 .digest = "\x87\x5f\x82\x88\x62\xb6\xb3\x34"
2245                           "\xb4\x27\xc5\x5f\x9f\x7f\xf0\x9b",
2246                 .np     = 2,
2247                 .tap    = { 14, 14 },
2248         }, {
2249                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2250                 .ksize  = 16,
2251                 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2252                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2253                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2254                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2255                 .psize  = 50,
2256                 .digest = "\x09\xf0\xb2\x84\x6d\x2f\x54\x3d"
2257                           "\xa3\x63\xcb\xec\x8d\x62\xa3\x8d",
2258         }, {
2259                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
2260                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2261                           "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2262                 .ksize  = 25,
2263                 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2264                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2265                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2266                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2267                 .psize  = 50,
2268                 .digest = "\xbd\xbb\xd7\xcf\x03\xe4\x4b\x5a"
2269                           "\xa6\x0a\xf8\x15\xbe\x4d\x22\x94",
2270         }, {
2271                 .key    = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2272                 .ksize  = 16,
2273                 .plaintext = "Test With Truncation",
2274                 .psize  = 20,
2275                 .digest = "\xe7\x98\x08\xf2\x4b\x25\xfd\x03"
2276                           "\x1c\x15\x5f\x0d\x55\x1d\x9a\x3a",
2277         }, {
2278                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2279                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2280                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2281                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2282                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2283                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2284                         "\xaa\xaa",
2285                 .ksize  = 80,
2286                 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2287                 .psize  = 54,
2288                 .digest = "\xdc\x73\x29\x28\xde\x98\x10\x4a"
2289                           "\x1f\x59\xd3\x73\xc1\x50\xac\xbb",
2290         }, {
2291                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2292                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2293                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2294                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2295                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2296                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2297                         "\xaa\xaa",
2298                 .ksize  = 80,
2299                 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2300                            "Block-Size Data",
2301                 .psize  = 73,
2302                 .digest = "\x5c\x6b\xec\x96\x79\x3e\x16\xd4"
2303                           "\x06\x90\xc2\x37\x63\x5f\x30\xc5",
2304         },
2305 };
2306
2307 /*
2308  * HMAC-RIPEMD160 test vectors from RFC2286
2309  */
2310 #define HMAC_RMD160_TEST_VECTORS        7
2311
2312 static struct hash_testvec hmac_rmd160_tv_template[] = {
2313         {
2314                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2315                 .ksize  = 20,
2316                 .plaintext = "Hi There",
2317                 .psize  = 8,
2318                 .digest = "\x24\xcb\x4b\xd6\x7d\x20\xfc\x1a\x5d\x2e"
2319                           "\xd7\x73\x2d\xcc\x39\x37\x7f\x0a\x56\x68",
2320         }, {
2321                 .key    = "Jefe",
2322                 .ksize  = 4,
2323                 .plaintext = "what do ya want for nothing?",
2324                 .psize  = 28,
2325                 .digest = "\xdd\xa6\xc0\x21\x3a\x48\x5a\x9e\x24\xf4"
2326                           "\x74\x20\x64\xa7\xf0\x33\xb4\x3c\x40\x69",
2327                 .np     = 2,
2328                 .tap    = { 14, 14 },
2329         }, {
2330                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2331                 .ksize  = 20,
2332                 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2333                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2334                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2335                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2336                 .psize  = 50,
2337                 .digest = "\xb0\xb1\x05\x36\x0d\xe7\x59\x96\x0a\xb4"
2338                           "\xf3\x52\x98\xe1\x16\xe2\x95\xd8\xe7\xc1",
2339         }, {
2340                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
2341                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2342                           "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2343                 .ksize  = 25,
2344                 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2345                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2346                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2347                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2348                 .psize  = 50,
2349                 .digest = "\xd5\xca\x86\x2f\x4d\x21\xd5\xe6\x10\xe1"
2350                           "\x8b\x4c\xf1\xbe\xb9\x7a\x43\x65\xec\xf4",
2351         }, {
2352                 .key    = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2353                 .ksize  = 20,
2354                 .plaintext = "Test With Truncation",
2355                 .psize  = 20,
2356                 .digest = "\x76\x19\x69\x39\x78\xf9\x1d\x90\x53\x9a"
2357                           "\xe7\x86\x50\x0f\xf3\xd8\xe0\x51\x8e\x39",
2358         }, {
2359                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2360                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2361                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2362                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2363                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2364                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2365                         "\xaa\xaa",
2366                 .ksize  = 80,
2367                 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2368                 .psize  = 54,
2369                 .digest = "\x64\x66\xca\x07\xac\x5e\xac\x29\xe1\xbd"
2370                           "\x52\x3e\x5a\xda\x76\x05\xb7\x91\xfd\x8b",
2371         }, {
2372                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2373                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2374                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2375                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2376                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2377                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2378                         "\xaa\xaa",
2379                 .ksize  = 80,
2380                 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2381                            "Block-Size Data",
2382                 .psize  = 73,
2383                 .digest = "\x69\xea\x60\x79\x8d\x71\x61\x6c\xce\x5f"
2384                           "\xd0\x87\x1e\x23\x75\x4c\xd7\x5d\x5a\x0a",
2385         },
2386 };
2387
2388 /*
2389  * HMAC-SHA1 test vectors from RFC2202
2390  */
2391 #define HMAC_SHA1_TEST_VECTORS  7
2392
2393 static struct hash_testvec hmac_sha1_tv_template[] = {
2394         {
2395                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
2396                 .ksize  = 20,
2397                 .plaintext = "Hi There",
2398                 .psize  = 8,
2399                 .digest = "\xb6\x17\x31\x86\x55\x05\x72\x64"
2400                           "\xe2\x8b\xc0\xb6\xfb\x37\x8c\x8e\xf1"
2401                           "\x46\xbe",
2402         }, {
2403                 .key    = "Jefe",
2404                 .ksize  = 4,
2405                 .plaintext = "what do ya want for nothing?",
2406                 .psize  = 28,
2407                 .digest = "\xef\xfc\xdf\x6a\xe5\xeb\x2f\xa2\xd2\x74"
2408                           "\x16\xd5\xf1\x84\xdf\x9c\x25\x9a\x7c\x79",
2409                 .np     = 2,
2410                 .tap    = { 14, 14 }
2411         }, {
2412                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2413                 .ksize  = 20,
2414                 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2415                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2416                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2417                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2418                 .psize  = 50,
2419                 .digest = "\x12\x5d\x73\x42\xb9\xac\x11\xcd\x91\xa3"
2420                           "\x9a\xf4\x8a\xa1\x7b\x4f\x63\xf1\x75\xd3",
2421         }, {
2422                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
2423                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2424                           "\x11\x12\x13\x14\x15\x16\x17\x18\x19",
2425                 .ksize  = 25,
2426                 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2427                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2428                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2429                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2430                 .psize  = 50,
2431                 .digest = "\x4c\x90\x07\xf4\x02\x62\x50\xc6\xbc\x84"
2432                           "\x14\xf9\xbf\x50\xc8\x6c\x2d\x72\x35\xda",
2433         }, {
2434                 .key    = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c",
2435                 .ksize  = 20,
2436                 .plaintext = "Test With Truncation",
2437                 .psize  = 20,
2438                 .digest = "\x4c\x1a\x03\x42\x4b\x55\xe0\x7f\xe7\xf2"
2439                           "\x7b\xe1\xd5\x8b\xb9\x32\x4a\x9a\x5a\x04",
2440         }, {
2441                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2442                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2443                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2444                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2445                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2446                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2447                         "\xaa\xaa",
2448                 .ksize  = 80,
2449                 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2450                 .psize  = 54,
2451                 .digest = "\xaa\x4a\xe5\xe1\x52\x72\xd0\x0e\x95\x70"
2452                           "\x56\x37\xce\x8a\x3b\x55\xed\x40\x21\x12",
2453         }, {
2454                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2455                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2456                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2457                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2458                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2459                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2460                         "\xaa\xaa",
2461                 .ksize  = 80,
2462                 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
2463                            "Block-Size Data",
2464                 .psize  = 73,
2465                 .digest = "\xe8\xe9\x9d\x0f\x45\x23\x7d\x78\x6d\x6b"
2466                           "\xba\xa7\x96\x5c\x78\x08\xbb\xff\x1a\x91",
2467         },
2468 };
2469
2470
2471 /*
2472  * SHA224 HMAC test vectors from RFC4231
2473  */
2474 #define HMAC_SHA224_TEST_VECTORS    4
2475
2476 static struct hash_testvec hmac_sha224_tv_template[] = {
2477         {
2478                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2479                         "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2480                         "\x0b\x0b\x0b\x0b",
2481                 .ksize  = 20,
2482                 /*  ("Hi There") */
2483                 .plaintext = "\x48\x69\x20\x54\x68\x65\x72\x65",
2484                 .psize  = 8,
2485                 .digest = "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19"
2486                         "\x68\x32\x10\x7c\xd4\x9d\xf3\x3f"
2487                         "\x47\xb4\xb1\x16\x99\x12\xba\x4f"
2488                         "\x53\x68\x4b\x22",
2489         }, {
2490                 .key    = "Jefe",
2491                 .ksize  = 4,
2492                 /* ("what do ya want for nothing?") */
2493                 .plaintext = "\x77\x68\x61\x74\x20\x64\x6f\x20"
2494                         "\x79\x61\x20\x77\x61\x6e\x74\x20"
2495                         "\x66\x6f\x72\x20\x6e\x6f\x74\x68"
2496                         "\x69\x6e\x67\x3f",
2497                 .psize  = 28,
2498                 .digest = "\xa3\x0e\x01\x09\x8b\xc6\xdb\xbf"
2499                         "\x45\x69\x0f\x3a\x7e\x9e\x6d\x0f"
2500                         "\x8b\xbe\xa2\xa3\x9e\x61\x48\x00"
2501                         "\x8f\xd0\x5e\x44",
2502                 .np = 4,
2503                 .tap    = { 7, 7, 7, 7 }
2504         }, {
2505                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2506                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2507                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2508                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2509                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2510                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2511                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2512                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2513                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2514                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2515                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2516                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2517                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2518                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2519                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2520                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2521                         "\xaa\xaa\xaa",
2522                 .ksize  = 131,
2523                 /* ("Test Using Larger Than Block-Size Key - Hash Key First") */
2524                 .plaintext = "\x54\x65\x73\x74\x20\x55\x73\x69"
2525                         "\x6e\x67\x20\x4c\x61\x72\x67\x65"
2526                         "\x72\x20\x54\x68\x61\x6e\x20\x42"
2527                         "\x6c\x6f\x63\x6b\x2d\x53\x69\x7a"
2528                         "\x65\x20\x4b\x65\x79\x20\x2d\x20"
2529                         "\x48\x61\x73\x68\x20\x4b\x65\x79"
2530                         "\x20\x46\x69\x72\x73\x74",
2531                 .psize  = 54,
2532                 .digest = "\x95\xe9\xa0\xdb\x96\x20\x95\xad"
2533                         "\xae\xbe\x9b\x2d\x6f\x0d\xbc\xe2"
2534                         "\xd4\x99\xf1\x12\xf2\xd2\xb7\x27"
2535                         "\x3f\xa6\x87\x0e",
2536         }, {
2537                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2538                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2539                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2540                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2541                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2542                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2543                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2544                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2545                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2546                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2547                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2548                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2549                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2550                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2551                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2552                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2553                         "\xaa\xaa\xaa",
2554                 .ksize  = 131,
2555                 /* ("This is a test using a larger than block-size key and a")
2556                 (" larger than block-size data. The key needs to be")
2557                         (" hashed before being used by the HMAC algorithm.") */
2558                 .plaintext = "\x54\x68\x69\x73\x20\x69\x73\x20"
2559                         "\x61\x20\x74\x65\x73\x74\x20\x75"
2560                         "\x73\x69\x6e\x67\x20\x61\x20\x6c"
2561                         "\x61\x72\x67\x65\x72\x20\x74\x68"
2562                         "\x61\x6e\x20\x62\x6c\x6f\x63\x6b"
2563                         "\x2d\x73\x69\x7a\x65\x20\x6b\x65"
2564                         "\x79\x20\x61\x6e\x64\x20\x61\x20"
2565                         "\x6c\x61\x72\x67\x65\x72\x20\x74"
2566                         "\x68\x61\x6e\x20\x62\x6c\x6f\x63"
2567                         "\x6b\x2d\x73\x69\x7a\x65\x20\x64"
2568                         "\x61\x74\x61\x2e\x20\x54\x68\x65"
2569                         "\x20\x6b\x65\x79\x20\x6e\x65\x65"
2570                         "\x64\x73\x20\x74\x6f\x20\x62\x65"
2571                         "\x20\x68\x61\x73\x68\x65\x64\x20"
2572                         "\x62\x65\x66\x6f\x72\x65\x20\x62"
2573                         "\x65\x69\x6e\x67\x20\x75\x73\x65"
2574                         "\x64\x20\x62\x79\x20\x74\x68\x65"
2575                         "\x20\x48\x4d\x41\x43\x20\x61\x6c"
2576                         "\x67\x6f\x72\x69\x74\x68\x6d\x2e",
2577                 .psize  = 152,
2578                 .digest = "\x3a\x85\x41\x66\xac\x5d\x9f\x02"
2579                         "\x3f\x54\xd5\x17\xd0\xb3\x9d\xbd"
2580                         "\x94\x67\x70\xdb\x9c\x2b\x95\xc9"
2581                         "\xf6\xf5\x65\xd1",
2582         },
2583 };
2584
2585 /*
2586  * HMAC-SHA256 test vectors from
2587  * draft-ietf-ipsec-ciph-sha-256-01.txt
2588  */
2589 #define HMAC_SHA256_TEST_VECTORS        10
2590
2591 static struct hash_testvec hmac_sha256_tv_template[] = {
2592         {
2593                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
2594                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2595                           "\x11\x12\x13\x14\x15\x16\x17\x18"
2596                           "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2597                 .ksize  = 32,
2598                 .plaintext = "abc",
2599                 .psize  = 3,
2600                 .digest = "\xa2\x1b\x1f\x5d\x4c\xf4\xf7\x3a"
2601                           "\x4d\xd9\x39\x75\x0f\x7a\x06\x6a"
2602                           "\x7f\x98\xcc\x13\x1c\xb1\x6a\x66"
2603                           "\x92\x75\x90\x21\xcf\xab\x81\x81",
2604         }, {
2605                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
2606                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2607                           "\x11\x12\x13\x14\x15\x16\x17\x18"
2608                           "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2609                 .ksize  = 32,
2610                 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
2611                 .psize  = 56,
2612                 .digest = "\x10\x4f\xdc\x12\x57\x32\x8f\x08"
2613                           "\x18\x4b\xa7\x31\x31\xc5\x3c\xae"
2614                           "\xe6\x98\xe3\x61\x19\x42\x11\x49"
2615                           "\xea\x8c\x71\x24\x56\x69\x7d\x30",
2616         }, {
2617                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
2618                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2619                           "\x11\x12\x13\x14\x15\x16\x17\x18"
2620                           "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20",
2621                 .ksize  = 32,
2622                 .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
2623                            "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
2624                 .psize  = 112,
2625                 .digest = "\x47\x03\x05\xfc\x7e\x40\xfe\x34"
2626                           "\xd3\xee\xb3\xe7\x73\xd9\x5a\xab"
2627                           "\x73\xac\xf0\xfd\x06\x04\x47\xa5"
2628                           "\xeb\x45\x95\xbf\x33\xa9\xd1\xa3",
2629         }, {
2630                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2631                         "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
2632                         "\x0b\x0b\x0b\x0b\x0b\x0b",
2633                 .ksize  = 32,
2634                 .plaintext = "Hi There",
2635                 .psize  = 8,
2636                 .digest = "\x19\x8a\x60\x7e\xb4\x4b\xfb\xc6"
2637                           "\x99\x03\xa0\xf1\xcf\x2b\xbd\xc5"
2638                           "\xba\x0a\xa3\xf3\xd9\xae\x3c\x1c"
2639                           "\x7a\x3b\x16\x96\xa0\xb6\x8c\xf7",
2640         }, {
2641                 .key    = "Jefe",
2642                 .ksize  = 4,
2643                 .plaintext = "what do ya want for nothing?",
2644                 .psize  = 28,
2645                 .digest = "\x5b\xdc\xc1\x46\xbf\x60\x75\x4e"
2646                           "\x6a\x04\x24\x26\x08\x95\x75\xc7"
2647                           "\x5a\x00\x3f\x08\x9d\x27\x39\x83"
2648                           "\x9d\xec\x58\xb9\x64\xec\x38\x43",
2649                 .np     = 2,
2650                 .tap    = { 14, 14 }
2651         }, {
2652                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2653                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2654                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa",
2655                 .ksize  = 32,
2656                 .plaintext = "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2657                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2658                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd"
2659                         "\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd\xdd",
2660                 .psize  = 50,
2661                 .digest = "\xcd\xcb\x12\x20\xd1\xec\xcc\xea"
2662                           "\x91\xe5\x3a\xba\x30\x92\xf9\x62"
2663                           "\xe5\x49\xfe\x6c\xe9\xed\x7f\xdc"
2664                           "\x43\x19\x1f\xbd\xe4\x5c\x30\xb0",
2665         }, {
2666                 .key    = "\x01\x02\x03\x04\x05\x06\x07\x08"
2667                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
2668                           "\x11\x12\x13\x14\x15\x16\x17\x18"
2669                           "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
2670                           "\x21\x22\x23\x24\x25",
2671                 .ksize  = 37,
2672                 .plaintext = "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2673                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2674                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd"
2675                         "\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd\xcd",
2676                 .psize  = 50,
2677                 .digest = "\xd4\x63\x3c\x17\xf6\xfb\x8d\x74"
2678                           "\x4c\x66\xde\xe0\xf8\xf0\x74\x55"
2679                           "\x6e\xc4\xaf\x55\xef\x07\x99\x85"
2680                           "\x41\x46\x8e\xb4\x9b\xd2\xe9\x17",
2681         }, {
2682                 .key    = "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
2683                         "\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c\x0c"
2684                         "\x0c\x0c\x0c\x0c\x0c\x0c",
2685                 .ksize  = 32,
2686                 .plaintext = "Test With Truncation",
2687                 .psize  = 20,
2688                 .digest = "\x75\x46\xaf\x01\x84\x1f\xc0\x9b"
2689                           "\x1a\xb9\xc3\x74\x9a\x5f\x1c\x17"
2690                           "\xd4\xf5\x89\x66\x8a\x58\x7b\x27"
2691                           "\x00\xa9\xc9\x7c\x11\x93\xcf\x42",
2692         }, {
2693                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2694                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2695                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2696                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2697                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2698                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2699                         "\xaa\xaa",
2700                 .ksize  = 80,
2701                 .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
2702                 .psize  = 54,
2703                 .digest = "\x69\x53\x02\x5e\xd9\x6f\x0c\x09"
2704                           "\xf8\x0a\x96\xf7\x8e\x65\x38\xdb"
2705                           "\xe2\xe7\xb8\x20\xe3\xdd\x97\x0e"
2706                           "\x7d\xdd\x39\x09\x1b\x32\x35\x2f",
2707         }, {
2708                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2709                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2710                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2711                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2712                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2713                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
2714                         "\xaa\xaa",
2715                 .ksize  = 80,
2716                 .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
2717                            "One Block-Size Data",
2718                 .psize  = 73,
2719                 .digest = "\x63\x55\xac\x22\xe8\x90\xd0\xa3"
2720                           "\xc8\x48\x1a\x5c\xa4\x82\x5b\xc8"
2721                           "\x84\xd3\xe7\xa1\xff\x98\xa2\xfc"
2722                           "\x2a\xc7\xd8\xe0\x64\xc3\xb2\xe6",
2723         },
2724 };
2725
2726 #define CMAC_AES_TEST_VECTORS 6
2727
2728 static struct hash_testvec aes_cmac128_tv_template[] = {
2729         { /* From NIST Special Publication 800-38B, AES-128 */
2730                 .key            = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2731                                   "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2732                 .plaintext      = zeroed_string,
2733                 .digest         = "\xbb\x1d\x69\x29\xe9\x59\x37\x28"
2734                                   "\x7f\xa3\x7d\x12\x9b\x75\x67\x46",
2735                 .psize          = 0,
2736                 .ksize          = 16,
2737         }, {
2738                 .key            = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2739                                   "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2740                 .plaintext      = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2741                                   "\xe9\x3d\x7e\x11\x73\x93\x17\x2a",
2742                 .digest         = "\x07\x0a\x16\xb4\x6b\x4d\x41\x44"
2743                                   "\xf7\x9b\xdd\x9d\xd0\x4a\x28\x7c",
2744                 .psize          = 16,
2745                 .ksize          = 16,
2746         }, {
2747                 .key            = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2748                                   "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2749                 .plaintext      = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2750                                   "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2751                                   "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2752                                   "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2753                                   "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11",
2754                 .digest         = "\xdf\xa6\x67\x47\xde\x9a\xe6\x30"
2755                                   "\x30\xca\x32\x61\x14\x97\xc8\x27",
2756                 .psize          = 40,
2757                 .ksize          = 16,
2758         }, {
2759                 .key            = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
2760                                   "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
2761                 .plaintext      = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2762                                   "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2763                                   "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2764                                   "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2765                                   "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2766                                   "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2767                                   "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2768                                   "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
2769                 .digest         = "\x51\xf0\xbe\xbf\x7e\x3b\x9d\x92"
2770                                   "\xfc\x49\x74\x17\x79\x36\x3c\xfe",
2771                 .psize          = 64,
2772                 .ksize          = 16,
2773         }, { /* From NIST Special Publication 800-38B, AES-256 */
2774                 .key            = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2775                                   "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2776                                   "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2777                                   "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
2778                 .plaintext      = zeroed_string,
2779                 .digest         = "\x02\x89\x62\xf6\x1b\x7b\xf8\x9e"
2780                                   "\xfc\x6b\x55\x1f\x46\x67\xd9\x83",
2781                 .psize          = 0,
2782                 .ksize          = 32,
2783         }, {
2784                 .key            = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
2785                                   "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
2786                                   "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
2787                                   "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
2788                 .plaintext      = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2789                                   "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2790                                   "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2791                                   "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
2792                                   "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
2793                                   "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
2794                                   "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
2795                                   "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
2796                 .digest         = "\xe1\x99\x21\x90\x54\x9f\x6e\xd5"
2797                                   "\x69\x6a\x2c\x05\x6c\x31\x54\x10",
2798                 .psize          = 64,
2799                 .ksize          = 32,
2800         }
2801 };
2802
2803 #define CMAC_DES3_EDE_TEST_VECTORS 4
2804
2805 static struct hash_testvec des3_ede_cmac64_tv_template[] = {
2806 /*
2807  * From NIST Special Publication 800-38B, Three Key TDEA
2808  * Corrected test vectors from:
2809  *  http://csrc.nist.gov/publications/nistpubs/800-38B/Updated_CMAC_Examples.pdf
2810  */
2811         {
2812                 .key            = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2813                                   "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2814                                   "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2815                 .plaintext      = zeroed_string,
2816                 .digest         = "\xb7\xa6\x88\xe1\x22\xff\xaf\x95",
2817                 .psize          = 0,
2818                 .ksize          = 24,
2819         }, {
2820                 .key            = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2821                                   "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2822                                   "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2823                 .plaintext      = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96",
2824                 .digest         = "\x8e\x8f\x29\x31\x36\x28\x37\x97",
2825                 .psize          = 8,
2826                 .ksize          = 24,
2827         }, {
2828                 .key            = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2829                                   "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2830                                   "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2831                 .plaintext      = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2832                                   "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2833                                   "\xae\x2d\x8a\x57",
2834                 .digest         = "\x74\x3d\xdb\xe0\xce\x2d\xc2\xed",
2835                 .psize          = 20,
2836                 .ksize          = 24,
2837         }, {
2838                 .key            = "\x8a\xa8\x3b\xf8\xcb\xda\x10\x62"
2839                                   "\x0b\xc1\xbf\x19\xfb\xb6\xcd\x58"
2840                                   "\xbc\x31\x3d\x4a\x37\x1c\xa8\xb5",
2841                 .plaintext      = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
2842                                   "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
2843                                   "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
2844                                   "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51",
2845                 .digest         = "\x33\xe6\xb1\x09\x24\x00\xea\xe5",
2846                 .psize          = 32,
2847                 .ksize          = 24,
2848         }
2849 };
2850
2851 #define XCBC_AES_TEST_VECTORS 6
2852
2853 static struct hash_testvec aes_xcbc128_tv_template[] = {
2854         {
2855                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
2856                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2857                 .plaintext = zeroed_string,
2858                 .digest = "\x75\xf0\x25\x1d\x52\x8a\xc0\x1c"
2859                           "\x45\x73\xdf\xd5\x84\xd7\x9f\x29",
2860                 .psize  = 0,
2861                 .ksize  = 16,
2862         }, {
2863                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
2864                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2865                 .plaintext = "\x00\x01\x02",
2866                 .digest = "\x5b\x37\x65\x80\xae\x2f\x19\xaf"
2867                           "\xe7\x21\x9c\xee\xf1\x72\x75\x6f",
2868                 .psize  = 3,
2869                 .ksize  = 16,
2870         } , {
2871                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
2872                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2873                 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2874                              "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2875                 .digest = "\xd2\xa2\x46\xfa\x34\x9b\x68\xa7"
2876                           "\x99\x98\xa4\x39\x4f\xf7\xa2\x63",
2877                 .psize  = 16,
2878                 .ksize  = 16,
2879         }, {
2880                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
2881                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2882                 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2883                              "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2884                              "\x10\x11\x12\x13",
2885                 .digest = "\x47\xf5\x1b\x45\x64\x96\x62\x15"
2886                           "\xb8\x98\x5c\x63\x05\x5e\xd3\x08",
2887                 .tap    = { 10, 10 },
2888                 .psize  = 20,
2889                 .np     = 2,
2890                 .ksize  = 16,
2891         }, {
2892                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
2893                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2894                 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2895                              "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2896                              "\x10\x11\x12\x13\x14\x15\x16\x17"
2897                              "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
2898                 .digest = "\xf5\x4f\x0e\xc8\xd2\xb9\xf3\xd3"
2899                           "\x68\x07\x73\x4b\xd5\x28\x3f\xd4",
2900                 .psize  = 32,
2901                 .ksize  = 16,
2902         }, {
2903                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
2904                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2905                 .plaintext = "\x00\x01\x02\x03\x04\x05\x06\x07"
2906                              "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
2907                              "\x10\x11\x12\x13\x14\x15\x16\x17"
2908                              "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
2909                              "\x20\x21",
2910                 .digest = "\xbe\xcb\xb3\xbc\xcd\xb5\x18\xa3"
2911                           "\x06\x77\xd5\x48\x1f\xb6\xb4\xd8",
2912                 .tap    = { 17, 17 },
2913                 .psize  = 34,
2914                 .np     = 2,
2915                 .ksize  = 16,
2916         }
2917 };
2918
2919 #define VMAC_AES_TEST_VECTORS   11
2920 static char vmac_string1[128] = {'\x01', '\x01', '\x01', '\x01',
2921                                 '\x02', '\x03', '\x02', '\x02',
2922                                 '\x02', '\x04', '\x01', '\x07',
2923                                 '\x04', '\x01', '\x04', '\x03',};
2924 static char vmac_string2[128] = {'a', 'b', 'c',};
2925 static char vmac_string3[128] = {'a', 'b', 'c', 'a', 'b', 'c',
2926                                 'a', 'b', 'c', 'a', 'b', 'c',
2927                                 'a', 'b', 'c', 'a', 'b', 'c',
2928                                 'a', 'b', 'c', 'a', 'b', 'c',
2929                                 'a', 'b', 'c', 'a', 'b', 'c',
2930                                 'a', 'b', 'c', 'a', 'b', 'c',
2931                                 'a', 'b', 'c', 'a', 'b', 'c',
2932                                 'a', 'b', 'c', 'a', 'b', 'c',
2933                                 };
2934
2935 static char vmac_string4[17] = {'b', 'c', 'e', 'f',
2936                                 'i', 'j', 'l', 'm',
2937                                 'o', 'p', 'r', 's',
2938                                 't', 'u', 'w', 'x', 'z'};
2939
2940 static char vmac_string5[127] = {'r', 'm', 'b', 't', 'c',
2941                                  'o', 'l', 'k', ']', '%',
2942                                  '9', '2', '7', '!', 'A'};
2943
2944 static char vmac_string6[129] = {'p', 't', '*', '7', 'l',
2945                                  'i', '!', '#', 'w', '0',
2946                                  'z', '/', '4', 'A', 'n'};
2947
2948 static struct hash_testvec aes_vmac128_tv_template[] = {
2949         {
2950                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
2951                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2952                 .plaintext = NULL,
2953                 .digest = "\x07\x58\x80\x35\x77\xa4\x7b\x54",
2954                 .psize  = 0,
2955                 .ksize  = 16,
2956         }, {
2957                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
2958                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2959                 .plaintext = vmac_string1,
2960                 .digest = "\xce\xf5\x3c\xd3\xae\x68\x8c\xa1",
2961                 .psize  = 128,
2962                 .ksize  = 16,
2963         }, {
2964                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
2965                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2966                 .plaintext = vmac_string2,
2967                 .digest = "\xc9\x27\xb0\x73\x81\xbd\x14\x2d",
2968                 .psize  = 128,
2969                 .ksize  = 16,
2970         }, {
2971                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
2972                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
2973                 .plaintext = vmac_string3,
2974                 .digest = "\x8d\x1a\x95\x8c\x98\x47\x0b\x19",
2975                 .psize  = 128,
2976                 .ksize  = 16,
2977         }, {
2978                 .key    = "abcdefghijklmnop",
2979                 .plaintext = NULL,
2980                 .digest = "\x3b\x89\xa1\x26\x9e\x55\x8f\x84",
2981                 .psize  = 0,
2982                 .ksize  = 16,
2983         }, {
2984                 .key    = "abcdefghijklmnop",
2985                 .plaintext = vmac_string1,
2986                 .digest = "\xab\x5e\xab\xb0\xf6\x8d\x74\xc2",
2987                 .psize  = 128,
2988                 .ksize  = 16,
2989         }, {
2990                 .key    = "abcdefghijklmnop",
2991                 .plaintext = vmac_string2,
2992                 .digest = "\x11\x15\x68\x42\x3d\x7b\x09\xdf",
2993                 .psize  = 128,
2994                 .ksize  = 16,
2995         }, {
2996                 .key    = "abcdefghijklmnop",
2997                 .plaintext = vmac_string3,
2998                 .digest = "\x8b\x32\x8f\xe1\xed\x8f\xfa\xd4",
2999                 .psize  = 128,
3000                 .ksize  = 16,
3001         }, {
3002                 .key = "a09b5cd!f#07K\x00\x00\x00",
3003                 .plaintext = vmac_string4,
3004                 .digest = "\xab\xa5\x0f\xea\x42\x4e\xa1\x5f",
3005                 .psize = sizeof(vmac_string4),
3006                 .ksize = 16,
3007         }, {
3008                 .key = "a09b5cd!f#07K\x00\x00\x00",
3009                 .plaintext = vmac_string5,
3010                 .digest = "\x25\x31\x98\xbc\x1d\xe8\x67\x60",
3011                 .psize = sizeof(vmac_string5),
3012                 .ksize = 16,
3013         }, {
3014                 .key = "a09b5cd!f#07K\x00\x00\x00",
3015                 .plaintext = vmac_string6,
3016                 .digest = "\xc4\xae\x9b\x47\x95\x65\xeb\x41",
3017                 .psize = sizeof(vmac_string6),
3018                 .ksize = 16,
3019         },
3020 };
3021
3022 /*
3023  * SHA384 HMAC test vectors from RFC4231
3024  */
3025
3026 #define HMAC_SHA384_TEST_VECTORS        4
3027
3028 static struct hash_testvec hmac_sha384_tv_template[] = {
3029         {
3030                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3031                           "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3032                           "\x0b\x0b\x0b\x0b",
3033                 .ksize  = 20,
3034                 .plaintext = "Hi There",
3035                 .psize  = 8,
3036                 .digest = "\xaf\xd0\x39\x44\xd8\x48\x95\x62"
3037                           "\x6b\x08\x25\xf4\xab\x46\x90\x7f"
3038                           "\x15\xf9\xda\xdb\xe4\x10\x1e\xc6"
3039                           "\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c"
3040                           "\xfa\xea\x9e\xa9\x07\x6e\xde\x7f"
3041                           "\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
3042         }, {
3043                 .key    = "Jefe",
3044                 .ksize  = 4,
3045                 .plaintext = "what do ya want for nothing?",
3046                 .psize  = 28,
3047                 .digest = "\xaf\x45\xd2\xe3\x76\x48\x40\x31"
3048                           "\x61\x7f\x78\xd2\xb5\x8a\x6b\x1b"
3049                           "\x9c\x7e\xf4\x64\xf5\xa0\x1b\x47"
3050                           "\xe4\x2e\xc3\x73\x63\x22\x44\x5e"
3051                           "\x8e\x22\x40\xca\x5e\x69\xe2\xc7"
3052                           "\x8b\x32\x39\xec\xfa\xb2\x16\x49",
3053                 .np     = 4,
3054                 .tap    = { 7, 7, 7, 7 }
3055         }, {
3056                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3057                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3058                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3059                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3060                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3061                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3062                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3063                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3064                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3065                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3066                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3067                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3068                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3069                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3070                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3071                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3072                           "\xaa\xaa\xaa",
3073                 .ksize  = 131,
3074                 .plaintext = "Test Using Larger Than Block-Siz"
3075                            "e Key - Hash Key First",
3076                 .psize  = 54,
3077                 .digest = "\x4e\xce\x08\x44\x85\x81\x3e\x90"
3078                           "\x88\xd2\xc6\x3a\x04\x1b\xc5\xb4"
3079                           "\x4f\x9e\xf1\x01\x2a\x2b\x58\x8f"
3080                           "\x3c\xd1\x1f\x05\x03\x3a\xc4\xc6"
3081                           "\x0c\x2e\xf6\xab\x40\x30\xfe\x82"
3082                           "\x96\x24\x8d\xf1\x63\xf4\x49\x52",
3083         }, {
3084                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3085                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3086                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3087                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3088                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3089                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3090                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3091                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3092                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3093                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3094                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3095                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3096                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3097                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3098                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3099                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3100                           "\xaa\xaa\xaa",
3101                 .ksize  = 131,
3102                 .plaintext = "This is a test u"
3103                            "sing a larger th"
3104                            "an block-size ke"
3105                            "y and a larger t"
3106                            "han block-size d"
3107                            "ata. The key nee"
3108                            "ds to be hashed "
3109                            "before being use"
3110                            "d by the HMAC al"
3111                            "gorithm.",
3112                 .psize  = 152,
3113                 .digest = "\x66\x17\x17\x8e\x94\x1f\x02\x0d"
3114                           "\x35\x1e\x2f\x25\x4e\x8f\xd3\x2c"
3115                           "\x60\x24\x20\xfe\xb0\xb8\xfb\x9a"
3116                           "\xdc\xce\xbb\x82\x46\x1e\x99\xc5"
3117                           "\xa6\x78\xcc\x31\xe7\x99\x17\x6d"
3118                           "\x38\x60\xe6\x11\x0c\x46\x52\x3e",
3119         },
3120 };
3121
3122 /*
3123  * SHA512 HMAC test vectors from RFC4231
3124  */
3125
3126 #define HMAC_SHA512_TEST_VECTORS        4
3127
3128 static struct hash_testvec hmac_sha512_tv_template[] = {
3129         {
3130                 .key    = "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3131                           "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b"
3132                           "\x0b\x0b\x0b\x0b",
3133                 .ksize  = 20,
3134                 .plaintext = "Hi There",
3135                 .psize  = 8,
3136                 .digest = "\x87\xaa\x7c\xde\xa5\xef\x61\x9d"
3137                           "\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0"
3138                           "\x23\x79\xf4\xe2\xce\x4e\xc2\x78"
3139                           "\x7a\xd0\xb3\x05\x45\xe1\x7c\xde"
3140                           "\xda\xa8\x33\xb7\xd6\xb8\xa7\x02"
3141                           "\x03\x8b\x27\x4e\xae\xa3\xf4\xe4"
3142                           "\xbe\x9d\x91\x4e\xeb\x61\xf1\x70"
3143                           "\x2e\x69\x6c\x20\x3a\x12\x68\x54",
3144         }, {
3145                 .key    = "Jefe",
3146                 .ksize  = 4,
3147                 .plaintext = "what do ya want for nothing?",
3148                 .psize  = 28,
3149                 .digest = "\x16\x4b\x7a\x7b\xfc\xf8\x19\xe2"
3150                           "\xe3\x95\xfb\xe7\x3b\x56\xe0\xa3"
3151                           "\x87\xbd\x64\x22\x2e\x83\x1f\xd6"
3152                           "\x10\x27\x0c\xd7\xea\x25\x05\x54"
3153                           "\x97\x58\xbf\x75\xc0\x5a\x99\x4a"
3154                           "\x6d\x03\x4f\x65\xf8\xf0\xe6\xfd"
3155                           "\xca\xea\xb1\xa3\x4d\x4a\x6b\x4b"
3156                           "\x63\x6e\x07\x0a\x38\xbc\xe7\x37",
3157                 .np     = 4,
3158                 .tap    = { 7, 7, 7, 7 }
3159         }, {
3160                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3161                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3162                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3163                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3164                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3165                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3166                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3167                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3168                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3169                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3170                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3171                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3172                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3173                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3174                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3175                           "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3176                           "\xaa\xaa\xaa",
3177                 .ksize  = 131,
3178                 .plaintext = "Test Using Large"
3179                            "r Than Block-Siz"
3180                            "e Key - Hash Key"
3181                            " First",
3182                 .psize  = 54,
3183                 .digest = "\x80\xb2\x42\x63\xc7\xc1\xa3\xeb"
3184                         "\xb7\x14\x93\xc1\xdd\x7b\xe8\xb4"
3185                         "\x9b\x46\xd1\xf4\x1b\x4a\xee\xc1"
3186                         "\x12\x1b\x01\x37\x83\xf8\xf3\x52"
3187                         "\x6b\x56\xd0\x37\xe0\x5f\x25\x98"
3188                         "\xbd\x0f\xd2\x21\x5d\x6a\x1e\x52"
3189                         "\x95\xe6\x4f\x73\xf6\x3f\x0a\xec"
3190                         "\x8b\x91\x5a\x98\x5d\x78\x65\x98",
3191         }, {
3192                 .key    = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3193                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3194                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3195                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3196                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3197                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3198                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3199                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3200                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3201                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3202                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3203                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3204                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3205                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3206                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3207                         "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
3208                         "\xaa\xaa\xaa",
3209                 .ksize  = 131,
3210                 .plaintext =
3211                           "This is a test u"
3212                           "sing a larger th"
3213                           "an block-size ke"
3214                           "y and a larger t"
3215                           "han block-size d"
3216                           "ata. The key nee"
3217                           "ds to be hashed "
3218                           "before being use"
3219                           "d by the HMAC al"
3220                           "gorithm.",
3221                 .psize  = 152,
3222                 .digest = "\xe3\x7b\x6a\x77\x5d\xc8\x7d\xba"
3223                         "\xa4\xdf\xa9\xf9\x6e\x5e\x3f\xfd"
3224                         "\xde\xbd\x71\xf8\x86\x72\x89\x86"
3225                         "\x5d\xf5\xa3\x2d\x20\xcd\xc9\x44"
3226                         "\xb6\x02\x2c\xac\x3c\x49\x82\xb1"
3227                         "\x0d\x5e\xeb\x55\xc3\xe4\xde\x15"
3228                         "\x13\x46\x76\xfb\x6d\xe0\x44\x60"
3229                         "\x65\xc9\x74\x40\xfa\x8c\x6a\x58",
3230         },
3231 };
3232
3233 /*
3234  * Poly1305 test vectors from RFC7539 A.3.
3235  */
3236
3237 #define POLY1305_TEST_VECTORS   11
3238
3239 static struct hash_testvec poly1305_tv_template[] = {
3240         { /* Test Vector #1 */
3241                 .plaintext      = "\x00\x00\x00\x00\x00\x00\x00\x00"
3242                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3243                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3244                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3245                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3246                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3247                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3248                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3249                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3250                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3251                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3252                                   "\x00\x00\x00\x00\x00\x00\x00\x00",
3253                 .psize          = 96,
3254                 .digest         = "\x00\x00\x00\x00\x00\x00\x00\x00"
3255                                   "\x00\x00\x00\x00\x00\x00\x00\x00",
3256         }, { /* Test Vector #2 */
3257                 .plaintext      = "\x00\x00\x00\x00\x00\x00\x00\x00"
3258                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3259                                   "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3260                                   "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3261                                   "\x41\x6e\x79\x20\x73\x75\x62\x6d"
3262                                   "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3263                                   "\x6f\x20\x74\x68\x65\x20\x49\x45"
3264                                   "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3265                                   "\x64\x65\x64\x20\x62\x79\x20\x74"
3266                                   "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3267                                   "\x69\x62\x75\x74\x6f\x72\x20\x66"
3268                                   "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3269                                   "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3270                                   "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3271                                   "\x20\x70\x61\x72\x74\x20\x6f\x66"
3272                                   "\x20\x61\x6e\x20\x49\x45\x54\x46"
3273                                   "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3274                                   "\x74\x2d\x44\x72\x61\x66\x74\x20"
3275                                   "\x6f\x72\x20\x52\x46\x43\x20\x61"
3276                                   "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3277                                   "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3278                                   "\x20\x6d\x61\x64\x65\x20\x77\x69"
3279                                   "\x74\x68\x69\x6e\x20\x74\x68\x65"
3280                                   "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3281                                   "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3282                                   "\x45\x54\x46\x20\x61\x63\x74\x69"
3283                                   "\x76\x69\x74\x79\x20\x69\x73\x20"
3284                                   "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3285                                   "\x65\x64\x20\x61\x6e\x20\x22\x49"
3286                                   "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3287                                   "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3288                                   "\x22\x2e\x20\x53\x75\x63\x68\x20"
3289                                   "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3290                                   "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3291                                   "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3292                                   "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3293                                   "\x74\x73\x20\x69\x6e\x20\x49\x45"
3294                                   "\x54\x46\x20\x73\x65\x73\x73\x69"
3295                                   "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3296                                   "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3297                                   "\x77\x72\x69\x74\x74\x65\x6e\x20"
3298                                   "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3299                                   "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3300                                   "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3301                                   "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3302                                   "\x64\x65\x20\x61\x74\x20\x61\x6e"
3303                                   "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3304                                   "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3305                                   "\x20\x77\x68\x69\x63\x68\x20\x61"
3306                                   "\x72\x65\x20\x61\x64\x64\x72\x65"
3307                                   "\x73\x73\x65\x64\x20\x74\x6f",
3308                 .psize          = 407,
3309                 .digest         = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3310                                   "\xf0\xef\xca\x96\x22\x7a\x86\x3e",
3311         }, { /* Test Vector #3 */
3312                 .plaintext      = "\x36\xe5\xf6\xb5\xc5\xe0\x60\x70"
3313                                   "\xf0\xef\xca\x96\x22\x7a\x86\x3e"
3314                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3315                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3316                                   "\x41\x6e\x79\x20\x73\x75\x62\x6d"
3317                                   "\x69\x73\x73\x69\x6f\x6e\x20\x74"
3318                                   "\x6f\x20\x74\x68\x65\x20\x49\x45"
3319                                   "\x54\x46\x20\x69\x6e\x74\x65\x6e"
3320                                   "\x64\x65\x64\x20\x62\x79\x20\x74"
3321                                   "\x68\x65\x20\x43\x6f\x6e\x74\x72"
3322                                   "\x69\x62\x75\x74\x6f\x72\x20\x66"
3323                                   "\x6f\x72\x20\x70\x75\x62\x6c\x69"
3324                                   "\x63\x61\x74\x69\x6f\x6e\x20\x61"
3325                                   "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
3326                                   "\x20\x70\x61\x72\x74\x20\x6f\x66"
3327                                   "\x20\x61\x6e\x20\x49\x45\x54\x46"
3328                                   "\x20\x49\x6e\x74\x65\x72\x6e\x65"
3329                                   "\x74\x2d\x44\x72\x61\x66\x74\x20"
3330                                   "\x6f\x72\x20\x52\x46\x43\x20\x61"
3331                                   "\x6e\x64\x20\x61\x6e\x79\x20\x73"
3332                                   "\x74\x61\x74\x65\x6d\x65\x6e\x74"
3333                                   "\x20\x6d\x61\x64\x65\x20\x77\x69"
3334                                   "\x74\x68\x69\x6e\x20\x74\x68\x65"
3335                                   "\x20\x63\x6f\x6e\x74\x65\x78\x74"
3336                                   "\x20\x6f\x66\x20\x61\x6e\x20\x49"
3337                                   "\x45\x54\x46\x20\x61\x63\x74\x69"
3338                                   "\x76\x69\x74\x79\x20\x69\x73\x20"
3339                                   "\x63\x6f\x6e\x73\x69\x64\x65\x72"
3340                                   "\x65\x64\x20\x61\x6e\x20\x22\x49"
3341                                   "\x45\x54\x46\x20\x43\x6f\x6e\x74"
3342                                   "\x72\x69\x62\x75\x74\x69\x6f\x6e"
3343                                   "\x22\x2e\x20\x53\x75\x63\x68\x20"
3344                                   "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3345                                   "\x74\x73\x20\x69\x6e\x63\x6c\x75"
3346                                   "\x64\x65\x20\x6f\x72\x61\x6c\x20"
3347                                   "\x73\x74\x61\x74\x65\x6d\x65\x6e"
3348                                   "\x74\x73\x20\x69\x6e\x20\x49\x45"
3349                                   "\x54\x46\x20\x73\x65\x73\x73\x69"
3350                                   "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
3351                                   "\x77\x65\x6c\x6c\x20\x61\x73\x20"
3352                                   "\x77\x72\x69\x74\x74\x65\x6e\x20"
3353                                   "\x61\x6e\x64\x20\x65\x6c\x65\x63"
3354                                   "\x74\x72\x6f\x6e\x69\x63\x20\x63"
3355                                   "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
3356                                   "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
3357                                   "\x64\x65\x20\x61\x74\x20\x61\x6e"
3358                                   "\x79\x20\x74\x69\x6d\x65\x20\x6f"
3359                                   "\x72\x20\x70\x6c\x61\x63\x65\x2c"
3360                                   "\x20\x77\x68\x69\x63\x68\x20\x61"
3361                                   "\x72\x65\x20\x61\x64\x64\x72\x65"
3362                                   "\x73\x73\x65\x64\x20\x74\x6f",
3363                 .psize          = 407,
3364                 .digest         = "\xf3\x47\x7e\x7c\xd9\x54\x17\xaf"
3365                                   "\x89\xa6\xb8\x79\x4c\x31\x0c\xf0",
3366         }, { /* Test Vector #4 */
3367                 .plaintext      = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
3368                                   "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
3369                                   "\x47\x39\x17\xc1\x40\x2b\x80\x09"
3370                                   "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
3371                                   "\x27\x54\x77\x61\x73\x20\x62\x72"
3372                                   "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
3373                                   "\x6e\x64\x20\x74\x68\x65\x20\x73"
3374                                   "\x6c\x69\x74\x68\x79\x20\x74\x6f"
3375                                   "\x76\x65\x73\x0a\x44\x69\x64\x20"
3376                                   "\x67\x79\x72\x65\x20\x61\x6e\x64"
3377                                   "\x20\x67\x69\x6d\x62\x6c\x65\x20"
3378                                   "\x69\x6e\x20\x74\x68\x65\x20\x77"
3379                                   "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
3380                                   "\x20\x6d\x69\x6d\x73\x79\x20\x77"
3381                                   "\x65\x72\x65\x20\x74\x68\x65\x20"
3382                                   "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
3383                                   "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
3384                                   "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
3385                                   "\x72\x61\x74\x68\x73\x20\x6f\x75"
3386                                   "\x74\x67\x72\x61\x62\x65\x2e",
3387                 .psize          = 159,
3388                 .digest         = "\x45\x41\x66\x9a\x7e\xaa\xee\x61"
3389                                   "\xe7\x08\xdc\x7c\xbc\xc5\xeb\x62",
3390         }, { /* Test Vector #5 */
3391                 .plaintext      = "\x02\x00\x00\x00\x00\x00\x00\x00"
3392                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3393                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3394                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3395                                   "\xff\xff\xff\xff\xff\xff\xff\xff"
3396                                   "\xff\xff\xff\xff\xff\xff\xff\xff",
3397                 .psize          = 48,
3398                 .digest         = "\x03\x00\x00\x00\x00\x00\x00\x00"
3399                                   "\x00\x00\x00\x00\x00\x00\x00\x00",
3400         }, { /* Test Vector #6 */
3401                 .plaintext      = "\x02\x00\x00\x00\x00\x00\x00\x00"
3402                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3403                                   "\xff\xff\xff\xff\xff\xff\xff\xff"
3404                                   "\xff\xff\xff\xff\xff\xff\xff\xff"
3405                                   "\x02\x00\x00\x00\x00\x00\x00\x00"
3406                                   "\x00\x00\x00\x00\x00\x00\x00\x00",
3407                 .psize          = 48,
3408                 .digest         = "\x03\x00\x00\x00\x00\x00\x00\x00"
3409                                   "\x00\x00\x00\x00\x00\x00\x00\x00",
3410         }, { /* Test Vector #7 */
3411                 .plaintext      = "\x01\x00\x00\x00\x00\x00\x00\x00"
3412                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3413                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3414                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3415                                   "\xff\xff\xff\xff\xff\xff\xff\xff"
3416                                   "\xff\xff\xff\xff\xff\xff\xff\xff"
3417                                   "\xf0\xff\xff\xff\xff\xff\xff\xff"
3418                                   "\xff\xff\xff\xff\xff\xff\xff\xff"
3419                                   "\x11\x00\x00\x00\x00\x00\x00\x00"
3420                                   "\x00\x00\x00\x00\x00\x00\x00\x00",
3421                 .psize          = 80,
3422                 .digest         = "\x05\x00\x00\x00\x00\x00\x00\x00"
3423                                   "\x00\x00\x00\x00\x00\x00\x00\x00",
3424         }, { /* Test Vector #8 */
3425                 .plaintext      = "\x01\x00\x00\x00\x00\x00\x00\x00"
3426                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3427                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3428                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3429                                   "\xff\xff\xff\xff\xff\xff\xff\xff"
3430                                   "\xff\xff\xff\xff\xff\xff\xff\xff"
3431                                   "\xfb\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3432                                   "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
3433                                   "\x01\x01\x01\x01\x01\x01\x01\x01"
3434                                   "\x01\x01\x01\x01\x01\x01\x01\x01",
3435                 .psize          = 80,
3436                 .digest         = "\x00\x00\x00\x00\x00\x00\x00\x00"
3437                                   "\x00\x00\x00\x00\x00\x00\x00\x00",
3438         }, { /* Test Vector #9 */
3439                 .plaintext      = "\x02\x00\x00\x00\x00\x00\x00\x00"
3440                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3441                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3442                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3443                                   "\xfd\xff\xff\xff\xff\xff\xff\xff"
3444                                   "\xff\xff\xff\xff\xff\xff\xff\xff",
3445                 .psize          = 48,
3446                 .digest         = "\xfa\xff\xff\xff\xff\xff\xff\xff"
3447                                   "\xff\xff\xff\xff\xff\xff\xff\xff",
3448         }, { /* Test Vector #10 */
3449                 .plaintext      = "\x01\x00\x00\x00\x00\x00\x00\x00"
3450                                   "\x04\x00\x00\x00\x00\x00\x00\x00"
3451                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3452                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3453                                   "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
3454                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3455                                   "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3456                                   "\x01\x00\x00\x00\x00\x00\x00\x00"
3457                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3458                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3459                                   "\x01\x00\x00\x00\x00\x00\x00\x00"
3460                                   "\x00\x00\x00\x00\x00\x00\x00\x00",
3461                 .psize          = 96,
3462                 .digest         = "\x14\x00\x00\x00\x00\x00\x00\x00"
3463                                   "\x55\x00\x00\x00\x00\x00\x00\x00",
3464         }, { /* Test Vector #11 */
3465                 .plaintext      = "\x01\x00\x00\x00\x00\x00\x00\x00"
3466                                   "\x04\x00\x00\x00\x00\x00\x00\x00"
3467                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3468                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3469                                   "\xe3\x35\x94\xd7\x50\x5e\x43\xb9"
3470                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3471                                   "\x33\x94\xd7\x50\x5e\x43\x79\xcd"
3472                                   "\x01\x00\x00\x00\x00\x00\x00\x00"
3473                                   "\x00\x00\x00\x00\x00\x00\x00\x00"
3474                                   "\x00\x00\x00\x00\x00\x00\x00\x00",
3475                 .psize          = 80,
3476                 .digest         = "\x13\x00\x00\x00\x00\x00\x00\x00"
3477                                   "\x00\x00\x00\x00\x00\x00\x00\x00",
3478         },
3479 };
3480
3481 /*
3482  * DES test vectors.
3483  */
3484 #define DES_ENC_TEST_VECTORS            11
3485 #define DES_DEC_TEST_VECTORS            5
3486 #define DES_CBC_ENC_TEST_VECTORS        6
3487 #define DES_CBC_DEC_TEST_VECTORS        5
3488 #define DES_CTR_ENC_TEST_VECTORS        2
3489 #define DES_CTR_DEC_TEST_VECTORS        2
3490 #define DES3_EDE_ENC_TEST_VECTORS       4
3491 #define DES3_EDE_DEC_TEST_VECTORS       4
3492 #define DES3_EDE_CBC_ENC_TEST_VECTORS   2
3493 #define DES3_EDE_CBC_DEC_TEST_VECTORS   2
3494 #define DES3_EDE_CTR_ENC_TEST_VECTORS   2
3495 #define DES3_EDE_CTR_DEC_TEST_VECTORS   2
3496
3497 static struct cipher_testvec des_enc_tv_template[] = {
3498         { /* From Applied Cryptography */
3499                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3500                 .klen   = 8,
3501                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3502                 .ilen   = 8,
3503                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3504                 .rlen   = 8,
3505         }, { /* Same key, different plaintext block */
3506                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3507                 .klen   = 8,
3508                 .input  = "\x22\x33\x44\x55\x66\x77\x88\x99",
3509                 .ilen   = 8,
3510                 .result = "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3511                 .rlen   = 8,
3512         }, { /* Sbox test from NBS */
3513                 .key    = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3514                 .klen   = 8,
3515                 .input  = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3516                 .ilen   = 8,
3517                 .result = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3518                 .rlen   = 8,
3519         }, { /* Three blocks */
3520                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3521                 .klen   = 8,
3522                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3523                           "\x22\x33\x44\x55\x66\x77\x88\x99"
3524                           "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3525                 .ilen   = 24,
3526                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3527                           "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3528                           "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3529                 .rlen   = 24,
3530         }, { /* Weak key */
3531                 .fail   = true,
3532                 .wk     = 1,
3533                 .key    = "\x01\x01\x01\x01\x01\x01\x01\x01",
3534                 .klen   = 8,
3535                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3536                 .ilen   = 8,
3537                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3538                 .rlen   = 8,
3539         }, { /* Two blocks -- for testing encryption across pages */
3540                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3541                 .klen   = 8,
3542                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3543                           "\x22\x33\x44\x55\x66\x77\x88\x99",
3544                 .ilen   = 16,
3545                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3546                           "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3547                 .rlen   = 16,
3548                 .np     = 2,
3549                 .tap    = { 8, 8 }
3550         }, { /* Four blocks -- for testing encryption with chunking */
3551                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3552                 .klen   = 8,
3553                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3554                           "\x22\x33\x44\x55\x66\x77\x88\x99"
3555                           "\xca\xfe\xba\xbe\xfe\xed\xbe\xef"
3556                           "\x22\x33\x44\x55\x66\x77\x88\x99",
3557                 .ilen   = 32,
3558                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3559                           "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3560                           "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90"
3561                           "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3562                 .rlen   = 32,
3563                 .np     = 3,
3564                 .tap    = { 14, 10, 8 }
3565         }, {
3566                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3567                 .klen   = 8,
3568                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3569                           "\x22\x33\x44\x55\x66\x77\x88\x99"
3570                           "\xca\xfe\xba\xbe\xfe\xed\xbe\xef",
3571                 .ilen   = 24,
3572                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3573                           "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b"
3574                           "\xb4\x99\x26\xf7\x1f\xe1\xd4\x90",
3575                 .rlen   = 24,
3576                 .np     = 4,
3577                 .tap    = { 2, 1, 3, 18 }
3578         }, {
3579                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3580                 .klen   = 8,
3581                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3582                           "\x22\x33\x44\x55\x66\x77\x88\x99",
3583                 .ilen   = 16,
3584                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3585                           "\xf7\x9c\x89\x2a\x33\x8f\x4a\x8b",
3586                 .rlen   = 16,
3587                 .np     = 5,
3588                 .tap    = { 2, 2, 2, 2, 8 }
3589         }, {
3590                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3591                 .klen   = 8,
3592                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3593                 .ilen   = 8,
3594                 .result = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3595                 .rlen   = 8,
3596                 .np     = 8,
3597                 .tap    = { 1, 1, 1, 1, 1, 1, 1, 1 }
3598         }, { /* Generated with Crypto++ */
3599                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3600                 .klen   = 8,
3601                 .input  = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3602                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3603                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3604                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3605                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3606                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3607                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3608                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3609                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3610                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3611                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3612                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3613                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3614                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3615                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3616                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3617                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3618                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3619                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3620                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3621                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3622                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3623                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3624                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3625                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3626                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3627                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3628                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3629                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3630                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3631                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3632                 .ilen   = 248,
3633                 .result = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3634                           "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3635                           "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3636                           "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3637                           "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3638                           "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3639                           "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3640                           "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3641                           "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3642                           "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3643                           "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3644                           "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3645                           "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3646                           "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3647                           "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3648                           "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3649                           "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3650                           "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3651                           "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3652                           "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3653                           "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3654                           "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3655                           "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3656                           "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3657                           "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3658                           "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3659                           "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3660                           "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3661                           "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3662                           "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3663                           "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3664                 .rlen   = 248,
3665                 .also_non_np = 1,
3666                 .np     = 3,
3667                 .tap    = { 248 - 10, 2, 8 },
3668         },
3669 };
3670
3671 static struct cipher_testvec des_dec_tv_template[] = {
3672         { /* From Applied Cryptography */
3673                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3674                 .klen   = 8,
3675                 .input  = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d",
3676                 .ilen   = 8,
3677                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7",
3678                 .rlen   = 8,
3679         }, { /* Sbox test from NBS */
3680                 .key    = "\x7c\xa1\x10\x45\x4a\x1a\x6e\x57",
3681                 .klen   = 8,
3682                 .input  = "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3683                 .ilen   = 8,
3684                 .result = "\x01\xa1\xd6\xd0\x39\x77\x67\x42",
3685                 .rlen   = 8,
3686         }, { /* Two blocks, for chunking test */
3687                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3688                 .klen   = 8,
3689                 .input  = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3690                           "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3691                 .ilen   = 16,
3692                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3693                           "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3694                 .rlen   = 16,
3695                 .np     = 2,
3696                 .tap    = { 8, 8 }
3697         }, {
3698                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3699                 .klen   = 8,
3700                 .input  = "\xc9\x57\x44\x25\x6a\x5e\xd3\x1d"
3701                           "\x69\x0f\x5b\x0d\x9a\x26\x93\x9b",
3702                 .ilen   = 16,
3703                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xe7"
3704                           "\xa3\x99\x7b\xca\xaf\x69\xa0\xf5",
3705                 .rlen   = 16,
3706                 .np     = 3,
3707                 .tap    = { 3, 12, 1 }
3708         }, { /* Generated with Crypto++ */
3709                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3710                 .klen   = 8,
3711                 .input  = "\x88\xCB\x1F\xAB\x2F\x2A\x49\x57"
3712                           "\x92\xB9\x77\xFF\x2F\x47\x58\xDD"
3713                           "\xD7\x8A\x91\x95\x26\x33\x78\xB2"
3714                           "\x33\xBA\xB2\x3E\x02\xF5\x1F\xEF"
3715                           "\x98\xC5\xA6\xD2\x7D\x79\xEC\xB3"
3716                           "\x45\xF3\x4C\x61\xAC\x6C\xC2\x55"
3717                           "\xE5\xD3\x06\x58\x8A\x42\x3E\xDD"
3718                           "\x3D\x20\x45\xE9\x6F\x0D\x25\xA8"
3719                           "\xA5\xC7\x69\xCE\xD5\x3B\x7B\xC9"
3720                           "\x9E\x65\xE7\xA3\xF2\xE4\x18\x94"
3721                           "\xD2\x81\xE9\x33\x2B\x2D\x49\xC4"
3722                           "\xFE\xDA\x7F\xE2\xF2\x8C\x9C\xDC"
3723                           "\x73\x58\x11\x1F\x81\xD7\x21\x1A"
3724                           "\x80\xD0\x0D\xE8\x45\xD6\xD8\xD5"
3725                           "\x2E\x51\x16\xCA\x09\x89\x54\x62"
3726                           "\xF7\x04\x3D\x75\xB9\xA3\x84\xF4"
3727                           "\x62\xF0\x02\x58\x83\xAF\x30\x87"
3728                           "\x85\x3F\x01\xCD\x8E\x58\x42\xC4"
3729                           "\x41\x73\xE0\x15\x0A\xE6\x2E\x80"
3730                           "\x94\xF8\x5B\x3A\x4E\xDF\x51\xB2"
3731                           "\x9D\xE4\xC4\x9D\xF7\x3F\xF8\x8E"
3732                           "\x37\x22\x4D\x00\x2A\xEF\xC1\x0F"
3733                           "\x14\xA0\x66\xAB\x79\x39\xD0\x8E"
3734                           "\xE9\x95\x61\x74\x12\xED\x07\xD7"
3735                           "\xDD\x95\xDC\x7B\x57\x25\x27\x9C"
3736                           "\x51\x96\x16\xF7\x94\x61\xB8\x87"
3737                           "\xF0\x21\x1B\x32\xFB\x07\x0F\x29"
3738                           "\x56\xBD\x9D\x22\xA2\x9F\xA2\xB9"
3739                           "\x46\x31\x4C\x5E\x2E\x95\x61\xEF"
3740                           "\xE1\x58\x39\x09\xB4\x8B\x40\xAC"
3741                           "\x5F\x62\xC7\x72\xD9\xFC\xCB\x9A",
3742                 .ilen   = 248,
3743                 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3744                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3745                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3746                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3747                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3748                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3749                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3750                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3751                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3752                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3753                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3754                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3755                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3756                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3757                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3758                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3759                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3760                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3761                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3762                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3763                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3764                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3765                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3766                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3767                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3768                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3769                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3770                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3771                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3772                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3773                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3774                 .rlen   = 248,
3775                 .also_non_np = 1,
3776                 .np     = 3,
3777                 .tap    = { 248 - 10, 2, 8 },
3778         },
3779 };
3780
3781 static struct cipher_testvec des_cbc_enc_tv_template[] = {
3782         { /* From OpenSSL */
3783                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3784                 .klen   = 8,
3785                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3786                 .input  = "\x37\x36\x35\x34\x33\x32\x31\x20"
3787                           "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3788                           "\x68\x65\x20\x74\x69\x6d\x65\x20",
3789                 .ilen   = 24,
3790                 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3791                           "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3792                           "\x46\x8e\x91\x15\x78\x88\xba\x68",
3793                 .rlen   = 24,
3794         }, { /* FIPS Pub 81 */
3795                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3796                 .klen   = 8,
3797                 .iv     = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3798                 .input  = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3799                 .ilen   = 8,
3800                 .result = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3801                 .rlen   = 8,
3802         }, {
3803                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3804                 .klen   = 8,
3805                 .iv     = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3806                 .input  = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3807                 .ilen   = 8,
3808                 .result = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3809                 .rlen   = 8,
3810         }, {
3811                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3812                 .klen   = 8,
3813                 .iv     = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3814                 .input  = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3815                 .ilen   = 8,
3816                 .result = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3817                 .rlen   = 8,
3818         }, { /* Copy of openssl vector for chunk testing */
3819              /* From OpenSSL */
3820                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3821                 .klen   = 8,
3822                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
3823                 .input  = "\x37\x36\x35\x34\x33\x32\x31\x20"
3824                           "\x4e\x6f\x77\x20\x69\x73\x20\x74"
3825                           "\x68\x65\x20\x74\x69\x6d\x65\x20",
3826                 .ilen   = 24,
3827                 .result = "\xcc\xd1\x73\xff\xab\x20\x39\xf4"
3828                           "\xac\xd8\xae\xfd\xdf\xd8\xa1\xeb"
3829                           "\x46\x8e\x91\x15\x78\x88\xba\x68",
3830                 .rlen   = 24,
3831                 .np     = 2,
3832                 .tap    = { 13, 11 }
3833         }, { /* Generated with Crypto++ */
3834                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3835                 .klen   = 8,
3836                 .iv     = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3837                 .input  = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3838                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3839                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3840                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3841                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3842                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3843                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3844                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3845                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3846                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3847                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3848                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3849                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3850                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3851                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3852                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3853                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3854                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3855                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3856                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3857                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3858                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
3859                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
3860                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
3861                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
3862                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
3863                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
3864                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
3865                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
3866                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
3867                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
3868                 .ilen   = 248,
3869                 .result = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
3870                           "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
3871                           "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
3872                           "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
3873                           "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
3874                           "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
3875                           "\x81\x72\x74\xDE\x30\x19\x69\x49"
3876                           "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
3877                           "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
3878                           "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
3879                           "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
3880                           "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
3881                           "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
3882                           "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
3883                           "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
3884                           "\x49\x90\x88\x6A\x09\x8F\x76\x59"
3885                           "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
3886                           "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
3887                           "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
3888                           "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
3889                           "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
3890                           "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
3891                           "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
3892                           "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
3893                           "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
3894                           "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
3895                           "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
3896                           "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
3897                           "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
3898                           "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
3899                           "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
3900                 .rlen   = 248,
3901                 .also_non_np = 1,
3902                 .np     = 3,
3903                 .tap    = { 248 - 10, 2, 8 },
3904         },
3905 };
3906
3907 static struct cipher_testvec des_cbc_dec_tv_template[] = {
3908         { /* FIPS Pub 81 */
3909                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3910                 .klen   = 8,
3911                 .iv     = "\x12\x34\x56\x78\x90\xab\xcd\xef",
3912                 .input  = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3913                 .ilen   = 8,
3914                 .result = "\x4e\x6f\x77\x20\x69\x73\x20\x74",
3915                 .rlen   = 8,
3916         }, {
3917                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3918                 .klen   = 8,
3919                 .iv     = "\xe5\xc7\xcd\xde\x87\x2b\xf2\x7c",
3920                 .input  = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3921                 .ilen   = 8,
3922                 .result = "\x68\x65\x20\x74\x69\x6d\x65\x20",
3923                 .rlen   = 8,
3924         }, {
3925                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3926                 .klen   = 8,
3927                 .iv     = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3928                 .input  = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3929                 .ilen   = 8,
3930                 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3931                 .rlen   = 8,
3932         }, { /* Copy of above, for chunk testing */
3933                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
3934                 .klen   = 8,
3935                 .iv     = "\x43\xe9\x34\x00\x8c\x38\x9c\x0f",
3936                 .input  = "\x68\x37\x88\x49\x9a\x7c\x05\xf6",
3937                 .ilen   = 8,
3938                 .result = "\x66\x6f\x72\x20\x61\x6c\x6c\x20",
3939                 .rlen   = 8,
3940                 .np     = 2,
3941                 .tap    = { 4, 4 }
3942         }, { /* Generated with Crypto++ */
3943                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
3944                 .klen   = 8,
3945                 .iv     = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
3946                 .input  = "\x71\xCC\x56\x1C\x87\x2C\x43\x20"
3947                           "\x1C\x20\x13\x09\xF9\x2B\x40\x47"
3948                           "\x99\x10\xD1\x1B\x65\x33\x33\xBA"
3949                           "\x88\x0D\xA2\xD1\x86\xFF\x4D\xF4"
3950                           "\x5A\x0C\x12\x96\x32\x57\xAA\x26"
3951                           "\xA7\xF4\x32\x8D\xBC\x10\x31\x9E"
3952                           "\x81\x72\x74\xDE\x30\x19\x69\x49"
3953                           "\x54\x9C\xC3\xEB\x0B\x97\xDD\xD1"
3954                           "\xE8\x6D\x0D\x05\x83\xA5\x12\x08"
3955                           "\x47\xF8\x88\x03\x86\x51\x3C\xEF"
3956                           "\xE7\x11\x73\x4D\x44\x2B\xE2\x16"
3957                           "\xE8\xA5\x06\x50\x66\x70\x0E\x14"
3958                           "\xBA\x21\x3B\xD5\x23\x5B\xA7\x8F"
3959                           "\x56\xB6\xA7\x44\xDB\x86\xAB\x69"
3960                           "\x33\x3C\xBE\x64\xC4\x22\xD3\xFE"
3961                           "\x49\x90\x88\x6A\x09\x8F\x76\x59"
3962                           "\xCB\xB7\xA0\x2D\x79\x75\x92\x8A"
3963                           "\x82\x1D\xC2\xFE\x09\x1F\x78\x6B"
3964                           "\x2F\xD6\xA4\x87\x1E\xC4\x53\x63"
3965                           "\x80\x02\x61\x2F\xE3\x46\xB6\xB5"
3966                           "\xAA\x95\xF4\xEE\xA7\x64\x2B\x4F"
3967                           "\x20\xCF\xD2\x47\x4E\x39\x65\xB3"
3968                           "\x11\x87\xA2\x6C\x49\x7E\x36\xC7"
3969                           "\x62\x8B\x48\x0D\x6A\x64\x00\xBD"
3970                           "\x71\x91\x8C\xE9\x70\x19\x01\x4F"
3971                           "\x4E\x68\x23\xBA\xDA\x24\x2E\x45"
3972                           "\x02\x14\x33\x21\xAE\x58\x4B\xCF"
3973                           "\x3B\x4B\xE8\xF8\xF6\x4F\x34\x93"
3974                           "\xD7\x07\x8A\xD7\x18\x92\x36\x8C"
3975                           "\x82\xA9\xBD\x6A\x31\x91\x39\x11"
3976                           "\xC6\x4A\xF3\x55\xC7\x29\x2E\x63",
3977                 .ilen   = 248,
3978                 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
3979                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
3980                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
3981                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
3982                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
3983                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
3984                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
3985                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
3986                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
3987                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
3988                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
3989                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
3990                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
3991                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
3992                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
3993                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
3994                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
3995                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
3996                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
3997                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
3998                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
3999                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4000                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4001                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4002                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4003                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4004                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4005                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4006                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4007                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4008                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4009                 .rlen   = 248,
4010                 .also_non_np = 1,
4011                 .np     = 3,
4012                 .tap    = { 248 - 10, 2, 8 },
4013         },
4014 };
4015
4016 static struct cipher_testvec des_ctr_enc_tv_template[] = {
4017         { /* Generated with Crypto++ */
4018                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4019                 .klen   = 8,
4020                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4021                 .input  = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4022                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4023                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4024                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4025                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4026                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4027                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4028                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4029                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4030                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4031                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4032                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4033                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4034                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4035                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4036                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4037                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4038                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4039                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4040                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4041                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4042                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4043                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4044                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4045                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4046                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4047                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4048                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4049                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4050                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4051                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4052                 .ilen   = 248,
4053                 .result = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
4054                           "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
4055                           "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
4056                           "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
4057                           "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
4058                           "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
4059                           "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
4060                           "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
4061                           "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
4062                           "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
4063                           "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
4064                           "\xBE\x4C\x91\x43\x22\x65\x72\x48"
4065                           "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
4066                           "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
4067                           "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
4068                           "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
4069                           "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
4070                           "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
4071                           "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
4072                           "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
4073                           "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
4074                           "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
4075                           "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
4076                           "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
4077                           "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
4078                           "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
4079                           "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4080                           "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4081                           "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4082                           "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4083                           "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4084                 .rlen   = 248,
4085                 .also_non_np = 1,
4086                 .np     = 3,
4087                 .tap    = { 248 - 10, 2, 8 },
4088         }, { /* Generated with Crypto++ */
4089                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4090                 .klen   = 8,
4091                 .iv     = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4092                 .input  = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4093                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4094                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4095                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4096                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4097                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4098                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4099                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4100                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4101                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4102                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4103                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4104                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4105                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4106                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4107                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4108                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4109                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4110                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4111                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4112                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4113                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4114                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4115                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4116                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4117                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4118                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4119                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4120                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4121                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4122                           "\xC6\x2F\xBB\x24\x8D\x19\x82",
4123                 .ilen   = 247,
4124                 .result = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4125                           "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4126                           "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4127                           "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4128                           "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4129                           "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4130                           "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4131                           "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4132                           "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4133                           "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4134                           "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4135                           "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4136                           "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4137                           "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4138                           "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4139                           "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4140                           "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4141                           "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4142                           "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4143                           "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4144                           "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4145                           "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4146                           "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4147                           "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4148                           "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4149                           "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4150                           "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4151                           "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4152                           "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4153                           "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4154                           "\x91\x45\x05\x3E\x58\xBF\x32",
4155                 .rlen   = 247,
4156                 .also_non_np = 1,
4157                 .np     = 2,
4158                 .tap    = { 247 - 8, 8 },
4159         },
4160 };
4161
4162 static struct cipher_testvec des_ctr_dec_tv_template[] = {
4163         { /* Generated with Crypto++ */
4164                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4165                 .klen   = 8,
4166                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
4167                 .input  = "\x2F\x96\x06\x0F\x50\xC9\x68\x03"
4168                           "\x0F\x31\xD4\x64\xA5\x29\x77\x35"
4169                           "\xBC\x7A\x9F\x19\xE7\x0D\x33\x3E"
4170                           "\x12\x0B\x8C\xAE\x48\xAE\xD9\x02"
4171                           "\x0A\xD4\xB0\xD6\x37\xB2\x65\x1C"
4172                           "\x4B\x65\xEB\x24\xB5\x8E\xAD\x47"
4173                           "\x0D\xDA\x79\x77\xA0\x29\xA0\x2B"
4174                           "\xC8\x0F\x85\xDC\x03\x13\xA9\x04"
4175                           "\x19\x40\xBE\xBE\x5C\x49\x4A\x69"
4176                           "\xED\xE8\xE1\x9E\x14\x43\x74\xDE"
4177                           "\xEC\x6E\x11\x3F\x36\xEF\x7B\xFB"
4178                           "\xBE\x4C\x91\x43\x22\x65\x72\x48"
4179                           "\xE2\x12\xED\x88\xAC\xA7\xC9\x91"
4180                           "\x14\xA2\x36\x1C\x29\xFF\xC8\x4F"
4181                           "\x72\x5C\x4B\xB0\x1E\x93\xC2\xFA"
4182                           "\x9D\x53\x86\xA0\xAE\xC6\xB7\x3C"
4183                           "\x59\x0C\xD0\x8F\xA6\xD8\xA4\x31"
4184                           "\xB7\x30\x1C\x21\x38\xFB\x68\x8C"
4185                           "\x2E\xF5\x6E\x73\xC3\x16\x5F\x12"
4186                           "\x0C\x33\xB9\x1E\x7B\x70\xDE\x86"
4187                           "\x32\xB3\xC1\x16\xAB\xD9\x49\x0B"
4188                           "\x96\x28\x72\x6B\xF3\x30\xA9\xEB"
4189                           "\x69\xE2\x1E\x58\x46\xA2\x8E\xC7"
4190                           "\xC0\xEF\x07\xB7\x77\x2C\x00\x05"
4191                           "\x46\xBD\xFE\x53\x81\x8B\xA4\x03"
4192                           "\x20\x0F\xDB\x78\x0B\x1F\x53\x04"
4193                           "\x4C\x60\x4C\xC3\x2A\x86\x86\x7E"
4194                           "\x13\xD2\x26\xED\x5D\x3E\x9C\xF2"
4195                           "\x5C\xC4\x15\xC9\x9A\x21\xC5\xCD"
4196                           "\x19\x7F\x99\x19\x53\xCE\x1D\x14"
4197                           "\x69\x74\xA1\x06\x46\x0F\x4E\x75",
4198                 .ilen   = 248,
4199                 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4200                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4201                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4202                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4203                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4204                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4205                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4206                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4207                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4208                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4209                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4210                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4211                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4212                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4213                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4214                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4215                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4216                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4217                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4218                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4219                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4220                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4221                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4222                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4223                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4224                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4225                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4226                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4227                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4228                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4229                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB",
4230                 .rlen   = 248,
4231                 .also_non_np = 1,
4232                 .np     = 3,
4233                 .tap    = { 248 - 10, 2, 8 },
4234         }, { /* Generated with Crypto++ */
4235                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55",
4236                 .klen   = 8,
4237                 .iv     = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47",
4238                 .input  = "\x62\xE5\xF4\xDC\x99\xE7\x89\xE3"
4239                           "\xF4\x10\xCC\x21\x99\xEB\xDC\x15"
4240                           "\x19\x13\x93\x27\x9D\xB6\x6F\x45"
4241                           "\x17\x55\x61\x72\xC8\xD3\x7F\xA5"
4242                           "\x32\xD0\xD3\x02\x15\xA4\x05\x23"
4243                           "\x9C\x23\x61\x60\x77\x7B\x6C\x95"
4244                           "\x26\x49\x42\x2E\xF3\xC1\x8C\x6D"
4245                           "\xC8\x47\xD5\x94\xE7\x53\xC8\x23"
4246                           "\x1B\xA5\x0B\xCB\x12\xD3\x7A\x12"
4247                           "\xA4\x42\x15\x34\xF7\x5F\xDC\x58"
4248                           "\x5B\x58\x4C\xAD\xD1\x33\x8E\xE6"
4249                           "\xE5\xA0\xDA\x4D\x94\x3D\x63\xA8"
4250                           "\x02\x82\xBB\x16\xB8\xDC\xB5\x58"
4251                           "\xC3\x2D\x79\xE4\x25\x79\x43\xF9"
4252                           "\x6D\xD3\xCA\xC0\xE8\x12\xD4\x7E"
4253                           "\x04\x25\x79\xFD\x27\xFB\xC4\xEA"
4254                           "\x32\x94\x48\x92\xF3\x68\x1A\x7F"
4255                           "\x36\x33\x43\x79\xF7\xCA\xC2\x38"
4256                           "\xC0\x68\xD4\x53\xA9\xCC\x43\x0C"
4257                           "\x40\x57\x3E\xED\x00\x9F\x22\x6E"
4258                           "\x80\x99\x0B\xCC\x40\x63\x46\x8A"
4259                           "\xE8\xC4\x9B\x6D\x7A\x08\x6E\xA9"
4260                           "\x6F\x84\xBC\xB3\xF4\x95\x0B\x2D"
4261                           "\x6A\xBA\x37\x50\xC3\xCF\x9F\x7C"
4262                           "\x59\x5E\xDE\x0B\x30\xFA\x34\x8A"
4263                           "\xF8\xD1\xA2\xF8\x4E\xBD\x5D\x5E"
4264                           "\x7D\x71\x99\xE0\xF6\xE5\x7C\xE0"
4265                           "\x6D\xEE\x82\x89\x92\xD4\xF5\xD7"
4266                           "\xDF\x85\x2D\xE1\xB2\xD6\xAB\x94"
4267                           "\xA5\xA6\xE7\xB0\x51\x36\x52\x37"
4268                           "\x91\x45\x05\x3E\x58\xBF\x32",
4269                 .ilen   = 247,
4270                 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
4271                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
4272                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
4273                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
4274                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
4275                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
4276                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
4277                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
4278                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
4279                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
4280                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
4281                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
4282                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
4283                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
4284                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
4285                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
4286                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
4287                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
4288                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
4289                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
4290                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
4291                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
4292                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
4293                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
4294                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
4295                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
4296                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
4297                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
4298                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
4299                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
4300                           "\xC6\x2F\xBB\x24\x8D\x19\x82",
4301                 .rlen   = 247,
4302                 .also_non_np = 1,
4303                 .np     = 2,
4304                 .tap    = { 247 - 8, 8 },
4305         },
4306 };
4307
4308 static struct cipher_testvec des3_ede_enc_tv_template[] = {
4309         { /* These are from openssl */
4310                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4311                           "\x55\x55\x55\x55\x55\x55\x55\x55"
4312                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4313                 .klen   = 24,
4314                 .input  = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4315                 .ilen   = 8,
4316                 .result = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4317                 .rlen   = 8,
4318         }, {
4319                 .key    = "\x03\x52\x02\x07\x67\x20\x82\x17"
4320                           "\x86\x02\x87\x66\x59\x08\x21\x98"
4321                           "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4322                 .klen   = 24,
4323                 .input  = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4324                 .ilen   = 8,
4325                 .result = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4326                 .rlen   = 8,
4327         }, {
4328                 .key    = "\x10\x46\x10\x34\x89\x98\x80\x20"
4329                           "\x91\x07\xd0\x15\x89\x19\x01\x01"
4330                           "\x19\x07\x92\x10\x98\x1a\x01\x01",
4331                 .klen   = 24,
4332                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
4333                 .ilen   = 8,
4334                 .result = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4335                 .rlen   = 8,
4336         }, { /* Generated with Crypto++ */
4337                 .key    = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4338                           "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4339                           "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4340                 .klen   = 24,
4341                 .input  = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4342                           "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4343                           "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4344                           "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4345                           "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4346                           "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4347                           "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4348                           "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4349                           "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4350                           "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4351                           "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4352                           "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4353                           "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4354                           "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4355                           "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4356                           "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4357                           "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4358                           "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4359                           "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4360                           "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4361                           "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4362                           "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4363                           "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4364                           "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4365                           "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4366                           "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4367                           "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4368                           "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4369                           "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4370                           "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4371                           "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4372                           "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4373                           "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4374                           "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4375                           "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4376                           "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4377                           "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4378                           "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4379                           "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4380                           "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4381                           "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4382                           "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4383                           "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4384                           "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4385                           "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4386                           "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4387                           "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4388                           "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4389                           "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4390                           "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4391                           "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4392                           "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4393                           "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4394                           "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4395                           "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4396                           "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4397                           "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4398                           "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4399                           "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4400                           "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4401                           "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4402                           "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4403                 .ilen   = 496,
4404                 .result = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4405                           "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4406                           "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4407                           "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4408                           "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4409                           "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4410                           "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4411                           "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4412                           "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4413                           "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4414                           "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4415                           "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4416                           "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4417                           "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4418                           "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4419                           "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4420                           "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4421                           "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4422                           "\x45\x86\x50\x01\x70\x35\x99\x92"
4423                           "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4424                           "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4425                           "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4426                           "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4427                           "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4428                           "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4429                           "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4430                           "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4431                           "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4432                           "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4433                           "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4434                           "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4435                           "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4436                           "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4437                           "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4438                           "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4439                           "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4440                           "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4441                           "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4442                           "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4443                           "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4444                           "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4445                           "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4446                           "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4447                           "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4448                           "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4449                           "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4450                           "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4451                           "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4452                           "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4453                           "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4454                           "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4455                           "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4456                           "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4457                           "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4458                           "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4459                           "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4460                           "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4461                           "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4462                           "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4463                           "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4464                           "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4465                           "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4466                 .rlen   = 496,
4467                 .also_non_np = 1,
4468                 .np     = 3,
4469                 .tap    = { 496 - 20, 4, 16 },
4470         },
4471 };
4472
4473 static struct cipher_testvec des3_ede_dec_tv_template[] = {
4474         { /* These are from openssl */
4475                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
4476                           "\x55\x55\x55\x55\x55\x55\x55\x55"
4477                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
4478                 .klen   = 24,
4479                 .input  = "\x18\xd7\x48\xe5\x63\x62\x05\x72",
4480                 .ilen   = 8,
4481                 .result = "\x73\x6f\x6d\x65\x64\x61\x74\x61",
4482                 .rlen   = 8,
4483         }, {
4484                 .key    = "\x03\x52\x02\x07\x67\x20\x82\x17"
4485                           "\x86\x02\x87\x66\x59\x08\x21\x98"
4486                           "\x64\x05\x6a\xbd\xfe\xa9\x34\x57",
4487                 .klen   = 24,
4488                 .input  = "\xc0\x7d\x2a\x0f\xa5\x66\xfa\x30",
4489                 .ilen   = 8,
4490                 .result = "\x73\x71\x75\x69\x67\x67\x6c\x65",
4491                 .rlen   = 8,
4492         }, {
4493                 .key    = "\x10\x46\x10\x34\x89\x98\x80\x20"
4494                           "\x91\x07\xd0\x15\x89\x19\x01\x01"
4495                           "\x19\x07\x92\x10\x98\x1a\x01\x01",
4496                 .klen   = 24,
4497                 .input  = "\xe1\xef\x62\xc3\x32\xfe\x82\x5b",
4498                 .ilen   = 8,
4499                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
4500                 .rlen   = 8,
4501         }, { /* Generated with Crypto++ */
4502                 .key    = "\xF3\x9C\xD6\xF3\x9C\xB9\x5A\x67"
4503                           "\x00\x5A\x67\x00\x2D\xCE\xEB\x2D"
4504                           "\xCE\xEB\xB4\x51\x72\xB4\x51\x72",
4505                 .klen   = 24,
4506                 .input  = "\x4E\x9A\x40\x3D\x61\x7D\x17\xFA"
4507                           "\x16\x86\x88\x0B\xD8\xAE\xF8\xE4"
4508                           "\x81\x01\x04\x00\x76\xFA\xED\xD3"
4509                           "\x44\x7E\x21\x9D\xF0\xFB\x2B\x64"
4510                           "\xCA\x4E\x90\xE0\xC0\x63\x28\x92"
4511                           "\xF3\x1F\xA4\x53\x2C\x77\xCC\x77"
4512                           "\x69\x56\xD0\x19\xAD\x00\x2D\x97"
4513                           "\xBC\xDE\x49\x6A\x82\xBC\x16\xE2"
4514                           "\x2F\x3E\x72\xEE\xD1\xCE\xFC\x1B"
4515                           "\xEA\x32\x56\xE4\x0B\xAF\x27\x36"
4516                           "\xAF\x08\xB9\x61\xB7\x48\x23\x27"
4517                           "\xEE\x4D\xC8\x79\x56\x06\xEB\xC7"
4518                           "\x5B\xCA\x0A\xC6\x5E\x5C\xCB\xB6"
4519                           "\x9D\xDA\x04\x59\xE2\x09\x48\x7E"
4520                           "\x6B\x37\xC6\xFE\x92\xA9\x1E\x6E"
4521                           "\x0D\x19\xFA\x33\x0F\xEE\x36\x68"
4522                           "\x11\xBB\xF9\x5A\x73\xAB\x3A\xEA"
4523                           "\xAC\x28\xD8\xD5\x27\xE8\x6B\x16"
4524                           "\x45\x86\x50\x01\x70\x35\x99\x92"
4525                           "\xDF\x0C\x07\x88\x8B\x7F\x9E\x4B"
4526                           "\xD2\x04\x84\x90\xC4\x27\xDF\x0A"
4527                           "\x49\xA8\xA7\x1A\x6D\x78\x16\xCA"
4528                           "\xB3\x18\x5C\xC3\x93\x63\x5A\x68"
4529                           "\x77\x02\xBA\xED\x62\x71\xB1\xD9"
4530                           "\x5E\xE5\x6F\x1A\xCC\x1D\xBE\x2E"
4531                           "\x11\xF3\xA6\x97\xCA\x8E\xBF\xB4"
4532                           "\x56\xA1\x36\x6B\xB1\x0A\x3E\x70"
4533                           "\xEA\xD7\xCD\x72\x7B\x79\xC8\xAD"
4534                           "\x6B\xFE\xFB\xBA\x64\xAE\x19\xC1"
4535                           "\x82\xCF\x8A\xA1\x50\x17\x7F\xB2"
4536                           "\x6F\x7B\x0F\x52\xC5\x3E\x4A\x52"
4537                           "\x3F\xD9\x3F\x01\xA6\x41\x1A\xB3"
4538                           "\xB3\x7A\x0E\x8E\x75\xB2\xB1\x5F"
4539                           "\xDB\xEA\x84\x13\x26\x6C\x85\x4E"
4540                           "\xAE\x6B\xDC\xE7\xE7\xAD\xB0\x06"
4541                           "\x5C\xBA\x92\xD0\x30\xBB\x8D\xD2"
4542                           "\xAE\x4C\x70\x85\xA0\x07\xE3\x2C"
4543                           "\xD1\x27\x9C\xCF\xDB\x13\xB7\xE5"
4544                           "\xF9\x6A\x02\xD0\x39\x9D\xB6\xE7"
4545                           "\xD1\x17\x25\x08\xF9\xA9\xA6\x67"
4546                           "\x38\x80\xD1\x22\xAB\x1A\xD7\x26"
4547                           "\xAD\xCA\x19\x1B\xFA\x18\xA7\x57"
4548                           "\x31\xEC\xC9\xED\xDB\x79\xC0\x48"
4549                           "\xAC\x31\x9F\x03\x8B\x62\x5B\x7E"
4550                           "\x0E\xA6\xD0\x64\xEE\xEA\x00\xFC"
4551                           "\x58\xC8\xDE\x51\x4E\x17\x15\x11"
4552                           "\x66\x58\xB6\x90\xDC\xDF\xA1\x49"
4553                           "\xCA\x79\xE9\x31\x31\x42\xDC\x56"
4554                           "\x0B\xCD\xB6\x0D\xC7\x64\xF7\x19"
4555                           "\xD9\x42\x05\x7F\xBC\x2F\xFC\x90"
4556                           "\xAE\x29\x86\xAA\x43\x7A\x4F\x6B"
4557                           "\xCE\xEA\xBC\x31\x8D\x65\x9D\x46"
4558                           "\xEA\x77\xB4\xF9\x58\xEA\x5D\x84"
4559                           "\xE4\xDC\x14\xBB\xBD\x15\x0E\xDA"
4560                           "\xD8\xE4\xA4\x5D\x61\xF9\x58\x0F"
4561                           "\xE4\x82\x77\xCE\x87\xC0\x09\xF0"
4562                           "\xD6\x10\x9E\x34\xE1\x0C\x67\x55"
4563                           "\x7B\x6D\xD5\x51\x4B\x00\xEE\xBA"
4564                           "\xF2\x7B\xBE\x75\x07\x42\x9D\x99"
4565                           "\x12\xE1\x71\x4A\xF9\x2A\xF5\xF6"
4566                           "\x93\x03\xD7\x51\x09\xFA\xBE\x68"
4567                           "\xD8\x45\xFF\x33\xBA\xBB\x2B\x63",
4568                 .ilen   = 496,
4569                 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4570                           "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4571                           "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4572                           "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4573                           "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4574                           "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4575                           "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4576                           "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4577                           "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4578                           "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4579                           "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4580                           "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4581                           "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4582                           "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4583                           "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4584                           "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4585                           "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4586                           "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4587                           "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4588                           "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4589                           "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4590                           "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4591                           "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4592                           "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4593                           "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4594                           "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4595                           "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4596                           "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4597                           "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4598                           "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4599                           "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4600                           "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4601                           "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4602                           "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4603                           "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4604                           "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4605                           "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4606                           "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4607                           "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4608                           "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4609                           "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4610                           "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4611                           "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4612                           "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4613                           "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4614                           "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4615                           "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4616                           "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4617                           "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4618                           "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4619                           "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4620                           "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4621                           "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4622                           "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4623                           "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4624                           "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4625                           "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4626                           "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4627                           "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4628                           "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4629                           "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4630                           "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4631                 .rlen   = 496,
4632                 .also_non_np = 1,
4633                 .np     = 3,
4634                 .tap    = { 496 - 20, 4, 16 },
4635         },
4636 };
4637
4638 static struct cipher_testvec des3_ede_cbc_enc_tv_template[] = {
4639         { /* Generated from openssl */
4640                 .key    = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4641                           "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4642                           "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4643                 .klen   = 24,
4644                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4645                 .input  = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4646                           "\x53\x20\x63\x65\x65\x72\x73\x74"
4647                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4648                           "\x20\x79\x65\x53\x72\x63\x74\x65"
4649                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4650                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
4651                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4652                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
4653                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4654                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4655                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4656                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4657                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
4658                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4659                           "\x63\x65\x65\x72\x73\x74\x54\x20"
4660                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4661                 .ilen   = 128,
4662                 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4663                           "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4664                           "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4665                           "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4666                           "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4667                           "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4668                           "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4669                           "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4670                           "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4671                           "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4672                           "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4673                           "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4674                           "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4675                           "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4676                           "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4677                           "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4678                 .rlen   = 128,
4679         }, { /* Generated with Crypto++ */
4680                 .key    = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4681                           "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4682                           "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4683                 .klen   = 24,
4684                 .iv     = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4685                           "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4686                 .input  = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4687                           "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4688                           "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4689                           "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4690                           "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4691                           "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4692                           "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4693                           "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4694                           "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4695                           "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4696                           "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4697                           "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4698                           "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4699                           "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4700                           "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4701                           "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4702                           "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4703                           "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4704                           "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4705                           "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4706                           "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4707                           "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4708                           "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4709                           "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4710                           "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4711                           "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4712                           "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4713                           "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4714                           "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4715                           "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4716                           "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4717                           "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4718                           "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4719                           "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4720                           "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4721                           "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4722                           "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4723                           "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4724                           "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4725                           "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4726                           "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4727                           "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4728                           "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4729                           "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4730                           "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4731                           "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4732                           "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4733                           "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4734                           "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4735                           "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4736                           "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4737                           "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4738                           "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4739                           "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4740                           "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4741                           "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4742                           "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4743                           "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4744                           "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4745                           "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4746                           "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4747                           "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4748                 .ilen   = 496,
4749                 .result = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4750                           "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4751                           "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4752                           "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4753                           "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4754                           "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4755                           "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4756                           "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4757                           "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4758                           "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4759                           "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4760                           "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4761                           "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4762                           "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4763                           "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4764                           "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4765                           "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4766                           "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4767                           "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4768                           "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4769                           "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4770                           "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4771                           "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4772                           "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4773                           "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4774                           "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4775                           "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4776                           "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4777                           "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4778                           "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4779                           "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4780                           "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4781                           "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4782                           "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4783                           "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4784                           "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4785                           "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4786                           "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4787                           "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4788                           "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4789                           "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4790                           "\x73\x50\x08\x56\x20\x9B\x94\x23"
4791                           "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4792                           "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4793                           "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4794                           "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4795                           "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4796                           "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4797                           "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4798                           "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4799                           "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4800                           "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4801                           "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4802                           "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4803                           "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4804                           "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4805                           "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4806                           "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4807                           "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4808                           "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4809                           "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4810                           "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4811                 .rlen   = 496,
4812                 .also_non_np = 1,
4813                 .np     = 3,
4814                 .tap    = { 496 - 20, 4, 16 },
4815         },
4816 };
4817
4818 static struct cipher_testvec des3_ede_cbc_dec_tv_template[] = {
4819         { /* Generated from openssl */
4820                 .key    = "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
4821                           "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
4822                           "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
4823                 .klen   = 24,
4824                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
4825                 .input  = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
4826                           "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
4827                           "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
4828                           "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
4829                           "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
4830                           "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
4831                           "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
4832                           "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
4833                           "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
4834                           "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
4835                           "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
4836                           "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
4837                           "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
4838                           "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
4839                           "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
4840                           "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19",
4841                 .ilen   = 128,
4842                 .result = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
4843                           "\x53\x20\x63\x65\x65\x72\x73\x74"
4844                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
4845                           "\x20\x79\x65\x53\x72\x63\x74\x65"
4846                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
4847                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
4848                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
4849                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
4850                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
4851                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
4852                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
4853                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
4854                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
4855                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
4856                           "\x63\x65\x65\x72\x73\x74\x54\x20"
4857                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
4858                 .rlen   = 128,
4859         }, { /* Generated with Crypto++ */
4860                 .key    = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
4861                           "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
4862                           "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
4863                 .klen   = 24,
4864                 .iv     = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
4865                           "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
4866                 .input  = "\xF8\xF6\xB5\x60\x5C\x5A\x75\x84"
4867                           "\x87\x81\x53\xBA\xC9\x6F\xEC\xD5"
4868                           "\x1E\x68\x8E\x85\x12\x86\x1D\x38"
4869                           "\x1C\x91\x40\xCC\x69\x6A\xD5\x35"
4870                           "\x0D\x7C\xB5\x07\x7C\x7B\x2A\xAF"
4871                           "\x32\xBC\xA1\xB3\x84\x31\x1B\x3C"
4872                           "\x0A\x2B\xFA\xD3\x9F\xB0\x8C\x37"
4873                           "\x8F\x9D\xA7\x6D\x6C\xFA\xD7\x90"
4874                           "\xE3\x69\x54\xED\x3A\xC4\xF1\x6B"
4875                           "\xB1\xCC\xFB\x7D\xD8\x8E\x17\x0B"
4876                           "\x9C\xF6\x4C\xD6\xFF\x03\x4E\xD9"
4877                           "\xE6\xA5\xAD\x25\xE6\x17\x69\x63"
4878                           "\x11\x35\x61\x94\x88\x7B\x1C\x48"
4879                           "\xF1\x24\x20\x29\x6B\x93\x1A\x8E"
4880                           "\x43\x03\x89\xD8\xB1\xDA\x47\x7B"
4881                           "\x79\x3A\x83\x76\xDA\xAE\xC6\xBB"
4882                           "\x22\xF8\xE8\x3D\x9A\x65\x54\xD8"
4883                           "\x4C\xE9\xE7\xE4\x63\x2F\x5C\x73"
4884                           "\x5A\xC3\xAE\x46\xA8\xCD\x57\xE6"
4885                           "\x67\x88\xA5\x20\x6F\x5F\x97\xC7"
4886                           "\xCC\x15\xA2\x0A\x93\xEA\x33\xE7"
4887                           "\x03\x5F\xEC\x64\x30\x6F\xEE\xD7"
4888                           "\x7E\xDF\xD6\xE9\x6F\x3F\xD6\x1E"
4889                           "\xBE\x67\x6C\x5B\x97\xA0\x09\xE6"
4890                           "\xEE\xFE\x55\xA3\x29\x65\xE0\x12"
4891                           "\xA1\x6A\x8A\x6F\xF2\xE6\xF1\x96"
4892                           "\x87\xFB\x9C\x05\xDD\x80\xEC\xFF"
4893                           "\xC5\xED\x50\xFE\xFC\x91\xCD\xCE"
4894                           "\x25\x2C\x5F\xD9\xAD\x95\x7D\x99"
4895                           "\xF0\x05\xC4\x71\x46\x5F\xF9\x0D"
4896                           "\xD2\x63\xDF\x9B\x96\x2E\x2B\xA6"
4897                           "\x2B\x1C\xD5\xFB\x96\x24\x60\x60"
4898                           "\x54\x40\xB8\x62\xA4\xF8\x46\x95"
4899                           "\x73\x28\xA3\xA6\x16\x2B\x17\xE7"
4900                           "\x7A\xF8\x62\x54\x3B\x64\x69\xE1"
4901                           "\x71\x34\x29\x5B\x4E\x05\x9B\xFA"
4902                           "\x5E\xF1\x96\xB7\xCE\x16\x9B\x59"
4903                           "\xF1\x1A\x4C\x51\x26\xFD\x79\xE2"
4904                           "\x3B\x8E\x71\x69\x6A\x91\xB6\x65"
4905                           "\x32\x09\xB8\xE4\x09\x1F\xEA\x39"
4906                           "\xCE\x20\x65\x9F\xD6\xD1\xC7\xF0"
4907                           "\x73\x50\x08\x56\x20\x9B\x94\x23"
4908                           "\x14\x39\xB7\x2B\xB1\x2D\x6D\x6F"
4909                           "\x41\x5B\xCC\xE2\x18\xAE\x62\x89"
4910                           "\x78\x8E\x67\x23\xD0\xFB\x2B\xE5"
4911                           "\x25\xC9\x48\x97\xB5\xD3\x17\xD5"
4912                           "\x6A\x9F\xA7\x48\x0C\x2B\x73\x3B"
4913                           "\x57\x08\xAE\x91\xF2\xB7\x57\x89"
4914                           "\xF4\xD0\xB0\x07\xB0\x42\x6C\xAF"
4915                           "\x98\x1A\xE7\xD1\xAC\x1E\xB5\x02"
4916                           "\xD4\x56\x42\x79\x79\x7F\x2A\x77"
4917                           "\x25\xE9\x7D\xC1\x88\x19\x2B\x49"
4918                           "\x6F\x46\x59\xAB\x56\x1F\x61\xE0"
4919                           "\x0C\x24\x9C\xC9\x5B\x63\xA9\x12"
4920                           "\xCF\x88\x96\xB6\xA8\x24\xC6\xA8"
4921                           "\x21\x85\x1A\x62\x7E\x34\xBB\xEB"
4922                           "\xBD\x02\x2A\xC7\xD8\x89\x80\xC5"
4923                           "\xB1\xBB\x60\xA5\x22\xFC\x6F\x38"
4924                           "\x02\x80\xA3\x28\x22\x75\xE1\xE9"
4925                           "\x90\xE9\xFA\x4B\x00\x10\xAC\x58"
4926                           "\x83\x70\xFF\x86\xE6\xAA\x0F\x1F"
4927                           "\x95\x63\x73\xA2\x44\xAC\xF8\xA5",
4928                 .ilen   = 496,
4929                 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
4930                           "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
4931                           "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
4932                           "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
4933                           "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
4934                           "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
4935                           "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
4936                           "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
4937                           "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
4938                           "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
4939                           "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
4940                           "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
4941                           "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
4942                           "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
4943                           "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
4944                           "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
4945                           "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
4946                           "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
4947                           "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
4948                           "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
4949                           "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
4950                           "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
4951                           "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
4952                           "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
4953                           "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
4954                           "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
4955                           "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
4956                           "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
4957                           "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
4958                           "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
4959                           "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
4960                           "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
4961                           "\x50\x3B\x82\x15\x99\x60\xCB\x52"
4962                           "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
4963                           "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
4964                           "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
4965                           "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
4966                           "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
4967                           "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
4968                           "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
4969                           "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
4970                           "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
4971                           "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
4972                           "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
4973                           "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
4974                           "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
4975                           "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
4976                           "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
4977                           "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
4978                           "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
4979                           "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
4980                           "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
4981                           "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
4982                           "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
4983                           "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
4984                           "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
4985                           "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
4986                           "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
4987                           "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
4988                           "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
4989                           "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
4990                           "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
4991                 .rlen   = 496,
4992                 .also_non_np = 1,
4993                 .np     = 3,
4994                 .tap    = { 496 - 20, 4, 16 },
4995         },
4996 };
4997
4998 static struct cipher_testvec des3_ede_ctr_enc_tv_template[] = {
4999         { /* Generated with Crypto++ */
5000                 .key    = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5001                           "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5002                           "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5003                 .klen   = 24,
5004                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5005                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5006                 .input  = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5007                           "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5008                           "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5009                           "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5010                           "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5011                           "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5012                           "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5013                           "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5014                           "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5015                           "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5016                           "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5017                           "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5018                           "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5019                           "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5020                           "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5021                           "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5022                           "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5023                           "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5024                           "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5025                           "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5026                           "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5027                           "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5028                           "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5029                           "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5030                           "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5031                           "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5032                           "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5033                           "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5034                           "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5035                           "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5036                           "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5037                           "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5038                           "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5039                           "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5040                           "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5041                           "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5042                           "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5043                           "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5044                           "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5045                           "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5046                           "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5047                           "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5048                           "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5049                           "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5050                           "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5051                           "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5052                           "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5053                           "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5054                           "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5055                           "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5056                           "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5057                           "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5058                           "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5059                           "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5060                           "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5061                           "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5062                           "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5063                           "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5064                           "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5065                           "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5066                           "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5067                           "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5068                 .ilen   = 496,
5069                 .result = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5070                           "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5071                           "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5072                           "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5073                           "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5074                           "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5075                           "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5076                           "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5077                           "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5078                           "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5079                           "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5080                           "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5081                           "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5082                           "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5083                           "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5084                           "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5085                           "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5086                           "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5087                           "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5088                           "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5089                           "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5090                           "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5091                           "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5092                           "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5093                           "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5094                           "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5095                           "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5096                           "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5097                           "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5098                           "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5099                           "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5100                           "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5101                           "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5102                           "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5103                           "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5104                           "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5105                           "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5106                           "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5107                           "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5108                           "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5109                           "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5110                           "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5111                           "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5112                           "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5113                           "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5114                           "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5115                           "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5116                           "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5117                           "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5118                           "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5119                           "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5120                           "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5121                           "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5122                           "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5123                           "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5124                           "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5125                           "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5126                           "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5127                           "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5128                           "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5129                           "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5130                           "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5131                 .rlen   = 496,
5132                 .also_non_np = 1,
5133                 .np     = 3,
5134                 .tap    = { 496 - 20, 4, 16 },
5135         }, { /* Generated with Crypto++ */
5136                 .key    = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5137                           "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5138                           "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5139                 .klen   = 24,
5140                 .iv     = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5141                           "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5142                 .input  = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5143                           "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5144                           "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5145                           "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5146                           "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5147                           "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5148                           "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5149                           "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5150                           "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5151                           "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5152                           "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5153                           "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5154                           "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5155                           "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5156                           "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5157                           "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5158                           "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5159                           "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5160                           "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5161                           "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5162                           "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5163                           "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5164                           "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5165                           "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5166                           "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5167                           "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5168                           "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5169                           "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5170                           "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5171                           "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5172                           "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5173                           "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5174                           "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5175                           "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5176                           "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5177                           "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5178                           "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5179                           "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5180                           "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5181                           "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5182                           "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5183                           "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5184                           "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5185                           "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5186                           "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5187                           "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5188                           "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5189                           "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5190                           "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5191                           "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5192                           "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5193                           "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5194                           "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5195                           "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5196                           "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5197                           "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5198                           "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5199                           "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5200                           "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5201                           "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5202                           "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5203                           "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5204                           "\x2E\xB1\x18",
5205                 .ilen   = 499,
5206                 .result = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5207                           "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5208                           "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5209                           "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5210                           "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5211                           "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5212                           "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5213                           "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5214                           "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5215                           "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5216                           "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5217                           "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5218                           "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5219                           "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5220                           "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5221                           "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5222                           "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5223                           "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5224                           "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5225                           "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5226                           "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5227                           "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5228                           "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5229                           "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5230                           "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5231                           "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5232                           "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5233                           "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5234                           "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5235                           "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5236                           "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5237                           "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5238                           "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5239                           "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5240                           "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5241                           "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5242                           "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5243                           "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5244                           "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5245                           "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5246                           "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5247                           "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5248                           "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5249                           "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5250                           "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5251                           "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5252                           "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5253                           "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5254                           "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5255                           "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5256                           "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5257                           "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5258                           "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5259                           "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5260                           "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5261                           "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5262                           "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5263                           "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5264                           "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5265                           "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5266                           "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5267                           "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5268                           "\xF2\x79\xD9",
5269                 .rlen   = 499,
5270                 .also_non_np = 1,
5271                 .np     = 2,
5272                 .tap    = { 499 - 16, 16 },
5273         },
5274 };
5275
5276 static struct cipher_testvec des3_ede_ctr_dec_tv_template[] = {
5277         { /* Generated with Crypto++ */
5278                 .key    = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5279                           "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5280                           "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5281                 .klen   = 24,
5282                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
5283                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
5284                 .input  = "\x07\xC2\x08\x20\x72\x1F\x49\xEF"
5285                           "\x19\xCD\x6F\x32\x53\x05\x22\x15"
5286                           "\xA2\x85\x2B\xDB\x85\xD2\xD8\xB9"
5287                           "\xDD\x0D\x1B\x45\xCB\x69\x11\xD4"
5288                           "\xEA\xBE\xB2\x45\x5D\x0C\xAE\xBE"
5289                           "\xA0\xC1\x27\xAC\x65\x9F\x53\x7E"
5290                           "\xAF\xC2\x1B\xB5\xB8\x6D\x36\x0C"
5291                           "\x25\xC0\xF8\x6D\x0B\x29\x01\xDA"
5292                           "\x13\x78\xDC\x89\x12\x12\x43\xFA"
5293                           "\xF6\x12\xEF\x8D\x87\x62\x78\x83"
5294                           "\xE2\xBE\x41\x20\x4C\x6D\x35\x1B"
5295                           "\xD1\x0C\x30\xCF\xE2\xDE\x2B\x03"
5296                           "\xBF\x45\x73\xD4\xE5\x59\x95\xD1"
5297                           "\xB3\x9B\x27\x62\x97\xBD\xDE\x7F"
5298                           "\xA4\xD2\x39\x80\xAA\x50\x23\xF0"
5299                           "\x74\x88\x3D\xA8\x6A\x18\x79\x3B"
5300                           "\xC4\x96\x6C\x8D\x22\x40\x92\x6E"
5301                           "\xD6\xAD\x2A\x1F\xDE\x63\xC0\xE7"
5302                           "\x07\xF7\x2D\xF7\xB5\xF3\xF0\xCC"
5303                           "\x01\x7C\x2A\x9B\xC2\x10\xCA\xAA"
5304                           "\xFD\x2B\x3F\xC5\xF3\xF6\xFC\x9B"
5305                           "\x45\xDB\x53\xE4\x5B\xF3\xC9\x7B"
5306                           "\x8E\x52\xFF\xC8\x02\xB8\xAC\x9D"
5307                           "\xA1\x00\x39\xDA\x3D\x2D\x0E\x01"
5308                           "\x09\x7D\x8D\x5E\xBE\x53\xB9\xB0"
5309                           "\x8E\xE7\xE2\x96\x6A\xB2\x78\xEA"
5310                           "\xDE\x23\x8B\xA5\xFA\x5C\xE3\xDA"
5311                           "\xBF\x8E\x31\x6A\x55\xD1\x6A\xB2"
5312                           "\xB5\x46\x6F\xA5\xF0\xEE\xBA\x1F"
5313                           "\x9F\x98\xB0\x66\x4F\xD0\x3F\xA9"
5314                           "\xDF\x5F\x58\xC4\xF4\xFF\x75\x5C"
5315                           "\x40\x3A\x09\x7E\x6E\x1C\x97\xD4"
5316                           "\xCC\xE7\xE7\x71\xCF\x0B\x15\x08"
5317                           "\x71\xFA\x07\x97\xCD\xE6\xCA\x1D"
5318                           "\x14\x28\x0C\xCF\x99\x13\x7A\xF1"
5319                           "\xEB\xFA\xFA\x92\x07\xDE\x1D\xA1"
5320                           "\xD3\x36\x69\xFE\x51\x4D\x9F\x2E"
5321                           "\x83\x37\x4F\x1F\x48\x30\xED\x04"
5322                           "\x4D\xA4\xEF\x3A\xCA\x76\xF4\x1C"
5323                           "\x41\x8F\x63\x37\x78\x2F\x86\xA6"
5324                           "\xEF\x41\x7E\xD2\xAF\x88\xAB\x67"
5325                           "\x52\x71\xC3\x8E\xF8\x26\x93\x72"
5326                           "\xAA\xD6\x0E\xE7\x0B\x46\xB1\x3A"
5327                           "\xB4\x08\xA9\xA8\xA0\xCF\x20\x0C"
5328                           "\x52\xBC\x8B\x05\x56\xB2\xBC\x31"
5329                           "\x9B\x74\xB9\x29\x29\x96\x9A\x50"
5330                           "\xDC\x45\xDC\x1A\xEB\x0C\x64\xD4"
5331                           "\xD3\x05\x7E\x59\x55\xC3\xF4\x90"
5332                           "\xC2\xAB\xF8\x9B\x8A\xDA\xCE\xA1"
5333                           "\xC3\xF4\xAD\x77\xDD\x44\xC8\xAC"
5334                           "\xA3\xF1\xC9\xD2\x19\x5C\xB0\xCA"
5335                           "\xA2\x34\xC1\xF7\x6C\xFD\xAC\x65"
5336                           "\x32\xDC\x48\xC4\xF2\x00\x6B\x77"
5337                           "\xF1\x7D\x76\xAC\xC0\x31\x63\x2A"
5338                           "\xA5\x3A\x62\xC8\x91\xB1\x03\x65"
5339                           "\xCB\x43\xD1\x06\xDF\xC3\x67\xBC"
5340                           "\xDC\xE0\xCD\x35\xCE\x49\x65\xA0"
5341                           "\x52\x7B\xA7\x0D\x07\xA9\x1B\xB0"
5342                           "\x40\x77\x72\xC2\xEA\x0E\x3A\x78"
5343                           "\x46\xB9\x91\xB6\xE7\x3D\x51\x42"
5344                           "\xFD\x51\xB0\xC6\x2C\x63\x13\x78"
5345                           "\x5C\xEE\xFC\xCF\xC4\x70\x00\x34",
5346                 .ilen   = 496,
5347                 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5348                           "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5349                           "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5350                           "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5351                           "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5352                           "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5353                           "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5354                           "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5355                           "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5356                           "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5357                           "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5358                           "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5359                           "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5360                           "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5361                           "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5362                           "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5363                           "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5364                           "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5365                           "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5366                           "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5367                           "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5368                           "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5369                           "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5370                           "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5371                           "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5372                           "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5373                           "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5374                           "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5375                           "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5376                           "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5377                           "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5378                           "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5379                           "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5380                           "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5381                           "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5382                           "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5383                           "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5384                           "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5385                           "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5386                           "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5387                           "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5388                           "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5389                           "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5390                           "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5391                           "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5392                           "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5393                           "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5394                           "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5395                           "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5396                           "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5397                           "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5398                           "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5399                           "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5400                           "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5401                           "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5402                           "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5403                           "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5404                           "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5405                           "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5406                           "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5407                           "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5408                           "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47",
5409                 .rlen   = 496,
5410                 .also_non_np = 1,
5411                 .np     = 3,
5412                 .tap    = { 496 - 20, 4, 16 },
5413         }, { /* Generated with Crypto++ */
5414                 .key    = "\x9C\xD6\xF3\x9C\xB9\x5A\x67\x00"
5415                           "\x5A\x67\x00\x2D\xCE\xEB\x2D\xCE"
5416                           "\xEB\xB4\x51\x72\xB4\x51\x72\x1F",
5417                 .klen   = 24,
5418                 .iv     = "\xB2\xD7\x48\xED\x06\x44\xF9\x12"
5419                           "\xB7\x28\x4D\x83\x24\x59\xF2\x17",
5420                 .input  = "\x23\xFF\x5C\x99\x75\xBB\x1F\xD4"
5421                           "\xBC\x27\x9D\x36\x60\xA9\xC9\xF7"
5422                           "\x94\x9D\x1B\xFF\x8E\x95\x57\x89"
5423                           "\x8C\x2E\x33\x70\x43\x61\xE6\xD2"
5424                           "\x82\x33\x63\xB6\xC4\x34\x5E\xF8"
5425                           "\x96\x07\xA7\xD2\x3B\x8E\xC9\xAA"
5426                           "\x7C\xA0\x55\x89\x2E\xE1\x85\x25"
5427                           "\x14\x04\xDA\x6B\xE0\xEE\x56\xCF"
5428                           "\x08\x2E\x69\xD4\x54\xDE\x22\x84"
5429                           "\x69\xA6\xA7\xD3\x3A\x9A\xE8\x05"
5430                           "\x63\xDB\xBF\x46\x3A\x26\x2E\x0F"
5431                           "\x58\x5C\x46\xEA\x07\x40\xDA\xE1"
5432                           "\x14\x1D\xCD\x4F\x06\xC0\xCA\x54"
5433                           "\x1E\xC9\x45\x85\x67\x7C\xC2\xB5"
5434                           "\x97\x5D\x61\x78\x2E\x46\xEC\x6A"
5435                           "\x53\xF4\xD0\xAE\xFA\xB4\x86\x29"
5436                           "\x9F\x17\x33\x24\xD8\xB9\xB2\x05"
5437                           "\x93\x88\xEA\xF7\xA0\x70\x69\x49"
5438                           "\x88\x6B\x73\x40\x41\x8D\xD9\xD9"
5439                           "\x7E\x78\xE9\xBE\x6C\x14\x22\x7A"
5440                           "\x66\xE1\xDA\xED\x10\xFF\x69\x1D"
5441                           "\xB9\xAA\xF2\x56\x72\x1B\x23\xE2"
5442                           "\x45\x54\x8B\xA3\x70\x23\xB4\x5E"
5443                           "\x8E\x96\xC9\x05\x00\xB3\xB6\xC2"
5444                           "\x2A\x02\x43\x7A\x62\xD5\xC8\xD2"
5445                           "\xC2\xD0\xE4\x78\xA1\x7B\x3E\xE8"
5446                           "\x9F\x7F\x7D\x40\x54\x30\x3B\xC0"
5447                           "\xA5\x54\xFD\xCA\x25\xEC\x44\x3E"
5448                           "\x1A\x54\x7F\x88\xD0\xE1\xFE\x71"
5449                           "\xCE\x05\x49\x89\xBA\xD6\x72\xE7"
5450                           "\xD6\x5D\x3F\xA2\xD9\xAB\xC5\x02"
5451                           "\xD6\x43\x22\xAF\xA2\xE4\x80\x85"
5452                           "\xD7\x87\xB9\xEA\x43\xDB\xC8\xEF"
5453                           "\x5C\x82\x2E\x98\x0D\x30\x41\x6B"
5454                           "\x08\x48\x8D\xF0\xF8\x60\xD7\x9D"
5455                           "\xE9\xDE\x40\xAD\x0D\xAD\x0D\x58"
5456                           "\x2A\x98\x35\xFE\xF7\xDD\x4B\x40"
5457                           "\xDE\xB0\x05\xD9\x7B\x09\x4D\xBC"
5458                           "\x42\xC0\xF1\x15\x0B\xFA\x26\x6B"
5459                           "\xC6\x12\x13\x4F\xCB\x35\xBA\x35"
5460                           "\xDD\x7A\x36\x9C\x12\x57\x55\x83"
5461                           "\x78\x58\x09\xD0\xB0\xCF\x7C\x5C"
5462                           "\x38\xCF\xBD\x79\x5B\x13\x4D\x97"
5463                           "\xC1\x85\x6F\x97\xC9\xE8\xC2\xA4"
5464                           "\x98\xE2\xBD\x77\x6B\x53\x39\x1A"
5465                           "\x28\x10\xE7\xE0\xE7\xDE\x9D\x69"
5466                           "\x78\x6F\x8E\xD2\xD9\x5D\xD2\x15"
5467                           "\x9E\xB5\x4D\x8C\xC0\x78\x22\x2F"
5468                           "\x17\x11\x2E\x99\xD7\xE3\xA4\x4F"
5469                           "\x65\xA5\x6B\x03\x2C\x35\x6F\xDA"
5470                           "\x8A\x19\x08\xE1\x08\x48\x59\x51"
5471                           "\x53\x4B\xD1\xDF\xDA\x14\x50\x5F"
5472                           "\xDF\xB5\x8C\xDF\xC6\xFD\x85\xFA"
5473                           "\xD4\xF9\x64\x45\x65\x0D\x7D\xF4"
5474                           "\xC8\xCD\x3F\x32\xAF\xDD\x30\xED"
5475                           "\x7B\xAA\xAC\xF0\xDA\x7F\xDF\x75"
5476                           "\x1C\xA4\xF1\xCB\x5E\x4F\x0B\xB4"
5477                           "\x97\x73\x28\xDE\xCF\xAF\x82\xBD"
5478                           "\xC4\xBA\xB4\x9C\x0D\x16\x77\x42"
5479                           "\x42\x39\x7C\x53\xA4\xD4\xDD\x40"
5480                           "\x5C\x60\x1F\x6E\xA7\xE2\xDC\xE7"
5481                           "\x32\x0F\x05\x2F\xF2\x4C\x95\x3B"
5482                           "\xF2\x79\xD9",
5483                 .ilen   = 499,
5484                 .result = "\x05\xEC\x77\xFB\x42\xD5\x59\x20"
5485                           "\x8B\x12\x86\x69\xF0\x5B\xCF\x56"
5486                           "\x39\xAD\x34\x9F\x66\xEA\x7D\xC4"
5487                           "\x48\xD3\xBA\x0D\xB1\x18\xE3\x4A"
5488                           "\xFE\x41\x28\x5C\x27\x8E\x11\x85"
5489                           "\x6C\xF7\x5E\xC2\x55\x3C\xA0\x0B"
5490                           "\x92\x65\xE9\x70\xDB\x4F\xD6\xB9"
5491                           "\x00\xB4\x1F\xE6\x49\xFD\x44\x2F"
5492                           "\x53\x3A\x8D\x14\x98\x63\xCA\x5D"
5493                           "\xC1\xA8\x33\xA7\x0E\x91\x78\xEC"
5494                           "\x77\xDE\x42\xD5\xBC\x07\x8B\x12"
5495                           "\xE5\x4C\xF0\x5B\x22\x56\x39\x80"
5496                           "\x6B\x9F\x66\xC9\x50\xC4\xAF\x36"
5497                           "\xBA\x0D\x94\x7F\xE3\x4A\xDD\x41"
5498                           "\x28\xB3\x1A\x8E\x11\xF8\x43\xF7"
5499                           "\x5E\x21\x55\x3C\x87\x6E\x92\x65"
5500                           "\xCC\x57\xDB\xA2\x35\xB9\x00\xEB"
5501                           "\x72\xE6\x49\xD0\x44\x2F\xB6\x19"
5502                           "\x8D\x14\xFF\x46\xCA\x5D\x24\xA8"
5503                           "\x33\x9A\x6D\x91\x78\xC3\x77\xDE"
5504                           "\xA1\x08\xBC\x07\xEE\x71\xE5\x4C"
5505                           "\xD7\x5B\x22\xB5\x1C\x80\x6B\xF2"
5506                           "\x45\xC9\x50\x3B\xAF\x36\x99\x60"
5507                           "\x94\x7F\xC6\x4A\xDD\xA4\x0F\xB3"
5508                           "\x1A\xED\x74\xF8\x43\x2A\x5E\x21"
5509                           "\x88\x13\x87\x6E\xF1\x58\xCC\x57"
5510                           "\x3E\xA2\x35\x9C\x67\xEB\x72\xC5"
5511                           "\x49\xD0\xBB\x02\xB6\x19\xE0\x4B"
5512                           "\xFF\x46\x29\x5D\x24\x8F\x16\x9A"
5513                           "\x6D\xF4\x5F\xC3\xAA\x3D\xA1\x08"
5514                           "\x93\x7A\xEE\x71\xD8\x4C\xD7\xBE"
5515                           "\x01\xB5\x1C\xE7\x4E\xF2\x45\x2C"
5516                           "\x50\x3B\x82\x15\x99\x60\xCB\x52"
5517                           "\xC6\xA9\x30\xA4\x0F\x96\x79\xED"
5518                           "\x74\xDF\x43\x2A\xBD\x04\x88\x13"
5519                           "\xFA\x4D\xF1\x58\x23\x57\x3E\x81"
5520                           "\x68\x9C\x67\xCE\x51\xC5\xAC\x37"
5521                           "\xBB\x02\x95\x7C\xE0\x4B\xD2\x46"
5522                           "\x29\xB0\x1B\x8F\x16\xF9\x40\xF4"
5523                           "\x5F\x26\xAA\x3D\x84\x6F\x93\x7A"
5524                           "\xCD\x54\xD8\xA3\x0A\xBE\x01\xE8"
5525                           "\x73\xE7\x4E\xD1\x45\x2C\xB7\x1E"
5526                           "\x82\x15\xFC\x47\xCB\x52\x25\xA9"
5527                           "\x30\x9B\x62\x96\x79\xC0\x74\xDF"
5528                           "\xA6\x09\xBD\x04\xEF\x76\xFA\x4D"
5529                           "\xD4\x58\x23\x8A\x1D\x81\x68\xF3"
5530                           "\x5A\xCE\x51\x38\xAC\x37\x9E\x61"
5531                           "\x95\x7C\xC7\x4B\xD2\xA5\x0C\xB0"
5532                           "\x1B\xE2\x75\xF9\x40\x2B\x5F\x26"
5533                           "\x89\x10\x84\x6F\xF6\x59\xCD\x54"
5534                           "\x3F\xA3\x0A\x9D\x64\xE8\x73\xDA"
5535                           "\x4E\xD1\xB8\x03\xB7\x1E\xE1\x48"
5536                           "\xFC\x47\x2E\x52\x25\x8C\x17\x9B"
5537                           "\x62\xF5\x5C\xC0\xAB\x32\xA6\x09"
5538                           "\x90\x7B\xEF\x76\xD9\x4D\xD4\xBF"
5539                           "\x06\x8A\x1D\xE4\x4F\xF3\x5A\x2D"
5540                           "\x51\x38\x83\x6A\x9E\x61\xC8\x53"
5541                           "\xC7\xAE\x31\xA5\x0C\x97\x7E\xE2"
5542                           "\x75\xDC\x40\x2B\xB2\x05\x89\x10"
5543                           "\xFB\x42\xF6\x59\x20\x54\x3F\x86"
5544                           "\x69\x9D\x64\xCF\x56\xDA\xAD\x34"
5545                           "\xB8\x03\xEA\x7D\xE1\x48\xD3\x47"
5546                           "\x2E\xB1\x18",
5547                 .rlen   = 499,
5548                 .also_non_np = 1,
5549                 .np     = 2,
5550                 .tap    = { 499 - 16, 16 },
5551         },
5552 };
5553
5554 /*
5555  * Blowfish test vectors.
5556  */
5557 #define BF_ENC_TEST_VECTORS     7
5558 #define BF_DEC_TEST_VECTORS     7
5559 #define BF_CBC_ENC_TEST_VECTORS 2
5560 #define BF_CBC_DEC_TEST_VECTORS 2
5561 #define BF_CTR_ENC_TEST_VECTORS 2
5562 #define BF_CTR_DEC_TEST_VECTORS 2
5563
5564 static struct cipher_testvec bf_enc_tv_template[] = {
5565         { /* DES test vectors from OpenSSL */
5566                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
5567                 .klen   = 8,
5568                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
5569                 .ilen   = 8,
5570                 .result = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5571                 .rlen   = 8,
5572         }, {
5573                 .key    = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5574                 .klen   = 8,
5575                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5576                 .ilen   = 8,
5577                 .result = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5578                 .rlen   = 8,
5579         }, {
5580                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5581                 .klen   = 8,
5582                 .input  = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5583                 .ilen   = 8,
5584                 .result = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5585                 .rlen   = 8,
5586         }, { /* Vary the keylength... */
5587                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5588                           "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5589                 .klen   = 16,
5590                 .input  = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5591                 .ilen   = 8,
5592                 .result = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5593                 .rlen   = 8,
5594         }, {
5595                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5596                           "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5597                           "\x00\x11\x22\x33\x44",
5598                 .klen   = 21,
5599                 .input  = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5600                 .ilen   = 8,
5601                 .result = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5602                 .rlen   = 8,
5603         }, { /* Generated with bf488 */
5604                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5605                           "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5606                           "\x00\x11\x22\x33\x44\x55\x66\x77"
5607                           "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5608                           "\x58\x40\x23\x64\x1a\xba\x61\x76"
5609                           "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5610                           "\xff\xff\xff\xff\xff\xff\xff\xff",
5611                 .klen   = 56,
5612                 .input  = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5613                 .ilen   = 8,
5614                 .result = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5615                 .rlen   = 8,
5616         }, { /* Generated with Crypto++ */
5617                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5618                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5619                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5620                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5621                 .klen   = 32,
5622                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5623                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5624                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5625                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5626                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5627                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5628                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5629                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5630                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5631                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5632                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5633                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5634                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5635                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5636                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5637                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5638                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5639                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5640                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5641                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5642                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5643                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5644                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5645                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5646                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5647                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5648                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5649                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5650                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5651                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5652                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5653                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5654                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5655                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5656                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5657                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5658                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5659                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5660                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5661                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5662                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5663                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5664                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5665                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5666                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5667                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5668                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5669                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5670                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5671                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5672                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5673                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5674                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5675                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5676                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5677                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5678                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5679                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5680                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5681                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5682                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5683                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5684                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5685                 .ilen   = 504,
5686                 .result = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5687                           "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5688                           "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5689                           "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
5690                           "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5691                           "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5692                           "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5693                           "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5694                           "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5695                           "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5696                           "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5697                           "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5698                           "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5699                           "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5700                           "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5701                           "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5702                           "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5703                           "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5704                           "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5705                           "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5706                           "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5707                           "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5708                           "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5709                           "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5710                           "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5711                           "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5712                           "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5713                           "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5714                           "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5715                           "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5716                           "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5717                           "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5718                           "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5719                           "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5720                           "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5721                           "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5722                           "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5723                           "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5724                           "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5725                           "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5726                           "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5727                           "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5728                           "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5729                           "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5730                           "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5731                           "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5732                           "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5733                           "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5734                           "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5735                           "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5736                           "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5737                           "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5738                           "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5739                           "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5740                           "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5741                           "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5742                           "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5743                           "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5744                           "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5745                           "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5746                           "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5747                           "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5748                           "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5749                 .rlen   = 504,
5750                 .also_non_np = 1,
5751                 .np     = 3,
5752                 .tap    = { 504 - 10, 2, 8 },
5753         },
5754 };
5755
5756 static struct cipher_testvec bf_dec_tv_template[] = {
5757         { /* DES test vectors from OpenSSL */
5758                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
5759                 .klen   = 8,
5760                 .input  = "\x4e\xf9\x97\x45\x61\x98\xdd\x78",
5761                 .ilen   = 8,
5762                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
5763                 .rlen   = 8,
5764         }, {
5765                 .key    = "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e",
5766                 .klen   = 8,
5767                 .input  = "\xa7\x90\x79\x51\x08\xea\x3c\xae",
5768                 .ilen   = 8,
5769                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
5770                 .rlen   = 8,
5771         }, {
5772                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5773                 .klen   = 8,
5774                 .input  = "\xe8\x7a\x24\x4e\x2c\xc8\x5e\x82",
5775                 .ilen   = 8,
5776                 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5777                 .rlen   = 8,
5778         }, { /* Vary the keylength... */
5779                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5780                           "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f",
5781                 .klen   = 16,
5782                 .input  = "\x93\x14\x28\x87\xee\x3b\xe1\x5c",
5783                 .ilen   = 8,
5784                 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5785                 .rlen   = 8,
5786         }, {
5787                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5788                           "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5789                           "\x00\x11\x22\x33\x44",
5790                 .klen   = 21,
5791                 .input  = "\xe6\xf5\x1e\xd7\x9b\x9d\xb2\x1f",
5792                 .ilen   = 8,
5793                 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5794                 .rlen   = 8,
5795         }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
5796                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87"
5797                           "\x78\x69\x5a\x4b\x3c\x2d\x1e\x0f"
5798                           "\x00\x11\x22\x33\x44\x55\x66\x77"
5799                           "\x04\x68\x91\x04\xc2\xfd\x3b\x2f"
5800                           "\x58\x40\x23\x64\x1a\xba\x61\x76"
5801                           "\x1f\x1f\x1f\x1f\x0e\x0e\x0e\x0e"
5802                           "\xff\xff\xff\xff\xff\xff\xff\xff",
5803                 .klen   = 56,
5804                 .input  = "\xc0\x45\x04\x01\x2e\x4e\x1f\x53",
5805                 .ilen   = 8,
5806                 .result = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5807                 .rlen   = 8,
5808         }, { /* Generated with Crypto++ */
5809                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5810                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5811                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5812                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5813                 .klen   = 32,
5814                 .input  = "\x96\x87\x3D\x0C\x7B\xFB\xBD\x1F"
5815                           "\xE3\xC1\x99\x6D\x39\xD4\xC2\x7D"
5816                           "\xD7\x87\xA1\xF2\xDF\x51\x71\x26"
5817                           "\xC2\xF4\x6D\xFF\xF6\xCD\x6B\x40"
5818                           "\xE1\xB3\xBF\xD4\x38\x2B\xC8\x3B"
5819                           "\xD3\xB2\xD4\x61\xC7\x9F\x06\xE9"
5820                           "\xCD\xF3\x88\x39\x39\x7A\xDF\x19"
5821                           "\xE8\x03\x2A\x0B\x9E\xA0\x2B\x86"
5822                           "\x31\xF8\x9D\xB1\xEE\x78\x9D\xB5"
5823                           "\xCD\x8B\x7C\x2E\xF5\xA2\x2D\x5D"
5824                           "\x6E\x66\xAF\x38\x6C\xD3\x13\xED"
5825                           "\x14\xEA\x5D\xD0\x17\x77\x0F\x4A"
5826                           "\x50\xF2\xD0\x0F\xC8\xF7\x1E\x7B"
5827                           "\x9D\x5B\x54\x65\x4F\x16\x8A\x97"
5828                           "\xF3\xF6\xD4\xAA\x87\x36\x77\x72"
5829                           "\x99\x4A\xB5\x5E\x88\xC3\xCD\x7D"
5830                           "\x1D\x97\xF9\x11\xBD\xE0\x1F\x1F"
5831                           "\x96\x3E\x4B\x22\xF4\xC0\xE6\xB8"
5832                           "\x47\x82\x98\x23\x33\x36\xBC\x1B"
5833                           "\x36\xE7\xF6\xCF\x97\x37\x16\xC0"
5834                           "\x87\x31\x8B\xB0\xDB\x19\x42\xA5"
5835                           "\x1F\x90\x7E\x66\x34\xDD\x5E\xE9"
5836                           "\x4F\xB2\x2B\x9A\xDE\xB3\x5D\x71"
5837                           "\x4D\x68\xF0\xDC\xA6\xEA\xE3\x9B"
5838                           "\x60\x00\x55\x57\x06\x8B\xD5\xB3"
5839                           "\x86\x30\x78\xDA\x33\x9A\x9D\xCC"
5840                           "\xBA\x0B\x81\x06\x77\x43\xC7\xC9"
5841                           "\xDB\x37\x60\x11\x45\x59\x6D\x2D"
5842                           "\x90\x3D\x65\x3E\xD0\x13\xC6\x3C"
5843                           "\x0E\x78\x7D\x9A\x00\xD6\x2F\x0B"
5844                           "\x3B\x53\x19\x1E\xA8\x9B\x11\xD9"
5845                           "\x98\xE4\x7F\xC3\x6E\x51\x24\x70"
5846                           "\x9F\x04\x9C\xC2\x9E\x44\x84\xE3"
5847                           "\xE0\x8A\x44\xA2\x5C\x94\x74\x34"
5848                           "\x37\x52\x7C\x03\xE8\x8E\x97\xE1"
5849                           "\x5B\x5C\x0E\xB0\x70\xFE\x54\x3F"
5850                           "\xD8\x65\xA9\xC5\xCD\xEC\xF4\x45"
5851                           "\x55\xC5\xA7\xA3\x19\x80\x28\x51"
5852                           "\xBE\x64\x4A\xC1\xD4\xE1\xBE\xEB"
5853                           "\x73\x4C\xB6\xF9\x5F\x6D\x82\xBC"
5854                           "\x3E\x42\x14\x49\x88\x51\xBF\x68"
5855                           "\x45\x75\x27\x1B\x0A\x72\xED\xAF"
5856                           "\xDA\xC4\x4D\x67\x0D\xEE\x75\xE3"
5857                           "\x34\xDD\x91\x19\x42\x3A\xCB\xDA"
5858                           "\x38\xFA\x3C\x93\x62\xF2\xE3\x81"
5859                           "\xB3\xE4\xBB\xF6\x0D\x0B\x1D\x09"
5860                           "\x9C\x52\x0D\x50\x63\xA4\xB2\xD2"
5861                           "\x82\xA0\x23\x3F\x1F\xB6\xED\x6E"
5862                           "\xC2\x9C\x1C\xD0\x9A\x40\xB6\xFC"
5863                           "\x36\x56\x6E\x85\x73\xD7\x52\xBA"
5864                           "\x35\x5E\x32\x89\x5D\x42\xF5\x36"
5865                           "\x52\x8D\x46\x7D\xC8\x71\xAD\x33"
5866                           "\xE1\xAF\x6A\xA8\xEC\xBA\x1C\xDC"
5867                           "\xFE\x88\xE6\x16\xE4\xC8\x13\x00"
5868                           "\x3C\xDA\x59\x32\x38\x19\xD5\xEB"
5869                           "\xB6\x7F\x78\x45\x1B\x8E\x07\x8C"
5870                           "\x66\x52\x75\xFF\xAF\xCE\x2D\x2B"
5871                           "\x22\x29\xCA\xB3\x5F\x7F\xE3\x29"
5872                           "\xB2\xB8\x9D\xEB\x16\xC8\xC5\x1D"
5873                           "\xC9\x0D\x59\x82\x27\x57\x9D\x42"
5874                           "\x54\x59\x09\xA5\x3D\xC5\x84\x68"
5875                           "\x56\xEB\x36\x77\x3D\xAA\xB8\xF5"
5876                           "\xC9\x1A\xFB\x5D\xDE\xBB\x43\xF4",
5877                 .ilen   = 504,
5878                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5879                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5880                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5881                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5882                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5883                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5884                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5885                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5886                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5887                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5888                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5889                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5890                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5891                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5892                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5893                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5894                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5895                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5896                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5897                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5898                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5899                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5900                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5901                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5902                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5903                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5904                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5905                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5906                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
5907                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
5908                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
5909                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
5910                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
5911                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
5912                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
5913                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
5914                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
5915                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
5916                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
5917                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
5918                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
5919                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
5920                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
5921                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
5922                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
5923                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
5924                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
5925                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
5926                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
5927                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
5928                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
5929                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
5930                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
5931                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
5932                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
5933                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
5934                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
5935                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
5936                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
5937                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
5938                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
5939                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
5940                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
5941                 .rlen   = 504,
5942                 .also_non_np = 1,
5943                 .np     = 3,
5944                 .tap    = { 504 - 10, 2, 8 },
5945         },
5946 };
5947
5948 static struct cipher_testvec bf_cbc_enc_tv_template[] = {
5949         { /* From OpenSSL */
5950                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
5951                           "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
5952                 .klen   = 16,
5953                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
5954                 .input  = "\x37\x36\x35\x34\x33\x32\x31\x20"
5955                           "\x4e\x6f\x77\x20\x69\x73\x20\x74"
5956                           "\x68\x65\x20\x74\x69\x6d\x65\x20"
5957                           "\x66\x6f\x72\x20\x00\x00\x00\x00",
5958                 .ilen   = 32,
5959                 .result = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
5960                           "\x05\xb1\x56\xe2\x74\x03\x97\x93"
5961                           "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
5962                           "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
5963                 .rlen   = 32,
5964         }, { /* Generated with Crypto++ */
5965                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
5966                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
5967                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
5968                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
5969                 .klen   = 32,
5970                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
5971                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
5972                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
5973                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
5974                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
5975                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
5976                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
5977                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
5978                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
5979                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
5980                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
5981                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
5982                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
5983                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
5984                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
5985                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
5986                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
5987                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
5988                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
5989                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
5990                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
5991                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
5992                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
5993                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
5994                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
5995                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
5996                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
5997                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
5998                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
5999                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6000                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6001                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6002                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6003                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6004                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6005                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6006                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6007                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6008                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6009                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6010                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6011                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6012                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6013                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6014                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6015                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6016                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6017                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6018                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6019                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6020                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6021                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6022                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6023                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6024                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6025                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6026                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6027                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6028                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6029                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6030                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6031                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6032                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6033                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6034                 .ilen   = 504,
6035                 .result = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
6036                           "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
6037                           "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
6038                           "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
6039                           "\x01\x9C\x93\x63\x51\x60\x82\xD2"
6040                           "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
6041                           "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
6042                           "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
6043                           "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
6044                           "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
6045                           "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
6046                           "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
6047                           "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
6048                           "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
6049                           "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
6050                           "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
6051                           "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
6052                           "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
6053                           "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
6054                           "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
6055                           "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
6056                           "\x65\xFE\x15\x40\xD0\x62\x41\x02"
6057                           "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
6058                           "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
6059                           "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
6060                           "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
6061                           "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
6062                           "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
6063                           "\x04\xF0\x86\x08\x78\x18\x42\xE0"
6064                           "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
6065                           "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
6066                           "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
6067                           "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
6068                           "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
6069                           "\x97\x18\x92\xFF\x15\x11\xCE\xED"
6070                           "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
6071                           "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
6072                           "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
6073                           "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
6074                           "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
6075                           "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
6076                           "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
6077                           "\x43\x12\x73\x77\xDB\x91\x83\x5B"
6078                           "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
6079                           "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
6080                           "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
6081                           "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
6082                           "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
6083                           "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
6084                           "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
6085                           "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
6086                           "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
6087                           "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
6088                           "\xC5\xF8\x69\x83\x28\x84\x87\x56"
6089                           "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
6090                           "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
6091                           "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
6092                           "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
6093                           "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
6094                           "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
6095                           "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
6096                           "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
6097                           "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
6098                 .rlen   = 504,
6099                 .also_non_np = 1,
6100                 .np     = 3,
6101                 .tap    = { 504 - 10, 2, 8 },
6102         },
6103 };
6104
6105 static struct cipher_testvec bf_cbc_dec_tv_template[] = {
6106         { /* From OpenSSL */
6107                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
6108                           "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
6109                 .klen   = 16,
6110                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
6111                 .input  = "\x6b\x77\xb4\xd6\x30\x06\xde\xe6"
6112                           "\x05\xb1\x56\xe2\x74\x03\x97\x93"
6113                           "\x58\xde\xb9\xe7\x15\x46\x16\xd9"
6114                           "\x59\xf1\x65\x2b\xd5\xff\x92\xcc",
6115                 .ilen   = 32,
6116                 .result = "\x37\x36\x35\x34\x33\x32\x31\x20"
6117                           "\x4e\x6f\x77\x20\x69\x73\x20\x74"
6118                           "\x68\x65\x20\x74\x69\x6d\x65\x20"
6119                           "\x66\x6f\x72\x20\x00\x00\x00\x00",
6120                 .rlen   = 32,
6121         }, { /* Generated with Crypto++ */
6122                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6123                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6124                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6125                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6126                 .klen   = 32,
6127                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6128                 .input  = "\xB4\xFE\xA5\xBB\x3D\x2C\x27\x06"
6129                           "\x06\x2B\x3A\x92\xB2\xF5\x5E\x62"
6130                           "\x84\xCD\xF7\x66\x7E\x41\x6C\x8E"
6131                           "\x1B\xD9\x02\xB6\x48\xB0\x87\x25"
6132                           "\x01\x9C\x93\x63\x51\x60\x82\xD2"
6133                           "\x4D\xE5\xC2\xB7\xAE\x60\xD8\xAD"
6134                           "\x9F\xAB\x6C\xFA\x20\x05\xDA\x6F"
6135                           "\x1F\xD1\xD8\x36\x0F\xB5\x16\x69"
6136                           "\x3C\xAF\xB3\x30\x18\x33\xE6\xB5"
6137                           "\x43\x29\x9D\x94\xF4\x2F\x0A\x65"
6138                           "\x40\xB2\xB2\xB2\x42\x89\xEE\x8A"
6139                           "\x60\xD3\x52\xA8\xED\x91\xDF\xE1"
6140                           "\x91\x73\x7C\x28\xA1\x14\xC3\x4C"
6141                           "\x82\x72\x4B\x7D\x7D\x32\xD5\x19"
6142                           "\xE8\xB8\x6B\x30\x21\x09\x0E\x27"
6143                           "\x10\x9D\x2D\x3A\x6A\x4B\x7B\xE6"
6144                           "\x8D\x4E\x02\x32\xFF\x7F\x8E\x13"
6145                           "\xB0\x96\xF4\xC2\xA1\x60\x8A\x69"
6146                           "\xEF\x0F\x86\xD0\x25\x13\x1A\x7C"
6147                           "\x6E\xF0\x41\xA3\xFB\xB3\xAB\x40"
6148                           "\x7D\x19\xA0\x11\x4F\x3E\x1D\x43"
6149                           "\x65\xFE\x15\x40\xD0\x62\x41\x02"
6150                           "\xEA\x0C\x7A\xC3\x84\xEE\xB0\xBE"
6151                           "\xBE\xC8\x57\x51\xCD\x4F\xAD\x5C"
6152                           "\xCC\x79\xBA\x0D\x85\x3A\xED\x6B"
6153                           "\xAC\x6B\xA3\x4D\xBC\xE8\x02\x6A"
6154                           "\xC2\x6D\xBD\x5E\x89\x95\x86\x43"
6155                           "\x2C\x17\x4B\xC6\x40\xA2\xBD\x24"
6156                           "\x04\xF0\x86\x08\x78\x18\x42\xE0"
6157                           "\x39\x1B\x22\x9E\x89\x4C\x04\x6B"
6158                           "\x65\xC5\xB6\x0E\xF6\x63\xFC\xD7"
6159                           "\xAE\x9E\x87\x13\xCC\xD3\x1A\xEC"
6160                           "\xF0\x51\xCC\x93\x68\xFC\xE9\x19"
6161                           "\x7C\x4E\x9B\xCC\x17\xAD\xD2\xFC"
6162                           "\x97\x18\x92\xFF\x15\x11\xCE\xED"
6163                           "\x04\x41\x05\xA3\x92\xFF\x3B\xE6"
6164                           "\xB6\x8C\x90\xC6\xCD\x15\xA0\x04"
6165                           "\x25\x8B\x5D\x5B\x5F\xDB\xAE\x68"
6166                           "\xEF\xB3\x61\x18\xDB\x83\x9B\x39"
6167                           "\xCA\x82\xD1\x88\xF0\xA2\x5C\x02"
6168                           "\x87\xBD\x8D\x8F\xBB\x62\xF0\x35"
6169                           "\x75\x6F\x06\x81\x0A\x97\x4D\xF0"
6170                           "\x43\x12\x73\x77\xDB\x91\x83\x5B"
6171                           "\xE7\x3A\xA6\x07\x7B\xBF\x2C\x50"
6172                           "\x94\xDE\x7B\x65\xDA\x1C\xF1\x9F"
6173                           "\x7E\x12\x40\xB2\x3E\x19\x23\xF1"
6174                           "\x7C\x1B\x5F\xA8\xF3\xAC\x63\x87"
6175                           "\xEB\x3E\x0C\xBE\xA3\x63\x97\x88"
6176                           "\x8D\x27\xC6\x2A\xF8\xF2\x67\x9A"
6177                           "\x0D\x14\x16\x2B\x6F\xCB\xD4\x76"
6178                           "\x14\x48\x2E\xDE\x2A\x44\x5E\x45"
6179                           "\xF1\x97\x82\xEF\xB7\xAE\xED\x3A"
6180                           "\xED\x73\xD3\x79\xF7\x38\x1D\xD0"
6181                           "\xC5\xF8\x69\x83\x28\x84\x87\x56"
6182                           "\x3F\xAE\x81\x04\x79\x1F\xD1\x09"
6183                           "\xC5\xE5\x05\x0D\x64\x16\xCE\x42"
6184                           "\xC5\xF8\xDB\x57\x89\x33\x22\xFC"
6185                           "\xB4\xD7\x94\xB9\xF3\xCC\x02\x90"
6186                           "\x02\xBA\x55\x1E\x24\x3E\x02\x1D"
6187                           "\xC6\xCD\x8F\xD9\xBD\xED\xB0\x51"
6188                           "\xCD\xE9\xD5\x0C\xFE\x12\x39\xA9"
6189                           "\x93\x9B\xEE\xB5\x97\x41\xD2\xA0"
6190                           "\xB4\x98\xD8\x6B\x74\xE7\x65\xF4",
6191                 .ilen   = 504,
6192                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6193                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6194                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6195                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6196                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6197                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6198                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6199                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6200                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6201                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6202                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6203                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6204                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6205                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6206                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6207                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6208                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6209                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6210                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6211                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6212                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6213                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6214                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6215                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6216                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6217                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6218                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6219                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6220                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6221                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6222                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6223                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6224                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6225                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6226                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6227                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6228                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6229                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6230                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6231                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6232                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6233                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6234                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6235                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6236                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6237                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6238                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6239                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6240                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6241                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6242                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6243                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6244                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6245                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6246                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6247                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6248                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6249                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6250                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6251                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6252                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6253                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6254                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6255                 .rlen   = 504,
6256                 .also_non_np = 1,
6257                 .np     = 3,
6258                 .tap    = { 504 - 10, 2, 8 },
6259         },
6260 };
6261
6262 static struct cipher_testvec bf_ctr_enc_tv_template[] = {
6263         { /* Generated with Crypto++ */
6264                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6265                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6266                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6267                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6268                 .klen   = 32,
6269                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6270                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6271                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6272                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6273                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6274                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6275                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6276                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6277                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6278                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6279                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6280                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6281                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6282                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6283                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6284                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6285                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6286                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6287                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6288                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6289                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6290                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6291                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6292                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6293                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6294                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6295                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6296                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6297                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6298                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6299                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6300                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6301                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6302                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6303                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6304                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6305                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6306                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6307                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6308                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6309                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6310                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6311                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6312                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6313                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6314                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6315                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6316                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6317                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6318                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6319                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6320                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6321                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6322                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6323                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6324                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6325                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6326                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6327                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6328                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6329                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6330                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6331                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6332                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6333                 .ilen   = 504,
6334                 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6335                           "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6336                           "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6337                           "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6338                           "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6339                           "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6340                           "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6341                           "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6342                           "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6343                           "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6344                           "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6345                           "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6346                           "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6347                           "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6348                           "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6349                           "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6350                           "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6351                           "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6352                           "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6353                           "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6354                           "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6355                           "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6356                           "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6357                           "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6358                           "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6359                           "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6360                           "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6361                           "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6362                           "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6363                           "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6364                           "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6365                           "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6366                           "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6367                           "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6368                           "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6369                           "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6370                           "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6371                           "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6372                           "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6373                           "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6374                           "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6375                           "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6376                           "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6377                           "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6378                           "\x82\x63\x11\xB3\x54\x49\x00\x08"
6379                           "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6380                           "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6381                           "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6382                           "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6383                           "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6384                           "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6385                           "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6386                           "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6387                           "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6388                           "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6389                           "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6390                           "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6391                           "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6392                           "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6393                           "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6394                           "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6395                           "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6396                           "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6397                 .rlen   = 504,
6398         }, { /* Generated with Crypto++ */
6399                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6400                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6401                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6402                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6403                 .klen   = 32,
6404                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6405                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6406                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6407                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6408                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6409                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6410                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6411                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6412                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6413                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6414                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6415                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6416                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6417                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6418                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6419                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6420                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6421                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6422                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6423                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6424                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6425                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6426                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6427                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6428                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6429                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6430                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6431                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6432                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6433                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6434                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6435                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6436                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6437                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6438                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6439                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6440                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6441                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6442                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6443                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6444                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6445                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6446                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6447                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6448                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6449                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6450                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6451                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6452                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6453                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6454                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6455                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6456                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6457                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6458                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6459                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6460                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6461                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6462                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6463                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6464                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6465                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6466                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6467                           "\x2B\xC2\x59\xF0\x64\xFB\x92",
6468                 .ilen   = 503,
6469                 .result = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6470                           "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6471                           "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6472                           "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6473                           "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6474                           "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6475                           "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6476                           "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6477                           "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6478                           "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6479                           "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6480                           "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6481                           "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6482                           "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6483                           "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6484                           "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6485                           "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6486                           "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6487                           "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6488                           "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6489                           "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6490                           "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6491                           "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6492                           "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6493                           "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6494                           "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6495                           "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6496                           "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6497                           "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6498                           "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6499                           "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6500                           "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6501                           "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6502                           "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6503                           "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6504                           "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6505                           "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6506                           "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6507                           "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6508                           "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6509                           "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6510                           "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6511                           "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6512                           "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6513                           "\x82\x63\x11\xB3\x54\x49\x00\x08"
6514                           "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6515                           "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6516                           "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6517                           "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6518                           "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6519                           "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6520                           "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6521                           "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6522                           "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6523                           "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6524                           "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6525                           "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6526                           "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6527                           "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6528                           "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6529                           "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6530                           "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6531                           "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6532                 .rlen   = 503,
6533                 .also_non_np = 1,
6534                 .np     = 2,
6535                 .tap    = { 503 - 8, 8 },
6536         }, { /* Generated with Crypto++ */
6537                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6538                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6539                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6540                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6541                 .klen   = 32,
6542                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6543                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6544                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6545                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6546                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6547                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6548                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6549                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6550                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6551                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6552                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6553                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6554                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6555                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6556                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6557                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6558                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6559                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6560                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6561                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6562                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6563                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6564                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6565                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6566                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6567                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6568                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6569                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6570                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6571                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6572                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6573                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6574                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6575                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6576                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6577                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6578                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6579                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6580                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6581                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6582                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6583                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6584                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6585                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6586                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6587                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6588                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6589                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6590                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6591                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6592                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6593                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6594                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6595                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6596                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6597                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6598                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6599                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6600                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6601                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6602                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6603                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6604                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6605                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6606                 .ilen   = 504,
6607                 .result = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6608                           "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6609                           "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6610                           "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6611                           "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6612                           "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6613                           "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6614                           "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6615                           "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6616                           "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6617                           "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6618                           "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6619                           "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6620                           "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6621                           "\x0B\x82\x59\x14\x26\x67\x08\x09"
6622                           "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6623                           "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6624                           "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6625                           "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6626                           "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6627                           "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6628                           "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6629                           "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6630                           "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6631                           "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6632                           "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6633                           "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6634                           "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6635                           "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
6636                           "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
6637                           "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
6638                           "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
6639                           "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
6640                           "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
6641                           "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
6642                           "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
6643                           "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
6644                           "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
6645                           "\xB4\x19\xD8\x19\x45\x66\x27\x02"
6646                           "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
6647                           "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
6648                           "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
6649                           "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
6650                           "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
6651                           "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
6652                           "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
6653                           "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
6654                           "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
6655                           "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
6656                           "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
6657                           "\x91\x51\x4E\x71\xF2\x98\x85\x16"
6658                           "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
6659                           "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
6660                           "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
6661                           "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
6662                           "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
6663                           "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
6664                           "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
6665                           "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
6666                           "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
6667                           "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
6668                           "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
6669                           "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
6670                 .rlen   = 504,
6671         },
6672 };
6673
6674 static struct cipher_testvec bf_ctr_dec_tv_template[] = {
6675         { /* Generated with Crypto++ */
6676                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6677                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6678                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6679                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6680                 .klen   = 32,
6681                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6682                 .input  = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6683                           "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6684                           "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6685                           "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6686                           "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6687                           "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6688                           "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6689                           "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6690                           "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6691                           "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6692                           "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6693                           "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6694                           "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6695                           "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6696                           "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6697                           "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6698                           "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6699                           "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6700                           "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6701                           "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6702                           "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6703                           "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6704                           "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6705                           "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6706                           "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6707                           "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6708                           "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6709                           "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6710                           "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6711                           "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6712                           "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6713                           "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6714                           "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6715                           "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6716                           "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6717                           "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6718                           "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6719                           "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6720                           "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6721                           "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6722                           "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6723                           "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6724                           "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6725                           "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6726                           "\x82\x63\x11\xB3\x54\x49\x00\x08"
6727                           "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6728                           "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6729                           "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6730                           "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6731                           "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6732                           "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6733                           "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6734                           "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6735                           "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6736                           "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6737                           "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6738                           "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6739                           "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6740                           "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6741                           "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6742                           "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6743                           "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6744                           "\xF3\x71\xEF\xEB\x4E\xBB\x4D\x29",
6745                 .ilen   = 504,
6746                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6747                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6748                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6749                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6750                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6751                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6752                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6753                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6754                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6755                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6756                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6757                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6758                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6759                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6760                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6761                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6762                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6763                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6764                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6765                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6766                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6767                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6768                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6769                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6770                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6771                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6772                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6773                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6774                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6775                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6776                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6777                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6778                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6779                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6780                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6781                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6782                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6783                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6784                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6785                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6786                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6787                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6788                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6789                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6790                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6791                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6792                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6793                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6794                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6795                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6796                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6797                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6798                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6799                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6800                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6801                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6802                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6803                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6804                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6805                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6806                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6807                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6808                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
6809                 .rlen   = 504,
6810         }, { /* Generated with Crypto++ */
6811                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6812                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6813                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6814                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6815                 .klen   = 32,
6816                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
6817                 .input  = "\xC7\xA3\xDF\xB9\x05\xF4\x9E\x8D"
6818                           "\x9E\xDF\x38\x18\x83\x07\xEF\xC1"
6819                           "\x93\x3C\xAA\xAA\xFE\x06\x42\xCC"
6820                           "\x0D\x70\x86\x5A\x44\xAD\x85\x17"
6821                           "\xE4\x1F\x5E\xA5\x89\xAC\x32\xBC"
6822                           "\x3D\xA7\xE9\x0A\x5C\x70\x4D\xDE"
6823                           "\x99\x38\x07\xCA\x1D\x21\xC1\x11"
6824                           "\x97\xEB\x98\x75\xC4\x73\x45\x83"
6825                           "\x46\x1C\x9C\x91\x87\xC1\xA0\x56"
6826                           "\x98\xA1\x8B\xDB\x22\x76\xBD\x62"
6827                           "\xA4\xBC\xE8\x86\xDA\xD2\x51\x13"
6828                           "\x13\xD2\x96\x68\x69\x10\x67\x0C"
6829                           "\xD0\x17\x25\x7C\xB2\xAE\x4F\x93"
6830                           "\xA6\x82\x20\xCF\x0F\xA6\x47\x79"
6831                           "\x88\x09\x40\x59\xBD\x12\x64\xB5"
6832                           "\x19\x38\x0D\xFF\x86\xD9\x42\x20"
6833                           "\x81\x0D\x96\x99\xAF\x22\x1F\x94"
6834                           "\x5C\x6E\xEC\xEA\xA3\x39\xCB\x09"
6835                           "\x43\x19\x7F\xD0\xBB\x10\xC2\x49"
6836                           "\xF7\xE9\xF2\xEE\xBF\xF7\xF8\xB3"
6837                           "\x0E\x1A\xF1\x8D\x70\x82\x0C\x04"
6838                           "\xFD\x29\x1A\xAC\xC0\x92\x48\x34"
6839                           "\x6A\xE3\x1D\x4F\xFC\x1C\x72\x6A"
6840                           "\x57\xCB\xAD\xD0\x98\xAB\xB1\x01"
6841                           "\x03\x6A\x45\xDD\x07\x71\x5F\x5B"
6842                           "\xB5\x4A\xE4\xE5\xB9\xB9\xBC\xAC"
6843                           "\x44\xF7\x41\xA4\x5F\x2E\xE9\x28"
6844                           "\xE3\x05\xD2\x94\x78\x4C\x33\x1B"
6845                           "\xBD\xC1\x6E\x51\xD9\xAD\xD9\x86"
6846                           "\x15\x4A\x78\xAE\x7B\xAD\x3B\xBC"
6847                           "\x2F\xE0\x0E\xC5\x7B\x54\x97\x5F"
6848                           "\x60\x51\x14\x65\xF9\x91\xE9\xDA"
6849                           "\x9A\xBC\xFC\x19\x29\x67\xAA\x63"
6850                           "\x5E\xF2\x48\x88\xEB\x79\xE1\xE4"
6851                           "\xF7\xF6\x4C\xA9\xE2\x8C\x3B\xE0"
6852                           "\xED\x52\xAE\x90\x8F\x5B\x98\x34"
6853                           "\x29\x94\x34\x7F\xF9\x6C\x1E\xB6"
6854                           "\xA4\xE7\x2D\x06\x54\x9D\xC3\x02"
6855                           "\xC1\x90\xA4\x72\x31\x6B\x24\x51"
6856                           "\x0B\xB3\x7C\x63\x15\xBA\xAF\x5D"
6857                           "\x41\xE0\x37\x6D\xBE\x41\x58\xDE"
6858                           "\xF2\x07\x62\x99\xBE\xC1\x8C\x0F"
6859                           "\x0F\x28\xFB\x8F\x0E\x1D\x91\xE2"
6860                           "\xDA\x99\x5C\x49\xBA\x9C\xA8\x86"
6861                           "\x82\x63\x11\xB3\x54\x49\x00\x08"
6862                           "\x07\xF2\xE8\x1F\x34\x49\x61\xF4"
6863                           "\x81\xE9\xF6\xA9\x5A\x28\x60\x1F"
6864                           "\x66\x99\x08\x06\xF2\xE8\x2D\xD1"
6865                           "\xD0\x67\xBA\x32\x1F\x02\x86\x7B"
6866                           "\xFB\x79\x3D\xC5\xB1\x7F\x15\xAF"
6867                           "\xD7\xBF\x31\x46\x22\x7F\xAE\x5B"
6868                           "\x8B\x95\x47\xC2\xB1\x62\xA1\xCE"
6869                           "\x52\xAC\x9C\x8B\xC2\x49\x7F\xBC"
6870                           "\x9C\x89\xB8\xB6\xCA\xE3\x8F\xEA"
6871                           "\xAC\xB4\x5D\xE4\x50\xDC\x3A\xB5"
6872                           "\x91\x04\x94\x99\x03\x3B\x42\x6D"
6873                           "\x9C\x4A\x02\xF5\xB5\x38\x98\xA8"
6874                           "\x5C\x97\x2E\x4D\x79\x67\x71\xAF"
6875                           "\xF0\x70\x77\xFF\x2D\xDA\xA0\x9E"
6876                           "\x23\x8D\xD6\xA6\x68\x10\x78\x9A"
6877                           "\x64\xBB\x15\xB8\x56\xCF\xEE\xE5"
6878                           "\x32\x44\x96\x1C\xD8\xEB\x95\xD2"
6879                           "\xF3\x71\xEF\xEB\x4E\xBB\x4D",
6880                 .ilen   = 503,
6881                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
6882                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
6883                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
6884                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
6885                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
6886                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
6887                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
6888                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
6889                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
6890                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
6891                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
6892                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
6893                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
6894                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
6895                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
6896                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
6897                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
6898                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
6899                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
6900                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
6901                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
6902                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
6903                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
6904                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
6905                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
6906                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
6907                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
6908                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
6909                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
6910                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
6911                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
6912                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
6913                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
6914                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
6915                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
6916                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
6917                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
6918                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
6919                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
6920                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
6921                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
6922                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
6923                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
6924                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
6925                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
6926                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
6927                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
6928                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
6929                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
6930                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
6931                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
6932                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
6933                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
6934                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
6935                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
6936                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
6937                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
6938                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
6939                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
6940                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
6941                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
6942                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
6943                           "\x2B\xC2\x59\xF0\x64\xFB\x92",
6944                 .rlen   = 503,
6945                 .also_non_np = 1,
6946                 .np     = 2,
6947                 .tap    = { 503 - 8, 8 },
6948         }, { /* Generated with Crypto++ */
6949                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
6950                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
6951                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
6952                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
6953                 .klen   = 32,
6954                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
6955                 .input  = "\x5F\x58\x6E\x60\x51\x6E\xDC\x3D"
6956                           "\xD1\xBB\xF7\xB7\xFD\x04\x44\x82"
6957                           "\xDC\x9F\x4B\x02\xF1\xD2\x5A\x6F"
6958                           "\x25\xF9\x27\x21\xF2\xD2\x9A\x01"
6959                           "\xBD\xAD\x3D\x93\x87\xCA\x0D\xFE"
6960                           "\xB7\x2C\x17\x1F\x42\x8C\x13\xB2"
6961                           "\x62\x44\x72\xB9\x5D\xC0\xF8\x37"
6962                           "\xDF\xEA\x78\x81\x8F\xA6\x34\xB2"
6963                           "\x07\x09\x7C\xB9\x3A\xA0\x2B\x18"
6964                           "\x34\x6A\x9D\x3D\xA5\xEB\xF4\x60"
6965                           "\xF8\x98\xA2\x39\x81\x23\x6C\xA9"
6966                           "\x70\xCA\xCC\x45\xD8\x1F\xDF\x44"
6967                           "\x2A\x67\x7A\x88\x28\xDC\x36\x83"
6968                           "\x18\xD7\x48\x43\x17\x2B\x1B\xE6"
6969                           "\x0B\x82\x59\x14\x26\x67\x08\x09"
6970                           "\x5B\x5D\x38\xD0\x81\xCE\x54\x2A"
6971                           "\xCD\x22\x94\x42\xF5\xBA\x74\x7E"
6972                           "\xD9\x00\x40\xA9\x0D\x0B\xBD\x8E"
6973                           "\xC4\x8E\x5E\x17\x8F\x48\xE2\xB8"
6974                           "\xF4\xCC\x19\x76\xAB\x48\x29\xAA"
6975                           "\x81\xD5\xCE\xD5\x8A\x3B\xC9\x21"
6976                           "\xEF\x50\x4F\x04\x02\xBF\xE1\x1F"
6977                           "\x59\x28\x1A\xE4\x18\x16\xA0\x29"
6978                           "\xBF\x34\xA9\x2D\x28\x83\xC0\x5E"
6979                           "\xEA\x44\xC4\x6E\xAB\x24\x79\x9D"
6980                           "\x2D\xA1\xE8\x55\xCA\x74\xFC\xBD"
6981                           "\xFE\xDD\xDA\xA5\xFB\x34\x90\x31"
6982                           "\x0E\x62\x28\x9B\xDC\xD7\xA1\xBB"
6983                           "\xF0\x1A\xB3\xE2\xD0\xFA\xBD\xE8"
6984                           "\x5C\x5A\x10\x67\xF6\x6A\x17\x3F"
6985                           "\xC5\xE9\x09\x08\xDD\x22\x77\x42"
6986                           "\x26\x6A\x6A\x7A\x3F\x87\x80\x0C"
6987                           "\xF0\xFF\x15\x8E\x84\x86\xC0\x10"
6988                           "\x0F\x8D\x33\x06\xB8\x72\xA4\x47"
6989                           "\x6B\xED\x2E\x05\x94\x6C\x5C\x5B"
6990                           "\x13\xF6\x77\xEE\x3B\x16\xDF\xC2"
6991                           "\x63\x66\x07\x6D\x3F\x6C\x51\x7C"
6992                           "\x1C\xAC\x80\xB6\x58\x48\xB7\x9D"
6993                           "\xB4\x19\xD8\x19\x45\x66\x27\x02"
6994                           "\xA1\xA9\x99\xF3\x1F\xE5\xA7\x1D"
6995                           "\x31\xE7\x1B\x0D\xFF\xBB\xB5\xA1"
6996                           "\xF5\x9C\x45\x1E\x18\x19\xA1\xE7"
6997                           "\xC2\xF1\xBF\x68\xC3\xEC\xCF\x53"
6998                           "\x67\xA6\x2B\x7D\x3C\x6D\x24\xC3"
6999                           "\xE8\xE6\x07\x5A\x09\xE0\x32\xA8"
7000                           "\x52\xF6\xE9\xED\x0E\xC6\x0A\x6A"
7001                           "\xFC\x60\x2A\xE0\x93\xCE\xB8\x2E"
7002                           "\xA2\xA8\x0E\x79\x9E\x34\x5D\x37"
7003                           "\x6F\x12\xFE\x48\x7B\xE7\xB9\x22"
7004                           "\x29\xE8\xD7\xBE\x5D\xD1\x8B\xD9"
7005                           "\x91\x51\x4E\x71\xF2\x98\x85\x16"
7006                           "\x25\x7A\x76\x8A\x51\x0E\x65\x14"
7007                           "\x81\xB5\x3A\x37\xFD\xEC\xB5\x8A"
7008                           "\xE1\xCF\x41\x72\x14\x29\x4C\xF0"
7009                           "\x20\xD9\x9A\xC5\x66\xA4\x03\x76"
7010                           "\x5B\xA4\x15\x4F\x0E\x64\x39\x40"
7011                           "\x25\xF9\x20\x22\xF5\x88\xF5\xBA"
7012                           "\xE4\xDF\x45\x61\xBF\x8D\x7A\x24"
7013                           "\x4B\x92\x71\xD9\x2F\x77\xA7\x95"
7014                           "\xA8\x7F\x61\xD5\xA4\x57\xB0\xFB"
7015                           "\xB5\x77\xBA\x1C\xEE\x71\xFA\xB0"
7016                           "\x16\x4C\x18\x6B\xF2\x69\xA0\x07"
7017                           "\xEF\xBE\xEC\x69\xAC\xA8\x63\x9E",
7018                 .ilen   = 504,
7019                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7020                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7021                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7022                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7023                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7024                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7025                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7026                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7027                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7028                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7029                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7030                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7031                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7032                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7033                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7034                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7035                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7036                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7037                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7038                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7039                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7040                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7041                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7042                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7043                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7044                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7045                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7046                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7047                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7048                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7049                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7050                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7051                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7052                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7053                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7054                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7055                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7056                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7057                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7058                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7059                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7060                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7061                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7062                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7063                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7064                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7065                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7066                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7067                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7068                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7069                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7070                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7071                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7072                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7073                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7074                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7075                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7076                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7077                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7078                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7079                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7080                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
7081                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06",
7082                 .rlen   = 504,
7083         },
7084 };
7085
7086 /*
7087  * Twofish test vectors.
7088  */
7089 #define TF_ENC_TEST_VECTORS             4
7090 #define TF_DEC_TEST_VECTORS             4
7091 #define TF_CBC_ENC_TEST_VECTORS         5
7092 #define TF_CBC_DEC_TEST_VECTORS         5
7093 #define TF_CTR_ENC_TEST_VECTORS         2
7094 #define TF_CTR_DEC_TEST_VECTORS         2
7095 #define TF_LRW_ENC_TEST_VECTORS         8
7096 #define TF_LRW_DEC_TEST_VECTORS         8
7097 #define TF_XTS_ENC_TEST_VECTORS         5
7098 #define TF_XTS_DEC_TEST_VECTORS         5
7099
7100 static struct cipher_testvec tf_enc_tv_template[] = {
7101         {
7102                 .key    = zeroed_string,
7103                 .klen   = 16,
7104                 .input  = zeroed_string,
7105                 .ilen   = 16,
7106                 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7107                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7108                 .rlen   = 16,
7109         }, {
7110                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7111                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7112                           "\x00\x11\x22\x33\x44\x55\x66\x77",
7113                 .klen   = 24,
7114                 .input  = zeroed_string,
7115                 .ilen   = 16,
7116                 .result = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7117                           "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7118                 .rlen   = 16,
7119         }, {
7120                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7121                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7122                           "\x00\x11\x22\x33\x44\x55\x66\x77"
7123                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7124                 .klen   = 32,
7125                 .input  = zeroed_string,
7126                 .ilen   = 16,
7127                 .result = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7128                           "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7129                 .rlen   = 16,
7130         }, { /* Generated with Crypto++ */
7131                 .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7132                           "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7133                           "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7134                           "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7135                 .klen   = 32,
7136                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7137                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7138                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7139                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7140                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7141                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7142                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7143                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7144                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7145                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7146                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7147                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7148                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7149                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7150                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7151                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7152                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7153                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7154                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7155                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7156                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7157                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7158                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7159                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7160                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7161                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7162                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7163                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7164                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7165                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7166                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7167                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7168                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7169                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7170                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7171                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7172                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7173                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7174                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7175                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7176                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7177                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7178                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7179                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7180                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7181                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7182                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7183                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7184                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7185                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7186                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7187                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7188                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7189                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7190                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7191                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7192                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7193                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7194                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7195                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7196                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7197                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7198                 .ilen   = 496,
7199                 .result = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7200                           "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7201                           "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7202                           "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7203                           "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7204                           "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7205                           "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
7206                           "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7207                           "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7208                           "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7209                           "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7210                           "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7211                           "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7212                           "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7213                           "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7214                           "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7215                           "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7216                           "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7217                           "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7218                           "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7219                           "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7220                           "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7221                           "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7222                           "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7223                           "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7224                           "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7225                           "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7226                           "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7227                           "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7228                           "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7229                           "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7230                           "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7231                           "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7232                           "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7233                           "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7234                           "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7235                           "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7236                           "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7237                           "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7238                           "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7239                           "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7240                           "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7241                           "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7242                           "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7243                           "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7244                           "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7245                           "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7246                           "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7247                           "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7248                           "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7249                           "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7250                           "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7251                           "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7252                           "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7253                           "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7254                           "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7255                           "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7256                           "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7257                           "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7258                           "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7259                           "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7260                           "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7261                 .rlen   = 496,
7262                 .also_non_np = 1,
7263                 .np     = 3,
7264                 .tap    = { 496 - 20, 4, 16 },
7265         },
7266 };
7267
7268 static struct cipher_testvec tf_dec_tv_template[] = {
7269         {
7270                 .key    = zeroed_string,
7271                 .klen   = 16,
7272                 .input  = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7273                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7274                 .ilen   = 16,
7275                 .result = zeroed_string,
7276                 .rlen   = 16,
7277         }, {
7278                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7279                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7280                           "\x00\x11\x22\x33\x44\x55\x66\x77",
7281                 .klen   = 24,
7282                 .input  = "\xcf\xd1\xd2\xe5\xa9\xbe\x9c\xdf"
7283                           "\x50\x1f\x13\xb8\x92\xbd\x22\x48",
7284                 .ilen   = 16,
7285                 .result = zeroed_string,
7286                 .rlen   = 16,
7287         }, {
7288                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
7289                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
7290                           "\x00\x11\x22\x33\x44\x55\x66\x77"
7291                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
7292                 .klen   = 32,
7293                 .input  = "\x37\x52\x7b\xe0\x05\x23\x34\xb8"
7294                           "\x9f\x0c\xfc\xca\xe8\x7c\xfa\x20",
7295                 .ilen   = 16,
7296                 .result = zeroed_string,
7297                 .rlen   = 16,
7298         }, { /* Generated with Crypto++ */
7299                 .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
7300                           "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
7301                           "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
7302                           "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
7303                 .klen   = 32,
7304                 .input  = "\x88\xCB\x1E\xC2\xAF\x8A\x97\xFF"
7305                           "\xF6\x90\x46\x9C\x4A\x0F\x08\xDC"
7306                           "\xDE\xAB\xAD\xFA\xFC\xA8\xC2\x3D"
7307                           "\xE0\xE4\x8B\x3F\xD5\xA3\xF7\x14"
7308                           "\x34\x9E\xB6\x08\xB2\xDD\xA8\xF5"
7309                           "\xDF\xFA\xC7\xE8\x09\x50\x76\x08"
7310                           "\xA2\xB6\x6A\x59\xC0\x2B\x6D\x05"
7311                           "\x89\xF6\x82\xF0\xD3\xDB\x06\x02"
7312                           "\xB5\x11\x5C\x5E\x79\x1A\xAC\x43"
7313                           "\x5C\xC0\x30\x4B\x6B\x16\xA1\x40"
7314                           "\x80\x27\x88\xBA\x2C\x74\x42\xE0"
7315                           "\x1B\xA5\x85\x08\xB9\xE6\x22\x7A"
7316                           "\x36\x3B\x0D\x9F\xA0\x22\x6C\x2A"
7317                           "\x91\x75\x47\xBC\x67\x21\x4E\xF9"
7318                           "\xEA\xFF\xD9\xD5\xC0\xFC\x9E\x2C"
7319                           "\x3E\xAD\xC6\x61\x0E\x93\x7A\x22"
7320                           "\x09\xC8\x8D\xC1\x8E\xB4\x8B\x5C"
7321                           "\xC6\x24\x42\xB8\x23\x66\x80\xA9"
7322                           "\x32\x0B\x7A\x29\xBF\xB3\x0B\x63"
7323                           "\x43\x27\x13\xA9\xBE\xEB\xBD\xF3"
7324                           "\x33\x62\x70\xE2\x1B\x86\x7A\xA1"
7325                           "\x51\x4A\x16\xFE\x29\x63\x7E\xD0"
7326                           "\x7A\xA4\x6E\x2C\xF8\xC1\xDB\xE8"
7327                           "\xCB\x4D\xD2\x8C\x04\x14\xB4\x66"
7328                           "\x41\xB7\x3A\x96\x16\x7C\x1D\x5B"
7329                           "\xB6\x41\x42\x64\x43\xEE\x6E\x7C"
7330                           "\x8B\xAF\x01\x9C\xA4\x6E\x75\x8F"
7331                           "\xDE\x10\x9F\xA6\xE7\xD6\x44\x97"
7332                           "\x66\xA3\x96\x0F\x1C\x25\x60\xF5"
7333                           "\x3C\x2E\x32\x69\x0E\x82\xFF\x27"
7334                           "\x0F\xB5\x06\xDA\xD8\x31\x15\x6C"
7335                           "\xDF\x18\x6C\x87\xF5\x3B\x11\x9A"
7336                           "\x1B\x42\x1F\x5B\x29\x19\x96\x13"
7337                           "\x68\x2E\x5E\x08\x1C\x8F\x32\x4B"
7338                           "\x81\x77\x6D\xF4\xA0\x01\x42\xEC"
7339                           "\xDD\x5B\xFD\x3A\x8E\x6A\x14\xFB"
7340                           "\x83\x54\xDF\x0F\x86\xB7\xEA\x40"
7341                           "\x46\x39\xF7\x2A\x89\x8D\x4E\x96"
7342                           "\x5F\x5F\x6D\x76\xC6\x13\x9D\x3D"
7343                           "\x1D\x5F\x0C\x7D\xE2\xBC\xC2\x16"
7344                           "\x16\xBE\x89\x3E\xB0\x61\xA2\x5D"
7345                           "\xAF\xD1\x40\x5F\x1A\xB8\x26\x41"
7346                           "\xC6\xBD\x36\xEF\xED\x29\x50\x6D"
7347                           "\x10\xEF\x26\xE8\xA8\x93\x11\x3F"
7348                           "\x2D\x1F\x88\x20\x77\x45\xF5\x66"
7349                           "\x08\xB9\xF1\xEF\xB1\x93\xA8\x81"
7350                           "\x65\xC5\xCD\x3E\x8C\x06\x60\x2C"
7351                           "\xB2\x10\x7A\xCA\x05\x25\x59\xDB"
7352                           "\xC7\x28\xF5\x20\x35\x52\x9E\x62"
7353                           "\xF8\x88\x24\x1C\x4D\x84\x12\x39"
7354                           "\x39\xE4\x2E\xF4\xD4\x9D\x2B\xBC"
7355                           "\x87\x66\xE6\xC0\x6B\x31\x9A\x66"
7356                           "\x03\xDC\x95\xD8\x6B\xD0\x30\x8F"
7357                           "\xDF\x8F\x8D\xFA\xEC\x1F\x08\xBD"
7358                           "\xA3\x63\xE2\x71\x4F\x03\x94\x87"
7359                           "\x50\xDF\x15\x1F\xED\x3A\xA3\x7F"
7360                           "\x1F\x2A\xB5\xA1\x69\xAC\x4B\x0D"
7361                           "\x84\x9B\x2A\xE9\x55\xDD\x46\x91"
7362                           "\x15\x33\xF3\x2B\x9B\x46\x97\x00"
7363                           "\xF0\x29\xD8\x59\x5D\x33\x37\xF9"
7364                           "\x58\x33\x9B\x78\xC7\x58\x48\x6B"
7365                           "\x2C\x75\x64\xC4\xCA\xC1\x7E\xD5",
7366                 .ilen   = 496,
7367                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7368                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7369                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7370                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7371                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7372                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7373                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7374                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7375                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7376                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7377                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7378                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7379                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7380                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7381                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7382                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7383                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7384                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7385                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7386                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7387                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7388                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7389                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7390                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7391                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7392                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7393                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7394                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7395                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7396                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7397                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7398                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7399                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7400                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7401                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7402                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7403                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7404                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7405                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7406                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7407                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7408                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7409                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7410                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7411                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7412                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7413                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7414                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7415                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7416                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7417                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7418                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7419                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7420                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7421                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7422                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7423                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7424                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7425                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7426                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7427                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7428                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7429                 .rlen   = 496,
7430                 .also_non_np = 1,
7431                 .np     = 3,
7432                 .tap    = { 496 - 20, 4, 16 },
7433         },
7434 };
7435
7436 static struct cipher_testvec tf_cbc_enc_tv_template[] = {
7437         { /* Generated with Nettle */
7438                 .key    = zeroed_string,
7439                 .klen   = 16,
7440                 .iv     = zeroed_string,
7441                 .input  = zeroed_string,
7442                 .ilen   = 16,
7443                 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7444                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7445                 .rlen   = 16,
7446         }, {
7447                 .key    = zeroed_string,
7448                 .klen   = 16,
7449                 .iv     = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7450                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7451                 .input  = zeroed_string,
7452                 .ilen   = 16,
7453                 .result = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7454                           "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7455                 .rlen   = 16,
7456         }, {
7457                 .key    = zeroed_string,
7458                 .klen   = 16,
7459                 .iv     = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7460                           "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7461                 .input  = zeroed_string,
7462                 .ilen   = 16,
7463                 .result = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7464                           "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7465                 .rlen   = 16,
7466         }, {
7467                 .key    = zeroed_string,
7468                 .klen   = 16,
7469                 .iv     = zeroed_string,
7470                 .input  = zeroed_string,
7471                 .ilen   = 48,
7472                 .result = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7473                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7474                           "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7475                           "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7476                           "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7477                           "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7478                 .rlen   = 48,
7479         }, { /* Generated with Crypto++ */
7480                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7481                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7482                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7483                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7484                 .klen   = 32,
7485                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7486                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7487                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7488                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7489                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7490                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7491                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7492                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7493                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7494                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7495                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7496                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7497                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7498                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7499                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7500                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7501                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7502                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7503                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7504                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7505                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7506                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7507                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7508                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7509                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7510                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7511                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7512                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7513                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7514                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7515                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7516                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7517                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7518                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7519                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7520                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7521                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7522                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7523                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7524                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7525                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7526                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7527                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7528                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7529                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7530                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7531                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7532                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7533                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7534                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7535                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7536                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7537                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7538                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7539                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7540                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7541                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7542                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7543                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7544                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7545                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7546                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7547                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7548                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7549                 .ilen   = 496,
7550                 .result = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7551                           "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7552                           "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7553                           "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7554                           "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7555                           "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7556                           "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
7557                           "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7558                           "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7559                           "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7560                           "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7561                           "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7562                           "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7563                           "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7564                           "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7565                           "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7566                           "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7567                           "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7568                           "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7569                           "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7570                           "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7571                           "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7572                           "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7573                           "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7574                           "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7575                           "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7576                           "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7577                           "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7578                           "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7579                           "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7580                           "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7581                           "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7582                           "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7583                           "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7584                           "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7585                           "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7586                           "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7587                           "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7588                           "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7589                           "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7590                           "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7591                           "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7592                           "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7593                           "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7594                           "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7595                           "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7596                           "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7597                           "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7598                           "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7599                           "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7600                           "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7601                           "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7602                           "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7603                           "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7604                           "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7605                           "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7606                           "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7607                           "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7608                           "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7609                           "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7610                           "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7611                           "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7612                 .rlen   = 496,
7613                 .also_non_np = 1,
7614                 .np     = 3,
7615                 .tap    = { 496 - 20, 4, 16 },
7616         },
7617 };
7618
7619 static struct cipher_testvec tf_cbc_dec_tv_template[] = {
7620         { /* Reverse of the first four above */
7621                 .key    = zeroed_string,
7622                 .klen   = 16,
7623                 .iv     = zeroed_string,
7624                 .input  = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7625                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7626                 .ilen   = 16,
7627                 .result = zeroed_string,
7628                 .rlen   = 16,
7629         }, {
7630                 .key    = zeroed_string,
7631                 .klen   = 16,
7632                 .iv     = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7633                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a",
7634                 .input  = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7635                           "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7636                 .ilen   = 16,
7637                 .result = zeroed_string,
7638                 .rlen   = 16,
7639         }, {
7640                 .key    = zeroed_string,
7641                 .klen   = 16,
7642                 .iv     = "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7643                           "\x86\xcb\x08\x6b\x78\x9f\x54\x19",
7644                 .input  = "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7645                           "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7646                 .ilen   = 16,
7647                 .result = zeroed_string,
7648                 .rlen   = 16,
7649         }, {
7650                 .key    = zeroed_string,
7651                 .klen   = 16,
7652                 .iv     = zeroed_string,
7653                 .input  = "\x9f\x58\x9f\x5c\xf6\x12\x2c\x32"
7654                           "\xb6\xbf\xec\x2f\x2a\xe8\xc3\x5a"
7655                           "\xd4\x91\xdb\x16\xe7\xb1\xc3\x9e"
7656                           "\x86\xcb\x08\x6b\x78\x9f\x54\x19"
7657                           "\x05\xef\x8c\x61\xa8\x11\x58\x26"
7658                           "\x34\xba\x5c\xb7\x10\x6a\xa6\x41",
7659                 .ilen   = 48,
7660                 .result = zeroed_string,
7661                 .rlen   = 48,
7662         }, { /* Generated with Crypto++ */
7663                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7664                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7665                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7666                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7667                 .klen   = 32,
7668                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7669                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7670                 .input  = "\xC8\xFF\xF2\x53\xA6\x27\x09\xD1"
7671                           "\x33\x38\xC2\xC0\x0C\x14\x7E\xB5"
7672                           "\x26\x1B\x05\x0C\x05\x12\x3F\xC0"
7673                           "\xF9\x1C\x02\x28\x40\x96\x6F\xD0"
7674                           "\x3D\x32\xDF\xDA\x56\x00\x6E\xEE"
7675                           "\x5B\x2A\x72\x9D\xC2\x4D\x19\xBC"
7676                           "\x8C\x53\xFA\x87\x6F\xDD\x81\xA3"
7677                           "\xB1\xD3\x44\x65\xDF\xE7\x63\x38"
7678                           "\x4A\xFC\xDC\xEC\x3F\x26\x8E\xB8"
7679                           "\x43\xFC\xFE\x18\xB5\x11\x6D\x31"
7680                           "\x81\x8B\x0D\x75\xF6\x80\xEC\x84"
7681                           "\x04\xB9\xE6\x09\x63\xED\x39\xDB"
7682                           "\xC3\xF6\x14\xD6\x6E\x5E\x8B\xBD"
7683                           "\x3E\xFA\xD7\x98\x50\x6F\xD9\x63"
7684                           "\x02\xCD\x0D\x39\x4B\x0D\xEC\x80"
7685                           "\xE3\x6A\x17\xF4\xCC\xAD\xFF\x68"
7686                           "\x45\xDD\xC8\x83\x1D\x41\x96\x0D"
7687                           "\x91\x2E\x05\xD3\x59\x82\xE0\x43"
7688                           "\x90\x4F\xB9\xF7\xAD\x6B\x2E\xAF"
7689                           "\xA7\x84\x00\x53\xCD\x6F\xD1\x0C"
7690                           "\x4E\xF9\x5A\x23\xFB\xCA\xC7\xD3"
7691                           "\xA9\xAA\x9D\xB2\x3F\x66\xF1\xAC"
7692                           "\x25\x21\x8F\xF7\xEF\xF2\x6A\xDF"
7693                           "\xE8\xDA\x75\x1A\x8A\xF1\xDD\x38"
7694                           "\x1F\xF9\x3D\x68\x4A\xBB\x9E\x34"
7695                           "\x1F\x66\x1F\x9C\x2B\x54\xFF\x60"
7696                           "\x7F\x29\x4B\x55\x80\x8F\x4E\xA7"
7697                           "\xA6\x9A\x0A\xD9\x0D\x19\x00\xF8"
7698                           "\x1F\xBC\x0C\x40\x6B\xEC\x99\x25"
7699                           "\x94\x70\x74\x0E\x1D\xC5\xBC\x12"
7700                           "\xF3\x42\xBE\x95\xBF\xFB\x4E\x55"
7701                           "\x9A\xB9\xCE\x14\x16\x5B\xDC\xD3"
7702                           "\x75\x42\x62\x04\x31\x1F\x95\x7C"
7703                           "\x66\x1A\x97\xDC\x2F\x40\x5C\x39"
7704                           "\x78\xE6\x02\xDB\x49\xE1\xC6\x47"
7705                           "\xC2\x78\x9A\xBB\xF3\xBE\xCB\x93"
7706                           "\xD8\xB8\xE8\xBB\x8C\xB3\x9B\xA7"
7707                           "\xC2\x89\xF3\x91\x88\x83\x3D\xF0"
7708                           "\x29\xA2\xCD\xB5\x79\x16\xC2\x40"
7709                           "\x11\x03\x8E\x9C\xFD\xC9\x43\xC4"
7710                           "\xC2\x19\xF0\x4A\x32\xEF\x0C\x2B"
7711                           "\xD3\x2B\xE9\xD4\x4C\xDE\x95\xCF"
7712                           "\x04\x03\xD3\x2C\x7F\x82\xC8\xFA"
7713                           "\x0F\xD8\x7A\x39\x7B\x01\x41\x9C"
7714                           "\x78\xB6\xC9\xBF\xF9\x78\x57\x88"
7715                           "\xB1\xA5\xE1\xE0\xD9\x16\xD4\xC8"
7716                           "\xEE\xC4\xBE\x7B\x55\x59\x00\x48"
7717                           "\x1B\xBC\x14\xFA\x2A\x9D\xC9\x1C"
7718                           "\xFB\x28\x3F\x95\xDD\xB7\xD6\xCE"
7719                           "\x3A\x7F\x09\x0C\x0E\x69\x30\x7D"
7720                           "\xBC\x68\x9C\x91\x2A\x59\x57\x04"
7721                           "\xED\x1A\x1E\x00\xB1\x85\x92\x04"
7722                           "\x28\x8C\x0C\x3C\xC1\xD5\x12\xF7"
7723                           "\x4C\x3E\xB0\xE7\x86\x62\x68\x91"
7724                           "\xFC\xC4\xE2\xCE\xA6\xDC\x5E\x93"
7725                           "\x5D\x8D\x8C\x68\xB3\xB2\xB9\x64"
7726                           "\x16\xB8\xC8\x6F\xD8\xEE\x21\xBD"
7727                           "\xAC\x18\x0C\x7D\x0D\x05\xAB\xF1"
7728                           "\xFA\xDD\xE2\x48\xDF\x4C\x02\x39"
7729                           "\x69\xA1\x62\xBD\x49\x3A\x9D\x91"
7730                           "\x30\x70\x56\xA4\x37\xDD\x7C\xC0"
7731                           "\x0A\xA3\x30\x10\x26\x25\x41\x2C",
7732                 .ilen   = 496,
7733                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7734                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7735                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7736                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7737                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7738                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7739                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7740                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7741                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7742                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7743                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7744                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7745                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7746                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7747                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7748                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7749                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7750                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7751                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7752                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7753                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7754                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7755                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7756                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7757                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7758                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7759                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7760                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7761                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7762                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7763                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7764                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7765                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7766                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7767                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7768                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7769                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7770                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7771                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7772                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7773                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7774                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7775                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7776                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7777                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7778                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7779                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7780                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7781                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7782                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7783                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7784                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7785                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7786                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7787                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7788                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7789                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7790                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7791                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7792                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7793                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7794                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7795                 .rlen   = 496,
7796                 .also_non_np = 1,
7797                 .np     = 3,
7798                 .tap    = { 496 - 20, 4, 16 },
7799         },
7800 };
7801
7802 static struct cipher_testvec tf_ctr_enc_tv_template[] = {
7803         { /* Generated with Crypto++ */
7804                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7805                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7806                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7807                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7808                 .klen   = 32,
7809                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
7810                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
7811                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7812                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7813                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7814                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7815                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7816                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7817                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7818                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7819                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7820                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7821                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7822                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7823                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7824                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7825                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7826                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7827                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7828                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7829                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7830                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7831                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7832                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7833                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7834                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7835                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7836                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7837                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7838                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7839                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7840                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7841                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7842                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7843                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7844                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7845                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7846                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7847                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7848                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7849                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7850                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7851                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7852                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7853                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7854                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7855                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7856                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7857                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7858                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7859                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7860                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7861                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7862                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7863                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7864                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7865                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
7866                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
7867                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
7868                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
7869                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
7870                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
7871                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
7872                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
7873                 .ilen   = 496,
7874                 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
7875                           "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
7876                           "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
7877                           "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
7878                           "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
7879                           "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
7880                           "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
7881                           "\x01\x41\x21\x12\x38\xAB\x52\x4F"
7882                           "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
7883                           "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
7884                           "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
7885                           "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
7886                           "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
7887                           "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
7888                           "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
7889                           "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
7890                           "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
7891                           "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
7892                           "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
7893                           "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
7894                           "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
7895                           "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
7896                           "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
7897                           "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
7898                           "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
7899                           "\x23\x61\x48\xEA\x80\x04\x27\xAA"
7900                           "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
7901                           "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
7902                           "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
7903                           "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
7904                           "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
7905                           "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
7906                           "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
7907                           "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
7908                           "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
7909                           "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
7910                           "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
7911                           "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
7912                           "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
7913                           "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
7914                           "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
7915                           "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
7916                           "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
7917                           "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
7918                           "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
7919                           "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
7920                           "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
7921                           "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
7922                           "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
7923                           "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
7924                           "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
7925                           "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
7926                           "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
7927                           "\x11\xE9\x43\x83\x76\xAA\x53\x37"
7928                           "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
7929                           "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
7930                           "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
7931                           "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
7932                           "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
7933                           "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
7934                           "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
7935                           "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
7936                 .rlen   = 496,
7937         }, { /* Generated with Crypto++ */
7938                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
7939                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
7940                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
7941                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
7942                 .klen   = 32,
7943                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
7944                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
7945                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
7946                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
7947                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
7948                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
7949                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
7950                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
7951                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
7952                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
7953                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
7954                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
7955                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
7956                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
7957                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
7958                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
7959                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
7960                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
7961                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
7962                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
7963                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
7964                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
7965                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
7966                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
7967                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
7968                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
7969                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
7970                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
7971                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
7972                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
7973                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
7974                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
7975                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
7976                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
7977                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
7978                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
7979                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
7980                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
7981                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
7982                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
7983                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
7984                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
7985                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
7986                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
7987                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
7988                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
7989                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
7990                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
7991                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
7992                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
7993                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
7994                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
7995                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
7996                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
7997                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
7998                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
7999                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8000                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8001                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8002                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8003                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8004                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8005                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8006                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8007                 .ilen   = 496,
8008                 .result = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8009                           "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8010                           "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8011                           "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8012                           "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8013                           "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8014                           "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8015                           "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8016                           "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8017                           "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8018                           "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8019                           "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8020                           "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8021                           "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8022                           "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8023                           "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8024                           "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8025                           "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8026                           "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8027                           "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8028                           "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8029                           "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8030                           "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8031                           "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8032                           "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8033                           "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8034                           "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8035                           "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8036                           "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8037                           "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8038                           "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8039                           "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8040                           "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8041                           "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8042                           "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8043                           "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8044                           "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8045                           "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8046                           "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8047                           "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8048                           "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8049                           "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8050                           "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8051                           "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8052                           "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8053                           "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8054                           "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8055                           "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8056                           "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8057                           "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8058                           "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8059                           "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8060                           "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8061                           "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8062                           "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8063                           "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8064                           "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8065                           "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8066                           "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8067                           "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8068                           "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8069                           "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8070                 .rlen   = 496,
8071         }, { /* Generated with Crypto++ */
8072                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8073                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8074                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8075                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8076                 .klen   = 32,
8077                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8078                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8079                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8080                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8081                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8082                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8083                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8084                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8085                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8086                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8087                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8088                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8089                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8090                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8091                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8092                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8093                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8094                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8095                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8096                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8097                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8098                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8099                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8100                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8101                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8102                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8103                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8104                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8105                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8106                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8107                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8108                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8109                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8110                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8111                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8112                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8113                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8114                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8115                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8116                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8117                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8118                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8119                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8120                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8121                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8122                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8123                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8124                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8125                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8126                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8127                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8128                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8129                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8130                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8131                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8132                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8133                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8134                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8135                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8136                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8137                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8138                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8139                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8140                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
8141                           "\x2B\xC2\x59",
8142                 .ilen   = 499,
8143                 .result = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8144                           "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8145                           "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8146                           "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8147                           "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8148                           "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8149                           "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8150                           "\x01\x41\x21\x12\x38\xAB\x52\x4F"
8151                           "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8152                           "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8153                           "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8154                           "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8155                           "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8156                           "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8157                           "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8158                           "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8159                           "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8160                           "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8161                           "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8162                           "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8163                           "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8164                           "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8165                           "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8166                           "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8167                           "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8168                           "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8169                           "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8170                           "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8171                           "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8172                           "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8173                           "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8174                           "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8175                           "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8176                           "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8177                           "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8178                           "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8179                           "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8180                           "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8181                           "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8182                           "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8183                           "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8184                           "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8185                           "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8186                           "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8187                           "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8188                           "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8189                           "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8190                           "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8191                           "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8192                           "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8193                           "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8194                           "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8195                           "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8196                           "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8197                           "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8198                           "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8199                           "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8200                           "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8201                           "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8202                           "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8203                           "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8204                           "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8205                           "\x6C\x82\x9D",
8206                 .rlen   = 499,
8207                 .also_non_np = 1,
8208                 .np     = 2,
8209                 .tap    = { 499 - 16, 16 },
8210         },
8211 };
8212
8213 static struct cipher_testvec tf_ctr_dec_tv_template[] = {
8214         { /* Generated with Crypto++ */
8215                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8216                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8217                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8218                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8219                 .klen   = 32,
8220                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8221                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8222                 .input  = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8223                           "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8224                           "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8225                           "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8226                           "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8227                           "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8228                           "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8229                           "\x01\x41\x21\x12\x38\xAB\x52\x4F"
8230                           "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8231                           "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8232                           "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8233                           "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8234                           "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8235                           "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8236                           "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8237                           "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8238                           "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8239                           "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8240                           "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8241                           "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8242                           "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8243                           "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8244                           "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8245                           "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8246                           "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8247                           "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8248                           "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8249                           "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8250                           "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8251                           "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8252                           "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8253                           "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8254                           "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8255                           "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8256                           "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8257                           "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8258                           "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8259                           "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8260                           "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8261                           "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8262                           "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8263                           "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8264                           "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8265                           "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8266                           "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8267                           "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8268                           "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8269                           "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8270                           "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8271                           "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8272                           "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8273                           "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8274                           "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8275                           "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8276                           "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8277                           "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8278                           "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8279                           "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8280                           "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8281                           "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8282                           "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8283                           "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF",
8284                 .ilen   = 496,
8285                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8286                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8287                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8288                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8289                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8290                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8291                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8292                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8293                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8294                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8295                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8296                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8297                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8298                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8299                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8300                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8301                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8302                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8303                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8304                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8305                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8306                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8307                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8308                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8309                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8310                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8311                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8312                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8313                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8314                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8315                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8316                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8317                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8318                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8319                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8320                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8321                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8322                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8323                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8324                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8325                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8326                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8327                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8328                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8329                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8330                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8331                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8332                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8333                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8334                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8335                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8336                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8337                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8338                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8339                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8340                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8341                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8342                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8343                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8344                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8345                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8346                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8347                 .rlen   = 496,
8348         }, { /* Generated with Crypto++ */
8349                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8350                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8351                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8352                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8353                 .klen   = 32,
8354                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
8355                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
8356                 .input  = "\xEB\x44\xAF\x49\x27\xB8\xFB\x44"
8357                           "\x4C\xA6\xC3\x0C\x8B\xD0\x01\x0C"
8358                           "\x53\xC8\x16\x38\xDE\x40\x4F\x91"
8359                           "\x25\x6D\x4C\xA0\x9A\x87\x1E\xDA"
8360                           "\x88\x7E\x89\xE9\x67\x2B\x83\xA2"
8361                           "\x5F\x2E\x23\x3E\x45\xB9\x77\x7B"
8362                           "\xA6\x7E\x47\x36\x81\x9F\x9B\xF3"
8363                           "\xE0\xF0\xD7\x47\xA9\xC8\xEF\x33"
8364                           "\x0C\x43\xFE\x67\x50\x0A\x2C\x3E"
8365                           "\xA0\xE1\x25\x8E\x80\x07\x4A\xC0"
8366                           "\x64\x89\x9F\x6A\x27\x96\x07\xA6"
8367                           "\x9B\xC8\x1B\x21\x60\xAE\x5D\x01"
8368                           "\xE2\xCD\xC8\xAA\x6C\x9D\x1C\x34"
8369                           "\x39\x18\x09\xA4\x82\x59\x78\xE7"
8370                           "\xFC\x59\x65\xF2\x94\xFF\xFB\xE2"
8371                           "\x3C\xDA\xB1\x90\x95\xBF\x91\xE3"
8372                           "\xE6\x87\x31\x9E\x16\x85\xAD\xB1"
8373                           "\x4C\xAE\x43\x4D\x19\x58\xB5\x5E"
8374                           "\x2E\xF5\x09\xAA\x39\xF4\xC0\xB3"
8375                           "\xD4\x4D\xDB\x73\x7A\xD4\xF1\xBF"
8376                           "\x89\x16\x4D\x2D\xA2\x26\x33\x72"
8377                           "\x18\x33\x7E\xD6\xD2\x16\xA4\x54"
8378                           "\xF4\x8C\xB3\x52\xDF\x21\x9C\xEB"
8379                           "\xBF\x49\xD3\xF9\x05\x06\xCB\xD2"
8380                           "\xA9\xD2\x3B\x6E\x19\x8C\xBC\x19"
8381                           "\xAB\x89\xD6\xD8\xCD\x56\x89\x5E"
8382                           "\xAC\x00\xE3\x50\x63\x4A\x80\x9A"
8383                           "\x05\xBC\x50\x39\xD3\x32\xD9\x0D"
8384                           "\xE3\x20\x0D\x75\x54\xEC\xE6\x31"
8385                           "\x14\xB9\x3A\x59\x00\x43\x37\x8E"
8386                           "\x8C\x5A\x79\x62\x14\x76\x8A\xAE"
8387                           "\x8F\xCC\xA1\x6C\x38\x78\xDD\x2D"
8388                           "\x8B\x6D\xEA\xBD\x7B\x25\xFF\x60"
8389                           "\xC9\x87\xB1\x79\x1E\xA5\x86\x68"
8390                           "\x81\xB4\xE2\xC1\x05\x7D\x3A\x73"
8391                           "\xD0\xDA\x75\x77\x9E\x05\x27\xF1"
8392                           "\x08\xA9\x66\x64\x6C\xBC\x82\x17"
8393                           "\x2C\x23\x5F\x62\x4D\x02\x1A\x58"
8394                           "\xE7\xB7\x23\x6D\xE2\x20\xDA\xEF"
8395                           "\xB4\xB3\x3F\xB2\x2B\x69\x98\x83"
8396                           "\x95\x87\x13\x57\x60\xD7\xB5\xB1"
8397                           "\xEE\x0A\x2F\x95\x36\x4C\x76\x5D"
8398                           "\x5F\xD9\x19\xED\xB9\xA5\x48\xBF"
8399                           "\xC8\xAB\x0F\x71\xCC\x61\x8E\x0A"
8400                           "\xD0\x29\x44\xA8\xB9\xC1\xE8\xC8"
8401                           "\xC9\xA8\x28\x81\xFB\x50\xF2\xF0"
8402                           "\x26\xAE\x39\xB8\x91\xCD\xA8\xAC"
8403                           "\xDE\x55\x1B\x50\x14\x53\x44\x17"
8404                           "\x54\x46\xFC\xB1\xE4\x07\x6B\x9A"
8405                           "\x01\x14\xF0\x2E\x2E\xDB\x46\x1B"
8406                           "\x1A\x09\x97\xA9\xB6\x97\x79\x06"
8407                           "\xFB\xCB\x85\xCF\xDD\xA1\x41\xB1"
8408                           "\x00\xAA\xF7\xE0\x89\x73\xFB\xE5"
8409                           "\xBF\x84\xDB\xC9\xCD\xC4\xA2\x0D"
8410                           "\x3B\xAC\xF9\xDF\x96\xBF\x88\x23"
8411                           "\x41\x67\xA1\x24\x99\x7E\xCC\x9B"
8412                           "\x02\x8F\x6A\x49\xF6\x25\xBA\x7A"
8413                           "\xF4\x78\xFD\x79\x62\x63\x4F\x14"
8414                           "\xD6\x11\x11\x04\x05\x5F\x7E\xEA"
8415                           "\x4C\xB6\xF8\xF4\x5F\x48\x52\x54"
8416                           "\x94\x63\xA8\x4E\xCF\xD2\x1B\x1B"
8417                           "\x22\x18\x6A\xAF\x6E\x3E\xE1\x0D",
8418                 .ilen   = 496,
8419                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8420                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8421                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8422                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8423                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8424                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8425                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8426                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8427                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8428                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8429                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8430                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8431                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8432                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8433                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8434                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8435                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8436                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8437                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8438                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8439                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8440                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8441                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8442                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8443                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8444                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8445                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8446                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8447                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8448                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8449                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8450                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8451                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8452                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8453                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8454                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8455                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8456                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8457                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8458                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8459                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8460                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8461                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8462                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8463                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8464                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8465                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8466                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8467                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8468                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8469                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8470                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8471                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8472                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8473                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8474                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8475                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8476                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8477                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8478                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8479                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8480                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
8481                 .rlen   = 496,
8482         }, { /* Generated with Crypto++ */
8483                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
8484                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
8485                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
8486                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
8487                 .klen   = 32,
8488                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
8489                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
8490                 .input  = "\xDF\xDD\x69\xFA\xB0\x2E\xFD\xFE"
8491                           "\x70\x9E\xC5\x4B\xC9\xD4\xA1\x30"
8492                           "\x26\x9B\x89\xA1\xEE\x43\xE0\x52"
8493                           "\x55\x17\x4E\xC7\x0E\x33\x1F\xF1"
8494                           "\x9F\x8D\x40\x9F\x24\xFD\x92\xA0"
8495                           "\xBC\x8F\x35\xDD\x67\x38\xD8\xAA"
8496                           "\xCF\xF8\x48\xCA\xFB\xE4\x5C\x60"
8497                           "\x01\x41\x21\x12\x38\xAB\x52\x4F"
8498                           "\xA8\x57\x20\xE0\x21\x6A\x17\x0D"
8499                           "\x0E\xF9\x8E\x49\x42\x00\x3C\x94"
8500                           "\x14\xC0\xD0\x8D\x8A\x98\xEB\x29"
8501                           "\xEC\xAE\x96\x44\xC0\x3C\x48\xDC"
8502                           "\x29\x35\x25\x2F\xE7\x11\x6C\x68"
8503                           "\xC8\x67\x0A\x2F\xF4\x07\xBE\xF9"
8504                           "\x2C\x31\x87\x40\xAB\xB2\xB6\xFA"
8505                           "\xD2\xC9\x6D\x5C\x50\xE9\xE6\x7E"
8506                           "\xE3\x0A\xD2\xD5\x6D\x8D\x64\x9E"
8507                           "\x70\xCE\x03\x76\xDD\xE0\xF0\x8C"
8508                           "\x84\x86\x8B\x6A\xFE\xC7\xF9\x69"
8509                           "\x2E\xFE\xFC\xC2\xC4\x1A\x55\x58"
8510                           "\xB3\xBE\xE2\x7E\xED\x39\x42\x6C"
8511                           "\xB4\x42\x97\x9A\xEC\xE1\x0A\x06"
8512                           "\x02\xC5\x03\x9D\xC4\x48\x15\x66"
8513                           "\x35\x6A\xC2\xC9\xA2\x26\x30\xBB"
8514                           "\xDB\x2D\xC8\x08\x2B\xA0\x29\x1A"
8515                           "\x23\x61\x48\xEA\x80\x04\x27\xAA"
8516                           "\x69\x49\xE8\xE8\x4A\x83\x6B\x5A"
8517                           "\xCA\x7C\xD3\xB1\xB5\x0B\xCC\x23"
8518                           "\x74\x1F\xA9\x87\xCD\xED\xC0\x2D"
8519                           "\xBF\xEB\xCF\x16\x2D\x2A\x2E\x1D"
8520                           "\x96\xBA\x36\x11\x45\x41\xDA\xCE"
8521                           "\xA4\x48\x80\x8B\x06\xF4\x98\x89"
8522                           "\x8B\x23\x08\x53\xF4\xD4\x5A\x24"
8523                           "\x8B\xF8\x43\x73\xD1\xEE\xC4\xB0"
8524                           "\xF8\xFE\x09\x0C\x75\x05\x38\x0B"
8525                           "\x7C\x81\xDE\x9D\xE4\x61\x37\x63"
8526                           "\x63\xAD\x12\xD2\x04\xB9\xCE\x45"
8527                           "\x5A\x1A\x6E\xB3\x78\x2A\xA4\x74"
8528                           "\x86\xD0\xE3\xFF\xDA\x38\x9C\xB5"
8529                           "\xB8\xB1\xDB\x38\x2F\xC5\x6A\xB4"
8530                           "\xEB\x6E\x96\xE8\x43\x80\xB5\x51"
8531                           "\x61\x2D\x48\xAA\x07\x65\x11\x8C"
8532                           "\x48\xE3\x90\x7E\x78\x3A\xEC\x97"
8533                           "\x05\x3D\x84\xE7\x90\x2B\xAA\xBD"
8534                           "\x83\x29\x0E\x1A\x81\x73\x7B\xE0"
8535                           "\x7A\x01\x4A\x37\x3B\x77\x7F\x8D"
8536                           "\x49\xA4\x2F\x6E\xBE\x68\x99\x08"
8537                           "\x99\xAA\x4C\x12\x04\xAE\x1F\x77"
8538                           "\x35\x88\xF1\x65\x06\x0A\x0B\x4D"
8539                           "\x47\xF9\x50\x38\x5D\x71\xF9\x6E"
8540                           "\xDE\xEC\x61\x35\x2C\x4C\x96\x50"
8541                           "\xE8\x28\x93\x9C\x7E\x01\xC6\x04"
8542                           "\xB2\xD6\xBC\x6C\x17\xEB\xC1\x7D"
8543                           "\x11\xE9\x43\x83\x76\xAA\x53\x37"
8544                           "\x0C\x1D\x39\x89\x53\x72\x09\x7E"
8545                           "\xD9\x85\x16\x04\xA5\x2C\x05\x6F"
8546                           "\x17\x0C\x6E\x66\xAA\x84\xA7\xD9"
8547                           "\xE2\xD9\xC4\xEB\x43\x3E\xB1\x8D"
8548                           "\x7C\x36\xC7\x71\x70\x9C\x10\xD8"
8549                           "\xE8\x47\x2A\x4D\xFD\xA1\xBC\xE3"
8550                           "\xB9\x32\xE2\xC1\x82\xAC\xFE\xCC"
8551                           "\xC5\xC9\x7F\x9E\xCF\x33\x7A\xDF"
8552                           "\x6C\x82\x9D",
8553                 .ilen   = 499,
8554                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
8555                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
8556                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
8557                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
8558                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
8559                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
8560                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
8561                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
8562                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
8563                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
8564                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
8565                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
8566                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
8567                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
8568                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
8569                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
8570                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
8571                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
8572                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
8573                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
8574                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
8575                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
8576                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
8577                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
8578                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
8579                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
8580                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
8581                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
8582                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
8583                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
8584                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
8585                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
8586                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
8587                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
8588                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
8589                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
8590                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
8591                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
8592                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
8593                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
8594                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
8595                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
8596                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
8597                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
8598                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
8599                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
8600                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
8601                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
8602                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
8603                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
8604                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
8605                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
8606                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
8607                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
8608                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
8609                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
8610                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
8611                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
8612                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
8613                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
8614                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
8615                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
8616                           "\x2B\xC2\x59",
8617                 .rlen   = 499,
8618                 .also_non_np = 1,
8619                 .np     = 2,
8620                 .tap    = { 499 - 16, 16 },
8621         },
8622 };
8623
8624 static struct cipher_testvec tf_lrw_enc_tv_template[] = {
8625         /* Generated from AES-LRW test vectors */
8626         {
8627                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8628                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8629                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8630                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8631                 .klen   = 32,
8632                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8633                           "\x00\x00\x00\x00\x00\x00\x00\x01",
8634                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
8635                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8636                 .ilen   = 16,
8637                 .result = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8638                           "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8639                 .rlen   = 16,
8640         }, {
8641                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8642                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8643                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8644                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8645                 .klen   = 32,
8646                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8647                           "\x00\x00\x00\x00\x00\x00\x00\x02",
8648                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
8649                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8650                 .ilen   = 16,
8651                 .result = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8652                           "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8653                 .rlen   = 16,
8654         }, {
8655                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8656                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8657                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8658                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8659                 .klen   = 32,
8660                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8661                           "\x00\x00\x00\x02\x00\x00\x00\x00",
8662                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
8663                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8664                 .ilen   = 16,
8665                 .result = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8666                           "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8667                 .rlen   = 16,
8668         }, {
8669                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8670                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8671                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8672                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8673                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8674                 .klen   = 40,
8675                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8676                           "\x00\x00\x00\x00\x00\x00\x00\x01",
8677                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
8678                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8679                 .ilen   = 16,
8680                 .result = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8681                           "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8682                 .rlen   = 16,
8683         }, {
8684                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8685                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8686                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8687                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8688                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8689                 .klen   = 40,
8690                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8691                           "\x00\x00\x00\x02\x00\x00\x00\x00",
8692                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
8693                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8694                 .ilen   = 16,
8695                 .result = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8696                           "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8697                 .rlen   = 16,
8698         }, {
8699                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8700                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8701                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8702                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8703                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8704                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8705                 .klen   = 48,
8706                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8707                           "\x00\x00\x00\x00\x00\x00\x00\x01",
8708                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
8709                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8710                 .ilen   = 16,
8711                 .result = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8712                           "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8713                 .rlen   = 16,
8714         }, {
8715                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8716                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8717                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8718                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8719                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8720                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8721                 .klen   = 48,
8722                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8723                           "\x00\x00\x00\x02\x00\x00\x00\x00",
8724                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
8725                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8726                 .ilen   = 16,
8727                 .result = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8728                           "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8729                 .rlen   = 16,
8730         }, {
8731                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8732                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8733                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8734                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8735                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8736                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8737                 .klen   = 48,
8738                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8739                           "\x00\x00\x00\x00\x00\x00\x00\x01",
8740                 .input  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
8741                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
8742                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
8743                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
8744                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
8745                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
8746                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
8747                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
8748                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
8749                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
8750                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
8751                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
8752                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
8753                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
8754                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
8755                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
8756                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
8757                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
8758                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
8759                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
8760                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
8761                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
8762                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
8763                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
8764                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
8765                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
8766                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
8767                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
8768                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
8769                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
8770                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
8771                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
8772                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
8773                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
8774                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
8775                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
8776                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
8777                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
8778                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
8779                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
8780                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
8781                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
8782                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
8783                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
8784                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
8785                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
8786                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
8787                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
8788                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
8789                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
8790                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
8791                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
8792                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
8793                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
8794                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
8795                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
8796                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
8797                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
8798                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
8799                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
8800                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
8801                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
8802                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
8803                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
8804                 .ilen   = 512,
8805                 .result = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
8806                           "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
8807                           "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
8808                           "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
8809                           "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
8810                           "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
8811                           "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
8812                           "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
8813                           "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
8814                           "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
8815                           "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
8816                           "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
8817                           "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
8818                           "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
8819                           "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
8820                           "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
8821                           "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
8822                           "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
8823                           "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
8824                           "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
8825                           "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
8826                           "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
8827                           "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
8828                           "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
8829                           "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
8830                           "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
8831                           "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
8832                           "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
8833                           "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
8834                           "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
8835                           "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
8836                           "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
8837                           "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
8838                           "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
8839                           "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
8840                           "\x3e\xae\x71\x90\x07\x70\x1c\x38"
8841                           "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
8842                           "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
8843                           "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
8844                           "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
8845                           "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
8846                           "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
8847                           "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
8848                           "\x93\x51\x1d\x3d\x62\x59\x83\x82"
8849                           "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
8850                           "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
8851                           "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
8852                           "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
8853                           "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
8854                           "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
8855                           "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
8856                           "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
8857                           "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
8858                           "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
8859                           "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
8860                           "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
8861                           "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
8862                           "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
8863                           "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
8864                           "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
8865                           "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
8866                           "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
8867                           "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
8868                           "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
8869                 .rlen   = 512,
8870                 .also_non_np = 1,
8871                 .np     = 3,
8872                 .tap    = { 512 - 20, 4, 16 },
8873         },
8874 };
8875
8876 static struct cipher_testvec tf_lrw_dec_tv_template[] = {
8877         /* Generated from AES-LRW test vectors */
8878         /* same as enc vectors with input and result reversed */
8879         {
8880                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
8881                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
8882                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
8883                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
8884                 .klen   = 32,
8885                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8886                           "\x00\x00\x00\x00\x00\x00\x00\x01",
8887                 .input  = "\xa1\x6c\x50\x69\x26\xa4\xef\x7b"
8888                           "\x7c\xc6\x91\xeb\x72\xdd\x9b\xee",
8889                 .ilen   = 16,
8890                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8891                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8892                 .rlen   = 16,
8893         }, {
8894                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
8895                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
8896                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
8897                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
8898                 .klen   = 32,
8899                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8900                           "\x00\x00\x00\x00\x00\x00\x00\x02",
8901                 .input  = "\xab\x72\x0a\xad\x3b\x0c\xf0\xc9"
8902                           "\x42\x2f\xf1\xae\xf1\x3c\xb1\xbd",
8903                 .ilen   = 16,
8904                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8905                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8906                 .rlen   = 16,
8907         }, {
8908                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
8909                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
8910                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
8911                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
8912                 .klen   = 32,
8913                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8914                           "\x00\x00\x00\x02\x00\x00\x00\x00",
8915                 .input  = "\x85\xa7\x56\x67\x08\xfa\x42\xe1"
8916                           "\x22\xe6\x82\xfc\xd9\xb4\xd7\xd4",
8917                 .ilen   = 16,
8918                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8919                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8920                 .rlen   = 16,
8921         }, {
8922                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
8923                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
8924                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
8925                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
8926                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
8927                 .klen   = 40,
8928                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8929                           "\x00\x00\x00\x00\x00\x00\x00\x01",
8930                 .input  = "\xd2\xaf\x69\x35\x24\x1d\x0e\x1c"
8931                           "\x84\x8b\x05\xe4\xa2\x2f\x16\xf5",
8932                 .ilen   = 16,
8933                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8934                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8935                 .rlen   = 16,
8936         }, {
8937                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
8938                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
8939                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
8940                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
8941                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
8942                 .klen   = 40,
8943                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8944                           "\x00\x00\x00\x02\x00\x00\x00\x00",
8945                 .input  = "\x4a\x23\x56\xd7\xff\x90\xd0\x9a"
8946                           "\x0d\x7c\x26\xfc\xf0\xf0\xf6\xe4",
8947                 .ilen   = 16,
8948                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8949                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8950                 .rlen   = 16,
8951         }, {
8952                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8953                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8954                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8955                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8956                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8957                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8958                 .klen   = 48,
8959                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8960                           "\x00\x00\x00\x00\x00\x00\x00\x01",
8961                 .input  = "\x30\xaf\x26\x05\x9d\x5d\x0a\x58"
8962                           "\xe2\xe7\xce\x8a\xb2\x56\x6d\x76",
8963                 .ilen   = 16,
8964                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8965                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8966                 .rlen   = 16,
8967         }, {
8968                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
8969                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
8970                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
8971                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
8972                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
8973                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
8974                 .klen   = 48,
8975                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8976                           "\x00\x00\x00\x02\x00\x00\x00\x00",
8977                 .input  = "\xdf\xcf\xdc\xd2\xe1\xcf\x86\x75"
8978                           "\x17\x66\x5e\x0c\x14\xa1\x3d\x40",
8979                 .ilen   = 16,
8980                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
8981                           "\x38\x39\x41\x42\x43\x44\x45\x46",
8982                 .rlen   = 16,
8983         }, {
8984                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
8985                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
8986                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
8987                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
8988                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
8989                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
8990                 .klen   = 48,
8991                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
8992                           "\x00\x00\x00\x00\x00\x00\x00\x01",
8993                 .input  = "\x30\x38\xeb\xaf\x12\x43\x1a\x89"
8994                           "\x62\xa2\x36\xe5\xcf\x77\x1e\xd9"
8995                           "\x08\xc3\x0d\xdd\x95\xab\x19\x96"
8996                           "\x27\x52\x41\xc3\xca\xfb\xf6\xee"
8997                           "\x40\x2d\xdf\xdd\x00\x0c\xb9\x0a"
8998                           "\x3a\xf0\xc0\xd1\xda\x63\x9e\x45"
8999                           "\x42\xe9\x29\xc0\xb4\x07\xb4\x31"
9000                           "\x66\x77\x72\xb5\xb6\xb3\x57\x46"
9001                           "\x34\x9a\xfe\x03\xaf\x6b\x36\x07"
9002                           "\x63\x8e\xc2\x5d\xa6\x0f\xb6\x7d"
9003                           "\xfb\x6d\x82\x51\xb6\x98\xd0\x71"
9004                           "\xe7\x10\x7a\xdf\xb2\xbd\xf1\x1d"
9005                           "\x72\x2b\x54\x13\xe3\x6d\x79\x37"
9006                           "\xa9\x39\x2c\xdf\x21\xab\x87\xd5"
9007                           "\xee\xef\x9a\x12\x50\x39\x2e\x1b"
9008                           "\x7d\xe6\x6a\x27\x48\xb9\xe7\xac"
9009                           "\xaa\xcd\x79\x5f\xf2\xf3\xa0\x08"
9010                           "\x6f\x2c\xf4\x0e\xd1\xb8\x89\x25"
9011                           "\x31\x9d\xef\xb1\x1d\x27\x55\x04"
9012                           "\xc9\x8c\xb7\x68\xdc\xb6\x67\x8a"
9013                           "\xdb\xcf\x22\xf2\x3b\x6f\xce\xbb"
9014                           "\x26\xbe\x4f\x27\x04\x42\xd1\x44"
9015                           "\x4c\x08\xa3\x95\x4c\x7f\x1a\xaf"
9016                           "\x1d\x28\x14\xfd\xb1\x1a\x34\x18"
9017                           "\xf5\x1e\x28\x69\x95\x6a\x5a\xba"
9018                           "\x8e\xb2\x58\x1d\x28\x17\x13\x3d"
9019                           "\x38\x7d\x14\x8d\xab\x5d\xf9\xe8"
9020                           "\x3c\x0f\x2b\x0d\x2b\x08\xb4\x4b"
9021                           "\x6b\x0d\xc8\xa7\x84\xc2\x3a\x1a"
9022                           "\xb7\xbd\xda\x92\x29\xb8\x5b\x5a"
9023                           "\x63\xa5\x99\x82\x09\x72\x8f\xc6"
9024                           "\xa4\x62\x24\x69\x8c\x2d\x26\x00"
9025                           "\x99\x83\x91\xd6\xc6\xcf\x57\x67"
9026                           "\x38\xea\xf2\xfc\x29\xe0\x73\x39"
9027                           "\xf9\x13\x94\x6d\xe2\x58\x28\x75"
9028                           "\x3e\xae\x71\x90\x07\x70\x1c\x38"
9029                           "\x5b\x4c\x1e\xb5\xa5\x3b\x20\xef"
9030                           "\xb1\x4c\x3e\x1a\x72\x62\xbb\x22"
9031                           "\x82\x09\xe3\x18\x3f\x4f\x48\xfc"
9032                           "\xdd\xac\xfc\xb6\x09\xdb\xd2\x7b"
9033                           "\xd6\xb7\x7e\x41\x2f\x14\xf5\x0e"
9034                           "\xc3\xac\x4a\xed\xe7\x82\xef\x31"
9035                           "\x1f\x1a\x51\x1e\x29\x60\xc8\x98"
9036                           "\x93\x51\x1d\x3d\x62\x59\x83\x82"
9037                           "\x0c\xf1\xd7\x8d\xac\x33\x44\x81"
9038                           "\x3c\x59\xb7\xd4\x5b\x65\x82\xc4"
9039                           "\xec\xdc\x24\xfd\x0e\x1a\x79\x94"
9040                           "\x34\xb0\x62\xfa\x98\x49\x26\x1f"
9041                           "\xf4\x9e\x40\x44\x5b\x1f\xf8\xbe"
9042                           "\x36\xff\xc6\xc6\x9d\xf2\xd6\xcc"
9043                           "\x63\x93\x29\xb9\x0b\x6d\xd7\x6c"
9044                           "\xdb\xf6\x21\x80\xf7\x5a\x37\x15"
9045                           "\x0c\xe3\x36\xc8\x74\x75\x20\x91"
9046                           "\xdf\x52\x2d\x0c\xe7\x45\xff\x46"
9047                           "\xb3\xf4\xec\xc2\xbd\xd3\x37\xb6"
9048                           "\x26\xa2\x5d\x7d\x61\xbf\x10\x46"
9049                           "\x57\x8d\x05\x96\x70\x0b\xd6\x41"
9050                           "\x5c\xe9\xd3\x54\x81\x39\x3a\xdd"
9051                           "\x5f\x92\x81\x6e\x35\x03\xd4\x72"
9052                           "\x3d\x5a\xe7\xb9\x3b\x0c\x84\x23"
9053                           "\x45\x5d\xec\x72\xc1\x52\xef\x2e"
9054                           "\x81\x00\xd3\xfe\x4c\x3c\x05\x61"
9055                           "\x80\x18\xc4\x6c\x03\xd3\xb7\xba"
9056                           "\x11\xd7\xb8\x6e\xea\xe1\x80\x30",
9057                 .ilen   = 512,
9058                 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
9059                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
9060                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
9061                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
9062                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
9063                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
9064                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
9065                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
9066                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
9067                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
9068                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
9069                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
9070                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
9071                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
9072                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
9073                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
9074                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
9075                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
9076                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
9077                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
9078                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
9079                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
9080                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
9081                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
9082                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
9083                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
9084                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
9085                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
9086                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
9087                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
9088                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
9089                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
9090                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
9091                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
9092                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
9093                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
9094                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
9095                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
9096                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
9097                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
9098                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
9099                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
9100                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
9101                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
9102                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
9103                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
9104                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
9105                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
9106                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
9107                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
9108                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
9109                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
9110                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
9111                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
9112                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
9113                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
9114                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
9115                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
9116                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
9117                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
9118                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
9119                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
9120                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
9121                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
9122                 .rlen   = 512,
9123                 .also_non_np = 1,
9124                 .np     = 3,
9125                 .tap    = { 512 - 20, 4, 16 },
9126         },
9127 };
9128
9129 static struct cipher_testvec tf_xts_enc_tv_template[] = {
9130         /* Generated from AES-XTS test vectors */
9131 {
9132                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
9133                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9134                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9135                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9136                 .klen   = 32,
9137                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
9138                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9139                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
9140                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9141                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9142                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9143                 .ilen   = 32,
9144                 .result = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9145                           "\x30\x74\xe4\x44\x52\x77\x97\x43"
9146                           "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9147                           "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9148                 .rlen   = 32,
9149         }, {
9150                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
9151                           "\x11\x11\x11\x11\x11\x11\x11\x11"
9152                           "\x22\x22\x22\x22\x22\x22\x22\x22"
9153                           "\x22\x22\x22\x22\x22\x22\x22\x22",
9154                 .klen   = 32,
9155                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
9156                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9157                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
9158                           "\x44\x44\x44\x44\x44\x44\x44\x44"
9159                           "\x44\x44\x44\x44\x44\x44\x44\x44"
9160                           "\x44\x44\x44\x44\x44\x44\x44\x44",
9161                 .ilen   = 32,
9162                 .result = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9163                           "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9164                           "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9165                           "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
9166                 .rlen   = 32,
9167         }, {
9168                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9169                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9170                           "\x22\x22\x22\x22\x22\x22\x22\x22"
9171                           "\x22\x22\x22\x22\x22\x22\x22\x22",
9172                 .klen   = 32,
9173                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
9174                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9175                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
9176                           "\x44\x44\x44\x44\x44\x44\x44\x44"
9177                           "\x44\x44\x44\x44\x44\x44\x44\x44"
9178                           "\x44\x44\x44\x44\x44\x44\x44\x44",
9179                 .ilen   = 32,
9180                 .result = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9181                           "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9182                           "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9183                           "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9184                 .rlen   = 32,
9185         }, {
9186                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
9187                           "\x23\x53\x60\x28\x74\x71\x35\x26"
9188                           "\x31\x41\x59\x26\x53\x58\x97\x93"
9189                           "\x23\x84\x62\x64\x33\x83\x27\x95",
9190                 .klen   = 32,
9191                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
9192                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9193                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9194                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9195                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9196                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9197                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9198                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9199                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9200                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9201                           "\x40\x41\x42\x43\x44\x45\x46\x47"
9202                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9203                           "\x50\x51\x52\x53\x54\x55\x56\x57"
9204                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9205                           "\x60\x61\x62\x63\x64\x65\x66\x67"
9206                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9207                           "\x70\x71\x72\x73\x74\x75\x76\x77"
9208                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9209                           "\x80\x81\x82\x83\x84\x85\x86\x87"
9210                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9211                           "\x90\x91\x92\x93\x94\x95\x96\x97"
9212                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9213                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9214                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9215                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9216                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9217                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9218                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9219                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9220                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9221                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9222                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9223                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9224                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9225                           "\x00\x01\x02\x03\x04\x05\x06\x07"
9226                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9227                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9228                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9229                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9230                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9231                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9232                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9233                           "\x40\x41\x42\x43\x44\x45\x46\x47"
9234                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9235                           "\x50\x51\x52\x53\x54\x55\x56\x57"
9236                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9237                           "\x60\x61\x62\x63\x64\x65\x66\x67"
9238                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9239                           "\x70\x71\x72\x73\x74\x75\x76\x77"
9240                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9241                           "\x80\x81\x82\x83\x84\x85\x86\x87"
9242                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9243                           "\x90\x91\x92\x93\x94\x95\x96\x97"
9244                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9245                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9246                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9247                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9248                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9249                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9250                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9251                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9252                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9253                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9254                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9255                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9256                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9257                 .ilen   = 512,
9258                 .result = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9259                           "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9260                           "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9261                           "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9262                           "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9263                           "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9264                           "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9265                           "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9266                           "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9267                           "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9268                           "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9269                           "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9270                           "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9271                           "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9272                           "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9273                           "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9274                           "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9275                           "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9276                           "\x39\x80\x39\x09\x97\x65\xf2\x83"
9277                           "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9278                           "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9279                           "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9280                           "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9281                           "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9282                           "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9283                           "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9284                           "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9285                           "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9286                           "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9287                           "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9288                           "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9289                           "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9290                           "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9291                           "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9292                           "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9293                           "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9294                           "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9295                           "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9296                           "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9297                           "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9298                           "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9299                           "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9300                           "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9301                           "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9302                           "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9303                           "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9304                           "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9305                           "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9306                           "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9307                           "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9308                           "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9309                           "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9310                           "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9311                           "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9312                           "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9313                           "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9314                           "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9315                           "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9316                           "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9317                           "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9318                           "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9319                           "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9320                           "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9321                           "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9322                 .rlen   = 512,
9323         }, {
9324                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
9325                           "\x23\x53\x60\x28\x74\x71\x35\x26"
9326                           "\x62\x49\x77\x57\x24\x70\x93\x69"
9327                           "\x99\x59\x57\x49\x66\x96\x76\x27"
9328                           "\x31\x41\x59\x26\x53\x58\x97\x93"
9329                           "\x23\x84\x62\x64\x33\x83\x27\x95"
9330                           "\x02\x88\x41\x97\x16\x93\x99\x37"
9331                           "\x51\x05\x82\x09\x74\x94\x45\x92",
9332                 .klen   = 64,
9333                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
9334                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9335                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9336                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9337                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9338                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9339                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9340                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9341                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9342                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9343                           "\x40\x41\x42\x43\x44\x45\x46\x47"
9344                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9345                           "\x50\x51\x52\x53\x54\x55\x56\x57"
9346                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9347                           "\x60\x61\x62\x63\x64\x65\x66\x67"
9348                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9349                           "\x70\x71\x72\x73\x74\x75\x76\x77"
9350                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9351                           "\x80\x81\x82\x83\x84\x85\x86\x87"
9352                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9353                           "\x90\x91\x92\x93\x94\x95\x96\x97"
9354                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9355                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9356                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9357                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9358                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9359                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9360                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9361                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9362                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9363                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9364                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9365                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9366                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9367                           "\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                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9371                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9372                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9373                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9374                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9375                           "\x40\x41\x42\x43\x44\x45\x46\x47"
9376                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9377                           "\x50\x51\x52\x53\x54\x55\x56\x57"
9378                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9379                           "\x60\x61\x62\x63\x64\x65\x66\x67"
9380                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9381                           "\x70\x71\x72\x73\x74\x75\x76\x77"
9382                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9383                           "\x80\x81\x82\x83\x84\x85\x86\x87"
9384                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9385                           "\x90\x91\x92\x93\x94\x95\x96\x97"
9386                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9387                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9388                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9389                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9390                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9391                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9392                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9393                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9394                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9395                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9396                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9397                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9398                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9399                 .ilen   = 512,
9400                 .result = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9401                           "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9402                           "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9403                           "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9404                           "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9405                           "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9406                           "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9407                           "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9408                           "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9409                           "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9410                           "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9411                           "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9412                           "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9413                           "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9414                           "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9415                           "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9416                           "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9417                           "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9418                           "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9419                           "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9420                           "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9421                           "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9422                           "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9423                           "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9424                           "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9425                           "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9426                           "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9427                           "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9428                           "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9429                           "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9430                           "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9431                           "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9432                           "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9433                           "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9434                           "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9435                           "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9436                           "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9437                           "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9438                           "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9439                           "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9440                           "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9441                           "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9442                           "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9443                           "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9444                           "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9445                           "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9446                           "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9447                           "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9448                           "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9449                           "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9450                           "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9451                           "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9452                           "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9453                           "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9454                           "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9455                           "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9456                           "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9457                           "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9458                           "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9459                           "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9460                           "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9461                           "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9462                           "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9463                           "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9464                 .rlen   = 512,
9465                 .also_non_np = 1,
9466                 .np     = 3,
9467                 .tap    = { 512 - 20, 4, 16 },
9468         },
9469 };
9470
9471 static struct cipher_testvec tf_xts_dec_tv_template[] = {
9472         /* Generated from AES-XTS test vectors */
9473         /* same as enc vectors with input and result reversed */
9474         {
9475                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
9476                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9477                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9478                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9479                 .klen   = 32,
9480                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
9481                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9482                 .input  = "\x4b\xc9\x44\x4a\x11\xa3\xef\xac"
9483                           "\x30\x74\xe4\x44\x52\x77\x97\x43"
9484                           "\xa7\x60\xb2\x45\x2e\xf9\x00\x90"
9485                           "\x9f\xaa\xfd\x89\x6e\x9d\x4a\xe0",
9486                 .ilen   = 32,
9487                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
9488                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9489                           "\x00\x00\x00\x00\x00\x00\x00\x00"
9490                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9491                 .rlen   = 32,
9492         }, {
9493                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
9494                           "\x11\x11\x11\x11\x11\x11\x11\x11"
9495                           "\x22\x22\x22\x22\x22\x22\x22\x22"
9496                           "\x22\x22\x22\x22\x22\x22\x22\x22",
9497                 .klen   = 32,
9498                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
9499                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9500                 .input  = "\x57\x0e\x8f\xe5\x2a\x35\x61\x4f"
9501                           "\x32\xd3\xbd\x36\x05\x15\x44\x2c"
9502                           "\x58\x06\xf7\xf8\x00\xa8\xb6\xd5"
9503                           "\xc6\x28\x92\xdb\xd8\x34\xa2\xe9",
9504                 .ilen   = 32,
9505                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9506                           "\x44\x44\x44\x44\x44\x44\x44\x44"
9507                           "\x44\x44\x44\x44\x44\x44\x44\x44"
9508                           "\x44\x44\x44\x44\x44\x44\x44\x44",
9509                 .rlen   = 32,
9510         }, {
9511                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
9512                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
9513                           "\x22\x22\x22\x22\x22\x22\x22\x22"
9514                           "\x22\x22\x22\x22\x22\x22\x22\x22",
9515                 .klen   = 32,
9516                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
9517                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9518                 .input  = "\x96\x45\x8f\x8d\x7a\x75\xb1\xde"
9519                           "\x40\x0c\x89\x56\xf6\x4d\xa7\x07"
9520                           "\x38\xbb\x5b\xe9\xcd\x84\xae\xb2"
9521                           "\x7b\x6a\x62\xf4\x8c\xb5\x37\xea",
9522                 .ilen   = 32,
9523                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
9524                           "\x44\x44\x44\x44\x44\x44\x44\x44"
9525                           "\x44\x44\x44\x44\x44\x44\x44\x44"
9526                           "\x44\x44\x44\x44\x44\x44\x44\x44",
9527                 .rlen   = 32,
9528         }, {
9529                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
9530                           "\x23\x53\x60\x28\x74\x71\x35\x26"
9531                           "\x31\x41\x59\x26\x53\x58\x97\x93"
9532                           "\x23\x84\x62\x64\x33\x83\x27\x95",
9533                 .klen   = 32,
9534                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
9535                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9536                 .input  = "\xa9\x78\xae\x1e\xea\xa2\x44\x4c"
9537                           "\xa2\x7a\x64\x1f\xaf\x46\xc1\xe0"
9538                           "\x6c\xb2\xf3\x92\x9a\xd6\x7d\x58"
9539                           "\xb8\x2d\xb9\x5d\x58\x07\x66\x50"
9540                           "\xea\x35\x35\x8c\xb2\x46\x61\x06"
9541                           "\x5d\x65\xfc\x57\x8f\x69\x74\xab"
9542                           "\x8a\x06\x69\xb5\x6c\xda\x66\xc7"
9543                           "\x52\x90\xbb\x8e\x6d\x8b\xb5\xa2"
9544                           "\x78\x1d\xc2\xa9\xc2\x73\x00\xc3"
9545                           "\x32\x36\x7c\x97\x6b\x4e\x8a\x50"
9546                           "\xe4\x91\x83\x96\x8f\xf4\x94\x1a"
9547                           "\xa6\x27\xe1\x33\xcb\x91\xc6\x5f"
9548                           "\x94\x75\xbc\xd7\x3e\x3e\x6f\x9e"
9549                           "\xa9\x31\x80\x5e\xe5\xdb\xc8\x53"
9550                           "\x01\x73\x68\x32\x25\x19\xfa\xfb"
9551                           "\xe4\xcf\xb9\x3e\xa2\xa0\x8f\x31"
9552                           "\xbf\x54\x06\x93\xa8\xb1\x0f\xb6"
9553                           "\x7c\x3c\xde\x6f\x0f\xfb\x0c\x11"
9554                           "\x39\x80\x39\x09\x97\x65\xf2\x83"
9555                           "\xae\xe6\xa1\x6f\x47\xb8\x49\xde"
9556                           "\x99\x36\x20\x7d\x97\x3b\xec\xfa"
9557                           "\xb4\x33\x6e\x7a\xc7\x46\x84\x49"
9558                           "\x91\xcd\xe1\x57\x0d\xed\x40\x08"
9559                           "\x13\xf1\x4e\x3e\xa4\xa4\x5c\xe6"
9560                           "\xd2\x0c\x20\x8f\x3e\xdf\x3f\x47"
9561                           "\x9a\x2f\xde\x6d\x66\xc9\x99\x4a"
9562                           "\x2d\x9e\x9d\x4b\x1a\x27\xa2\x12"
9563                           "\x99\xf0\xf8\xb1\xb6\xf6\x57\xc3"
9564                           "\xca\x1c\xa3\x8e\xed\x39\x28\xb5"
9565                           "\x10\x1b\x4b\x08\x42\x00\x4a\xd3"
9566                           "\xad\x5a\xc6\x8e\xc8\xbb\x95\xc4"
9567                           "\x4b\xaa\xfe\xd5\x42\xa8\xa3\x6d"
9568                           "\x3c\xf3\x34\x91\x2d\xb4\xdd\x20"
9569                           "\x0c\x90\x6d\xa3\x9b\x66\x9d\x24"
9570                           "\x02\xa6\xa9\x3f\x3f\x58\x5d\x47"
9571                           "\x24\x65\x63\x7e\xbd\x8c\xe6\x52"
9572                           "\x7d\xef\x33\x53\x63\xec\xaa\x0b"
9573                           "\x64\x15\xa9\xa6\x1f\x10\x00\x38"
9574                           "\x35\xa8\xe7\xbe\x23\x70\x22\xe0"
9575                           "\xd3\xb9\xe6\xfd\xe6\xaa\x03\x50"
9576                           "\xf3\x3c\x27\x36\x8b\xcc\xfe\x9c"
9577                           "\x9c\xa3\xb3\xe7\x68\x9b\xa2\x71"
9578                           "\xe0\x07\xd9\x1f\x68\x1f\xac\x5e"
9579                           "\x7a\x74\x85\xa9\x6a\x90\xab\x2c"
9580                           "\x38\x51\xbc\x1f\x43\x4a\x56\x1c"
9581                           "\xf8\x47\x03\x4e\x67\xa8\x1f\x99"
9582                           "\x04\x39\x73\x32\xb2\x86\x79\xe7"
9583                           "\x14\x28\x70\xb8\xe2\x7d\x69\x85"
9584                           "\xb6\x0f\xc5\xd0\xd0\x01\x5c\xe6"
9585                           "\x09\x0f\x75\xf7\xb6\x81\xd2\x11"
9586                           "\x20\x9c\xa1\xee\x11\x44\x79\xd0"
9587                           "\xb2\x34\x77\xda\x10\x9a\x6f\x6f"
9588                           "\xef\x7c\xd9\xdc\x35\xb7\x61\xdd"
9589                           "\xf1\xa4\xc6\x1c\xbf\x05\x22\xac"
9590                           "\xfe\x2f\x85\x00\x44\xdf\x33\x16"
9591                           "\x35\xb6\xa3\xd3\x70\xdf\x69\x35"
9592                           "\x6a\xc7\xb4\x99\x45\x27\xc8\x8e"
9593                           "\x5a\x14\x30\xd0\x55\x3e\x4f\x64"
9594                           "\x0d\x38\xe3\xdf\x8b\xa8\x93\x26"
9595                           "\x75\xae\xf6\xb5\x23\x0b\x17\x31"
9596                           "\xbf\x27\xb8\xb5\x94\x31\xa7\x8f"
9597                           "\x43\xc4\x46\x24\x22\x4f\x8f\x7e"
9598                           "\xe5\xf4\x6d\x1e\x0e\x18\x7a\xbb"
9599                           "\xa6\x8f\xfb\x49\x49\xd8\x7e\x5a",
9600                 .ilen   = 512,
9601                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9602                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9603                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9604                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9605                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9606                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9607                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9608                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9609                           "\x40\x41\x42\x43\x44\x45\x46\x47"
9610                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9611                           "\x50\x51\x52\x53\x54\x55\x56\x57"
9612                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9613                           "\x60\x61\x62\x63\x64\x65\x66\x67"
9614                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9615                           "\x70\x71\x72\x73\x74\x75\x76\x77"
9616                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9617                           "\x80\x81\x82\x83\x84\x85\x86\x87"
9618                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9619                           "\x90\x91\x92\x93\x94\x95\x96\x97"
9620                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9621                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9622                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9623                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9624                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9625                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9626                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9627                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9628                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9629                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9630                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9631                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9632                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9633                           "\x00\x01\x02\x03\x04\x05\x06\x07"
9634                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9635                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9636                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9637                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9638                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9639                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9640                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9641                           "\x40\x41\x42\x43\x44\x45\x46\x47"
9642                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9643                           "\x50\x51\x52\x53\x54\x55\x56\x57"
9644                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9645                           "\x60\x61\x62\x63\x64\x65\x66\x67"
9646                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9647                           "\x70\x71\x72\x73\x74\x75\x76\x77"
9648                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9649                           "\x80\x81\x82\x83\x84\x85\x86\x87"
9650                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9651                           "\x90\x91\x92\x93\x94\x95\x96\x97"
9652                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9653                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9654                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9655                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9656                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9657                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9658                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9659                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9660                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9661                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9662                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9663                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9664                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9665                 .rlen   = 512,
9666         }, {
9667                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
9668                           "\x23\x53\x60\x28\x74\x71\x35\x26"
9669                           "\x62\x49\x77\x57\x24\x70\x93\x69"
9670                           "\x99\x59\x57\x49\x66\x96\x76\x27"
9671                           "\x31\x41\x59\x26\x53\x58\x97\x93"
9672                           "\x23\x84\x62\x64\x33\x83\x27\x95"
9673                           "\x02\x88\x41\x97\x16\x93\x99\x37"
9674                           "\x51\x05\x82\x09\x74\x94\x45\x92",
9675                 .klen   = 64,
9676                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
9677                           "\x00\x00\x00\x00\x00\x00\x00\x00",
9678                 .input  = "\xd7\x4b\x93\x7d\x13\xa2\xa2\xe1"
9679                           "\x35\x39\x71\x88\x76\x1e\xc9\xea"
9680                           "\x86\xad\xf3\x14\x48\x3d\x5e\xe9"
9681                           "\xe9\x2d\xb2\x56\x59\x35\x9d\xec"
9682                           "\x84\xfa\x7e\x9d\x6d\x33\x36\x8f"
9683                           "\xce\xf4\xa9\x21\x0b\x5f\x96\xec"
9684                           "\xcb\xf9\x57\x68\x33\x88\x39\xbf"
9685                           "\x2f\xbb\x59\x03\xbd\x66\x8b\x11"
9686                           "\x11\x65\x51\x2e\xb8\x67\x05\xd1"
9687                           "\x27\x11\x5c\xd4\xcc\x97\xc2\xb3"
9688                           "\xa9\x55\xaf\x07\x56\xd1\xdc\xf5"
9689                           "\x85\xdc\x46\xe6\xf0\x24\xeb\x93"
9690                           "\x4d\xf0\x9b\xf5\x73\x1c\xda\x03"
9691                           "\x22\xc8\x3a\x4f\xb4\x19\x91\x09"
9692                           "\x54\x0b\xf6\xfe\x17\x3d\x1a\x53"
9693                           "\x72\x60\x79\xcb\x0e\x32\x8a\x77"
9694                           "\xd5\xed\xdb\x33\xd7\x62\x16\x69"
9695                           "\x63\xe0\xab\xb5\xf6\x9c\x5f\x3d"
9696                           "\x69\x35\x61\x86\xf8\x86\xb9\x89"
9697                           "\x6e\x59\x35\xac\xf6\x6b\x33\xa0"
9698                           "\xea\xef\x96\x62\xd8\xa9\xcf\x56"
9699                           "\xbf\xdb\x8a\xfd\xa1\x82\x77\x73"
9700                           "\x3d\x94\x4a\x49\x42\x6d\x08\x60"
9701                           "\xa1\xea\xab\xb6\x88\x13\x94\xb8"
9702                           "\x51\x98\xdb\x35\x85\xdf\xf6\xb9"
9703                           "\x8f\xcd\xdf\x80\xd3\x40\x2d\x72"
9704                           "\xb8\xb2\x6c\x02\x43\x35\x22\x2a"
9705                           "\x31\xed\xcd\x16\x19\xdf\x62\x0f"
9706                           "\x29\xcf\x87\x04\xec\x02\x4f\xe4"
9707                           "\xa2\xed\x73\xc6\x69\xd3\x7e\x89"
9708                           "\x0b\x76\x10\x7c\xd6\xf9\x6a\x25"
9709                           "\xed\xcc\x60\x5d\x61\x20\xc1\x97"
9710                           "\x56\x91\x57\x28\xbe\x71\x0d\xcd"
9711                           "\xde\xc4\x9e\x55\x91\xbe\xd1\x28"
9712                           "\x9b\x90\xeb\x73\xf3\x68\x51\xc6"
9713                           "\xdf\x82\xcc\xd8\x1f\xce\x5b\x27"
9714                           "\xc0\x60\x5e\x33\xd6\xa7\x20\xea"
9715                           "\xb2\x54\xc7\x5d\x6a\x3b\x67\x47"
9716                           "\xcf\xa0\xe3\xab\x86\xaf\xc1\x42"
9717                           "\xe6\xb0\x23\x4a\xaf\x53\xdf\xa0"
9718                           "\xad\x12\x32\x31\x03\xf7\x21\xbe"
9719                           "\x2d\xd5\x82\x42\xb6\x4a\x3d\xcd"
9720                           "\xd8\x81\x77\xa9\x49\x98\x6c\x09"
9721                           "\xc5\xa3\x61\x12\x62\x85\x6b\xcd"
9722                           "\xb3\xf4\x20\x0c\x41\xc4\x05\x37"
9723                           "\x46\x5f\xeb\x71\x8b\xf1\xaf\x6e"
9724                           "\xba\xf3\x50\x2e\xfe\xa8\x37\xeb"
9725                           "\xe8\x8c\x4f\xa4\x0c\xf1\x31\xc8"
9726                           "\x6e\x71\x4f\xa5\xd7\x97\x73\xe0"
9727                           "\x93\x4a\x2f\xda\x7b\xe0\x20\x54"
9728                           "\x1f\x8d\x85\x79\x0b\x7b\x5e\x75"
9729                           "\xb9\x07\x67\xcc\xc8\xe7\x21\x15"
9730                           "\xa7\xc8\x98\xff\x4b\x80\x1c\x12"
9731                           "\xa8\x54\xe1\x38\x52\xe6\x74\x81"
9732                           "\x97\x47\xa1\x41\x0e\xc0\x50\xe3"
9733                           "\x55\x0e\xc3\xa7\x70\x77\xce\x07"
9734                           "\xed\x8c\x88\xe6\xa1\x5b\x14\xec"
9735                           "\xe6\xde\x06\x6d\x74\xc5\xd9\xfa"
9736                           "\xe5\x2f\x5a\xff\xc8\x05\xee\x27"
9737                           "\x35\x61\xbf\x0b\x19\x78\x9b\xd2"
9738                           "\x04\xc7\x05\xb1\x79\xb4\xff\x5f"
9739                           "\xf3\xea\x67\x52\x78\xc2\xce\x70"
9740                           "\xa4\x05\x0b\xb2\xb3\xa8\x30\x97"
9741                           "\x37\x30\xe1\x91\x8d\xb3\x2a\xff",
9742                 .ilen   = 512,
9743                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
9744                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9745                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9746                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9747                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9748                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9749                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9750                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9751                           "\x40\x41\x42\x43\x44\x45\x46\x47"
9752                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9753                           "\x50\x51\x52\x53\x54\x55\x56\x57"
9754                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9755                           "\x60\x61\x62\x63\x64\x65\x66\x67"
9756                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9757                           "\x70\x71\x72\x73\x74\x75\x76\x77"
9758                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9759                           "\x80\x81\x82\x83\x84\x85\x86\x87"
9760                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9761                           "\x90\x91\x92\x93\x94\x95\x96\x97"
9762                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9763                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9764                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9765                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9766                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9767                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9768                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9769                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9770                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9771                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9772                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9773                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9774                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
9775                           "\x00\x01\x02\x03\x04\x05\x06\x07"
9776                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9777                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9778                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
9779                           "\x20\x21\x22\x23\x24\x25\x26\x27"
9780                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
9781                           "\x30\x31\x32\x33\x34\x35\x36\x37"
9782                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
9783                           "\x40\x41\x42\x43\x44\x45\x46\x47"
9784                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
9785                           "\x50\x51\x52\x53\x54\x55\x56\x57"
9786                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
9787                           "\x60\x61\x62\x63\x64\x65\x66\x67"
9788                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
9789                           "\x70\x71\x72\x73\x74\x75\x76\x77"
9790                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
9791                           "\x80\x81\x82\x83\x84\x85\x86\x87"
9792                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
9793                           "\x90\x91\x92\x93\x94\x95\x96\x97"
9794                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
9795                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
9796                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
9797                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
9798                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
9799                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
9800                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
9801                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
9802                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
9803                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
9804                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
9805                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
9806                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
9807                 .rlen   = 512,
9808                 .also_non_np = 1,
9809                 .np     = 3,
9810                 .tap    = { 512 - 20, 4, 16 },
9811         },
9812 };
9813
9814 /*
9815  * Serpent test vectors.  These are backwards because Serpent writes
9816  * octet sequences in right-to-left mode.
9817  */
9818 #define SERPENT_ENC_TEST_VECTORS        5
9819 #define SERPENT_DEC_TEST_VECTORS        5
9820
9821 #define TNEPRES_ENC_TEST_VECTORS        4
9822 #define TNEPRES_DEC_TEST_VECTORS        4
9823
9824 #define SERPENT_CBC_ENC_TEST_VECTORS    1
9825 #define SERPENT_CBC_DEC_TEST_VECTORS    1
9826
9827 #define SERPENT_CTR_ENC_TEST_VECTORS    2
9828 #define SERPENT_CTR_DEC_TEST_VECTORS    2
9829
9830 #define SERPENT_LRW_ENC_TEST_VECTORS    8
9831 #define SERPENT_LRW_DEC_TEST_VECTORS    8
9832
9833 #define SERPENT_XTS_ENC_TEST_VECTORS    5
9834 #define SERPENT_XTS_DEC_TEST_VECTORS    5
9835
9836 static struct cipher_testvec serpent_enc_tv_template[] = {
9837         {
9838                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9839                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9840                 .ilen   = 16,
9841                 .result = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
9842                           "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
9843                 .rlen   = 16,
9844         }, {
9845                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
9846                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9847                 .klen   = 16,
9848                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9849                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9850                 .ilen   = 16,
9851                 .result = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
9852                           "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
9853                 .rlen   = 16,
9854         }, {
9855                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
9856                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
9857                           "\x10\x11\x12\x13\x14\x15\x16\x17"
9858                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
9859                 .klen   = 32,
9860                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
9861                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
9862                 .ilen   = 16,
9863                 .result = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
9864                           "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
9865                 .rlen   = 16,
9866         }, {
9867                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
9868                 .klen   = 16,
9869                 .input  = zeroed_string,
9870                 .ilen   = 16,
9871                 .result = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
9872                           "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
9873                 .rlen   = 16,
9874         }, { /* Generated with Crypto++ */
9875                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
9876                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
9877                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
9878                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
9879                 .klen   = 32,
9880                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
9881                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
9882                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
9883                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
9884                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
9885                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
9886                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
9887                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
9888                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
9889                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
9890                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
9891                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
9892                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
9893                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
9894                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
9895                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
9896                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
9897                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
9898                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
9899                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
9900                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
9901                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
9902                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
9903                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
9904                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
9905                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
9906                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
9907                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
9908                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
9909                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
9910                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
9911                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
9912                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
9913                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
9914                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
9915                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
9916                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
9917                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
9918                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
9919                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
9920                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
9921                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
9922                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
9923                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
9924                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
9925                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
9926                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
9927                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
9928                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
9929                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
9930                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
9931                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
9932                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
9933                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
9934                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
9935                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
9936                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
9937                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
9938                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
9939                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
9940                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
9941                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
9942                 .ilen   = 496,
9943                 .result = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
9944                           "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
9945                           "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
9946                           "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
9947                           "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
9948                           "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
9949                           "\x99\x34\x89\x5B\x54\xE9\x12\x13"
9950                           "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
9951                           "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
9952                           "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
9953                           "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
9954                           "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
9955                           "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
9956                           "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
9957                           "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
9958                           "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
9959                           "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
9960                           "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
9961                           "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
9962                           "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
9963                           "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
9964                           "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
9965                           "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
9966                           "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
9967                           "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
9968                           "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
9969                           "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
9970                           "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
9971                           "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
9972                           "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
9973                           "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
9974                           "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
9975                           "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
9976                           "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
9977                           "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
9978                           "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
9979                           "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
9980                           "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
9981                           "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
9982                           "\x87\x70\x14\xD0\x01\x57\xCB\x42"
9983                           "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
9984                           "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
9985                           "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
9986                           "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
9987                           "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
9988                           "\x71\x80\x05\x35\x3F\x40\x0B\x21"
9989                           "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
9990                           "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
9991                           "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
9992                           "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
9993                           "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
9994                           "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
9995                           "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
9996                           "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
9997                           "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
9998                           "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
9999                           "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
10000                           "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
10001                           "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
10002                           "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
10003                           "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
10004                           "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
10005                 .rlen   = 496,
10006                 .also_non_np = 1,
10007                 .np     = 3,
10008                 .tap    = { 496 - 20, 4, 16 },
10009         },
10010 };
10011
10012 static struct cipher_testvec tnepres_enc_tv_template[] = {
10013         { /* KeySize=128, PT=0, I=1 */
10014                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
10015                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10016                 .key    = "\x80\x00\x00\x00\x00\x00\x00\x00"
10017                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10018                 .klen   = 16,
10019                 .ilen   = 16,
10020                 .result = "\x49\xaf\xbf\xad\x9d\x5a\x34\x05"
10021                           "\x2c\xd8\xff\xa5\x98\x6b\xd2\xdd",
10022                 .rlen   = 16,
10023         }, { /* KeySize=192, PT=0, I=1 */
10024                 .key    = "\x80\x00\x00\x00\x00\x00\x00\x00"
10025                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10026                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10027                 .klen   = 24,
10028                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
10029                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10030                 .ilen   = 16,
10031                 .result = "\xe7\x8e\x54\x02\xc7\x19\x55\x68"
10032                           "\xac\x36\x78\xf7\xa3\xf6\x0c\x66",
10033                 .rlen   = 16,
10034         }, { /* KeySize=256, PT=0, I=1 */
10035                 .key    = "\x80\x00\x00\x00\x00\x00\x00\x00"
10036                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10037                           "\x00\x00\x00\x00\x00\x00\x00\x00"
10038                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10039                 .klen   = 32,
10040                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
10041                           "\x00\x00\x00\x00\x00\x00\x00\x00",
10042                 .ilen   = 16,
10043                 .result = "\xab\xed\x96\xe7\x66\xbf\x28\xcb"
10044                           "\xc0\xeb\xd2\x1a\x82\xef\x08\x19",
10045                 .rlen   = 16,
10046         }, { /* KeySize=256, I=257 */
10047                 .key    = "\x1f\x1e\x1d\x1c\x1b\x1a\x19\x18"
10048                           "\x17\x16\x15\x14\x13\x12\x11\x10"
10049                           "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
10050                           "\x07\x06\x05\x04\x03\x02\x01\x00",
10051                 .klen   = 32,
10052                 .input  = "\x0f\x0e\x0d\x0c\x0b\x0a\x09\x08"
10053                           "\x07\x06\x05\x04\x03\x02\x01\x00",
10054                 .ilen   = 16,
10055                 .result = "\x5c\xe7\x1c\x70\xd2\x88\x2e\x5b"
10056                           "\xb8\x32\xe4\x33\xf8\x9f\x26\xde",
10057                 .rlen   = 16,
10058         },
10059 };
10060
10061
10062 static struct cipher_testvec serpent_dec_tv_template[] = {
10063         {
10064                 .input  = "\x12\x07\xfc\xce\x9b\xd0\xd6\x47"
10065                           "\x6a\xe9\x8f\xbe\xd1\x43\xa0\xe2",
10066                 .ilen   = 16,
10067                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10068                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10069                 .rlen   = 16,
10070         }, {
10071                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
10072                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10073                 .klen   = 16,
10074                 .input  = "\x4c\x7d\x8a\x32\x80\x72\xa2\x2c"
10075                           "\x82\x3e\x4a\x1f\x3a\xcd\xa1\x6d",
10076                 .ilen   = 16,
10077                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10078                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10079                 .rlen   = 16,
10080         }, {
10081                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
10082                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10083                           "\x10\x11\x12\x13\x14\x15\x16\x17"
10084                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10085                 .klen   = 32,
10086                 .input  = "\xde\x26\x9f\xf8\x33\xe4\x32\xb8"
10087                           "\x5b\x2e\x88\xd2\x70\x1c\xe7\x5c",
10088                 .ilen   = 16,
10089                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10090                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10091                 .rlen   = 16,
10092         }, {
10093                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10094                 .klen   = 16,
10095                 .input  = "\xdd\xd2\x6b\x98\xa5\xff\xd8\x2c"
10096                           "\x05\x34\x5a\x9d\xad\xbf\xaf\x49",
10097                 .ilen   = 16,
10098                 .result = zeroed_string,
10099                 .rlen   = 16,
10100         }, { /* Generated with Crypto++ */
10101                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10102                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10103                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10104                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10105                 .klen   = 32,
10106                 .input  = "\xFB\xB0\x5D\xDE\xC0\xFE\xFC\xEB"
10107                           "\xB1\x80\x10\x43\xDE\x62\x70\xBD"
10108                           "\xFA\x8A\x93\xEA\x6B\xF7\xC5\xD7"
10109                           "\x0C\xD1\xBB\x29\x25\x14\x4C\x22"
10110                           "\x77\xA6\x38\x00\xDB\xB9\xE2\x07"
10111                           "\xD1\xAC\x82\xBA\xEA\x67\xAA\x39"
10112                           "\x99\x34\x89\x5B\x54\xE9\x12\x13"
10113                           "\x3B\x04\xE5\x12\x42\xC5\x79\xAB"
10114                           "\x0D\xC7\x3C\x58\x2D\xA3\x98\xF6"
10115                           "\xE4\x61\x9E\x17\x0B\xCE\xE8\xAA"
10116                           "\xB5\x6C\x1A\x3A\x67\x52\x81\x6A"
10117                           "\x04\xFF\x8A\x1B\x96\xFE\xE6\x87"
10118                           "\x3C\xD4\x39\x7D\x36\x9B\x03\xD5"
10119                           "\xB6\xA0\x75\x3C\x83\xE6\x1C\x73"
10120                           "\x9D\x74\x2B\x77\x53\x2D\xE5\xBD"
10121                           "\x69\xDA\x7A\x01\xF5\x6A\x70\x39"
10122                           "\x30\xD4\x2C\xF2\x8E\x06\x4B\x39"
10123                           "\xB3\x12\x1D\xB3\x17\x46\xE6\xD6"
10124                           "\xB6\x31\x36\x34\x38\x3C\x1D\x69"
10125                           "\x9F\x47\x28\x9A\x1D\x96\x70\x54"
10126                           "\x8E\x88\xCB\xE0\xF5\x6A\xAE\x0A"
10127                           "\x3C\xD5\x93\x1C\x21\xC9\x14\x3A"
10128                           "\x23\x9C\x9B\x79\xC7\x75\xC8\x39"
10129                           "\xA6\xAC\x65\x9A\x99\x37\xAF\x6D"
10130                           "\xBD\xB5\x32\xFD\xD8\x9C\x95\x7B"
10131                           "\xC6\x6A\x80\x64\xEA\xEF\x6D\x3F"
10132                           "\xA9\xFE\x5B\x16\xA3\xCF\x32\xC8"
10133                           "\xEF\x50\x22\x20\x93\x30\xBE\xE2"
10134                           "\x38\x05\x65\xAF\xBA\xB6\xE4\x72"
10135                           "\xA9\xEE\x05\x42\x88\xBD\x9D\x49"
10136                           "\xAD\x93\xCA\x4D\x45\x11\x43\x4D"
10137                           "\xB8\xF5\x74\x2B\x48\xE7\x21\xE4"
10138                           "\x4E\x3A\x4C\xDE\x65\x7A\x5A\xAD"
10139                           "\x86\xE6\x23\xEC\x6B\xA7\x17\xE6"
10140                           "\xF6\xA1\xAC\x29\xAE\xF9\x9B\x69"
10141                           "\x73\x65\x65\x51\xD6\x0B\x4E\x8C"
10142                           "\x17\x15\x9D\xB0\xCF\xB2\x42\x2B"
10143                           "\x51\xC3\x03\xE8\xB7\x7D\x2D\x39"
10144                           "\xE8\x10\x93\x16\xC8\x68\x4C\x60"
10145                           "\x87\x70\x14\xD0\x01\x57\xCB\x42"
10146                           "\x13\x59\xB1\x7F\x12\x4F\xBB\xC7"
10147                           "\xBD\x2B\xD4\xA9\x12\x26\x4F\xDE"
10148                           "\xFD\x72\xEC\xD7\x6F\x97\x14\x90"
10149                           "\x0E\x37\x13\xE6\x67\x1D\xE5\xFE"
10150                           "\x9E\x18\x3C\x8F\x3A\x3F\x59\x9B"
10151                           "\x71\x80\x05\x35\x3F\x40\x0B\x21"
10152                           "\x76\xE5\xEF\x42\x6C\xDB\x31\x05"
10153                           "\x5F\x05\xCF\x14\xE3\xF0\x61\xA2"
10154                           "\x49\x03\x5E\x77\x2E\x20\xBA\xA1"
10155                           "\xAF\x46\x51\xC0\x2B\xC4\x64\x1E"
10156                           "\x65\xCC\x51\x58\x0A\xDF\xF0\x5F"
10157                           "\x75\x9F\x48\xCD\x81\xEC\xC3\xF6"
10158                           "\xED\xC9\x4B\x7B\x4E\x26\x23\xE1"
10159                           "\xBB\xE9\x83\x0B\xCF\xE4\xDE\x00"
10160                           "\x48\xFF\xBF\x6C\xB4\x72\x16\xEF"
10161                           "\xC7\x46\xEE\x48\x8C\xB8\xAF\x45"
10162                           "\x91\x76\xE7\x6E\x65\x3D\x15\x86"
10163                           "\x10\xF8\xDB\x66\x97\x7C\x43\x4D"
10164                           "\x79\x12\x4E\xCE\x06\xD1\xD1\x6A"
10165                           "\x34\xC1\xC9\xF2\x28\x4A\xCD\x02"
10166                           "\x75\x55\x9B\xFF\x36\x73\xAB\x7C"
10167                           "\xF4\x46\x2E\xEB\xAC\xF3\xD2\xB7",
10168                 .ilen   = 496,
10169                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10170                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10171                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10172                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10173                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10174                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10175                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10176                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10177                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10178                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10179                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10180                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10181                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10182                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10183                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10184                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10185                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10186                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10187                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10188                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10189                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10190                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10191                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10192                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10193                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10194                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10195                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10196                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10197                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10198                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10199                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10200                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10201                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10202                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10203                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10204                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10205                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10206                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10207                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10208                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10209                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10210                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10211                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10212                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10213                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10214                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10215                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10216                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10217                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10218                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10219                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10220                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10221                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10222                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10223                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10224                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10225                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10226                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10227                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10228                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10229                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10230                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10231                 .rlen   = 496,
10232                 .also_non_np = 1,
10233                 .np     = 3,
10234                 .tap    = { 496 - 20, 4, 16 },
10235         },
10236 };
10237
10238 static struct cipher_testvec tnepres_dec_tv_template[] = {
10239         {
10240                 .input  = "\x41\xcc\x6b\x31\x59\x31\x45\x97"
10241                           "\x6d\x6f\xbb\x38\x4b\x37\x21\x28",
10242                 .ilen   = 16,
10243                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10244                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10245                 .rlen   = 16,
10246         }, {
10247                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
10248                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10249                 .klen   = 16,
10250                 .input  = "\xea\xf4\xd7\xfc\xd8\x01\x34\x47"
10251                           "\x81\x45\x0b\xfa\x0c\xd6\xad\x6e",
10252                 .ilen   = 16,
10253                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10254                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10255                 .rlen   = 16,
10256         }, {
10257                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
10258                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
10259                           "\x10\x11\x12\x13\x14\x15\x16\x17"
10260                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
10261                 .klen   = 32,
10262                 .input  = "\x64\xa9\x1a\x37\xed\x9f\xe7\x49"
10263                           "\xa8\x4e\x76\xd6\xf5\x0d\x78\xee",
10264                 .ilen   = 16,
10265                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
10266                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
10267                 .rlen   = 16,
10268         }, { /* KeySize=128, I=121 */
10269                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x80",
10270                 .klen   = 16,
10271                 .input  = "\x3d\xda\xbf\xc0\x06\xda\xab\x06"
10272                           "\x46\x2a\xf4\xef\x81\x54\x4e\x26",
10273                 .ilen   = 16,
10274                 .result = zeroed_string,
10275                 .rlen   = 16,
10276         },
10277 };
10278
10279 static struct cipher_testvec serpent_cbc_enc_tv_template[] = {
10280         { /* Generated with Crypto++ */
10281                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10282                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10283                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10284                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10285                 .klen   = 32,
10286                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10287                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10288                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10289                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10290                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10291                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10292                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10293                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10294                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10295                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10296                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10297                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10298                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10299                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10300                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10301                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10302                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10303                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10304                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10305                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10306                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10307                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10308                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10309                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10310                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10311                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10312                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10313                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10314                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10315                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10316                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10317                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10318                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10319                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10320                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10321                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10322                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10323                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10324                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10325                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10326                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10327                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10328                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10329                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10330                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10331                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10332                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10333                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10334                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10335                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10336                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10337                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10338                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10339                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10340                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10341                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10342                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10343                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10344                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10345                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10346                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10347                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10348                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10349                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10350                 .ilen   = 496,
10351                 .result = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10352                           "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10353                           "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10354                           "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10355                           "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10356                           "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10357                           "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10358                           "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10359                           "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10360                           "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10361                           "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10362                           "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10363                           "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10364                           "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10365                           "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10366                           "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10367                           "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
10368                           "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10369                           "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10370                           "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10371                           "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10372                           "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10373                           "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10374                           "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10375                           "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10376                           "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10377                           "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10378                           "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10379                           "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10380                           "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10381                           "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10382                           "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10383                           "\x81\x92\x66\x67\x15\x1E\x39\x98"
10384                           "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10385                           "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10386                           "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10387                           "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10388                           "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10389                           "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10390                           "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10391                           "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10392                           "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10393                           "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10394                           "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10395                           "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10396                           "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10397                           "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10398                           "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10399                           "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10400                           "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10401                           "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10402                           "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10403                           "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10404                           "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10405                           "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10406                           "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10407                           "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10408                           "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10409                           "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10410                           "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10411                           "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10412                           "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10413                 .rlen   = 496,
10414                 .also_non_np = 1,
10415                 .np     = 3,
10416                 .tap    = { 496 - 20, 4, 16 },
10417         },
10418 };
10419
10420 static struct cipher_testvec serpent_cbc_dec_tv_template[] = {
10421         { /* Generated with Crypto++ */
10422                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10423                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10424                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10425                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10426                 .klen   = 32,
10427                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10428                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10429                 .input  = "\x80\xCF\x11\x41\x1A\xB9\x4B\x9C"
10430                           "\xFF\xB7\x6C\xEA\xF0\xAF\x77\x6E"
10431                           "\x71\x75\x95\x9D\x4E\x1C\xCF\xAD"
10432                           "\x81\x34\xE9\x8F\xAE\x5A\x91\x1C"
10433                           "\x38\x63\x35\x7E\x79\x18\x0A\xE8"
10434                           "\x67\x06\x76\xD5\xFF\x22\x2F\xDA"
10435                           "\xB6\x2D\x57\x13\xB6\x3C\xBC\x97"
10436                           "\xFE\x53\x75\x35\x97\x7F\x51\xEA"
10437                           "\xDF\x5D\xE8\x9D\xCC\xD9\xAE\xE7"
10438                           "\x62\x67\xFF\x04\xC2\x18\x22\x5F"
10439                           "\x2E\x06\xC1\xE2\x26\xCD\xC6\x1E"
10440                           "\xE5\x2C\x4E\x87\x23\xDD\xF0\x41"
10441                           "\x08\xA5\xB4\x3E\x07\x1E\x0B\xBB"
10442                           "\x72\x84\xF8\x0A\x3F\x38\x5E\x91"
10443                           "\x15\x26\xE1\xDB\xA4\x3D\x74\xD2"
10444                           "\x41\x1E\x3F\xA9\xC6\x7D\x2A\xAB"
10445                           "\x27\xDF\x89\x1D\x86\x3E\xF7\x5A"
10446                           "\xF6\xE3\x0F\xC7\x6B\x4C\x96\x7C"
10447                           "\x2D\x12\xA5\x05\x92\xCB\xD7\x4A"
10448                           "\x4D\x1E\x88\x21\xE1\x63\xB4\xFC"
10449                           "\x4A\xF2\xCD\x35\xB9\xD7\x70\x97"
10450                           "\x5A\x5E\x7E\x96\x52\x20\xDC\x25"
10451                           "\xE9\x6B\x36\xB4\xE0\x98\x85\x2C"
10452                           "\x3C\xD2\xF7\x78\x8A\x73\x26\x9B"
10453                           "\xAF\x0B\x11\xE8\x4D\x67\x23\xE9"
10454                           "\x77\xDF\x58\xF6\x6F\x9E\xA4\xC5"
10455                           "\x10\xA1\x82\x0E\x80\xA0\x8F\x4B"
10456                           "\xA1\xC0\x12\x54\x4E\xC9\x20\x92"
10457                           "\x11\x00\x10\x4E\xB3\x7C\xCA\x63"
10458                           "\xE5\x3F\xD3\x41\x37\xCD\x74\xB7"
10459                           "\xA5\x7C\x61\xB8\x0B\x7A\x7F\x4D"
10460                           "\xFE\x96\x7D\x1B\xBE\x60\x37\xB7"
10461                           "\x81\x92\x66\x67\x15\x1E\x39\x98"
10462                           "\x52\xC0\xF4\x69\xC0\x99\x4F\x5A"
10463                           "\x2E\x32\xAD\x7C\x8B\xE9\xAD\x05"
10464                           "\x55\xF9\x0A\x1F\x97\x5C\xFA\x2B"
10465                           "\xF4\x99\x76\x3A\x6E\x4D\xE1\x4C"
10466                           "\x14\x4E\x6F\x87\xEE\x1A\x85\xA3"
10467                           "\x96\xC6\x66\x49\xDA\x0D\x71\xAC"
10468                           "\x04\x05\x46\xD3\x90\x0F\x64\x64"
10469                           "\x01\x66\x2C\x62\x5D\x34\xD1\xCB"
10470                           "\x3A\x24\xCE\x95\xEF\xAE\x2C\x97"
10471                           "\x0E\x0C\x1D\x36\x49\xEB\xE9\x3D"
10472                           "\x62\xA6\x19\x28\x9E\x26\xB4\x3F"
10473                           "\xD7\x55\x42\x3C\xCD\x72\x0A\xF0"
10474                           "\x7D\xE9\x95\x45\x86\xED\xB1\xE0"
10475                           "\x8D\xE9\xC5\x86\x13\x24\x28\x7D"
10476                           "\x74\xEF\xCA\x50\x12\x7E\x64\x8F"
10477                           "\x1B\xF5\x5B\xFE\xE2\xAC\xFA\xE7"
10478                           "\xBD\x38\x8C\x11\x20\xEF\xB1\xAA"
10479                           "\x7B\xE5\xE5\x78\xAD\x9D\x2D\xA2"
10480                           "\x8E\xDD\x48\xB3\xEF\x18\x92\x7E"
10481                           "\xE6\x75\x0D\x54\x64\x11\xA3\x3A"
10482                           "\xDB\x97\x0F\xD3\xDF\x07\xD3\x7E"
10483                           "\x1E\xD1\x87\xE4\x74\xBB\x46\xF4"
10484                           "\xBA\x23\x2D\x8D\x29\x07\x12\xCF"
10485                           "\x34\xCD\x72\x7F\x01\x30\xE7\xA0"
10486                           "\xF8\xDD\xA8\x08\xF0\xBC\xB1\xA2"
10487                           "\xCC\xE1\x6B\x5F\xBE\xEA\xF1\xE4"
10488                           "\x02\xC4\xAF\xFA\xAD\x31\xF4\xBF"
10489                           "\xFC\x66\xAA\x37\xF2\x37\x39\x6B"
10490                           "\xBC\x08\x3A\xA2\x29\xB3\xDF\xD1",
10491                 .ilen   = 496,
10492                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10493                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10494                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10495                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10496                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10497                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10498                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10499                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10500                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10501                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10502                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10503                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10504                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10505                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10506                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10507                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10508                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10509                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10510                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10511                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10512                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10513                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10514                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10515                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10516                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10517                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10518                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10519                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10520                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10521                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10522                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10523                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10524                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10525                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10526                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10527                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10528                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10529                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10530                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10531                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10532                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10533                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10534                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10535                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10536                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10537                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10538                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10539                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10540                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10541                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10542                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10543                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10544                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10545                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10546                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10547                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10548                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10549                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10550                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10551                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10552                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10553                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10554                 .rlen   = 496,
10555                 .also_non_np = 1,
10556                 .np     = 3,
10557                 .tap    = { 496 - 20, 4, 16 },
10558         },
10559 };
10560
10561 static struct cipher_testvec serpent_ctr_enc_tv_template[] = {
10562         { /* Generated with Crypto++ */
10563                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10564                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10565                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10566                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10567                 .klen   = 32,
10568                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10569                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10570                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10571                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10572                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10573                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10574                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10575                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10576                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10577                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10578                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10579                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10580                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10581                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10582                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10583                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10584                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10585                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10586                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10587                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10588                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10589                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10590                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10591                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10592                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10593                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10594                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10595                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10596                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10597                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10598                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10599                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10600                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10601                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10602                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10603                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10604                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10605                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10606                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10607                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10608                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10609                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10610                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10611                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10612                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10613                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10614                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10615                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10616                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10617                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10618                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10619                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10620                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10621                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10622                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10623                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10624                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10625                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10626                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10627                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10628                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10629                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10630                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10631                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10632                 .ilen   = 496,
10633                 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10634                           "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10635                           "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10636                           "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10637                           "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10638                           "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10639                           "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10640                           "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10641                           "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10642                           "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10643                           "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10644                           "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10645                           "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10646                           "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10647                           "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10648                           "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10649                           "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
10650                           "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10651                           "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10652                           "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10653                           "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10654                           "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10655                           "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10656                           "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10657                           "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10658                           "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10659                           "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10660                           "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10661                           "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10662                           "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10663                           "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10664                           "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10665                           "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10666                           "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10667                           "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10668                           "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10669                           "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10670                           "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10671                           "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10672                           "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10673                           "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10674                           "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10675                           "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10676                           "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10677                           "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10678                           "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10679                           "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10680                           "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10681                           "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10682                           "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10683                           "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10684                           "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10685                           "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10686                           "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10687                           "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10688                           "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10689                           "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10690                           "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10691                           "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10692                           "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10693                           "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10694                           "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
10695                 .rlen   = 496,
10696         }, { /* Generated with Crypto++ */
10697                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10698                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10699                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10700                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10701                 .klen   = 32,
10702                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10703                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10704                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10705                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10706                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10707                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10708                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10709                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10710                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10711                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10712                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10713                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10714                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10715                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10716                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10717                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10718                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10719                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10720                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10721                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10722                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10723                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10724                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10725                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10726                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10727                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10728                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10729                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10730                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10731                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10732                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10733                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10734                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10735                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10736                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10737                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10738                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10739                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10740                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10741                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10742                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10743                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10744                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10745                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10746                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10747                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10748                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10749                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10750                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10751                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10752                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10753                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10754                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10755                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10756                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10757                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10758                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10759                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10760                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10761                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10762                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10763                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10764                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10765                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
10766                           "\x2B\xC2\x59",
10767                 .ilen   = 499,
10768                 .result = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10769                           "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10770                           "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10771                           "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10772                           "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10773                           "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10774                           "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10775                           "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10776                           "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10777                           "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10778                           "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10779                           "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10780                           "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10781                           "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10782                           "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10783                           "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10784                           "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
10785                           "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10786                           "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
10787                           "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
10788                           "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
10789                           "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
10790                           "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
10791                           "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
10792                           "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
10793                           "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
10794                           "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
10795                           "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
10796                           "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
10797                           "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
10798                           "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
10799                           "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
10800                           "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
10801                           "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
10802                           "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
10803                           "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
10804                           "\x07\x97\x38\x4B\x5C\x56\x98\x67"
10805                           "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
10806                           "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
10807                           "\x18\x06\x15\x9D\x5A\x10\x13\x37"
10808                           "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
10809                           "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
10810                           "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
10811                           "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
10812                           "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
10813                           "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
10814                           "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
10815                           "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
10816                           "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
10817                           "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
10818                           "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
10819                           "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
10820                           "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
10821                           "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
10822                           "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
10823                           "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
10824                           "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
10825                           "\x90\x47\x40\x92\xE6\x69\xD1\x96"
10826                           "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
10827                           "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
10828                           "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
10829                           "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
10830                           "\x38\xE2\xE5",
10831                 .rlen   = 499,
10832                 .also_non_np = 1,
10833                 .np     = 2,
10834                 .tap    = { 499 - 16, 16 },
10835         }, { /* Generated with Crypto++ */
10836                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10837                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10838                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10839                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10840                 .klen   = 32,
10841                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
10842                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
10843                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
10844                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
10845                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
10846                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
10847                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
10848                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
10849                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
10850                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
10851                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
10852                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
10853                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
10854                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
10855                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
10856                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
10857                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
10858                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
10859                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
10860                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
10861                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
10862                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
10863                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
10864                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
10865                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
10866                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
10867                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
10868                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
10869                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
10870                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
10871                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
10872                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
10873                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
10874                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
10875                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
10876                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
10877                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
10878                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
10879                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
10880                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
10881                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
10882                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
10883                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
10884                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
10885                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
10886                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
10887                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
10888                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
10889                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
10890                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
10891                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
10892                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
10893                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
10894                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
10895                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
10896                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
10897                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
10898                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
10899                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
10900                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
10901                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
10902                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
10903                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
10904                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
10905                 .ilen   = 496,
10906                 .result = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
10907                           "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
10908                           "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
10909                           "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
10910                           "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
10911                           "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
10912                           "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
10913                           "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
10914                           "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
10915                           "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
10916                           "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
10917                           "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
10918                           "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
10919                           "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
10920                           "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
10921                           "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
10922                           "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
10923                           "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
10924                           "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
10925                           "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
10926                           "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
10927                           "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
10928                           "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
10929                           "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
10930                           "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
10931                           "\x29\x5E\x01\x47\x13\x32\x78\xBE"
10932                           "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
10933                           "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
10934                           "\x38\x35\x11\x26\x4A\xB4\x06\x32"
10935                           "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
10936                           "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
10937                           "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
10938                           "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
10939                           "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
10940                           "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
10941                           "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
10942                           "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
10943                           "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
10944                           "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
10945                           "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
10946                           "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
10947                           "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
10948                           "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
10949                           "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
10950                           "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
10951                           "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
10952                           "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
10953                           "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
10954                           "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
10955                           "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
10956                           "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
10957                           "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
10958                           "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
10959                           "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
10960                           "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
10961                           "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
10962                           "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
10963                           "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
10964                           "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
10965                           "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
10966                           "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
10967                           "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
10968                 .rlen   = 496,
10969         },
10970 };
10971
10972 static struct cipher_testvec serpent_ctr_dec_tv_template[] = {
10973         { /* Generated with Crypto++ */
10974                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
10975                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
10976                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
10977                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
10978                 .klen   = 32,
10979                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
10980                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
10981                 .input  = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
10982                           "\x37\x69\xE3\x3A\x22\x85\x48\x46"
10983                           "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
10984                           "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
10985                           "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
10986                           "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
10987                           "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
10988                           "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
10989                           "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
10990                           "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
10991                           "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
10992                           "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
10993                           "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
10994                           "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
10995                           "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
10996                           "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
10997                           "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
10998                           "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
10999                           "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
11000                           "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
11001                           "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
11002                           "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
11003                           "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
11004                           "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
11005                           "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
11006                           "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
11007                           "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
11008                           "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
11009                           "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
11010                           "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
11011                           "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
11012                           "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
11013                           "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
11014                           "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
11015                           "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
11016                           "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
11017                           "\x07\x97\x38\x4B\x5C\x56\x98\x67"
11018                           "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
11019                           "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
11020                           "\x18\x06\x15\x9D\x5A\x10\x13\x37"
11021                           "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
11022                           "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
11023                           "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
11024                           "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
11025                           "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
11026                           "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
11027                           "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
11028                           "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
11029                           "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
11030                           "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
11031                           "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
11032                           "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
11033                           "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
11034                           "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
11035                           "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
11036                           "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
11037                           "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
11038                           "\x90\x47\x40\x92\xE6\x69\xD1\x96"
11039                           "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
11040                           "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
11041                           "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11042                           "\x40\x53\x77\x8C\x15\xF8\x8D\x13",
11043                 .ilen   = 496,
11044                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11045                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11046                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11047                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11048                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11049                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11050                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11051                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11052                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11053                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11054                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11055                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11056                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11057                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11058                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11059                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11060                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11061                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11062                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11063                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11064                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11065                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11066                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11067                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11068                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11069                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11070                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11071                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11072                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11073                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11074                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11075                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11076                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11077                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11078                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11079                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11080                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11081                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11082                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11083                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11084                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11085                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11086                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11087                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11088                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11089                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11090                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11091                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11092                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11093                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11094                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11095                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11096                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11097                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11098                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11099                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11100                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11101                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11102                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11103                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11104                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11105                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11106                 .rlen   = 496,
11107         }, { /* Generated with Crypto++ */
11108                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11109                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11110                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11111                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11112                 .klen   = 32,
11113                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
11114                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
11115                 .input  = "\x84\x68\xEC\xF2\x1C\x88\x20\xCA"
11116                           "\x37\x69\xE3\x3A\x22\x85\x48\x46"
11117                           "\x70\xAA\x25\xB4\xCD\x8B\x04\x4E"
11118                           "\x8D\x15\x2B\x98\xDF\x7B\x6D\xB9"
11119                           "\xE0\x4A\x73\x00\x65\xB6\x1A\x0D"
11120                           "\x5C\x60\xDF\x34\xDC\x60\x4C\xDF"
11121                           "\xB5\x1F\x26\x8C\xDA\xC1\x11\xA8"
11122                           "\x80\xFA\x37\x7A\x89\xAA\xAE\x7B"
11123                           "\x92\x6E\xB9\xDC\xC9\x62\x4F\x88"
11124                           "\x0A\x5D\x97\x2F\x6B\xAC\x03\x7C"
11125                           "\x22\xF6\x55\x5A\xFA\x35\xA5\x17"
11126                           "\xA1\x5C\x5E\x2B\x63\x2D\xB9\x91"
11127                           "\x3E\x83\x26\x00\x4E\xD5\xBE\xCE"
11128                           "\x79\xC4\x3D\xFC\x70\xA0\xAD\x96"
11129                           "\xBA\x58\x2A\x1C\xDF\xC2\x3A\xA5"
11130                           "\x7C\xB5\x12\x89\xED\xBF\xB6\x09"
11131                           "\x13\x4F\x7D\x61\x3C\x5C\x27\xFC"
11132                           "\x5D\xE1\x4F\xA1\xEA\xB3\xCA\xB9"
11133                           "\xE6\xD0\x97\x81\xDE\xD1\xFB\x8A"
11134                           "\x30\xDB\xA3\x5D\xEC\x25\x0B\x86"
11135                           "\x71\xC8\xA7\x67\xE8\xBC\x7D\x4C"
11136                           "\xAE\x82\xD3\x73\x31\x09\xCB\xB3"
11137                           "\x4D\xD4\xC0\x8A\x2B\xFA\xA6\x55"
11138                           "\x39\x0A\xBC\x6E\x75\xAB\xC2\xE2"
11139                           "\x8A\xF2\x26\xCD\x63\x38\x35\xF7"
11140                           "\xAE\x12\x83\xCD\x8A\x9E\x7E\x4C"
11141                           "\xFE\x4D\xD7\xCE\x5C\x6E\x4C\xAF"
11142                           "\xE3\xCD\x76\xA7\x87\xA1\x54\x7C"
11143                           "\xEC\x32\xC7\x83\x2A\xFF\xF8\xEA"
11144                           "\x87\xB2\x47\xA3\x9D\xC2\x9C\xA2"
11145                           "\xB7\x2C\x7C\x1A\x24\xCB\x88\x61"
11146                           "\xFF\xA7\x1A\x16\x01\xDD\x4B\xFC"
11147                           "\x2E\xE0\x48\x67\x09\x42\xCC\x91"
11148                           "\xBE\x20\x38\xC0\x5E\x3B\x95\x00"
11149                           "\xA1\x96\x66\x0B\x8A\xE9\x9E\xF7"
11150                           "\x6B\x34\x0A\x51\xC0\x3B\xEB\x71"
11151                           "\x07\x97\x38\x4B\x5C\x56\x98\x67"
11152                           "\x78\x9C\xD0\x0E\x2B\xB5\x67\x90"
11153                           "\x75\xF8\xFE\x6D\x4E\x85\xCC\x0D"
11154                           "\x18\x06\x15\x9D\x5A\x10\x13\x37"
11155                           "\xA3\xD6\x68\xA2\xDF\x7E\xC7\x12"
11156                           "\xC9\x0D\x4D\x91\xB0\x2A\x55\xFF"
11157                           "\x6F\x73\x13\xDF\x28\xB5\x2A\x2C"
11158                           "\xE4\xFC\x20\xD9\xF1\x7A\x82\xB1"
11159                           "\xCB\x57\xB6\x3D\x8C\xF4\x8E\x27"
11160                           "\x37\xDC\x35\xF3\x79\x01\x53\xA4"
11161                           "\x7B\x37\xDE\x7C\x04\xAE\x50\xDB"
11162                           "\x9B\x1E\x8C\x07\xA7\x52\x49\x50"
11163                           "\x34\x25\x65\xDD\xA9\x8F\x7E\xBD"
11164                           "\x7A\xC9\x36\xAE\xDE\x21\x48\x64"
11165                           "\xC2\x02\xBA\xBE\x11\x1E\x3D\x9C"
11166                           "\x98\x52\xCC\x04\xBD\x5E\x61\x26"
11167                           "\x10\xD3\x21\xD9\x6E\x25\x98\x77"
11168                           "\x8E\x98\x63\xF6\xF6\x52\xFB\x13"
11169                           "\xAA\x30\xF2\xB9\xA4\x43\x53\x39"
11170                           "\x1C\x97\x07\x7E\x6B\xFF\x3D\x43"
11171                           "\xA6\x71\x6B\x66\x8F\x58\x3F\x71"
11172                           "\x90\x47\x40\x92\xE6\x69\xD1\x96"
11173                           "\x34\xB3\x3B\xE5\x43\xE4\xD5\x56"
11174                           "\xB2\xE6\x7E\x86\x7A\x12\x17\x5B"
11175                           "\x30\xF3\x9B\x0D\xFA\x57\xE4\x50"
11176                           "\x40\x53\x77\x8C\x15\xF8\x8D\x13"
11177                           "\x38\xE2\xE5",
11178                 .ilen   = 499,
11179                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11180                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11181                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11182                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11183                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11184                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11185                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11186                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11187                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11188                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11189                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11190                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11191                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11192                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11193                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11194                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11195                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11196                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11197                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11198                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11199                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11200                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11201                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11202                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11203                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11204                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11205                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11206                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11207                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11208                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11209                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11210                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11211                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11212                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11213                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11214                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11215                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11216                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11217                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11218                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11219                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11220                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11221                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11222                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11223                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11224                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11225                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11226                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11227                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11228                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11229                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11230                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11231                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11232                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11233                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11234                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11235                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11236                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11237                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11238                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11239                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11240                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
11241                           "\x2B\xC2\x59",
11242                 .rlen   = 499,
11243                 .also_non_np = 1,
11244                 .np     = 2,
11245                 .tap    = { 499 - 16, 16 },
11246         }, { /* Generated with Crypto++ */
11247                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
11248                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
11249                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
11250                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
11251                 .klen   = 32,
11252                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
11253                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
11254                 .input  = "\x06\x9A\xF8\xB4\x53\x88\x62\xFC"
11255                           "\x68\xB8\x2E\xDF\xC1\x05\x0F\x3D"
11256                           "\xAF\x4D\x95\xAE\xC4\xE9\x1C\xDC"
11257                           "\xF6\x2B\x8F\x90\x89\xF6\x7E\x1A"
11258                           "\xA6\xB9\xE4\xF4\xFA\xCA\xE5\x7E"
11259                           "\x71\x28\x06\x4F\xE8\x08\x39\xDA"
11260                           "\xA5\x0E\xC8\xC0\xB8\x16\xE5\x69"
11261                           "\xE5\xCA\xEC\x4F\x63\x2C\xC0\x9B"
11262                           "\x9F\x3E\x39\x79\xF0\xCD\x64\x35"
11263                           "\x4A\xD3\xC8\xA9\x31\xCD\x48\x5B"
11264                           "\x92\x3D\x8F\x3F\x96\xBD\xB3\x18"
11265                           "\x74\x2A\x5D\x29\x3F\x57\x8F\xE2"
11266                           "\x67\x9A\xE0\xE5\xD4\x4A\xE2\x47"
11267                           "\xBC\xF6\xEB\x14\xF3\x8C\x20\xC2"
11268                           "\x7D\xE2\x43\x81\x86\x72\x2E\xB1"
11269                           "\x39\xF6\x95\xE1\x1F\xCB\x76\x33"
11270                           "\x5B\x7D\x23\x0F\x3A\x67\x2A\x2F"
11271                           "\xB9\x37\x9D\xDD\x1F\x16\xA1\x3C"
11272                           "\x70\xFE\x52\xAA\x93\x3C\xC4\x46"
11273                           "\xB1\xE5\xFF\xDA\xAF\xE2\x84\xFE"
11274                           "\x25\x92\xB2\x63\xBD\x49\x77\xB4"
11275                           "\x22\xA4\x6A\xD5\x04\xE0\x45\x58"
11276                           "\x1C\x34\x96\x7C\x03\x0C\x13\xA2"
11277                           "\x05\x22\xE2\xCB\x5A\x35\x03\x09"
11278                           "\x40\xD2\x82\x05\xCA\x58\x73\xF2"
11279                           "\x29\x5E\x01\x47\x13\x32\x78\xBE"
11280                           "\x06\xB0\x51\xDB\x6C\x31\xA0\x1C"
11281                           "\x74\xBC\x8D\x25\xDF\xF8\x65\xD1"
11282                           "\x38\x35\x11\x26\x4A\xB4\x06\x32"
11283                           "\xFA\xD2\x07\x77\xB3\x74\x98\x80"
11284                           "\x61\x59\xA8\x9F\xF3\x6F\x2A\xBF"
11285                           "\xE6\xA5\x9A\xC4\x6B\xA6\x49\x6F"
11286                           "\xBC\x47\xD9\xFB\xC6\xEF\x25\x65"
11287                           "\x96\xAC\x9F\xE4\x81\x4B\xD8\xBA"
11288                           "\xD6\x9B\xC9\x6D\x58\x40\x81\x02"
11289                           "\x73\x44\x4E\x43\x6E\x37\xBB\x11"
11290                           "\xE3\xF9\xB8\x2F\xEC\x76\x34\xEA"
11291                           "\x90\xCD\xB7\x2E\x0E\x32\x71\xE8"
11292                           "\xBB\x4E\x0B\x98\xA4\x17\x17\x5B"
11293                           "\x07\xB5\x82\x3A\xC4\xE8\x42\x51"
11294                           "\x5A\x4C\x4E\x7D\xBF\xC4\xC0\x4F"
11295                           "\x68\xB8\xC6\x4A\x32\x6F\x0B\xD7"
11296                           "\x85\xED\x6B\xFB\x72\xD2\xA5\x8F"
11297                           "\xBF\xF9\xAC\x59\x50\xA8\x08\x70"
11298                           "\xEC\xBD\x0A\xBF\xE5\x87\xA1\xC2"
11299                           "\x92\x14\x78\xAF\xE8\xEA\x2E\xDD"
11300                           "\xC1\x03\x9A\xAA\x89\x8B\x32\x46"
11301                           "\x5B\x18\x27\xBA\x46\xAA\x64\xDE"
11302                           "\xE3\xD5\xA3\xFC\x7B\x5B\x61\xDB"
11303                           "\x7E\xDA\xEC\x30\x17\x19\xF8\x80"
11304                           "\xB5\x5E\x27\xB5\x37\x3A\x1F\x28"
11305                           "\x07\x73\xC3\x63\xCE\xFF\x8C\xFE"
11306                           "\x81\x4E\xF8\x24\xF3\xB8\xC7\xE8"
11307                           "\x16\x9A\xCC\x58\x2F\x88\x1C\x4B"
11308                           "\xBB\x33\xA2\x73\xF0\x1C\x89\x0E"
11309                           "\xDC\x34\x27\x89\x98\xCE\x1C\xA2"
11310                           "\xD8\xB8\x90\xBE\xEC\x72\x28\x13"
11311                           "\xAC\x7B\xF1\xD0\x7F\x7A\x28\x50"
11312                           "\xB7\x99\x65\x8A\xC9\xC6\x21\x34"
11313                           "\x7F\x67\x9D\xB7\x2C\xCC\xF5\x17"
11314                           "\x2B\x89\xAC\xB0\xD7\x1E\x47\xB0"
11315                           "\x61\xAF\xD4\x63\x6D\xB8\x2D\x20",
11316                 .ilen   = 496,
11317                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
11318                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
11319                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
11320                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
11321                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
11322                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
11323                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
11324                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
11325                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
11326                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
11327                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
11328                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
11329                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
11330                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
11331                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
11332                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
11333                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
11334                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
11335                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
11336                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
11337                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
11338                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
11339                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
11340                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
11341                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
11342                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
11343                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
11344                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
11345                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
11346                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
11347                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
11348                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
11349                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
11350                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
11351                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
11352                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
11353                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
11354                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
11355                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
11356                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
11357                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
11358                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
11359                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
11360                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
11361                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
11362                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
11363                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
11364                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
11365                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
11366                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
11367                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
11368                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
11369                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
11370                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
11371                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
11372                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
11373                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
11374                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
11375                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
11376                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
11377                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
11378                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
11379                 .rlen   = 496,
11380         },
11381 };
11382
11383 static struct cipher_testvec serpent_lrw_enc_tv_template[] = {
11384         /* Generated from AES-LRW test vectors */
11385         {
11386                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11387                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11388                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11389                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11390                 .klen   = 32,
11391                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11392                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11393                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11394                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11395                 .ilen   = 16,
11396                 .result = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11397                           "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11398                 .rlen   = 16,
11399         }, {
11400                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11401                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11402                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11403                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11404                 .klen   = 32,
11405                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11406                           "\x00\x00\x00\x00\x00\x00\x00\x02",
11407                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11408                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11409                 .ilen   = 16,
11410                 .result = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11411                           "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11412                 .rlen   = 16,
11413         }, {
11414                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11415                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11416                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11417                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11418                 .klen   = 32,
11419                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11420                           "\x00\x00\x00\x02\x00\x00\x00\x00",
11421                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11422                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11423                 .ilen   = 16,
11424                 .result = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11425                           "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11426                 .rlen   = 16,
11427         }, {
11428                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11429                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11430                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11431                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11432                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11433                 .klen   = 40,
11434                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11435                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11436                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11437                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11438                 .ilen   = 16,
11439                 .result = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11440                           "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11441                 .rlen   = 16,
11442         }, {
11443                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11444                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11445                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11446                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11447                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11448                 .klen   = 40,
11449                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11450                           "\x00\x00\x00\x02\x00\x00\x00\x00",
11451                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11452                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11453                 .ilen   = 16,
11454                 .result = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11455                           "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11456                 .rlen   = 16,
11457         }, {
11458                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11459                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11460                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11461                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11462                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11463                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11464                 .klen   = 48,
11465                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11466                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11467                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11468                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11469                 .ilen   = 16,
11470                 .result = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11471                           "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11472                 .rlen   = 16,
11473         }, {
11474                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11475                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11476                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11477                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11478                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11479                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11480                 .klen   = 48,
11481                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11482                           "\x00\x00\x00\x02\x00\x00\x00\x00",
11483                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
11484                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11485                 .ilen   = 16,
11486                 .result = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11487                           "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11488                 .rlen   = 16,
11489         }, {
11490                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11491                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11492                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11493                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11494                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11495                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11496                 .klen   = 48,
11497                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11498                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11499                 .input  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11500                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11501                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11502                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11503                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11504                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11505                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11506                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11507                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11508                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11509                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11510                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11511                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11512                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11513                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11514                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11515                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11516                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11517                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11518                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11519                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11520                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11521                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11522                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11523                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11524                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11525                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11526                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11527                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11528                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11529                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11530                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11531                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11532                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11533                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11534                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11535                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11536                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11537                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11538                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11539                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11540                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11541                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11542                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11543                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11544                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11545                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11546                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11547                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11548                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11549                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11550                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11551                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11552                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11553                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11554                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11555                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11556                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11557                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11558                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11559                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11560                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11561                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11562                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11563                 .ilen   = 512,
11564                 .result = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11565                           "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11566                           "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11567                           "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11568                           "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11569                           "\xce\xab\xda\x33\x30\x20\x12\xfa"
11570                           "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11571                           "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11572                           "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11573                           "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11574                           "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11575                           "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11576                           "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11577                           "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11578                           "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11579                           "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11580                           "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11581                           "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11582                           "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11583                           "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11584                           "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11585                           "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11586                           "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11587                           "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11588                           "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11589                           "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11590                           "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11591                           "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11592                           "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11593                           "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11594                           "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11595                           "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11596                           "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11597                           "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11598                           "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11599                           "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11600                           "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11601                           "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11602                           "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11603                           "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11604                           "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11605                           "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11606                           "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11607                           "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11608                           "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11609                           "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11610                           "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11611                           "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11612                           "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11613                           "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11614                           "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11615                           "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11616                           "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11617                           "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11618                           "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11619                           "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11620                           "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11621                           "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11622                           "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11623                           "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11624                           "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11625                           "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11626                           "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11627                           "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11628                 .rlen   = 512,
11629                 .also_non_np = 1,
11630                 .np     = 3,
11631                 .tap    = { 512 - 20, 4, 16 },
11632         },
11633 };
11634
11635 static struct cipher_testvec serpent_lrw_dec_tv_template[] = {
11636         /* Generated from AES-LRW test vectors */
11637         /* same as enc vectors with input and result reversed */
11638         {
11639                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
11640                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
11641                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
11642                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
11643                 .klen   = 32,
11644                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11645                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11646                 .input  = "\x6f\xbf\xd4\xa4\x5d\x71\x16\x79"
11647                           "\x63\x9c\xa6\x8e\x40\xbe\x0d\x8a",
11648                 .ilen   = 16,
11649                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11650                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11651                 .rlen   = 16,
11652         }, {
11653                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
11654                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
11655                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
11656                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
11657                 .klen   = 32,
11658                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11659                           "\x00\x00\x00\x00\x00\x00\x00\x02",
11660                 .input  = "\xfd\xb2\x66\x98\x80\x96\x55\xad"
11661                           "\x08\x94\x54\x9c\x21\x7c\x69\xe3",
11662                 .ilen   = 16,
11663                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11664                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11665                 .rlen   = 16,
11666         }, {
11667                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
11668                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
11669                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
11670                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
11671                 .klen   = 32,
11672                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11673                           "\x00\x00\x00\x02\x00\x00\x00\x00",
11674                 .input  = "\x14\x5e\x3d\x70\xc0\x6e\x9c\x34"
11675                           "\x5b\x5e\xcf\x0f\xe4\x8c\x21\x5c",
11676                 .ilen   = 16,
11677                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11678                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11679                 .rlen   = 16,
11680         }, {
11681                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
11682                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
11683                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
11684                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
11685                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
11686                 .klen   = 40,
11687                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11688                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11689                 .input  = "\x25\x39\xaa\xa5\xf0\x65\xc8\xdc"
11690                           "\x5d\x45\x95\x30\x8f\xff\x2f\x1b",
11691                 .ilen   = 16,
11692                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11693                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11694                 .rlen   = 16,
11695         }, {
11696                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
11697                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
11698                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
11699                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
11700                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
11701                 .klen   = 40,
11702                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11703                           "\x00\x00\x00\x02\x00\x00\x00\x00",
11704                 .input  = "\x0c\x20\x20\x63\xd6\x8b\xfc\x8f"
11705                           "\xc0\xe2\x17\xbb\xd2\x59\x6f\x26",
11706                 .ilen   = 16,
11707                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11708                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11709                 .rlen   = 16,
11710         }, {
11711                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11712                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11713                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11714                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11715                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11716                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11717                 .klen   = 48,
11718                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11719                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11720                 .input  = "\xc1\x35\x2e\x53\xf0\x96\x4d\x9c"
11721                           "\x2e\x18\xe6\x99\xcd\xd3\x15\x68",
11722                 .ilen   = 16,
11723                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11724                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11725                 .rlen   = 16,
11726         }, {
11727                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
11728                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
11729                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
11730                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
11731                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
11732                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
11733                 .klen   = 48,
11734                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11735                           "\x00\x00\x00\x02\x00\x00\x00\x00",
11736                 .input  = "\x86\x0a\xc6\xa9\x1a\x9f\xe7\xe6"
11737                           "\x64\x3b\x33\xd6\xd5\x84\xd6\xdf",
11738                 .ilen   = 16,
11739                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
11740                           "\x38\x39\x41\x42\x43\x44\x45\x46",
11741                 .rlen   = 16,
11742         }, {
11743                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
11744                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
11745                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
11746                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
11747                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
11748                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
11749                 .klen   = 48,
11750                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11751                           "\x00\x00\x00\x00\x00\x00\x00\x01",
11752                 .input  = "\xe3\x5a\x38\x0f\x4d\x92\x3a\x74"
11753                           "\x15\xb1\x50\x8c\x9a\xd8\x99\x1d"
11754                           "\x82\xec\xf1\x5f\x03\x6d\x02\x58"
11755                           "\x90\x67\xfc\xdd\x8d\xe1\x38\x08"
11756                           "\x7b\xc9\x9b\x4b\x04\x09\x50\x15"
11757                           "\xce\xab\xda\x33\x30\x20\x12\xfa"
11758                           "\x83\xc4\xa6\x9a\x2e\x7d\x90\xd9"
11759                           "\xa6\xa6\x67\x43\xb4\xa7\xa8\x5c"
11760                           "\xbb\x6a\x49\x2b\x8b\xf8\xd0\x22"
11761                           "\xe5\x9e\xba\xe8\x8c\x67\xb8\x5b"
11762                           "\x60\xbc\xf5\xa4\x95\x4e\x66\xe5"
11763                           "\x6d\x8e\xa9\xf6\x65\x2e\x04\xf5"
11764                           "\xba\xb5\xdb\x88\xc2\xf6\x7a\x4b"
11765                           "\x89\x58\x7c\x9a\xae\x26\xe8\xb7"
11766                           "\xb7\x28\xcc\xd6\xcc\xa5\x98\x4d"
11767                           "\xb9\x91\xcb\xb4\xe4\x8b\x96\x47"
11768                           "\x5f\x03\x8b\xdd\x94\xd1\xee\x12"
11769                           "\xa7\x83\x80\xf2\xc1\x15\x74\x4f"
11770                           "\x49\xf9\xb0\x7e\x6f\xdc\x73\x2f"
11771                           "\xe2\xcf\xe0\x1b\x34\xa5\xa0\x52"
11772                           "\xfb\x3c\x5d\x85\x91\xe6\x6d\x98"
11773                           "\x04\xd6\xdd\x4c\x00\x64\xd9\x54"
11774                           "\x5c\x3c\x08\x1d\x4c\x06\x9f\xb8"
11775                           "\x1c\x4d\x8d\xdc\xa4\x3c\xb9\x3b"
11776                           "\x9e\x85\xce\xc3\xa8\x4a\x0c\xd9"
11777                           "\x04\xc3\x6f\x17\x66\xa9\x1f\x59"
11778                           "\xd9\xe2\x19\x36\xa3\x88\xb8\x0b"
11779                           "\x0f\x4a\x4d\xf8\xc8\x6f\xd5\x43"
11780                           "\xeb\xa0\xab\x1f\x61\xc0\x06\xeb"
11781                           "\x93\xb7\xb8\x6f\x0d\xbd\x07\x49"
11782                           "\xb3\xac\x5d\xcf\x31\xa0\x27\x26"
11783                           "\x21\xbe\x94\x2e\x19\xea\xf4\xee"
11784                           "\xb5\x13\x89\xf7\x94\x0b\xef\x59"
11785                           "\x44\xc5\x78\x8b\x3c\x3b\x71\x20"
11786                           "\xf9\x35\x0c\x70\x74\xdc\x5b\xc2"
11787                           "\xb4\x11\x0e\x2c\x61\xa1\x52\x46"
11788                           "\x18\x11\x16\xc6\x86\x44\xa7\xaf"
11789                           "\xd5\x0c\x7d\xa6\x9e\x25\x2d\x1b"
11790                           "\x9a\x8f\x0f\xf8\x6a\x61\xa0\xea"
11791                           "\x3f\x0e\x90\xd6\x8f\x83\x30\x64"
11792                           "\xb5\x51\x2d\x08\x3c\xcd\x99\x36"
11793                           "\x96\xd4\xb1\xb5\x48\x30\xca\x48"
11794                           "\xf7\x11\xa8\xf5\x97\x8a\x6a\x6d"
11795                           "\x12\x33\x2f\xc0\xe8\xda\xec\x8a"
11796                           "\xe1\x88\x72\x63\xde\x20\xa3\xe1"
11797                           "\x8e\xac\x84\x37\x35\xf5\xf7\x3f"
11798                           "\x00\x02\x0e\xe4\xc1\x53\x68\x3f"
11799                           "\xaa\xd5\xac\x52\x3d\x20\x2f\x4d"
11800                           "\x7c\x83\xd0\xbd\xaa\x97\x35\x36"
11801                           "\x98\x88\x59\x5d\xe7\x24\xe3\x90"
11802                           "\x9d\x30\x47\xa7\xc3\x60\x35\xf4"
11803                           "\xd5\xdb\x0e\x4d\x44\xc1\x81\x8b"
11804                           "\xfd\xbd\xc3\x2b\xba\x68\xfe\x8d"
11805                           "\x49\x5a\x3c\x8a\xa3\x01\xae\x25"
11806                           "\x42\xab\xd2\x87\x1b\x35\xd6\xd2"
11807                           "\xd7\x70\x1c\x1f\x72\xd1\xe1\x39"
11808                           "\x1c\x58\xa2\xb4\xd0\x78\x55\x72"
11809                           "\x76\x59\xea\xd9\xd7\x6e\x63\x8b"
11810                           "\xcc\x9b\xa7\x74\x89\xfc\xa3\x68"
11811                           "\x86\x28\xd1\xbb\x54\x8d\x66\xad"
11812                           "\x2a\x92\xf9\x4e\x04\x3d\xae\xfd"
11813                           "\x1b\x2b\x7f\xc3\x2f\x1a\x78\x0a"
11814                           "\x5c\xc6\x84\xfe\x7c\xcb\x26\xfd"
11815                           "\xd9\x51\x0f\xd7\x94\x2f\xc5\xa7",
11816                 .ilen   = 512,
11817                 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
11818                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
11819                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
11820                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
11821                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
11822                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
11823                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
11824                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
11825                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
11826                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
11827                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
11828                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
11829                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
11830                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
11831                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
11832                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
11833                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
11834                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
11835                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
11836                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
11837                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
11838                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
11839                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
11840                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
11841                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
11842                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
11843                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
11844                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
11845                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
11846                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
11847                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
11848                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
11849                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
11850                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
11851                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
11852                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
11853                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
11854                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
11855                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
11856                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
11857                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
11858                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
11859                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
11860                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
11861                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
11862                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
11863                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
11864                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
11865                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
11866                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
11867                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
11868                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
11869                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
11870                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
11871                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
11872                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
11873                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
11874                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
11875                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
11876                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
11877                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
11878                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
11879                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
11880                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
11881                 .rlen   = 512,
11882                 .also_non_np = 1,
11883                 .np     = 3,
11884                 .tap    = { 512 - 20, 4, 16 },
11885         },
11886 };
11887
11888 static struct cipher_testvec serpent_xts_enc_tv_template[] = {
11889         /* Generated from AES-XTS test vectors */
11890         {
11891                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
11892                           "\x00\x00\x00\x00\x00\x00\x00\x00"
11893                           "\x00\x00\x00\x00\x00\x00\x00\x00"
11894                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11895                 .klen   = 32,
11896                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11897                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11898                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
11899                           "\x00\x00\x00\x00\x00\x00\x00\x00"
11900                           "\x00\x00\x00\x00\x00\x00\x00\x00"
11901                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11902                 .ilen   = 32,
11903                 .result = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
11904                           "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
11905                           "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
11906                           "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
11907                 .rlen   = 32,
11908         }, {
11909                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
11910                           "\x11\x11\x11\x11\x11\x11\x11\x11"
11911                           "\x22\x22\x22\x22\x22\x22\x22\x22"
11912                           "\x22\x22\x22\x22\x22\x22\x22\x22",
11913                 .klen   = 32,
11914                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
11915                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11916                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
11917                           "\x44\x44\x44\x44\x44\x44\x44\x44"
11918                           "\x44\x44\x44\x44\x44\x44\x44\x44"
11919                           "\x44\x44\x44\x44\x44\x44\x44\x44",
11920                 .ilen   = 32,
11921                 .result = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
11922                           "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
11923                           "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
11924                           "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
11925                 .rlen   = 32,
11926         }, {
11927                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
11928                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
11929                           "\x22\x22\x22\x22\x22\x22\x22\x22"
11930                           "\x22\x22\x22\x22\x22\x22\x22\x22",
11931                 .klen   = 32,
11932                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
11933                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11934                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
11935                           "\x44\x44\x44\x44\x44\x44\x44\x44"
11936                           "\x44\x44\x44\x44\x44\x44\x44\x44"
11937                           "\x44\x44\x44\x44\x44\x44\x44\x44",
11938                 .ilen   = 32,
11939                 .result = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
11940                           "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
11941                           "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
11942                           "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
11943                 .rlen   = 32,
11944         }, {
11945                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
11946                           "\x23\x53\x60\x28\x74\x71\x35\x26"
11947                           "\x31\x41\x59\x26\x53\x58\x97\x93"
11948                           "\x23\x84\x62\x64\x33\x83\x27\x95",
11949                 .klen   = 32,
11950                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
11951                           "\x00\x00\x00\x00\x00\x00\x00\x00",
11952                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
11953                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11954                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11955                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11956                           "\x20\x21\x22\x23\x24\x25\x26\x27"
11957                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11958                           "\x30\x31\x32\x33\x34\x35\x36\x37"
11959                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11960                           "\x40\x41\x42\x43\x44\x45\x46\x47"
11961                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11962                           "\x50\x51\x52\x53\x54\x55\x56\x57"
11963                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11964                           "\x60\x61\x62\x63\x64\x65\x66\x67"
11965                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11966                           "\x70\x71\x72\x73\x74\x75\x76\x77"
11967                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
11968                           "\x80\x81\x82\x83\x84\x85\x86\x87"
11969                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
11970                           "\x90\x91\x92\x93\x94\x95\x96\x97"
11971                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
11972                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
11973                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
11974                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
11975                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
11976                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
11977                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
11978                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
11979                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
11980                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
11981                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
11982                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
11983                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
11984                           "\x00\x01\x02\x03\x04\x05\x06\x07"
11985                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
11986                           "\x10\x11\x12\x13\x14\x15\x16\x17"
11987                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
11988                           "\x20\x21\x22\x23\x24\x25\x26\x27"
11989                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
11990                           "\x30\x31\x32\x33\x34\x35\x36\x37"
11991                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
11992                           "\x40\x41\x42\x43\x44\x45\x46\x47"
11993                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
11994                           "\x50\x51\x52\x53\x54\x55\x56\x57"
11995                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
11996                           "\x60\x61\x62\x63\x64\x65\x66\x67"
11997                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
11998                           "\x70\x71\x72\x73\x74\x75\x76\x77"
11999                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12000                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12001                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12002                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12003                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12004                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12005                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12006                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12007                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12008                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12009                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12010                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12011                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12012                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12013                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12014                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12015                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12016                 .ilen   = 512,
12017                 .result = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12018                           "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12019                           "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12020                           "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12021                           "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12022                           "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12023                           "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12024                           "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12025                           "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12026                           "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12027                           "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12028                           "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12029                           "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12030                           "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12031                           "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12032                           "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12033                           "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12034                           "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12035                           "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12036                           "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12037                           "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12038                           "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12039                           "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12040                           "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12041                           "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12042                           "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12043                           "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12044                           "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12045                           "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12046                           "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12047                           "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12048                           "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12049                           "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12050                           "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12051                           "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12052                           "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12053                           "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12054                           "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12055                           "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12056                           "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12057                           "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12058                           "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12059                           "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12060                           "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12061                           "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12062                           "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12063                           "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12064                           "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12065                           "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12066                           "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12067                           "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12068                           "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12069                           "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12070                           "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12071                           "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12072                           "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12073                           "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12074                           "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12075                           "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12076                           "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12077                           "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12078                           "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12079                           "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12080                           "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12081                 .rlen   = 512,
12082         }, {
12083                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
12084                           "\x23\x53\x60\x28\x74\x71\x35\x26"
12085                           "\x62\x49\x77\x57\x24\x70\x93\x69"
12086                           "\x99\x59\x57\x49\x66\x96\x76\x27"
12087                           "\x31\x41\x59\x26\x53\x58\x97\x93"
12088                           "\x23\x84\x62\x64\x33\x83\x27\x95"
12089                           "\x02\x88\x41\x97\x16\x93\x99\x37"
12090                           "\x51\x05\x82\x09\x74\x94\x45\x92",
12091                 .klen   = 64,
12092                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
12093                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12094                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
12095                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12096                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12097                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12098                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12099                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12100                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12101                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12102                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12103                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12104                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12105                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12106                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12107                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12108                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12109                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12110                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12111                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12112                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12113                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12114                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12115                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12116                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12117                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12118                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12119                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12120                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12121                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12122                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12123                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12124                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12125                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12126                           "\x00\x01\x02\x03\x04\x05\x06\x07"
12127                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12128                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12129                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12130                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12131                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12132                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12133                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12134                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12135                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12136                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12137                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12138                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12139                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12140                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12141                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12142                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12143                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12144                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12145                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12146                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12147                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12148                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12149                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12150                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12151                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12152                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12153                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12154                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12155                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12156                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12157                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12158                 .ilen   = 512,
12159                 .result = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12160                           "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12161                           "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12162                           "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12163                           "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12164                           "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12165                           "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12166                           "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12167                           "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12168                           "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12169                           "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12170                           "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12171                           "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12172                           "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12173                           "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12174                           "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12175                           "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12176                           "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12177                           "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12178                           "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12179                           "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12180                           "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12181                           "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12182                           "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12183                           "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12184                           "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12185                           "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12186                           "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12187                           "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12188                           "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12189                           "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12190                           "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12191                           "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12192                           "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12193                           "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12194                           "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12195                           "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12196                           "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12197                           "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12198                           "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12199                           "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12200                           "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12201                           "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12202                           "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12203                           "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12204                           "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12205                           "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12206                           "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12207                           "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12208                           "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12209                           "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12210                           "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12211                           "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12212                           "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12213                           "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12214                           "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12215                           "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12216                           "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12217                           "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12218                           "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12219                           "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12220                           "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12221                           "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12222                           "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12223                 .rlen   = 512,
12224                 .also_non_np = 1,
12225                 .np     = 3,
12226                 .tap    = { 512 - 20, 4, 16 },
12227         },
12228 };
12229
12230 static struct cipher_testvec serpent_xts_dec_tv_template[] = {
12231         /* Generated from AES-XTS test vectors */
12232         /* same as enc vectors with input and result reversed */
12233         {
12234                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
12235                           "\x00\x00\x00\x00\x00\x00\x00\x00"
12236                           "\x00\x00\x00\x00\x00\x00\x00\x00"
12237                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12238                 .klen   = 32,
12239                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
12240                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12241                 .input  = "\xe1\x08\xb8\x1d\x2c\xf5\x33\x64"
12242                           "\xc8\x12\x04\xc7\xb3\x70\xe8\xc4"
12243                           "\x6a\x31\xc5\xf3\x00\xca\xb9\x16"
12244                           "\xde\xe2\x77\x66\xf7\xfe\x62\x08",
12245                 .ilen   = 32,
12246                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
12247                           "\x00\x00\x00\x00\x00\x00\x00\x00"
12248                           "\x00\x00\x00\x00\x00\x00\x00\x00"
12249                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12250                 .rlen   = 32,
12251         }, {
12252                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
12253                           "\x11\x11\x11\x11\x11\x11\x11\x11"
12254                           "\x22\x22\x22\x22\x22\x22\x22\x22"
12255                           "\x22\x22\x22\x22\x22\x22\x22\x22",
12256                 .klen   = 32,
12257                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
12258                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12259                 .input  = "\x1a\x0a\x09\x5f\xcd\x07\x07\x98"
12260                           "\x41\x86\x12\xaf\xb3\xd7\x68\x13"
12261                           "\xed\x81\xcd\x06\x87\x43\x1a\xbb"
12262                           "\x13\x3d\xd6\x1e\x2b\xe1\x77\xbe",
12263                 .ilen   = 32,
12264                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12265                           "\x44\x44\x44\x44\x44\x44\x44\x44"
12266                           "\x44\x44\x44\x44\x44\x44\x44\x44"
12267                           "\x44\x44\x44\x44\x44\x44\x44\x44",
12268                 .rlen   = 32,
12269         }, {
12270                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
12271                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
12272                           "\x22\x22\x22\x22\x22\x22\x22\x22"
12273                           "\x22\x22\x22\x22\x22\x22\x22\x22",
12274                 .klen   = 32,
12275                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
12276                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12277                 .input  = "\xf9\x9b\x28\xb8\x5c\xaf\x8c\x61"
12278                           "\xb6\x1c\x81\x8f\x2c\x87\x60\x89"
12279                           "\x0d\x8d\x7a\xe8\x60\x48\xcc\x86"
12280                           "\xc1\x68\x45\xaa\x00\xe9\x24\xc5",
12281                 .ilen   = 32,
12282                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
12283                           "\x44\x44\x44\x44\x44\x44\x44\x44"
12284                           "\x44\x44\x44\x44\x44\x44\x44\x44"
12285                           "\x44\x44\x44\x44\x44\x44\x44\x44",
12286                 .rlen   = 32,
12287         }, {
12288                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
12289                           "\x23\x53\x60\x28\x74\x71\x35\x26"
12290                           "\x31\x41\x59\x26\x53\x58\x97\x93"
12291                           "\x23\x84\x62\x64\x33\x83\x27\x95",
12292                 .klen   = 32,
12293                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
12294                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12295                 .input  = "\xfe\x47\x4a\xc8\x60\x7e\xb4\x8b"
12296                           "\x0d\x10\xf4\xb0\x0d\xba\xf8\x53"
12297                           "\x65\x6e\x38\x4b\xdb\xaa\xb1\x9e"
12298                           "\x28\xca\xb0\x22\xb3\x85\x75\xf4"
12299                           "\x00\x5c\x75\x14\x06\xd6\x25\x82"
12300                           "\xe6\xcb\x08\xf7\x29\x90\x23\x8e"
12301                           "\xa4\x68\x57\xe4\xf0\xd8\x32\xf3"
12302                           "\x80\x51\x67\xb5\x0b\x85\x69\xe8"
12303                           "\x19\xfe\xc4\xc7\x3e\xea\x90\xd3"
12304                           "\x8f\xa3\xf2\x0a\xac\x17\x4b\xa0"
12305                           "\x63\x5a\x16\x0f\xf0\xce\x66\x1f"
12306                           "\x2c\x21\x07\xf1\xa4\x03\xa3\x44"
12307                           "\x41\x61\x87\x5d\x6b\xb3\xef\xd4"
12308                           "\xfc\xaa\x32\x7e\x55\x58\x04\x41"
12309                           "\xc9\x07\x33\xc6\xa2\x68\xd6\x5a"
12310                           "\x55\x79\x4b\x6f\xcf\x89\xb9\x19"
12311                           "\xe5\x54\x13\x15\xb2\x1a\xfa\x15"
12312                           "\xc2\xf0\x06\x59\xfa\xa0\x25\x05"
12313                           "\x58\xfa\x43\x91\x16\x85\x40\xbb"
12314                           "\x0d\x34\x4d\xc5\x1e\x20\xd5\x08"
12315                           "\xcd\x22\x22\x41\x11\x9f\x6c\x7c"
12316                           "\x8d\x57\xc9\xba\x57\xe8\x2c\xf7"
12317                           "\xa0\x42\xa8\xde\xfc\xa3\xca\x98"
12318                           "\x4b\x43\xb1\xce\x4b\xbf\x01\x67"
12319                           "\x6e\x29\x60\xbd\x10\x14\x84\x82"
12320                           "\x83\x82\x0c\x63\x73\x92\x02\x7c"
12321                           "\x55\x37\x20\x80\x17\x51\xc8\xbc"
12322                           "\x46\x02\xcb\x38\x07\x6d\xe2\x85"
12323                           "\xaa\x29\xaf\x24\x58\x0d\xf0\x75"
12324                           "\x08\x0a\xa5\x34\x25\x16\xf3\x74"
12325                           "\xa7\x0b\x97\xbe\xc1\xa9\xdc\x29"
12326                           "\x1a\x0a\x56\xc1\x1a\x91\x97\x8c"
12327                           "\x0b\xc7\x16\xed\x5a\x22\xa6\x2e"
12328                           "\x8c\x2b\x4f\x54\x76\x47\x53\x8e"
12329                           "\xe8\x00\xec\x92\xb9\x55\xe6\xa2"
12330                           "\xf3\xe2\x4f\x6a\x66\x60\xd0\x87"
12331                           "\xe6\xd1\xcc\xe3\x6a\xc5\x2d\x21"
12332                           "\xcc\x9d\x6a\xb6\x75\xaa\xe2\x19"
12333                           "\x21\x9f\xa1\x5e\x4c\xfd\x72\xf9"
12334                           "\x94\x4e\x63\xc7\xae\xfc\xed\x47"
12335                           "\xe2\xfe\x7a\x63\x77\xfe\x97\x82"
12336                           "\xb1\x10\x6e\x36\x1d\xe1\xc4\x80"
12337                           "\xec\x69\x41\xec\xa7\x8a\xe0\x2f"
12338                           "\xe3\x49\x26\xa2\x41\xb2\x08\x0f"
12339                           "\x28\xb4\xa7\x39\xa1\x99\x2d\x1e"
12340                           "\x43\x42\x35\xd0\xcf\xec\x77\x67"
12341                           "\xb2\x3b\x9e\x1c\x35\xde\x4f\x5e"
12342                           "\x73\x3f\x5d\x6f\x07\x4b\x2e\x50"
12343                           "\xab\x6c\x6b\xff\xea\x00\x67\xaa"
12344                           "\x0e\x82\x32\xdd\x3d\xb5\xe5\x76"
12345                           "\x2b\x77\x3f\xbe\x12\x75\xfb\x92"
12346                           "\xc6\x89\x67\x4d\xca\xf7\xd4\x50"
12347                           "\xc0\x74\x47\xcc\xd9\x0a\xd4\xc6"
12348                           "\x3b\x17\x2e\xe3\x35\xbb\x53\xb5"
12349                           "\x86\xad\x51\xcc\xd5\x96\xb8\xdc"
12350                           "\x03\x57\xe6\x98\x52\x2f\x61\x62"
12351                           "\xc4\x5c\x9c\x36\x71\x07\xfb\x94"
12352                           "\xe3\x02\xc4\x2b\x08\x75\xc7\x35"
12353                           "\xfb\x2e\x88\x7b\xbb\x67\x00\xe1"
12354                           "\xc9\xdd\x99\xb2\x13\x53\x1a\x4e"
12355                           "\x76\x87\x19\x04\x1a\x2f\x38\x3e"
12356                           "\xef\x91\x64\x1d\x18\x07\x4e\x31"
12357                           "\x88\x21\x7c\xb0\xa5\x12\x4c\x3c"
12358                           "\xb0\x20\xbd\xda\xdf\xf9\x7c\xdd",
12359                 .ilen   = 512,
12360                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12361                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12362                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12363                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12364                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12365                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12366                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12367                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12368                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12369                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12370                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12371                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12372                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12373                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12374                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12375                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12376                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12377                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12378                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12379                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12380                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12381                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12382                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12383                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12384                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12385                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12386                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12387                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12388                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12389                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12390                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12391                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12392                           "\x00\x01\x02\x03\x04\x05\x06\x07"
12393                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12394                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12395                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12396                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12397                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12398                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12399                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12400                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12401                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12402                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12403                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12404                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12405                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12406                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12407                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12408                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12409                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12410                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12411                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12412                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12413                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12414                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12415                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12416                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12417                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12418                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12419                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12420                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12421                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12422                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12423                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12424                 .rlen   = 512,
12425         }, {
12426                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
12427                           "\x23\x53\x60\x28\x74\x71\x35\x26"
12428                           "\x62\x49\x77\x57\x24\x70\x93\x69"
12429                           "\x99\x59\x57\x49\x66\x96\x76\x27"
12430                           "\x31\x41\x59\x26\x53\x58\x97\x93"
12431                           "\x23\x84\x62\x64\x33\x83\x27\x95"
12432                           "\x02\x88\x41\x97\x16\x93\x99\x37"
12433                           "\x51\x05\x82\x09\x74\x94\x45\x92",
12434                 .klen   = 64,
12435                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
12436                           "\x00\x00\x00\x00\x00\x00\x00\x00",
12437                 .input  = "\x2b\xc9\xb4\x6b\x10\x94\xa9\x32"
12438                           "\xaa\xb0\x20\xc6\x44\x3d\x74\x1f"
12439                           "\x75\x01\xa7\xf6\xf5\xf7\x62\x1b"
12440                           "\x80\x1b\x82\xcb\x01\x59\x91\x7f"
12441                           "\x80\x3a\x98\xf0\xd2\xca\xc4\xc3"
12442                           "\x34\xfd\xe6\x11\xf9\x33\x45\x12"
12443                           "\x48\xc5\x8c\x25\xf1\xc5\xc5\x23"
12444                           "\xd3\x44\xb4\x73\xd5\x04\xc0\xb7"
12445                           "\xca\x2f\xf5\xcd\xc5\xb4\xdd\xb0"
12446                           "\xf4\x60\xe8\xfb\xc6\x9c\xc5\x78"
12447                           "\xcd\xec\x7d\xdc\x19\x9c\x72\x64"
12448                           "\x63\x0b\x38\x2e\x76\xdd\x2d\x36"
12449                           "\x49\xb0\x1d\xea\x78\x9e\x00\xca"
12450                           "\x20\xcc\x1b\x1e\x98\x74\xab\xed"
12451                           "\x79\xf7\xd0\x6c\xd8\x93\x80\x29"
12452                           "\xac\xa5\x5e\x34\xa9\xab\xa0\x55"
12453                           "\x9a\xea\xaa\x95\x4d\x7b\xfe\x46"
12454                           "\x26\x8a\xfd\x88\xa2\xa8\xa6\xae"
12455                           "\x25\x42\x17\xbf\x76\x8f\x1c\x3d"
12456                           "\xec\x9a\xda\x64\x96\xb5\x61\xff"
12457                           "\x99\xeb\x12\x96\x85\x82\x9d\xd5"
12458                           "\x81\x85\x14\xa8\x59\xac\x8c\x94"
12459                           "\xbb\x3b\x85\x2b\xdf\xb3\x0c\xba"
12460                           "\x82\xc6\x4d\xca\x86\xea\x53\x28"
12461                           "\x4c\xe0\x4e\x31\xe3\x73\x2f\x79"
12462                           "\x9d\x42\xe1\x03\xe3\x8b\xc4\xff"
12463                           "\x05\xca\x81\x7b\xda\xa2\xde\x63"
12464                           "\x3a\x10\xbe\xc2\xac\x32\xc4\x05"
12465                           "\x47\x7e\xef\x67\xe2\x5f\x5b\xae"
12466                           "\xed\xf1\x70\x34\x16\x9a\x07\x7b"
12467                           "\xf2\x25\x2b\xb0\xf8\x3c\x15\x9a"
12468                           "\xa6\x59\x55\x5f\xc1\xf4\x1e\xcd"
12469                           "\x93\x1f\x06\xba\xd4\x9a\x22\x69"
12470                           "\xfa\x8e\x95\x0d\xf3\x23\x59\x2c"
12471                           "\xfe\x00\xba\xf0\x0e\xbc\x6d\xd6"
12472                           "\x62\xf0\x7a\x0e\x83\x3e\xdb\x32"
12473                           "\xfd\x43\x7d\xda\x42\x51\x87\x43"
12474                           "\x9d\xf9\xef\xf4\x30\x97\xf8\x09"
12475                           "\x88\xfc\x3f\x93\x70\xc1\x4a\xec"
12476                           "\x27\x5f\x11\xac\x71\xc7\x48\x46"
12477                           "\x2f\xf9\xdf\x8d\x9f\xf7\x2e\x56"
12478                           "\x0d\x4e\xb0\x32\x76\xce\x86\x81"
12479                           "\xcd\xdf\xe4\x00\xbf\xfd\x5f\x24"
12480                           "\xaf\xf7\x9a\xde\xff\x18\xac\x14"
12481                           "\x90\xc5\x01\x39\x34\x0f\x24\xf3"
12482                           "\x13\x2f\x5e\x4f\x30\x9a\x36\x40"
12483                           "\xec\xea\xbc\xcd\x9e\x0e\x5b\x23"
12484                           "\x50\x88\x97\x40\x69\xb1\x37\xf5"
12485                           "\xc3\x15\xf9\x3f\xb7\x79\x64\xe8"
12486                           "\x7b\x10\x20\xb9\x2b\x46\x83\x5b"
12487                           "\xd8\x39\xfc\xe4\xfa\x88\x52\xf2"
12488                           "\x72\xb0\x97\x4e\x89\xb3\x48\x00"
12489                           "\xc1\x16\x73\x50\x77\xba\xa6\x65"
12490                           "\x20\x2d\xb0\x02\x27\x89\xda\x99"
12491                           "\x45\xfb\xe9\xd3\x1d\x39\x2f\xd6"
12492                           "\x2a\xda\x09\x12\x11\xaf\xe6\x57"
12493                           "\x01\x04\x8a\xff\x86\x8b\xac\xf8"
12494                           "\xee\xe4\x1c\x98\x5b\xcf\x6b\x76"
12495                           "\xa3\x0e\x33\x74\x40\x18\x39\x72"
12496                           "\x66\x50\x31\xfd\x70\xdf\xe8\x51"
12497                           "\x96\x21\x36\xb2\x9b\xfa\x85\xd1"
12498                           "\x30\x05\xc8\x92\x98\x80\xff\x7a"
12499                           "\xaf\x43\x0b\xc5\x20\x41\x92\x20"
12500                           "\xd4\xa0\x91\x98\x11\x5f\x4d\xb1",
12501                 .ilen   = 512,
12502                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
12503                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12504                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12505                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12506                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12507                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12508                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12509                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12510                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12511                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12512                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12513                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12514                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12515                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12516                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12517                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12518                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12519                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12520                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12521                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12522                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12523                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12524                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12525                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12526                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12527                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12528                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12529                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12530                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12531                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12532                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12533                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
12534                           "\x00\x01\x02\x03\x04\x05\x06\x07"
12535                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
12536                           "\x10\x11\x12\x13\x14\x15\x16\x17"
12537                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
12538                           "\x20\x21\x22\x23\x24\x25\x26\x27"
12539                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
12540                           "\x30\x31\x32\x33\x34\x35\x36\x37"
12541                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
12542                           "\x40\x41\x42\x43\x44\x45\x46\x47"
12543                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
12544                           "\x50\x51\x52\x53\x54\x55\x56\x57"
12545                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
12546                           "\x60\x61\x62\x63\x64\x65\x66\x67"
12547                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
12548                           "\x70\x71\x72\x73\x74\x75\x76\x77"
12549                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
12550                           "\x80\x81\x82\x83\x84\x85\x86\x87"
12551                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
12552                           "\x90\x91\x92\x93\x94\x95\x96\x97"
12553                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
12554                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
12555                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
12556                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
12557                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
12558                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
12559                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
12560                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
12561                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
12562                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
12563                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
12564                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
12565                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
12566                 .rlen   = 512,
12567                 .also_non_np = 1,
12568                 .np     = 3,
12569                 .tap    = { 512 - 20, 4, 16 },
12570         },
12571 };
12572
12573 /* Cast6 test vectors from RFC 2612 */
12574 #define CAST6_ENC_TEST_VECTORS          4
12575 #define CAST6_DEC_TEST_VECTORS          4
12576 #define CAST6_CBC_ENC_TEST_VECTORS      1
12577 #define CAST6_CBC_DEC_TEST_VECTORS      1
12578 #define CAST6_CTR_ENC_TEST_VECTORS      2
12579 #define CAST6_CTR_DEC_TEST_VECTORS      2
12580 #define CAST6_LRW_ENC_TEST_VECTORS      1
12581 #define CAST6_LRW_DEC_TEST_VECTORS      1
12582 #define CAST6_XTS_ENC_TEST_VECTORS      1
12583 #define CAST6_XTS_DEC_TEST_VECTORS      1
12584
12585 static struct cipher_testvec cast6_enc_tv_template[] = {
12586         {
12587                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12588                           "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12589                 .klen   = 16,
12590                 .input  = zeroed_string,
12591                 .ilen   = 16,
12592                 .result = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12593                           "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12594                 .rlen   = 16,
12595         }, {
12596                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12597                           "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12598                           "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12599                 .klen   = 24,
12600                 .input  = zeroed_string,
12601                 .ilen   = 16,
12602                 .result = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12603                           "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12604                 .rlen   = 16,
12605         }, {
12606                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12607                           "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12608                           "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12609                           "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12610                 .klen   = 32,
12611                 .input  = zeroed_string,
12612                 .ilen   = 16,
12613                 .result = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12614                           "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12615                 .rlen   = 16,
12616         }, { /* Generated from TF test vectors */
12617                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12618                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12619                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12620                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12621                 .klen   = 32,
12622                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12623                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12624                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12625                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12626                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12627                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12628                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12629                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12630                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12631                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12632                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12633                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12634                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12635                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12636                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12637                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12638                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12639                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12640                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12641                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12642                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12643                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12644                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12645                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12646                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12647                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12648                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12649                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12650                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12651                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12652                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12653                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12654                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12655                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12656                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12657                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12658                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12659                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12660                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12661                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12662                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12663                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12664                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12665                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12666                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12667                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12668                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12669                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12670                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12671                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12672                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12673                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12674                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12675                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12676                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12677                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12678                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12679                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12680                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12681                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12682                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12683                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12684                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12685                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12686                 .ilen   = 496,
12687                 .result = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12688                           "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12689                           "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12690                           "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12691                           "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12692                           "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12693                           "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12694                           "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12695                           "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12696                           "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12697                           "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12698                           "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12699                           "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12700                           "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12701                           "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12702                           "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12703                           "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12704                           "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12705                           "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12706                           "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12707                           "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12708                           "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12709                           "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12710                           "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12711                           "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12712                           "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12713                           "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12714                           "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12715                           "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12716                           "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12717                           "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12718                           "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12719                           "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12720                           "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12721                           "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12722                           "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12723                           "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12724                           "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12725                           "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12726                           "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12727                           "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12728                           "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12729                           "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12730                           "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12731                           "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12732                           "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12733                           "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12734                           "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12735                           "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12736                           "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12737                           "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12738                           "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12739                           "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12740                           "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12741                           "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12742                           "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12743                           "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12744                           "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12745                           "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12746                           "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12747                           "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12748                           "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12749                 .rlen   = 496,
12750                 .also_non_np = 1,
12751                 .np     = 3,
12752                 .tap    = { 496 - 20, 4, 16 },
12753         },
12754 };
12755
12756 static struct cipher_testvec cast6_dec_tv_template[] = {
12757         {
12758                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12759                           "\x0a\xf7\x56\x47\xf2\x9f\x61\x5d",
12760                 .klen   = 16,
12761                 .input  = "\xc8\x42\xa0\x89\x72\xb4\x3d\x20"
12762                           "\x83\x6c\x91\xd1\xb7\x53\x0f\x6b",
12763                 .ilen   = 16,
12764                 .result = zeroed_string,
12765                 .rlen   = 16,
12766         }, {
12767                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12768                           "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12769                           "\xba\xc7\x7a\x77\x17\x94\x28\x63",
12770                 .klen   = 24,
12771                 .input  = "\x1b\x38\x6c\x02\x10\xdc\xad\xcb"
12772                           "\xdd\x0e\x41\xaa\x08\xa7\xa7\xe8",
12773                 .ilen   = 16,
12774                 .result = zeroed_string,
12775                 .rlen   = 16,
12776         }, {
12777                 .key    = "\x23\x42\xbb\x9e\xfa\x38\x54\x2c"
12778                           "\xbe\xd0\xac\x83\x94\x0a\xc2\x98"
12779                           "\x8d\x7c\x47\xce\x26\x49\x08\x46"
12780                           "\x1c\xc1\xb5\x13\x7a\xe6\xb6\x04",
12781                 .klen   = 32,
12782                 .input  = "\x4f\x6a\x20\x38\x28\x68\x97\xb9"
12783                           "\xc9\x87\x01\x36\x55\x33\x17\xfa",
12784                 .ilen   = 16,
12785                 .result = zeroed_string,
12786                 .rlen   = 16,
12787         }, { /* Generated from TF test vectors */
12788                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12789                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12790                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12791                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12792                 .klen   = 32,
12793                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12794                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12795                 .input  = "\xC3\x70\x22\x32\xF5\x80\xCB\x54"
12796                           "\xFC\x30\xE0\xF6\xEB\x39\x57\xA6"
12797                           "\xB6\xB9\xC5\xA4\x91\x55\x14\x97"
12798                           "\xC1\x20\xFF\x6C\x5C\xF0\x67\xEA"
12799                           "\x2F\xED\xD8\xC9\xFB\x38\x3F\xFE"
12800                           "\x93\xBE\xDC\x00\xD3\x7F\xAD\x4C"
12801                           "\x5A\x08\x92\xD1\x47\x0C\xFA\x6C"
12802                           "\xD0\x6A\x99\x10\x72\xF8\x47\x62"
12803                           "\x81\x42\xF8\xD8\xF5\xBB\x94\x08"
12804                           "\xAA\x97\xA2\x8B\x69\xB3\xD2\x7E"
12805                           "\xBC\xB5\x00\x0C\xE5\x44\x4B\x58"
12806                           "\xE8\x63\xDC\xB3\xC4\xE5\x23\x12"
12807                           "\x5A\x72\x85\x47\x8B\xEC\x9F\x26"
12808                           "\x84\xB6\xED\x10\x33\x63\x9B\x5F"
12809                           "\x4D\x53\xEE\x94\x45\x8B\x60\x58"
12810                           "\x86\x20\xF9\x1E\x82\x08\x3E\x58"
12811                           "\x60\x1B\x34\x19\x02\xBE\x4E\x09"
12812                           "\xBB\x7C\x15\xCC\x60\x27\x55\x7A"
12813                           "\x12\xB8\xD8\x08\x89\x3C\xA6\xF3"
12814                           "\xF1\xDD\xA7\x07\xA3\x12\x85\x28"
12815                           "\xE9\x57\xAC\x80\x0C\x5C\x0F\x3A"
12816                           "\x5D\xC2\x91\xC7\x90\xE4\x8C\x43"
12817                           "\x92\xE4\x7C\x26\x69\x4D\x83\x68"
12818                           "\x14\x96\x42\x47\xBD\xA9\xE4\x8A"
12819                           "\x33\x19\xEB\x54\x8E\x0D\x4B\x6E"
12820                           "\x91\x51\xB5\x36\x08\xDE\x1C\x06"
12821                           "\x03\xBD\xDE\x81\x26\xF7\x99\xC2"
12822                           "\xBA\xF7\x6D\x87\x0D\xE4\xA6\xCF"
12823                           "\xC1\xF5\x27\x05\xB8\x02\x57\x72"
12824                           "\xE6\x42\x13\x0B\xC6\x47\x05\x74"
12825                           "\x24\x15\xF7\x0D\xC2\x23\x9D\xB9"
12826                           "\x3C\x77\x18\x93\xBA\xB4\xFC\x8C"
12827                           "\x98\x82\x67\x67\xB4\xD7\xD3\x43"
12828                           "\x23\x08\x02\xB7\x9B\x99\x05\xFB"
12829                           "\xD3\xB5\x00\x0A\xA9\x9D\x66\xD6"
12830                           "\x2E\x49\x58\xD0\xA8\x57\x29\x7F"
12831                           "\x0A\x0E\x7D\xFC\x92\x83\xCC\x67"
12832                           "\xA2\xB1\x70\x3A\x8F\x87\x4A\x8D"
12833                           "\x17\xE2\x58\x2B\x88\x0D\x68\x62"
12834                           "\xBF\x35\xD1\x6F\xC0\xF0\x18\x62"
12835                           "\xB2\xC7\x2D\x58\xC7\x16\xDE\x08"
12836                           "\xEB\x84\x1D\x25\xA7\x38\x94\x06"
12837                           "\x93\x9D\xF8\xFE\x88\x71\xE7\x84"
12838                           "\x2C\xA0\x38\xA3\x1D\x48\xCF\x29"
12839                           "\x0B\xBC\xD8\x50\x99\x1A\x26\xFB"
12840                           "\x8E\x75\x3D\x73\xEB\x6A\xED\x29"
12841                           "\xE0\x8E\xED\xFC\xFE\x6F\xF6\xBA"
12842                           "\x41\xE2\x10\x4C\x01\x8B\x69\x2B"
12843                           "\x25\x3F\x4D\x70\x7B\x92\xD6\x3B"
12844                           "\xAC\xF9\x77\x18\xD9\x6A\x30\xA6"
12845                           "\x2E\xFA\x30\xFF\xC8\xD5\x1D\x06"
12846                           "\x59\x28\x1D\x86\x43\x04\x5D\x3B"
12847                           "\x99\x4C\x04\x5A\x21\x17\x8B\x76"
12848                           "\x8F\x72\xCB\xA1\x9C\x29\x4C\xC3"
12849                           "\x65\xA2\x58\x2A\xC5\x66\x24\xBF"
12850                           "\xBA\xE6\x0C\xDD\x34\x24\x74\xC8"
12851                           "\x84\x0A\x66\x2C\xBE\x8F\x32\xA9"
12852                           "\xE7\xE4\xA1\xD7\xDA\xAB\x23\x1E"
12853                           "\xEB\xEE\x6C\x94\x6F\x9C\x2E\xD1"
12854                           "\x49\x2C\xF3\xD4\x90\xCC\x93\x4C"
12855                           "\x84\x52\x6D\x68\xDE\xC6\x64\xB2"
12856                           "\x11\x74\x93\x57\xB4\x7E\xC6\x00",
12857                 .ilen   = 496,
12858                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12859                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12860                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12861                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12862                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12863                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12864                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12865                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12866                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12867                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12868                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12869                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12870                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12871                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12872                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12873                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12874                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12875                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12876                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12877                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12878                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12879                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12880                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12881                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12882                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12883                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12884                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12885                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12886                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12887                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12888                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12889                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12890                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12891                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12892                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12893                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12894                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12895                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12896                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12897                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12898                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12899                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12900                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12901                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12902                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12903                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12904                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12905                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12906                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12907                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12908                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12909                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12910                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12911                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12912                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12913                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12914                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12915                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12916                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12917                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12918                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12919                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12920                 .rlen   = 496,
12921                 .also_non_np = 1,
12922                 .np     = 3,
12923                 .tap    = { 496 - 20, 4, 16 },
12924         },
12925 };
12926
12927 static struct cipher_testvec cast6_cbc_enc_tv_template[] = {
12928         { /* Generated from TF test vectors */
12929                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
12930                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
12931                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
12932                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
12933                 .klen   = 32,
12934                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
12935                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
12936                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
12937                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
12938                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
12939                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
12940                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
12941                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
12942                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
12943                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
12944                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
12945                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
12946                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
12947                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
12948                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
12949                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
12950                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
12951                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
12952                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
12953                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
12954                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
12955                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
12956                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
12957                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
12958                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
12959                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
12960                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
12961                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
12962                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
12963                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
12964                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
12965                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
12966                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
12967                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
12968                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
12969                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
12970                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
12971                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
12972                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
12973                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
12974                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
12975                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
12976                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
12977                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
12978                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
12979                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
12980                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
12981                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
12982                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
12983                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
12984                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
12985                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
12986                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
12987                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
12988                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
12989                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
12990                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
12991                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
12992                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
12993                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
12994                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
12995                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
12996                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
12997                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
12998                 .ilen   = 496,
12999                 .result = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
13000                           "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
13001                           "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
13002                           "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
13003                           "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
13004                           "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
13005                           "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
13006                           "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
13007                           "\x57\x95\xE1\x21\x26\x10\x9A\x21"
13008                           "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
13009                           "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
13010                           "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
13011                           "\x23\x16\x47\x72\x81\x13\x3A\x72"
13012                           "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
13013                           "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
13014                           "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
13015                           "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
13016                           "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
13017                           "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
13018                           "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
13019                           "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
13020                           "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
13021                           "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
13022                           "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
13023                           "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
13024                           "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
13025                           "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
13026                           "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
13027                           "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
13028                           "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
13029                           "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
13030                           "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
13031                           "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
13032                           "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
13033                           "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
13034                           "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
13035                           "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
13036                           "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
13037                           "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
13038                           "\x73\x3F\x12\x91\x47\x54\xBA\x39"
13039                           "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
13040                           "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
13041                           "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
13042                           "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
13043                           "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
13044                           "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
13045                           "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
13046                           "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
13047                           "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
13048                           "\x80\x21\x83\x58\x3C\x76\xFD\x28"
13049                           "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
13050                           "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
13051                           "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
13052                           "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
13053                           "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
13054                           "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
13055                           "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
13056                           "\x56\x4D\x82\x62\x37\xA3\x48\x01"
13057                           "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
13058                           "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
13059                           "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
13060                           "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
13061                 .rlen   = 496,
13062                 .also_non_np = 1,
13063                 .np     = 3,
13064                 .tap    = { 496 - 20, 4, 16 },
13065         },
13066 };
13067
13068 static struct cipher_testvec cast6_cbc_dec_tv_template[] = {
13069         { /* Generated from TF test vectors */
13070                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13071                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13072                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13073                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13074                 .klen   = 32,
13075                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13076                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13077                 .input  = "\xDF\x77\x68\x96\xC7\xBA\xF8\xE2"
13078                           "\x0E\x24\x99\x1A\xAA\xF3\xC6\x9F"
13079                           "\xA0\x73\xB3\x70\xC3\x68\x64\x70"
13080                           "\xAD\x33\x02\xFB\x88\x74\xAA\x78"
13081                           "\xC7\x47\x1A\x18\x61\x2D\xAC\x9F"
13082                           "\x7E\x6F\xDF\x05\x13\x76\xA6\x72"
13083                           "\xB7\x13\x09\x0F\x7D\x38\xDF\x25"
13084                           "\x4E\xFD\x50\x45\xFA\x35\x6A\xC0"
13085                           "\x57\x95\xE1\x21\x26\x10\x9A\x21"
13086                           "\xA1\x8A\x51\x05\xD1\xB1\x78\x35"
13087                           "\x98\xF5\xAE\xC0\xC1\x8B\x94\xFF"
13088                           "\xD0\x69\x3F\x42\xC2\x01\xA7\x9B"
13089                           "\x23\x16\x47\x72\x81\x13\x3A\x72"
13090                           "\xEC\xD9\x40\x88\x00\x9C\xB0\xA8"
13091                           "\x9C\xAC\xCE\x11\x73\x7B\x63\x3E"
13092                           "\xA3\x63\x98\x7D\x35\xE4\xD9\x83"
13093                           "\xE2\xD0\x52\x87\x0C\x1F\xB0\xB3"
13094                           "\x41\x1A\x93\x8D\x76\x31\x9F\xF2"
13095                           "\xFE\x09\xA3\x8F\x22\x6A\x3B\xB9"
13096                           "\x6C\x9E\xE4\xA1\xA0\xC4\xE7\xA1"
13097                           "\x21\x9C\x1A\xCA\x65\xDE\x44\x03"
13098                           "\x99\xF2\xD2\x39\xE3\x3F\x0F\x37"
13099                           "\x53\x50\x23\xA4\x81\x6E\xDA\xFB"
13100                           "\xF8\x7B\x01\xD7\xB2\x32\x9C\xB8"
13101                           "\xB1\x0E\x99\x17\xB5\x38\xF9\xD7"
13102                           "\x86\x2D\x6E\x94\x5C\x99\x9D\xB3"
13103                           "\xD3\x63\x4B\x2A\x7D\x44\x6A\xB2"
13104                           "\xC1\x03\xE6\x5A\x37\xD8\x64\x18"
13105                           "\xAA\x32\xCE\x29\xED\xC0\xA2\xCB"
13106                           "\x8D\xAF\xCD\xBE\x8F\xB6\xEC\xB4"
13107                           "\x89\x05\x81\x6E\x71\x4F\xC3\x28"
13108                           "\x10\xC1\x62\xC4\x41\xE9\xD2\x39"
13109                           "\xF3\x22\x39\x12\x2C\xC2\x95\x2D"
13110                           "\xBF\x93\x58\x4B\x04\xD1\x8D\x57"
13111                           "\xAE\xEB\x60\x03\x56\x35\xAD\x5A"
13112                           "\xE9\xC3\xFF\x4E\x31\xE1\x37\xF8"
13113                           "\x7D\xEE\x65\x8A\xB6\x88\x1A\x3E"
13114                           "\x07\x09\x82\xBA\xF0\x80\x8A\xD0"
13115                           "\xA0\x3F\x6A\xE9\x24\x87\x19\x65"
13116                           "\x73\x3F\x12\x91\x47\x54\xBA\x39"
13117                           "\x30\x5B\x1E\xE5\xC2\xF9\x3F\xEF"
13118                           "\xD6\x75\xF9\xB8\x7C\x8B\x05\x76"
13119                           "\xEE\xB7\x08\x25\x4B\xB6\x7B\x47"
13120                           "\x72\xC0\x4C\xD4\xDA\xE0\x75\xF1"
13121                           "\x7C\xE8\x94\x9E\x16\x6E\xB8\x12"
13122                           "\xA1\xC1\x6E\x3B\x1C\x59\x41\x2D"
13123                           "\x23\xFA\x7D\x77\xB8\x46\x75\xFE"
13124                           "\x4F\x10\xD3\x09\x60\xA1\x36\x96"
13125                           "\x5B\xC2\xDC\x6E\x84\x7D\x9B\x14"
13126                           "\x80\x21\x83\x58\x3C\x76\xFD\x28"
13127                           "\x1D\xF9\x93\x13\xD7\x0E\x62\x14"
13128                           "\x5A\xC5\x4E\x08\xA5\x56\xA4\x3C"
13129                           "\x68\x93\x44\x70\xDF\xCF\x4A\x51"
13130                           "\x0B\x81\x29\x41\xE5\x62\x4D\x36"
13131                           "\xB3\xEA\x94\xA6\xB9\xDD\x3F\x09"
13132                           "\x62\x34\xA0\x6A\x7E\x7D\xF5\xF6"
13133                           "\x01\x91\xB4\x27\xDA\x59\xD6\x17"
13134                           "\x56\x4D\x82\x62\x37\xA3\x48\x01"
13135                           "\x99\x91\x77\xB2\x08\x6B\x2C\x37"
13136                           "\xC5\x5C\xAD\xB6\x07\xB6\x84\xF3"
13137                           "\x4D\x59\x7D\xC5\x28\x69\xFA\x92"
13138                           "\x22\x46\x89\x2D\x0F\x2B\x08\x24",
13139                 .ilen   = 496,
13140                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13141                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13142                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13143                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13144                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13145                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13146                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13147                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13148                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13149                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13150                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13151                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13152                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13153                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13154                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13155                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13156                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13157                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13158                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13159                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13160                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13161                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13162                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13163                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13164                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13165                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13166                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13167                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13168                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13169                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13170                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13171                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13172                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13173                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13174                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13175                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13176                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13177                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13178                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13179                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13180                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13181                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13182                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13183                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13184                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13185                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13186                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13187                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13188                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13189                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13190                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13191                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13192                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13193                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13194                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13195                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13196                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13197                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13198                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13199                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13200                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13201                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13202                 .rlen   = 496,
13203                 .also_non_np = 1,
13204                 .np     = 3,
13205                 .tap    = { 496 - 20, 4, 16 },
13206         },
13207 };
13208
13209 static struct cipher_testvec cast6_ctr_enc_tv_template[] = {
13210         { /* Generated from TF test vectors */
13211                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13212                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13213                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13214                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13215                 .klen   = 32,
13216                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13217                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13218                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13219                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13220                           "\x3A",
13221                 .ilen   = 17,
13222                 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13223                           "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13224                           "\x57",
13225                 .rlen   = 17,
13226         }, { /* Generated from TF test vectors */
13227                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13228                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13229                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13230                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13231                 .klen   = 32,
13232                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13233                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13234                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13235                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13236                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13237                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13238                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13239                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13240                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13241                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13242                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13243                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13244                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13245                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13246                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13247                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13248                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13249                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13250                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13251                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13252                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13253                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13254                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13255                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13256                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13257                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13258                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13259                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13260                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13261                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13262                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13263                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13264                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13265                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13266                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13267                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13268                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13269                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13270                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13271                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13272                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13273                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13274                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13275                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13276                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13277                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13278                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13279                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13280                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13281                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13282                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13283                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13284                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13285                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13286                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13287                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13288                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13289                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13290                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13291                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13292                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13293                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13294                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13295                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13296                 .ilen   = 496,
13297                 .result = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13298                           "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13299                           "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13300                           "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13301                           "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13302                           "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13303                           "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13304                           "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13305                           "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13306                           "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13307                           "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13308                           "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13309                           "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13310                           "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13311                           "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13312                           "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13313                           "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13314                           "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13315                           "\x49\x61\x22\x52\x64\x8C\x46\x41"
13316                           "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13317                           "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13318                           "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13319                           "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13320                           "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13321                           "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13322                           "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13323                           "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13324                           "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13325                           "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13326                           "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13327                           "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13328                           "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13329                           "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13330                           "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13331                           "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13332                           "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13333                           "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13334                           "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13335                           "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13336                           "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13337                           "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13338                           "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13339                           "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13340                           "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13341                           "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13342                           "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13343                           "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13344                           "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13345                           "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13346                           "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13347                           "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13348                           "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13349                           "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13350                           "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13351                           "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13352                           "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13353                           "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13354                           "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13355                           "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13356                           "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13357                           "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13358                           "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13359                 .rlen   = 496,
13360                 .also_non_np = 1,
13361                 .np     = 3,
13362                 .tap    = { 496 - 20, 4, 16 },
13363         },
13364 };
13365
13366 static struct cipher_testvec cast6_ctr_dec_tv_template[] = {
13367         { /* Generated from TF test vectors */
13368                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13369                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13370                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13371                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13372                 .klen   = 32,
13373                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13374                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13375                 .input  = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13376                           "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13377                           "\x57",
13378                 .ilen   = 17,
13379                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13380                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13381                           "\x3A",
13382                 .rlen   = 17,
13383         }, { /* Generated from TF test vectors */
13384                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
13385                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
13386                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
13387                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
13388                 .klen   = 32,
13389                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
13390                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
13391                 .input  = "\x26\x0A\xF1\xE2\x3F\x8A\xEF\xA3"
13392                           "\x53\x9A\x5E\x1B\x2A\x1A\xC6\x0A"
13393                           "\x57\xA3\xEF\x47\x2A\xE8\x88\xA7"
13394                           "\x3C\xD0\xEC\xB9\x94\x50\x7D\x56"
13395                           "\xBC\xE1\xC1\xF5\xE1\xEE\x12\xF8"
13396                           "\x4F\x03\x82\x3A\x93\x6B\x4C\xD3"
13397                           "\xE3\xF3\xFA\xC2\x23\x55\x98\x20"
13398                           "\x49\x76\x9B\x6B\xC1\x23\xBF\xE5"
13399                           "\xD4\xC4\x2F\x61\xE1\x67\x2A\x30"
13400                           "\x6F\x29\xCA\x54\xF8\x1B\xA6\x7D"
13401                           "\x66\x45\xEE\xC8\x19\xBE\x50\xF0"
13402                           "\x5F\x65\xF8\x1E\x4D\x07\x87\xD9"
13403                           "\xD3\xD9\x1B\x09\x89\xFD\x42\xC5"
13404                           "\xDB\xEB\x86\xF1\x67\x04\x0F\x5C"
13405                           "\x81\xDF\x82\x12\xC7\x4C\x1B\x07"
13406                           "\xDE\xE6\xFA\x29\x86\xD1\xB0\xBA"
13407                           "\x3D\x6A\x69\x76\xEC\x0F\xB4\xE6"
13408                           "\xCD\xA7\xF8\xA8\xB8\xE0\x33\xF5"
13409                           "\x49\x61\x22\x52\x64\x8C\x46\x41"
13410                           "\x1F\x48\x5F\x4F\xA2\x89\x36\x17"
13411                           "\x20\xF8\x2F\x8F\x4B\xFA\xF2\xC0"
13412                           "\x1E\x18\xA2\xF8\xB7\x6D\x98\xE3"
13413                           "\x00\x14\x15\x59\xC1\x30\x64\xAF"
13414                           "\xA8\x01\x38\xAB\xD4\x8B\xEC\x7C"
13415                           "\x44\x9A\xC6\x2C\x2E\x2B\x2B\xF4"
13416                           "\x02\x37\xC4\x69\xEF\x36\xC1\xF3"
13417                           "\xA0\xFB\xFE\x29\xAD\x39\xCF\xD0"
13418                           "\x51\x73\xA3\x22\x42\x41\xAB\xD2"
13419                           "\x0F\x50\x14\xB9\x54\xD3\xD4\xFA"
13420                           "\xBF\xC9\xBB\xCE\xC4\x1D\x2D\xAF"
13421                           "\xC9\x3F\x07\x87\x42\x4B\x3A\x54"
13422                           "\x34\x8E\x37\xA3\x03\x6F\x65\x66"
13423                           "\xDB\x44\xC3\xE8\xD7\xDD\x7D\xDD"
13424                           "\x61\xB4\x2B\x80\xA3\x98\x13\xF5"
13425                           "\x5A\xD3\x34\x58\xC3\x6E\xF6\xB8"
13426                           "\x0A\xC6\x50\x01\x8E\xD5\x6C\x7D"
13427                           "\xFE\x16\xB6\xCF\xFC\x51\x40\xAE"
13428                           "\xB3\x15\xAC\x90\x6F\x0B\x28\x3A"
13429                           "\x60\x40\x38\x90\x20\x46\xC7\xB3"
13430                           "\x0B\x12\x6D\x3B\x15\x14\xF9\xF4"
13431                           "\x11\x41\x76\x6B\xB3\x60\x82\x3C"
13432                           "\x84\xFB\x08\x2E\x92\x25\xCB\x79"
13433                           "\x6F\x58\xC5\x94\x00\x00\x47\xB6"
13434                           "\x9E\xDC\x0F\x29\x70\x46\x20\x76"
13435                           "\x65\x75\x66\x5C\x00\x96\xB3\xE1"
13436                           "\x0B\xA7\x11\x8B\x2E\x61\x4E\x45"
13437                           "\x73\xFC\x91\xAB\x79\x41\x23\x14"
13438                           "\x13\xB6\x72\x6C\x46\xB3\x03\x11"
13439                           "\xE4\xF1\xEE\xC9\x7A\xCF\x96\x32"
13440                           "\xB6\xF0\x8B\x97\xB4\xCF\x82\xB7"
13441                           "\x15\x48\x44\x99\x09\xF6\xE0\xD7"
13442                           "\xBC\xF1\x5B\x91\x4F\x30\x22\xA2"
13443                           "\x45\xC4\x68\x55\xC2\xBE\xA7\xD2"
13444                           "\x12\x53\x35\x9C\xF9\xE7\x35\x5D"
13445                           "\x81\xE4\x86\x42\xC3\x58\xFB\xF0"
13446                           "\x38\x9B\x8E\x5A\xEF\x83\x33\x0F"
13447                           "\x00\x4E\x3F\x9F\xF5\x84\x62\xC4"
13448                           "\x19\x35\x88\x22\x45\x59\x0E\x8F"
13449                           "\xEC\x27\xDD\x4A\xA4\x1F\xBC\x41"
13450                           "\x9B\x66\x8D\x32\xBA\x81\x34\x87"
13451                           "\x0E\x74\x33\x30\x62\xB9\x89\xDF"
13452                           "\xF9\xC5\xDD\x27\xB3\x39\xCB\xCB",
13453                 .ilen   = 496,
13454                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
13455                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
13456                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
13457                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
13458                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
13459                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
13460                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
13461                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
13462                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
13463                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
13464                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
13465                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
13466                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
13467                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
13468                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
13469                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
13470                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
13471                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
13472                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
13473                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
13474                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
13475                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
13476                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
13477                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
13478                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
13479                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
13480                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
13481                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
13482                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
13483                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
13484                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
13485                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
13486                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
13487                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
13488                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
13489                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
13490                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
13491                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
13492                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
13493                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
13494                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
13495                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
13496                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
13497                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
13498                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
13499                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
13500                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
13501                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
13502                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
13503                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
13504                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
13505                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
13506                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
13507                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
13508                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
13509                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
13510                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
13511                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
13512                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
13513                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
13514                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
13515                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
13516                 .rlen   = 496,
13517                 .also_non_np = 1,
13518                 .np     = 3,
13519                 .tap    = { 496 - 20, 4, 16 },
13520         },
13521 };
13522
13523 static struct cipher_testvec cast6_lrw_enc_tv_template[] = {
13524         { /* Generated from TF test vectors */
13525                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13526                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13527                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13528                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13529                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13530                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13531                 .klen   = 48,
13532                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
13533                           "\x00\x00\x00\x00\x00\x00\x00\x01",
13534                 .input  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13535                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13536                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13537                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13538                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13539                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13540                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13541                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13542                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13543                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13544                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13545                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13546                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13547                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13548                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13549                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13550                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13551                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13552                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13553                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13554                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13555                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13556                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13557                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13558                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13559                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13560                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13561                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13562                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13563                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13564                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13565                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13566                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13567                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13568                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13569                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13570                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13571                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13572                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13573                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13574                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13575                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13576                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13577                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13578                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13579                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13580                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13581                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13582                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13583                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13584                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13585                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13586                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13587                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13588                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13589                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13590                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13591                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13592                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13593                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13594                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13595                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13596                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13597                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13598                 .ilen   = 512,
13599                 .result = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13600                           "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13601                           "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13602                           "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13603                           "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13604                           "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13605                           "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13606                           "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13607                           "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13608                           "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13609                           "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13610                           "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13611                           "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13612                           "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13613                           "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13614                           "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13615                           "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13616                           "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13617                           "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13618                           "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13619                           "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13620                           "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13621                           "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13622                           "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13623                           "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13624                           "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13625                           "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13626                           "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13627                           "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13628                           "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13629                           "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13630                           "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13631                           "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13632                           "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13633                           "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13634                           "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13635                           "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13636                           "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13637                           "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13638                           "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13639                           "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13640                           "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13641                           "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13642                           "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13643                           "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13644                           "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13645                           "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13646                           "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13647                           "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13648                           "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13649                           "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13650                           "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13651                           "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13652                           "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13653                           "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13654                           "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13655                           "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13656                           "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13657                           "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13658                           "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13659                           "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13660                           "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13661                           "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13662                           "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13663                 .rlen   = 512,
13664                 .also_non_np = 1,
13665                 .np     = 3,
13666                 .tap    = { 512 - 20, 4, 16 },
13667         },
13668 };
13669
13670 static struct cipher_testvec cast6_lrw_dec_tv_template[] = {
13671         { /* Generated from TF test vectors */
13672                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
13673                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
13674                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
13675                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
13676                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
13677                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
13678                 .klen   = 48,
13679                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
13680                           "\x00\x00\x00\x00\x00\x00\x00\x01",
13681                 .input  = "\x55\x25\x09\x8B\xB5\xD5\xF8\xBF"
13682                           "\x37\x4A\xFE\x3C\x47\xD8\xE6\xEB"
13683                           "\xCA\xA4\x9B\xB0\xAB\x6D\x64\xCA"
13684                           "\x58\xB6\x73\xF0\xD7\x52\x34\xEF"
13685                           "\xFB\x3E\x96\x81\xB7\x71\x34\xA4"
13686                           "\x55\x20\xBE\x39\x5A\x2B\xF9\xD1"
13687                           "\x65\x0B\xDA\xD3\x7E\xB3\xA6\xF7"
13688                           "\x2E\x0B\x5A\x52\xDB\x39\x8C\x9B"
13689                           "\x61\x17\x5F\xAF\xB6\x5A\xC8\x08"
13690                           "\xA7\xB7\x2A\x11\x7C\x97\x38\x9D"
13691                           "\x59\x0E\x66\x59\x5E\xD8\x8B\xCE"
13692                           "\x70\xE0\xC3\x42\xB0\x8C\x0F\xBA"
13693                           "\xB2\x0D\x81\xB6\xBE\x61\x1C\x2D"
13694                           "\x7E\xEA\x91\x25\xAC\xEC\xF8\x28"
13695                           "\x80\x1D\xF0\x30\xBA\x62\x77\x7D"
13696                           "\xDB\x15\x69\xDF\xFA\x2A\x81\x64"
13697                           "\x95\x5B\xA4\x7F\x3E\x4F\xE3\x30"
13698                           "\xB0\x5C\xC2\x05\xF8\xF0\x29\xE7"
13699                           "\x0A\xA0\x66\xB2\x5D\x0F\x39\x2B"
13700                           "\xB4\xB3\x00\xA9\xD0\xAB\x63\x61"
13701                           "\x5E\xDB\xFC\x11\x74\x25\x96\x65"
13702                           "\xE8\xE2\x34\x57\x77\x15\x5E\x70"
13703                           "\xFF\x10\x90\xC3\x64\xF0\x11\x0A"
13704                           "\x63\x3A\xD3\x55\x92\x15\x4B\x0C"
13705                           "\xC7\x08\x89\x17\x3B\x99\xAD\x63"
13706                           "\xE7\x06\xDF\x52\xBC\x15\x64\x45"
13707                           "\x9D\x7A\xFB\x69\xBC\x2D\x6E\xA9"
13708                           "\x35\xD9\xD8\xF5\x0C\xC4\xA2\x23"
13709                           "\x9C\x18\x8B\xA8\x8C\xFE\xF8\x0E"
13710                           "\xBD\xAB\x60\x1A\x51\x17\x54\x27"
13711                           "\xB6\xE8\xBE\x0F\xA9\xA5\x82\x19"
13712                           "\x2F\x6F\x20\xA7\x47\xED\x74\x6C"
13713                           "\x4E\xC1\xF8\x8C\x14\xF3\xBB\x1F"
13714                           "\xED\x4D\x8F\x7C\x37\xEF\x19\xA1"
13715                           "\x07\x16\xDE\x76\xCC\x5E\x94\x02"
13716                           "\xFB\xBF\xE4\x81\x50\xCE\xFC\x0F"
13717                           "\x9E\xCF\x3D\xF6\x67\x00\xBF\xA7"
13718                           "\x6E\x21\x58\x36\x06\xDE\xB3\xD4"
13719                           "\xA2\xFA\xD8\x4E\xE0\xB9\x7F\x23"
13720                           "\x51\x21\x2B\x32\x68\xAA\xF8\xA8"
13721                           "\x93\x08\xB5\x6D\xE6\x43\x2C\xB7"
13722                           "\x31\xB2\x0F\xD0\xA2\x51\xC0\x25"
13723                           "\x30\xC7\x10\x3F\x97\x27\x01\x8E"
13724                           "\xFA\xD8\x4F\x78\xD8\x2E\x1D\xEB"
13725                           "\xA1\x37\x52\x0F\x7B\x5E\x87\xA8"
13726                           "\x22\xE2\xE6\x92\xA7\x5F\x11\x32"
13727                           "\xCC\x93\x34\xFC\xD1\x7E\xAE\x54"
13728                           "\xBC\x6A\x1B\x91\xD1\x2E\x21\xEC"
13729                           "\x5D\xF1\xC4\xF1\x55\x20\xBF\xE5"
13730                           "\x96\x3D\x69\x91\x20\x4E\xF2\x61"
13731                           "\xDA\x77\xFE\xEE\xC3\x74\x57\x2A"
13732                           "\x78\x39\xB0\xE0\xCF\x12\x56\xD6"
13733                           "\x05\xDC\xF9\x19\x66\x44\x1D\xF9"
13734                           "\x82\x37\xD4\xC2\x60\xB6\x31\xDF"
13735                           "\x0C\xAF\xBC\x8B\x55\x9A\xC8\x2D"
13736                           "\xAB\xA7\x88\x7B\x41\xE8\x29\xC9"
13737                           "\x9B\x8D\xA7\x00\x86\x25\xB6\x14"
13738                           "\xF5\x13\x73\xD7\x4B\x6B\x83\xF3"
13739                           "\xAF\x96\x00\xE4\xB7\x3C\x65\xA6"
13740                           "\x15\xB7\x94\x7D\x4E\x70\x4C\x75"
13741                           "\xF3\xB4\x02\xA9\x17\x1C\x7A\x0A"
13742                           "\xC0\xD5\x33\x11\x56\xDE\xDC\xF5"
13743                           "\x8D\xD9\xCD\x3B\x22\x67\x18\xC7"
13744                           "\xC4\xF5\x99\x61\xBC\xBB\x5B\x46",
13745                 .ilen   = 512,
13746                 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
13747                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
13748                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
13749                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
13750                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
13751                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
13752                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
13753                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
13754                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
13755                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
13756                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
13757                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
13758                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
13759                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
13760                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
13761                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
13762                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
13763                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
13764                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
13765                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
13766                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
13767                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
13768                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
13769                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
13770                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
13771                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
13772                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
13773                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
13774                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
13775                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
13776                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
13777                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
13778                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
13779                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
13780                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
13781                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
13782                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
13783                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
13784                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
13785                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
13786                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
13787                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
13788                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
13789                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
13790                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
13791                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
13792                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
13793                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
13794                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
13795                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
13796                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
13797                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
13798                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
13799                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
13800                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
13801                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
13802                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
13803                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
13804                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
13805                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
13806                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
13807                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
13808                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
13809                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
13810                 .rlen   = 512,
13811                 .also_non_np = 1,
13812                 .np     = 3,
13813                 .tap    = { 512 - 20, 4, 16 },
13814         },
13815 };
13816
13817 static struct cipher_testvec cast6_xts_enc_tv_template[] = {
13818         { /* Generated from TF test vectors */
13819                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
13820                           "\x23\x53\x60\x28\x74\x71\x35\x26"
13821                           "\x62\x49\x77\x57\x24\x70\x93\x69"
13822                           "\x99\x59\x57\x49\x66\x96\x76\x27"
13823                           "\x31\x41\x59\x26\x53\x58\x97\x93"
13824                           "\x23\x84\x62\x64\x33\x83\x27\x95"
13825                           "\x02\x88\x41\x97\x16\x93\x99\x37"
13826                           "\x51\x05\x82\x09\x74\x94\x45\x92",
13827                 .klen   = 64,
13828                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
13829                           "\x00\x00\x00\x00\x00\x00\x00\x00",
13830                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
13831                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13832                           "\x10\x11\x12\x13\x14\x15\x16\x17"
13833                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13834                           "\x20\x21\x22\x23\x24\x25\x26\x27"
13835                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13836                           "\x30\x31\x32\x33\x34\x35\x36\x37"
13837                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13838                           "\x40\x41\x42\x43\x44\x45\x46\x47"
13839                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13840                           "\x50\x51\x52\x53\x54\x55\x56\x57"
13841                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13842                           "\x60\x61\x62\x63\x64\x65\x66\x67"
13843                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13844                           "\x70\x71\x72\x73\x74\x75\x76\x77"
13845                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13846                           "\x80\x81\x82\x83\x84\x85\x86\x87"
13847                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13848                           "\x90\x91\x92\x93\x94\x95\x96\x97"
13849                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13850                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13851                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13852                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13853                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13854                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13855                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13856                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13857                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13858                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13859                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13860                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13861                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
13862                           "\x00\x01\x02\x03\x04\x05\x06\x07"
13863                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
13864                           "\x10\x11\x12\x13\x14\x15\x16\x17"
13865                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
13866                           "\x20\x21\x22\x23\x24\x25\x26\x27"
13867                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
13868                           "\x30\x31\x32\x33\x34\x35\x36\x37"
13869                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
13870                           "\x40\x41\x42\x43\x44\x45\x46\x47"
13871                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
13872                           "\x50\x51\x52\x53\x54\x55\x56\x57"
13873                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
13874                           "\x60\x61\x62\x63\x64\x65\x66\x67"
13875                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
13876                           "\x70\x71\x72\x73\x74\x75\x76\x77"
13877                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
13878                           "\x80\x81\x82\x83\x84\x85\x86\x87"
13879                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
13880                           "\x90\x91\x92\x93\x94\x95\x96\x97"
13881                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
13882                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
13883                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
13884                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
13885                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
13886                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
13887                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
13888                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
13889                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
13890                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
13891                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
13892                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
13893                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
13894                 .ilen   = 512,
13895                 .result = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
13896                           "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
13897                           "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
13898                           "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
13899                           "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
13900                           "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
13901                           "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
13902                           "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
13903                           "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
13904                           "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
13905                           "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
13906                           "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
13907                           "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
13908                           "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
13909                           "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
13910                           "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
13911                           "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
13912                           "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
13913                           "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
13914                           "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
13915                           "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
13916                           "\x71\x38\x17\x91\x44\xE8\xFC\x65"
13917                           "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
13918                           "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
13919                           "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
13920                           "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
13921                           "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
13922                           "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
13923                           "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
13924                           "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
13925                           "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
13926                           "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
13927                           "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
13928                           "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
13929                           "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
13930                           "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
13931                           "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
13932                           "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
13933                           "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
13934                           "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
13935                           "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
13936                           "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
13937                           "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
13938                           "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
13939                           "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
13940                           "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
13941                           "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
13942                           "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
13943                           "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
13944                           "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
13945                           "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
13946                           "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
13947                           "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
13948                           "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
13949                           "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
13950                           "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
13951                           "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
13952                           "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
13953                           "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
13954                           "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
13955                           "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
13956                           "\x45\x72\x80\x17\x81\xBD\x9D\x62"
13957                           "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
13958                           "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
13959                 .rlen   = 512,
13960                 .also_non_np = 1,
13961                 .np     = 3,
13962                 .tap    = { 512 - 20, 4, 16 },
13963         },
13964 };
13965
13966 static struct cipher_testvec cast6_xts_dec_tv_template[] = {
13967         { /* Generated from TF test vectors */
13968                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
13969                           "\x23\x53\x60\x28\x74\x71\x35\x26"
13970                           "\x62\x49\x77\x57\x24\x70\x93\x69"
13971                           "\x99\x59\x57\x49\x66\x96\x76\x27"
13972                           "\x31\x41\x59\x26\x53\x58\x97\x93"
13973                           "\x23\x84\x62\x64\x33\x83\x27\x95"
13974                           "\x02\x88\x41\x97\x16\x93\x99\x37"
13975                           "\x51\x05\x82\x09\x74\x94\x45\x92",
13976                 .klen   = 64,
13977                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
13978                           "\x00\x00\x00\x00\x00\x00\x00\x00",
13979                 .input  = "\xDE\x6F\x22\xA5\xE8\x39\xE8\x78"
13980                           "\x88\x5A\x4F\x8D\x82\x76\x52\x6D"
13981                           "\xB2\x41\x16\xF4\x2B\xA6\xEB\xF6"
13982                           "\xE2\xC5\x62\x8D\x61\xA1\x01\xED"
13983                           "\xD9\x38\x01\xC1\x43\x63\x4E\x88"
13984                           "\xC9\x4B\x5A\x88\x80\xB7\x5C\x71"
13985                           "\x47\xEE\x11\xD8\xB7\x2D\x5D\x13"
13986                           "\x1A\xB1\x68\x5B\x61\xA7\xA9\x81"
13987                           "\x8B\x83\xA1\x6A\xAA\x36\xD6\xB6"
13988                           "\x60\x54\x09\x32\xFE\x6A\x76\x2E"
13989                           "\x28\xFF\xD5\xD6\xDD\x1D\x45\x7D"
13990                           "\xF0\x8B\xF3\x32\x4E\x6C\x12\xCB"
13991                           "\xB8\x25\x70\xF8\x40\xBC\x90\x1B"
13992                           "\x11\xC3\x59\xAF\xF0\x2F\x92\xDD"
13993                           "\xD3\x3B\xCF\x60\xA1\x78\x94\x57"
13994                           "\xAF\x76\xC1\x67\xA6\x3C\xCD\x98"
13995                           "\xB1\xF7\x27\xB9\xA3\xBD\x10\xEA"
13996                           "\xCD\x8B\xC2\xF2\x14\xF2\xB2\x67"
13997                           "\x05\xDD\x1D\x58\x6E\x2F\x95\x08"
13998                           "\x3A\xF8\x78\x76\x82\x56\xA7\xEC"
13999                           "\x51\x4B\x85\x77\xC2\x4C\x4A\x34"
14000                           "\x71\x38\x17\x91\x44\xE8\xFC\x65"
14001                           "\x99\x0D\x52\x91\xEE\xF8\xEF\x27"
14002                           "\x2A\x9E\x6E\x78\xC4\x26\x87\xF4"
14003                           "\x8A\xF0\x2D\x04\xE8\x14\x92\x5D"
14004                           "\x59\x22\x9B\x29\x5C\x18\xF0\xC3"
14005                           "\x47\xF3\x76\xD8\xE4\xF3\x1B\xD1"
14006                           "\x70\xA3\x0D\xB5\x70\x02\x1D\xA3"
14007                           "\x91\x3B\x49\x73\x18\xAB\xD4\xC9"
14008                           "\xC3\x1E\xEF\x1F\xFE\xD5\x59\x8A"
14009                           "\xD7\xF6\xC9\x71\x67\x79\xD7\x0E"
14010                           "\xBE\x1F\x8E\xEC\x55\x7E\x4F\x24"
14011                           "\xE6\x87\xEA\xFE\x96\x25\x67\x8E"
14012                           "\x93\x03\xFA\xFF\xCE\xAF\xB2\x3C"
14013                           "\x6F\xEB\x57\xFB\xD3\x28\x87\xA9"
14014                           "\xCE\xC2\xF5\x9C\xC6\x67\xB5\x97"
14015                           "\x49\xF7\x04\xCB\xEF\x84\x98\x33"
14016                           "\xAF\x38\xD3\x04\x1C\x24\x71\x38"
14017                           "\xC7\x71\xDD\x43\x0D\x12\x4A\x18"
14018                           "\xBA\xC4\xAF\xBA\xB2\x5B\xEB\x95"
14019                           "\x02\x43\x5D\xCE\x19\xCC\xCD\x66"
14020                           "\x91\x0B\x8C\x7F\x51\xC4\xBF\x3C"
14021                           "\x8B\xF1\xCC\xAA\x29\xD7\x87\xCB"
14022                           "\x3E\xC5\xF3\xC9\x75\xE8\xA3\x5B"
14023                           "\x30\x45\xA9\xB7\xAF\x80\x64\x6F"
14024                           "\x75\x4A\xA7\xC0\x6D\x19\x6B\xDE"
14025                           "\x17\xDE\x6D\xEA\x87\x9F\x95\xAE"
14026                           "\xF5\x3C\xEE\x54\xB8\x27\x84\xF8"
14027                           "\x97\xA3\xE1\x6F\x38\x24\x34\x88"
14028                           "\xCE\xBD\x32\x52\xE0\x00\x6C\x94"
14029                           "\xC9\xD7\x5D\x37\x81\x33\x2E\x7F"
14030                           "\x4F\x7E\x2E\x0D\x94\xBD\xEA\x59"
14031                           "\x34\x39\xA8\x35\x12\xB7\xBC\xAC"
14032                           "\xEA\x52\x9C\x78\x02\x6D\x92\x36"
14033                           "\xFB\x59\x2B\xA4\xEA\x7B\x1B\x83"
14034                           "\xE1\x4D\x5E\x2A\x7E\x92\xB1\x64"
14035                           "\xDE\xE0\x27\x4B\x0A\x6F\x4C\xE3"
14036                           "\xB0\xEB\x31\xE4\x69\x95\xAB\x35"
14037                           "\x8B\x2C\xF5\x6B\x7F\xF1\xA2\x82"
14038                           "\xF8\xD9\x47\x82\xA9\x82\x03\x91"
14039                           "\x69\x1F\xBE\x4C\xE7\xC7\x34\x2F"
14040                           "\x45\x72\x80\x17\x81\xBD\x9D\x62"
14041                           "\xA1\xAC\xE8\xCF\xC6\x74\xCF\xDC"
14042                           "\x22\x60\x4E\xE8\xA4\x5D\x85\xB9",
14043                 .ilen   = 512,
14044                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14045                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14046                           "\x10\x11\x12\x13\x14\x15\x16\x17"
14047                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14048                           "\x20\x21\x22\x23\x24\x25\x26\x27"
14049                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14050                           "\x30\x31\x32\x33\x34\x35\x36\x37"
14051                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14052                           "\x40\x41\x42\x43\x44\x45\x46\x47"
14053                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14054                           "\x50\x51\x52\x53\x54\x55\x56\x57"
14055                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14056                           "\x60\x61\x62\x63\x64\x65\x66\x67"
14057                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14058                           "\x70\x71\x72\x73\x74\x75\x76\x77"
14059                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14060                           "\x80\x81\x82\x83\x84\x85\x86\x87"
14061                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14062                           "\x90\x91\x92\x93\x94\x95\x96\x97"
14063                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14064                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14065                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14066                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14067                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14068                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14069                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14070                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14071                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14072                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14073                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14074                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14075                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
14076                           "\x00\x01\x02\x03\x04\x05\x06\x07"
14077                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14078                           "\x10\x11\x12\x13\x14\x15\x16\x17"
14079                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
14080                           "\x20\x21\x22\x23\x24\x25\x26\x27"
14081                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
14082                           "\x30\x31\x32\x33\x34\x35\x36\x37"
14083                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
14084                           "\x40\x41\x42\x43\x44\x45\x46\x47"
14085                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
14086                           "\x50\x51\x52\x53\x54\x55\x56\x57"
14087                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
14088                           "\x60\x61\x62\x63\x64\x65\x66\x67"
14089                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
14090                           "\x70\x71\x72\x73\x74\x75\x76\x77"
14091                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
14092                           "\x80\x81\x82\x83\x84\x85\x86\x87"
14093                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
14094                           "\x90\x91\x92\x93\x94\x95\x96\x97"
14095                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
14096                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
14097                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
14098                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
14099                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
14100                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
14101                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
14102                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
14103                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
14104                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
14105                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
14106                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
14107                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
14108                 .rlen   = 512,
14109                 .also_non_np = 1,
14110                 .np     = 3,
14111                 .tap    = { 512 - 20, 4, 16 },
14112         },
14113 };
14114
14115
14116 /*
14117  * AES test vectors.
14118  */
14119 #define AES_ENC_TEST_VECTORS 4
14120 #define AES_DEC_TEST_VECTORS 4
14121 #define AES_CBC_ENC_TEST_VECTORS 5
14122 #define AES_CBC_DEC_TEST_VECTORS 5
14123 #define HMAC_MD5_ECB_CIPHER_NULL_ENC_TEST_VECTORS 2
14124 #define HMAC_MD5_ECB_CIPHER_NULL_DEC_TEST_VECTORS 2
14125 #define HMAC_SHA1_ECB_CIPHER_NULL_ENC_TEST_VEC 2
14126 #define HMAC_SHA1_ECB_CIPHER_NULL_DEC_TEST_VEC 2
14127 #define HMAC_SHA1_AES_CBC_ENC_TEST_VEC 7
14128 #define HMAC_SHA256_AES_CBC_ENC_TEST_VEC 7
14129 #define HMAC_SHA512_AES_CBC_ENC_TEST_VEC 7
14130 #define AES_LRW_ENC_TEST_VECTORS 8
14131 #define AES_LRW_DEC_TEST_VECTORS 8
14132 #define AES_XTS_ENC_TEST_VECTORS 5
14133 #define AES_XTS_DEC_TEST_VECTORS 5
14134 #define AES_CTR_ENC_TEST_VECTORS 5
14135 #define AES_CTR_DEC_TEST_VECTORS 5
14136 #define AES_OFB_ENC_TEST_VECTORS 1
14137 #define AES_OFB_DEC_TEST_VECTORS 1
14138 #define AES_CTR_3686_ENC_TEST_VECTORS 7
14139 #define AES_CTR_3686_DEC_TEST_VECTORS 6
14140 #define AES_GCM_ENC_TEST_VECTORS 9
14141 #define AES_GCM_DEC_TEST_VECTORS 8
14142 #define AES_GCM_4106_ENC_TEST_VECTORS 23
14143 #define AES_GCM_4106_DEC_TEST_VECTORS 23
14144 #define AES_GCM_4543_ENC_TEST_VECTORS 1
14145 #define AES_GCM_4543_DEC_TEST_VECTORS 2
14146 #define AES_CCM_ENC_TEST_VECTORS 8
14147 #define AES_CCM_DEC_TEST_VECTORS 7
14148 #define AES_CCM_4309_ENC_TEST_VECTORS 7
14149 #define AES_CCM_4309_DEC_TEST_VECTORS 10
14150
14151 static struct cipher_testvec aes_enc_tv_template[] = {
14152         { /* From FIPS-197 */
14153                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
14154                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14155                 .klen   = 16,
14156                 .input  = "\x00\x11\x22\x33\x44\x55\x66\x77"
14157                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14158                 .ilen   = 16,
14159                 .result = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14160                           "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14161                 .rlen   = 16,
14162         }, {
14163                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
14164                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14165                           "\x10\x11\x12\x13\x14\x15\x16\x17",
14166                 .klen   = 24,
14167                 .input  = "\x00\x11\x22\x33\x44\x55\x66\x77"
14168                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14169                 .ilen   = 16,
14170                 .result = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14171                           "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
14172                 .rlen   = 16,
14173         }, {
14174                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
14175                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14176                           "\x10\x11\x12\x13\x14\x15\x16\x17"
14177                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14178                 .klen   = 32,
14179                 .input  = "\x00\x11\x22\x33\x44\x55\x66\x77"
14180                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14181                 .ilen   = 16,
14182                 .result = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14183                           "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14184                 .rlen   = 16,
14185         }, { /* Generated with Crypto++ */
14186                 .key    = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14187                           "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14188                           "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14189                           "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14190                 .klen   = 32,
14191                 .input  = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14192                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14193                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14194                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14195                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14196                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14197                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14198                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14199                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14200                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14201                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14202                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14203                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14204                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14205                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14206                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14207                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14208                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14209                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14210                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14211                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14212                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14213                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14214                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14215                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14216                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14217                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14218                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14219                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14220                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14221                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14222                           "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14223                           "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14224                           "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14225                           "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14226                           "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14227                           "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14228                           "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14229                           "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14230                           "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14231                           "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14232                           "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14233                           "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14234                           "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14235                           "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14236                           "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14237                           "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14238                           "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14239                           "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14240                           "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14241                           "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14242                           "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14243                           "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14244                           "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14245                           "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14246                           "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14247                           "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14248                           "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14249                           "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14250                           "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14251                           "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14252                           "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14253                 .ilen   = 496,
14254                 .result = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14255                           "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14256                           "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14257                           "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14258                           "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14259                           "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14260                           "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14261                           "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14262                           "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14263                           "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14264                           "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14265                           "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14266                           "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14267                           "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14268                           "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14269                           "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14270                           "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14271                           "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14272                           "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14273                           "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14274                           "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14275                           "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14276                           "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14277                           "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14278                           "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14279                           "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14280                           "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14281                           "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14282                           "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14283                           "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14284                           "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14285                           "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14286                           "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14287                           "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14288                           "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14289                           "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14290                           "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14291                           "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14292                           "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14293                           "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14294                           "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14295                           "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14296                           "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14297                           "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14298                           "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14299                           "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14300                           "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14301                           "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14302                           "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14303                           "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14304                           "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14305                           "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14306                           "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14307                           "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14308                           "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14309                           "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14310                           "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14311                           "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14312                           "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14313                           "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14314                           "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14315                           "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14316                 .rlen   = 496,
14317                 .also_non_np = 1,
14318                 .np     = 3,
14319                 .tap    = { 496 - 20, 4, 16 },
14320         },
14321 };
14322
14323 static struct cipher_testvec aes_dec_tv_template[] = {
14324         { /* From FIPS-197 */
14325                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
14326                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14327                 .klen   = 16,
14328                 .input  = "\x69\xc4\xe0\xd8\x6a\x7b\x04\x30"
14329                           "\xd8\xcd\xb7\x80\x70\xb4\xc5\x5a",
14330                 .ilen   = 16,
14331                 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14332                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14333                 .rlen   = 16,
14334         }, {
14335                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
14336                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14337                           "\x10\x11\x12\x13\x14\x15\x16\x17",
14338                 .klen   = 24,
14339                 .input  = "\xdd\xa9\x7c\xa4\x86\x4c\xdf\xe0"
14340                           "\x6e\xaf\x70\xa0\xec\x0d\x71\x91",
14341                 .ilen   = 16,
14342                 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14343                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14344                 .rlen   = 16,
14345         }, {
14346                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
14347                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14348                           "\x10\x11\x12\x13\x14\x15\x16\x17"
14349                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14350                 .klen   = 32,
14351                 .input  = "\x8e\xa2\xb7\xca\x51\x67\x45\xbf"
14352                           "\xea\xfc\x49\x90\x4b\x49\x60\x89",
14353                 .ilen   = 16,
14354                 .result = "\x00\x11\x22\x33\x44\x55\x66\x77"
14355                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
14356                 .rlen   = 16,
14357         }, { /* Generated with Crypto++ */
14358                 .key    = "\xA6\xC9\x83\xA6\xC9\xEC\x0F\x32"
14359                           "\x55\x0F\x32\x55\x78\x9B\xBE\x78"
14360                           "\x9B\xBE\xE1\x04\x27\xE1\x04\x27"
14361                           "\x4A\x6D\x90\x4A\x6D\x90\xB3\xD6",
14362                 .klen   = 32,
14363                 .input  = "\x71\x73\xF7\xDB\x24\x93\x21\x6D"
14364                           "\x61\x1E\xBB\x63\x42\x79\xDB\x64"
14365                           "\x6F\x82\xC0\xCA\xA3\x9B\xFA\x0B"
14366                           "\xD9\x08\xC7\x4A\x90\xAE\x8F\x5F"
14367                           "\x5E\x06\xF0\x5F\x31\x51\x18\x37"
14368                           "\x45\xD7\xCA\x3A\xFD\x6C\x3F\xE1"
14369                           "\xDD\x8D\x22\x65\x2B\x00\x50\xCE"
14370                           "\xBA\x28\x67\xD7\xCE\x0E\x0D\xEA"
14371                           "\x78\x69\x7F\xAE\x8F\x8B\x69\x37"
14372                           "\x75\xE0\xDC\x96\xE0\xB7\xF4\x09"
14373                           "\xCB\x6D\xA2\xFB\xDA\xAF\x09\xF8"
14374                           "\x81\x82\x27\xFA\x45\x9C\x29\xA4"
14375                           "\x22\x8B\x78\x69\x5B\x46\xF9\x39"
14376                           "\x1B\xCC\xF9\x1D\x09\xEB\xBC\x5C"
14377                           "\x41\x72\x51\x97\x1D\x07\x49\xA0"
14378                           "\x1B\x8E\x65\x4B\xB2\x6A\x12\x03"
14379                           "\x6A\x60\x95\xAC\xBD\xAC\x1A\x64"
14380                           "\xDE\x5A\xA5\xF0\x83\x2F\xCB\xCA"
14381                           "\x22\x74\xA6\x6C\x9B\x73\xCE\x3F"
14382                           "\xE1\x8B\x22\x17\x59\x0C\x47\x89"
14383                           "\x33\xA1\xD6\x47\x03\x19\x4F\xA8"
14384                           "\x67\x69\xF0\x5B\xF0\x20\xAD\x06"
14385                           "\x27\x81\x92\xD8\xC5\xBA\x98\x12"
14386                           "\xBE\x24\xB5\x2F\x75\x02\xC2\xAD"
14387                           "\x12\x2F\x07\x32\xEE\x39\xAF\x64"
14388                           "\x05\x8F\xB3\xD4\xEB\x1B\x46\x6E"
14389                           "\xD9\x21\xF9\xC4\xB7\xC9\x45\x68"
14390                           "\xB4\xA1\x74\x9F\x82\x47\xEB\xCC"
14391                           "\xBD\x0A\x14\x95\x0F\x8B\xA8\x2F"
14392                           "\x4B\x1B\xA7\xBF\x82\xA6\x43\x0C"
14393                           "\xB9\x39\x4A\xA8\x10\x6F\x50\x7B"
14394                           "\x25\xFB\x26\x81\xE0\x2F\xF0\x96"
14395                           "\x8D\x8B\xAC\x92\x0F\xF6\xED\x64"
14396                           "\x63\x29\x4C\x8E\x18\x13\xC5\xBF"
14397                           "\xFC\xA0\xD9\xBF\x7C\x3A\x0E\x29"
14398                           "\x6F\xD1\x6C\x6F\xA5\xDA\xBF\xB1"
14399                           "\x30\xEA\x44\x2D\xC3\x8F\x16\xE1"
14400                           "\x66\xFA\xA3\x21\x3E\xFC\x13\xCA"
14401                           "\xF0\xF6\xF0\x59\xBD\x8F\x38\x50"
14402                           "\x31\xCB\x69\x3F\x96\x15\xD6\xF5"
14403                           "\xAE\xFF\xF6\xAA\x41\x85\x4C\x10"
14404                           "\x58\xE3\xF9\x44\xE6\x28\xDA\x9A"
14405                           "\xDC\x6A\x80\x34\x73\x97\x1B\xC5"
14406                           "\xCA\x26\x16\x77\x0E\x60\xAB\x89"
14407                           "\x0F\x04\x27\xBD\xCE\x3E\x71\xB4"
14408                           "\xA0\xD7\x22\x7E\xDB\xEB\x24\x70"
14409                           "\x42\x71\x51\x78\x70\xB3\xE0\x3D"
14410                           "\x84\x8E\x8D\x7B\xD0\x6D\xEA\x92"
14411                           "\x11\x08\x42\x4F\xE5\xAD\x26\x92"
14412                           "\xD2\x00\xAE\xA8\xE3\x4B\x37\x47"
14413                           "\x22\xC1\x95\xC1\x63\x7F\xCB\x03"
14414                           "\xF3\xE3\xD7\x9D\x60\xC7\xBC\xEA"
14415                           "\x35\xA2\xFD\x45\x52\x39\x13\x6F"
14416                           "\xC1\x53\xF3\x53\xDF\x33\x84\xD7"
14417                           "\xD2\xC8\x37\xB0\x75\xE3\x41\x46"
14418                           "\xB3\xC7\x83\x2E\x8A\xBB\xA4\xE5"
14419                           "\x7F\x3C\xFD\x8B\xEB\xEA\x63\xBD"
14420                           "\xB7\x46\xE7\xBF\x09\x9C\x0D\x0F"
14421                           "\x40\x86\x7F\x51\xE1\x11\x9C\xCB"
14422                           "\x88\xE6\x68\x47\xE3\x2B\xC5\xFF"
14423                           "\x09\x79\xA0\x43\x5C\x0D\x08\x58"
14424                           "\x17\xBB\xC0\x6B\x62\x3F\x56\xE9",
14425                 .ilen   = 496,
14426                 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14427                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14428                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14429                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14430                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14431                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14432                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14433                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14434                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14435                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14436                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14437                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14438                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14439                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14440                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14441                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14442                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14443                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14444                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14445                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14446                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14447                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14448                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14449                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14450                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14451                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14452                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14453                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14454                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14455                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14456                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14457                           "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14458                           "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14459                           "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14460                           "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14461                           "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14462                           "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14463                           "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14464                           "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14465                           "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14466                           "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14467                           "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14468                           "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14469                           "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14470                           "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14471                           "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14472                           "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14473                           "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14474                           "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14475                           "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14476                           "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14477                           "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14478                           "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14479                           "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14480                           "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14481                           "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14482                           "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14483                           "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14484                           "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14485                           "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14486                           "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14487                           "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14488                 .rlen   = 496,
14489                 .also_non_np = 1,
14490                 .np     = 3,
14491                 .tap    = { 496 - 20, 4, 16 },
14492         },
14493 };
14494
14495 static struct cipher_testvec aes_cbc_enc_tv_template[] = {
14496         { /* From RFC 3602 */
14497                 .key    = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14498                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14499                 .klen   = 16,
14500                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14501                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14502                 .input  = "Single block msg",
14503                 .ilen   = 16,
14504                 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14505                           "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14506                 .rlen   = 16,
14507                 .also_non_np = 1,
14508                 .np     = 8,
14509                 .tap    = { 3, 2, 3, 2, 3, 1, 1, 1 },
14510         }, {
14511                 .key    = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14512                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14513                 .klen   = 16,
14514                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14515                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14516                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
14517                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14518                           "\x10\x11\x12\x13\x14\x15\x16\x17"
14519                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14520                 .ilen   = 32,
14521                 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14522                           "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14523                           "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14524                           "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14525                 .rlen   = 32,
14526         }, { /* From NIST SP800-38A */
14527                 .key    = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14528                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14529                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14530                 .klen   = 24,
14531                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
14532                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14533                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14534                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14535                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14536                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14537                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14538                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14539                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14540                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14541                 .ilen   = 64,
14542                 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14543                           "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14544                           "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14545                           "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14546                           "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14547                           "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14548                           "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14549                           "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14550                 .rlen   = 64,
14551         }, {
14552                 .key    = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14553                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14554                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14555                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14556                 .klen   = 32,
14557                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
14558                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14559                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14560                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14561                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14562                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14563                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14564                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14565                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14566                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14567                 .ilen   = 64,
14568                 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14569                           "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14570                           "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14571                           "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14572                           "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14573                           "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14574                           "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14575                           "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14576                 .rlen   = 64,
14577         }, { /* Generated with Crypto++ */
14578                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14579                           "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14580                           "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14581                           "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14582                 .klen   = 32,
14583                 .iv     = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14584                           "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14585                 .input  = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14586                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14587                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14588                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14589                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14590                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14591                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14592                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14593                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14594                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14595                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14596                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14597                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14598                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14599                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14600                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14601                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14602                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14603                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14604                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14605                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14606                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14607                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14608                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14609                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14610                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14611                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14612                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14613                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14614                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14615                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14616                           "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14617                           "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14618                           "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14619                           "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14620                           "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14621                           "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14622                           "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14623                           "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14624                           "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14625                           "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14626                           "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14627                           "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14628                           "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14629                           "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14630                           "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14631                           "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14632                           "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14633                           "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14634                           "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14635                           "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14636                           "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14637                           "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14638                           "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14639                           "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14640                           "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14641                           "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14642                           "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14643                           "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14644                           "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14645                           "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14646                           "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14647                 .ilen   = 496,
14648                 .result = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14649                           "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14650                           "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14651                           "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14652                           "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14653                           "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14654                           "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14655                           "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14656                           "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14657                           "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14658                           "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14659                           "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14660                           "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14661                           "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14662                           "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14663                           "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14664                           "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14665                           "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14666                           "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14667                           "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14668                           "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14669                           "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14670                           "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14671                           "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14672                           "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14673                           "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14674                           "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14675                           "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14676                           "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14677                           "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14678                           "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14679                           "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14680                           "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14681                           "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14682                           "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14683                           "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14684                           "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14685                           "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14686                           "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14687                           "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14688                           "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14689                           "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14690                           "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14691                           "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14692                           "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14693                           "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14694                           "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14695                           "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14696                           "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14697                           "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14698                           "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14699                           "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14700                           "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14701                           "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14702                           "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14703                           "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14704                           "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14705                           "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14706                           "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14707                           "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14708                           "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14709                           "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14710                 .rlen   = 496,
14711                 .also_non_np = 1,
14712                 .np     = 3,
14713                 .tap    = { 496 - 20, 4, 16 },
14714         },
14715 };
14716
14717 static struct cipher_testvec aes_cbc_dec_tv_template[] = {
14718         { /* From RFC 3602 */
14719                 .key    = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
14720                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
14721                 .klen   = 16,
14722                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
14723                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
14724                 .input  = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
14725                           "\x27\x08\x94\x2d\xbe\x77\x18\x1a",
14726                 .ilen   = 16,
14727                 .result = "Single block msg",
14728                 .rlen   = 16,
14729                 .also_non_np = 1,
14730                 .np     = 8,
14731                 .tap    = { 3, 2, 3, 2, 3, 1, 1, 1 },
14732         }, {
14733                 .key    = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
14734                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
14735                 .klen   = 16,
14736                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
14737                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
14738                 .input  = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
14739                           "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
14740                           "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
14741                           "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1",
14742                 .ilen   = 32,
14743                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
14744                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
14745                           "\x10\x11\x12\x13\x14\x15\x16\x17"
14746                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
14747                 .rlen   = 32,
14748         }, { /* From NIST SP800-38A */
14749                 .key    = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
14750                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
14751                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
14752                 .klen   = 24,
14753                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
14754                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14755                 .input  = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
14756                           "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
14757                           "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
14758                           "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
14759                           "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
14760                           "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
14761                           "\x08\xb0\xe2\x79\x88\x59\x88\x81"
14762                           "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd",
14763                 .ilen   = 64,
14764                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14765                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14766                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14767                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14768                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14769                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14770                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14771                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14772                 .rlen   = 64,
14773         }, {
14774                 .key    = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
14775                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
14776                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
14777                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
14778                 .klen   = 32,
14779                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
14780                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
14781                 .input  = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
14782                           "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
14783                           "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
14784                           "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
14785                           "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
14786                           "\xa5\x30\xe2\x63\x04\x23\x14\x61"
14787                           "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
14788                           "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b",
14789                 .ilen   = 64,
14790                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
14791                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
14792                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
14793                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
14794                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
14795                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
14796                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
14797                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
14798                 .rlen   = 64,
14799         }, { /* Generated with Crypto++ */
14800                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
14801                           "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
14802                           "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
14803                           "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
14804                 .klen   = 32,
14805                 .iv     = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
14806                           "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
14807                 .input  = "\xEA\x65\x8A\x19\xB0\x66\xC1\x3F"
14808                           "\xCE\xF1\x97\x75\xC1\xFD\xB5\xAF"
14809                           "\x52\x65\xF7\xFF\xBC\xD8\x2D\x9F"
14810                           "\x2F\xB9\x26\x9B\x6F\x10\xB7\xB8"
14811                           "\x26\xA1\x02\x46\xA2\xAD\xC6\xC0"
14812                           "\x11\x15\xFF\x6D\x1E\x82\x04\xA6"
14813                           "\xB1\x74\xD1\x08\x13\xFD\x90\x7C"
14814                           "\xF5\xED\xD3\xDB\x5A\x0A\x0C\x2F"
14815                           "\x0A\x70\xF1\x88\x07\xCF\x21\x26"
14816                           "\x40\x40\x8A\xF5\x53\xF7\x24\x4F"
14817                           "\x83\x38\x43\x5F\x08\x99\xEB\xE3"
14818                           "\xDC\x02\x64\x67\x50\x6E\x15\xC3"
14819                           "\x01\x1A\xA0\x81\x13\x65\xA6\x73"
14820                           "\x71\xA6\x3B\x91\x83\x77\xBE\xFA"
14821                           "\xDB\x71\x73\xA6\xC1\xAE\x43\xC3"
14822                           "\x36\xCE\xD6\xEB\xF9\x30\x1C\x4F"
14823                           "\x80\x38\x5E\x9C\x6E\xAB\x98\x2F"
14824                           "\x53\xAF\xCF\xC8\x9A\xB8\x86\x43"
14825                           "\x3E\x86\xE7\xA1\xF4\x2F\x30\x40"
14826                           "\x03\xA8\x6C\x50\x42\x9F\x77\x59"
14827                           "\x89\xA0\xC5\xEC\x9A\xB8\xDD\x99"
14828                           "\x16\x24\x02\x07\x48\xAE\xF2\x31"
14829                           "\x34\x0E\xC3\x85\xFE\x1C\x95\x99"
14830                           "\x87\x58\x98\x8B\xE7\xC6\xC5\x70"
14831                           "\x73\x81\x07\x7C\x56\x2F\xD8\x1B"
14832                           "\xB7\xB9\x2B\xAB\xE3\x01\x87\x0F"
14833                           "\xD8\xBB\xC0\x0D\xAC\x2C\x2F\x98"
14834                           "\x3C\x0B\xA2\x99\x4A\x8C\xF7\x04"
14835                           "\xE0\xE0\xCF\xD1\x81\x5B\xFE\xF5"
14836                           "\x24\x04\xFD\xB8\xDF\x13\xD8\xCD"
14837                           "\xF1\xE3\x3D\x98\x50\x02\x77\x9E"
14838                           "\xBC\x22\xAB\xFA\xC2\x43\x1F\x66"
14839                           "\x20\x02\x23\xDA\xDF\xA0\x89\xF6"
14840                           "\xD8\xF3\x45\x24\x53\x6F\x16\x77"
14841                           "\x02\x3E\x7B\x36\x5F\xA0\x3B\x78"
14842                           "\x63\xA2\xBD\xB5\xA4\xCA\x1E\xD3"
14843                           "\x57\xBC\x0B\x9F\x43\x51\x28\x4F"
14844                           "\x07\x50\x6C\x68\x12\x07\xCF\xFA"
14845                           "\x6B\x72\x0B\xEB\xF8\x88\x90\x2C"
14846                           "\x7E\xF5\x91\xD1\x03\xD8\xD5\xBD"
14847                           "\x22\x39\x7B\x16\x03\x01\x69\xAF"
14848                           "\x3D\x38\x66\x28\x0C\xBE\x5B\xC5"
14849                           "\x03\xB4\x2F\x51\x8A\x56\x17\x2B"
14850                           "\x88\x42\x6D\x40\x68\x8F\xD0\x11"
14851                           "\x19\xF9\x1F\x43\x79\x95\x31\xFA"
14852                           "\x28\x7A\x3D\xF7\x66\xEB\xEF\xAC"
14853                           "\x06\xB2\x01\xAD\xDB\x68\xDB\xEC"
14854                           "\x8D\x53\x6E\x72\x68\xA3\xC7\x63"
14855                           "\x43\x2B\x78\xE0\x04\x29\x8F\x72"
14856                           "\xB2\x2C\xE6\x84\x03\x30\x6D\xCD"
14857                           "\x26\x92\x37\xE1\x2F\xBB\x8B\x9D"
14858                           "\xE4\x4C\xF6\x93\xBC\xD9\xAD\x44"
14859                           "\x52\x65\xC7\xB0\x0E\x3F\x0E\x61"
14860                           "\x56\x5D\x1C\x6D\xA7\x05\x2E\xBC"
14861                           "\x58\x08\x15\xAB\x12\xAB\x17\x4A"
14862                           "\x5E\x1C\xF2\xCD\xB8\xA2\xAE\xFB"
14863                           "\x9B\x2E\x0E\x85\x34\x80\x0E\x3F"
14864                           "\x4C\xB8\xDB\xCE\x1C\x90\xA1\x61"
14865                           "\x6C\x69\x09\x35\x9E\xD4\xF4\xAD"
14866                           "\xBC\x06\x41\xE3\x01\xB4\x4E\x0A"
14867                           "\xE0\x1F\x91\xF8\x82\x96\x2D\x65"
14868                           "\xA3\xAA\x13\xCC\x50\xFF\x7B\x02",
14869                 .ilen   = 496,
14870                 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
14871                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
14872                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
14873                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
14874                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
14875                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
14876                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
14877                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
14878                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
14879                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
14880                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
14881                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
14882                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
14883                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
14884                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
14885                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
14886                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
14887                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
14888                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
14889                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
14890                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
14891                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
14892                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
14893                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
14894                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
14895                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
14896                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
14897                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
14898                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
14899                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
14900                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
14901                           "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
14902                           "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
14903                           "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
14904                           "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
14905                           "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
14906                           "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
14907                           "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
14908                           "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
14909                           "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
14910                           "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
14911                           "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
14912                           "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
14913                           "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
14914                           "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
14915                           "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
14916                           "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
14917                           "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
14918                           "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
14919                           "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
14920                           "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
14921                           "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
14922                           "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
14923                           "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
14924                           "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
14925                           "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
14926                           "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
14927                           "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
14928                           "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
14929                           "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
14930                           "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
14931                           "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
14932                 .rlen   = 496,
14933                 .also_non_np = 1,
14934                 .np     = 3,
14935                 .tap    = { 496 - 20, 4, 16 },
14936         },
14937 };
14938
14939 static struct aead_testvec hmac_md5_ecb_cipher_null_enc_tv_template[] = {
14940         { /* Input data from RFC 2410 Case 1 */
14941 #ifdef __LITTLE_ENDIAN
14942                 .key    = "\x08\x00"            /* rta length */
14943                           "\x01\x00"            /* rta type */
14944 #else
14945                 .key    = "\x00\x08"            /* rta length */
14946                           "\x00\x01"            /* rta type */
14947 #endif
14948                           "\x00\x00\x00\x00"    /* enc key length */
14949                           "\x00\x00\x00\x00\x00\x00\x00\x00"
14950                           "\x00\x00\x00\x00\x00\x00\x00\x00",
14951                 .klen   = 8 + 16 + 0,
14952                 .iv     = "",
14953                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
14954                 .ilen   = 8,
14955                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14956                           "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14957                           "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14958                 .rlen   = 8 + 16,
14959         }, { /* Input data from RFC 2410 Case 2 */
14960 #ifdef __LITTLE_ENDIAN
14961                 .key    = "\x08\x00"            /* rta length */
14962                           "\x01\x00"            /* rta type */
14963 #else
14964                 .key    = "\x00\x08"            /* rta length */
14965                           "\x00\x01"            /* rta type */
14966 #endif
14967                           "\x00\x00\x00\x00"    /* enc key length */
14968                           "\x00\x00\x00\x00\x00\x00\x00\x00"
14969                           "\x00\x00\x00\x00\x00\x00\x00\x00",
14970                 .klen   = 8 + 16 + 0,
14971                 .iv     = "",
14972                 .input  = "Network Security People Have A Strange Sense Of Humor",
14973                 .ilen   = 53,
14974                 .result = "Network Security People Have A Strange Sense Of Humor"
14975                           "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
14976                           "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
14977                 .rlen   = 53 + 16,
14978         },
14979 };
14980
14981 static struct aead_testvec hmac_md5_ecb_cipher_null_dec_tv_template[] = {
14982         {
14983 #ifdef __LITTLE_ENDIAN
14984                 .key    = "\x08\x00"            /* rta length */
14985                           "\x01\x00"            /* rta type */
14986 #else
14987                 .key    = "\x00\x08"            /* rta length */
14988                           "\x00\x01"            /* rta type */
14989 #endif
14990                           "\x00\x00\x00\x00"    /* enc key length */
14991                           "\x00\x00\x00\x00\x00\x00\x00\x00"
14992                           "\x00\x00\x00\x00\x00\x00\x00\x00",
14993                 .klen   = 8 + 16 + 0,
14994                 .iv     = "",
14995                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef"
14996                           "\xaa\x42\xfe\x43\x8d\xea\xa3\x5a"
14997                           "\xb9\x3d\x9f\xb1\xa3\x8e\x9b\xae",
14998                 .ilen   = 8 + 16,
14999                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15000                 .rlen   = 8,
15001         }, {
15002 #ifdef __LITTLE_ENDIAN
15003                 .key    = "\x08\x00"            /* rta length */
15004                           "\x01\x00"            /* rta type */
15005 #else
15006                 .key    = "\x00\x08"            /* rta length */
15007                           "\x00\x01"            /* rta type */
15008 #endif
15009                           "\x00\x00\x00\x00"    /* enc key length */
15010                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15011                           "\x00\x00\x00\x00\x00\x00\x00\x00",
15012                 .klen   = 8 + 16 + 0,
15013                 .iv     = "",
15014                 .input  = "Network Security People Have A Strange Sense Of Humor"
15015                           "\x73\xa5\x3e\x1c\x08\x0e\x8a\x8a"
15016                           "\x8e\xb5\x5f\x90\x8e\xfe\x13\x23",
15017                 .ilen   = 53 + 16,
15018                 .result = "Network Security People Have A Strange Sense Of Humor",
15019                 .rlen   = 53,
15020         },
15021 };
15022
15023 static struct aead_testvec hmac_sha1_aes_cbc_enc_tv_temp[] = {
15024         { /* RFC 3602 Case 1 */
15025 #ifdef __LITTLE_ENDIAN
15026                 .key    = "\x08\x00"            /* rta length */
15027                           "\x01\x00"            /* rta type */
15028 #else
15029                 .key    = "\x00\x08"            /* rta length */
15030                           "\x00\x01"            /* rta type */
15031 #endif
15032                           "\x00\x00\x00\x10"    /* enc key length */
15033                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15034                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15035                           "\x00\x00\x00\x00"
15036                           "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15037                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15038                 .klen   = 8 + 20 + 16,
15039                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15040                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15041                 .assoc  = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15042                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15043                 .alen   = 16,
15044                 .input  = "Single block msg",
15045                 .ilen   = 16,
15046                 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15047                           "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15048                           "\x1b\x13\xcb\xaf\x89\x5e\xe1\x2c"
15049                           "\x13\xc5\x2e\xa3\xcc\xed\xdc\xb5"
15050                           "\x03\x71\xa2\x06",
15051                 .rlen   = 16 + 20,
15052         }, { /* RFC 3602 Case 2 */
15053 #ifdef __LITTLE_ENDIAN
15054                 .key    = "\x08\x00"            /* rta length */
15055                           "\x01\x00"            /* rta type */
15056 #else
15057                 .key    = "\x00\x08"            /* rta length */
15058                           "\x00\x01"            /* rta type */
15059 #endif
15060                           "\x00\x00\x00\x10"    /* enc key length */
15061                           "\x20\x21\x22\x23\x24\x25\x26\x27"
15062                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15063                           "\x30\x31\x32\x33"
15064                           "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15065                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15066                 .klen   = 8 + 20 + 16,
15067                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15068                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15069                 .assoc  = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15070                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15071                 .alen   = 16,
15072                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
15073                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15074                           "\x10\x11\x12\x13\x14\x15\x16\x17"
15075                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15076                 .ilen   = 32,
15077                 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15078                           "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15079                           "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15080                           "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15081                           "\xad\x9b\x4c\x5c\x85\xe1\xda\xae"
15082                           "\xee\x81\x4e\xd7\xdb\x74\xcf\x58"
15083                           "\x65\x39\xf8\xde",
15084                 .rlen   = 32 + 20,
15085         }, { /* RFC 3602 Case 3 */
15086 #ifdef __LITTLE_ENDIAN
15087                 .key    = "\x08\x00"            /* rta length */
15088                           "\x01\x00"            /* rta type */
15089 #else
15090                 .key    = "\x00\x08"            /* rta length */
15091                           "\x00\x01"            /* rta type */
15092 #endif
15093                           "\x00\x00\x00\x10"    /* enc key length */
15094                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15095                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15096                           "\x22\x33\x44\x55"
15097                           "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15098                           "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15099                 .klen   = 8 + 20 + 16,
15100                 .iv     = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15101                           "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15102                 .assoc  = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15103                           "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15104                 .alen   = 16,
15105                 .input  = "This is a 48-byte message (exactly 3 AES blocks)",
15106                 .ilen   = 48,
15107                 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15108                           "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15109                           "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15110                           "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15111                           "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15112                           "\x85\x79\x69\x5d\x83\xba\x26\x84"
15113                           "\xc2\xec\x0c\xf8\x7f\x05\xba\xca"
15114                           "\xff\xee\x4c\xd0\x93\xe6\x36\x7f"
15115                           "\x8d\x62\xf2\x1e",
15116                 .rlen   = 48 + 20,
15117         }, { /* RFC 3602 Case 4 */
15118 #ifdef __LITTLE_ENDIAN
15119                 .key    = "\x08\x00"            /* rta length */
15120                           "\x01\x00"            /* rta type */
15121 #else
15122                 .key    = "\x00\x08"            /* rta length */
15123                           "\x00\x01"            /* rta type */
15124 #endif
15125                           "\x00\x00\x00\x10"    /* enc key length */
15126                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15127                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15128                           "\x22\x33\x44\x55"
15129                           "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15130                           "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15131                 .klen   = 8 + 20 + 16,
15132                 .iv     = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15133                           "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15134                 .assoc  = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15135                           "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15136                 .alen   = 16,
15137                 .input  = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15138                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15139                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15140                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15141                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15142                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15143                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15144                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15145                 .ilen   = 64,
15146                 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15147                           "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15148                           "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15149                           "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15150                           "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15151                           "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15152                           "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15153                           "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15154                           "\x1c\x45\x57\xa9\x56\xcb\xa9\x2d"
15155                           "\x18\xac\xf1\xc7\x5d\xd1\xcd\x0d"
15156                           "\x1d\xbe\xc6\xe9",
15157                 .rlen   = 64 + 20,
15158         }, { /* RFC 3602 Case 5 */
15159 #ifdef __LITTLE_ENDIAN
15160                 .key    = "\x08\x00"            /* rta length */
15161                           "\x01\x00"            /* rta type */
15162 #else
15163                 .key    = "\x00\x08"            /* rta length */
15164                           "\x00\x01"            /* rta type */
15165 #endif
15166                           "\x00\x00\x00\x10"    /* enc key length */
15167                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15168                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15169                           "\x22\x33\x44\x55"
15170                           "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15171                           "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15172                 .klen   = 8 + 20 + 16,
15173                 .iv     = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15174                           "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15175                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
15176                           "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15177                           "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15178                 .alen   = 24,
15179                 .input  = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15180                           "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15181                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15182                           "\x10\x11\x12\x13\x14\x15\x16\x17"
15183                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15184                           "\x20\x21\x22\x23\x24\x25\x26\x27"
15185                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15186                           "\x30\x31\x32\x33\x34\x35\x36\x37"
15187                           "\x01\x02\x03\x04\x05\x06\x07\x08"
15188                           "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15189                 .ilen   = 80,
15190                 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15191                           "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15192                           "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15193                           "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15194                           "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15195                           "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15196                           "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15197                           "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15198                           "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15199                           "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15200                           "\x58\xc6\x84\x75\xe4\xe9\x6b\x0c"
15201                           "\xe1\xc5\x0b\x73\x4d\x82\x55\xa8"
15202                           "\x85\xe1\x59\xf7",
15203                 .rlen   = 80 + 20,
15204        }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15205 #ifdef __LITTLE_ENDIAN
15206                 .key    = "\x08\x00"            /* rta length */
15207                           "\x01\x00"            /* rta type */
15208 #else
15209                 .key    = "\x00\x08"            /* rta length */
15210                           "\x00\x01"            /* rta type */
15211 #endif
15212                           "\x00\x00\x00\x18"    /* enc key length */
15213                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15214                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15215                           "\x22\x33\x44\x55"
15216                           "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15217                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15218                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15219                 .klen   = 8 + 20 + 24,
15220                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
15221                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15222                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
15223                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15224                 .alen   = 16,
15225                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15226                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15227                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15228                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15229                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15230                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15231                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15232                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15233                 .ilen   = 64,
15234                 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15235                           "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15236                           "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15237                           "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15238                           "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15239                           "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15240                           "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15241                           "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15242                           "\x73\xe3\x19\x3f\x8b\xc9\xc6\xf4"
15243                           "\x5a\xf1\x5b\xa8\x98\x07\xc5\x36"
15244                           "\x47\x4c\xfc\x36",
15245                 .rlen   = 64 + 20,
15246         }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15247 #ifdef __LITTLE_ENDIAN
15248                 .key    = "\x08\x00"            /* rta length */
15249                           "\x01\x00"            /* rta type */
15250 #else
15251                 .key    = "\x00\x08"            /* rta length */
15252                           "\x00\x01"            /* rta type */
15253 #endif
15254                           "\x00\x00\x00\x20"    /* enc key length */
15255                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15256                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15257                           "\x22\x33\x44\x55"
15258                           "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15259                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15260                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15261                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15262                 .klen   = 8 + 20 + 32,
15263                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
15264                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15265                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
15266                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15267                 .alen   = 16,
15268                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15269                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15270                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15271                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15272                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15273                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15274                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15275                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15276                 .ilen   = 64,
15277                 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15278                           "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15279                           "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15280                           "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15281                           "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15282                           "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15283                           "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15284                           "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15285                           "\xa3\xe8\x9b\x17\xe3\xf4\x7f\xde"
15286                           "\x1b\x9f\xc6\x81\x26\x43\x4a\x87"
15287                           "\x51\xee\xd6\x4e",
15288                 .rlen   = 64 + 20,
15289         },
15290 };
15291
15292 static struct aead_testvec hmac_sha1_ecb_cipher_null_enc_tv_temp[] = {
15293         { /* Input data from RFC 2410 Case 1 */
15294 #ifdef __LITTLE_ENDIAN
15295                 .key    = "\x08\x00"            /* rta length */
15296                           "\x01\x00"            /* rta type */
15297 #else
15298                 .key    = "\x00\x08"            /* rta length */
15299                           "\x00\x01"            /* rta type */
15300 #endif
15301                           "\x00\x00\x00\x00"    /* enc key length */
15302                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15303                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15304                           "\x00\x00\x00\x00",
15305                 .klen   = 8 + 20 + 0,
15306                 .iv     = "",
15307                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15308                 .ilen   = 8,
15309                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15310                           "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15311                           "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15312                           "\x8c\x5e\xe4\x08",
15313                 .rlen   = 8 + 20,
15314         }, { /* Input data from RFC 2410 Case 2 */
15315 #ifdef __LITTLE_ENDIAN
15316                 .key    = "\x08\x00"            /* rta length */
15317                           "\x01\x00"            /* rta type */
15318 #else
15319                 .key    = "\x00\x08"            /* rta length */
15320                           "\x00\x01"            /* rta type */
15321 #endif
15322                           "\x00\x00\x00\x00"    /* enc key length */
15323                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15324                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15325                           "\x00\x00\x00\x00",
15326                 .klen   = 8 + 20 + 0,
15327                 .iv     = "",
15328                 .input  = "Network Security People Have A Strange Sense Of Humor",
15329                 .ilen   = 53,
15330                 .result = "Network Security People Have A Strange Sense Of Humor"
15331                           "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15332                           "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15333                           "\x91\x56\xe4\xd6",
15334                 .rlen   = 53 + 20,
15335         },
15336 };
15337
15338 static struct aead_testvec hmac_sha1_ecb_cipher_null_dec_tv_temp[] = {
15339         {
15340 #ifdef __LITTLE_ENDIAN
15341                 .key    = "\x08\x00"            /* rta length */
15342                           "\x01\x00"            /* rta type */
15343 #else
15344                 .key    = "\x00\x08"            /* rta length */
15345                           "\x00\x01"            /* rta type */
15346 #endif
15347                           "\x00\x00\x00\x00"    /* enc key length */
15348                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15349                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15350                           "\x00\x00\x00\x00",
15351                 .klen   = 8 + 20 + 0,
15352                 .iv     = "",
15353                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef"
15354                           "\x40\xc3\x0a\xa1\xc9\xa0\x28\xab"
15355                           "\x99\x5e\x19\x04\xd1\x72\xef\xb8"
15356                           "\x8c\x5e\xe4\x08",
15357                 .ilen   = 8 + 20,
15358                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
15359                 .rlen   = 8,
15360         }, {
15361 #ifdef __LITTLE_ENDIAN
15362                 .key    = "\x08\x00"            /* rta length */
15363                           "\x01\x00"            /* rta type */
15364 #else
15365                 .key    = "\x00\x08"            /* rta length */
15366                           "\x00\x01"            /* rta type */
15367 #endif
15368                           "\x00\x00\x00\x00"    /* enc key length */
15369                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15370                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15371                           "\x00\x00\x00\x00",
15372                 .klen   = 8 + 20 + 0,
15373                 .iv     = "",
15374                 .input  = "Network Security People Have A Strange Sense Of Humor"
15375                           "\x75\x6f\x42\x1e\xf8\x50\x21\xd2"
15376                           "\x65\x47\xee\x8e\x1a\xef\x16\xf6"
15377                           "\x91\x56\xe4\xd6",
15378                 .ilen   = 53 + 20,
15379                 .result = "Network Security People Have A Strange Sense Of Humor",
15380                 .rlen   = 53,
15381         },
15382 };
15383
15384 static struct aead_testvec hmac_sha256_aes_cbc_enc_tv_temp[] = {
15385         { /* RFC 3602 Case 1 */
15386 #ifdef __LITTLE_ENDIAN
15387                 .key    = "\x08\x00"            /* rta length */
15388                           "\x01\x00"            /* rta type */
15389 #else
15390                 .key    = "\x00\x08"            /* rta length */
15391                           "\x00\x01"            /* rta type */
15392 #endif
15393                           "\x00\x00\x00\x10"    /* enc key length */
15394                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15395                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15396                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15397                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15398                           "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15399                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15400                 .klen   = 8 + 32 + 16,
15401                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15402                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15403                 .assoc  = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15404                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15405                 .alen   = 16,
15406                 .input  = "Single block msg",
15407                 .ilen   = 16,
15408                 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15409                           "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15410                           "\xcc\xde\x2d\x6a\xae\xf1\x0b\xcc"
15411                           "\x38\x06\x38\x51\xb4\xb8\xf3\x5b"
15412                           "\x5c\x34\xa6\xa3\x6e\x0b\x05\xe5"
15413                           "\x6a\x6d\x44\xaa\x26\xa8\x44\xa5",
15414                 .rlen   = 16 + 32,
15415         }, { /* RFC 3602 Case 2 */
15416 #ifdef __LITTLE_ENDIAN
15417                 .key    = "\x08\x00"            /* rta length */
15418                           "\x01\x00"            /* rta type */
15419 #else
15420                 .key    = "\x00\x08"            /* rta length */
15421                           "\x00\x01"            /* rta type */
15422 #endif
15423                           "\x00\x00\x00\x10"    /* enc key length */
15424                           "\x20\x21\x22\x23\x24\x25\x26\x27"
15425                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15426                           "\x30\x31\x32\x33\x34\x35\x36\x37"
15427                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15428                           "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15429                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15430                 .klen   = 8 + 32 + 16,
15431                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15432                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15433                 .assoc  = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15434                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15435                 .alen   = 16,
15436                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
15437                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15438                           "\x10\x11\x12\x13\x14\x15\x16\x17"
15439                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15440                 .ilen   = 32,
15441                 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15442                           "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15443                           "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15444                           "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15445                           "\xf5\x33\x53\xf3\x68\x85\x2a\x99"
15446                           "\x0e\x06\x58\x8f\xba\xf6\x06\xda"
15447                           "\x49\x69\x0d\x5b\xd4\x36\x06\x62"
15448                           "\x35\x5e\x54\x58\x53\x4d\xdf\xbf",
15449                 .rlen   = 32 + 32,
15450         }, { /* RFC 3602 Case 3 */
15451 #ifdef __LITTLE_ENDIAN
15452                 .key    = "\x08\x00"            /* rta length */
15453                           "\x01\x00"            /* rta type */
15454 #else
15455                 .key    = "\x00\x08"            /* rta length */
15456                           "\x00\x01"            /* rta type */
15457 #endif
15458                           "\x00\x00\x00\x10"    /* enc key length */
15459                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15460                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15461                           "\x22\x33\x44\x55\x66\x77\x88\x99"
15462                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15463                           "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15464                           "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15465                 .klen   = 8 + 32 + 16,
15466                 .iv     = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15467                           "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15468                 .assoc  = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15469                           "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15470                 .alen   = 16,
15471                 .input  = "This is a 48-byte message (exactly 3 AES blocks)",
15472                 .ilen   = 48,
15473                 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15474                           "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15475                           "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15476                           "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15477                           "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15478                           "\x85\x79\x69\x5d\x83\xba\x26\x84"
15479                           "\x68\xb9\x3e\x90\x38\xa0\x88\x01"
15480                           "\xe7\xc6\xce\x10\x31\x2f\x9b\x1d"
15481                           "\x24\x78\xfb\xbe\x02\xe0\x4f\x40"
15482                           "\x10\xbd\xaa\xc6\xa7\x79\xe0\x1a",
15483                 .rlen   = 48 + 32,
15484         }, { /* RFC 3602 Case 4 */
15485 #ifdef __LITTLE_ENDIAN
15486                 .key    = "\x08\x00"            /* rta length */
15487                           "\x01\x00"            /* rta type */
15488 #else
15489                 .key    = "\x00\x08"            /* rta length */
15490                           "\x00\x01"            /* rta type */
15491 #endif
15492                           "\x00\x00\x00\x10"    /* enc key length */
15493                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15494                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15495                           "\x22\x33\x44\x55\x66\x77\x88\x99"
15496                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15497                           "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15498                           "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15499                 .klen   = 8 + 32 + 16,
15500                 .iv     = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15501                           "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15502                 .assoc  = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15503                           "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15504                 .alen   = 16,
15505                 .input  = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15506                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15507                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15508                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15509                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15510                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15511                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15512                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15513                 .ilen   = 64,
15514                 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15515                           "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15516                           "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15517                           "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15518                           "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15519                           "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15520                           "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15521                           "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15522                           "\x7a\x1b\xd4\x3c\xdb\x17\x95\xe2"
15523                           "\xe0\x93\xec\xc9\x9f\xf7\xce\xd8"
15524                           "\x3f\x54\xe2\x49\x39\xe3\x71\x25"
15525                           "\x2b\x6c\xe9\x5d\xec\xec\x2b\x64",
15526                 .rlen   = 64 + 32,
15527         }, { /* RFC 3602 Case 5 */
15528 #ifdef __LITTLE_ENDIAN
15529                 .key    = "\x08\x00"            /* rta length */
15530                           "\x01\x00"            /* rta type */
15531 #else
15532                 .key    = "\x00\x08"            /* rta length */
15533                           "\x00\x01"            /* rta type */
15534 #endif
15535                           "\x00\x00\x00\x10"    /* enc key length */
15536                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15537                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15538                           "\x22\x33\x44\x55\x66\x77\x88\x99"
15539                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15540                           "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15541                           "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15542                 .klen   = 8 + 32 + 16,
15543                 .iv     = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15544                           "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15545                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
15546                           "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15547                           "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15548                 .alen   = 24,
15549                 .input  = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15550                           "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15551                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15552                           "\x10\x11\x12\x13\x14\x15\x16\x17"
15553                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15554                           "\x20\x21\x22\x23\x24\x25\x26\x27"
15555                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15556                           "\x30\x31\x32\x33\x34\x35\x36\x37"
15557                           "\x01\x02\x03\x04\x05\x06\x07\x08"
15558                           "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15559                 .ilen   = 80,
15560                 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15561                           "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15562                           "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15563                           "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15564                           "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15565                           "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15566                           "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15567                           "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15568                           "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15569                           "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15570                           "\xbb\xd4\x0f\xbe\xa3\x3b\x4c\xb8"
15571                           "\x3a\xd2\xe1\x03\x86\xa5\x59\xb7"
15572                           "\x73\xc3\x46\x20\x2c\xb1\xef\x68"
15573                           "\xbb\x8a\x32\x7e\x12\x8c\x69\xcf",
15574                 .rlen   = 80 + 32,
15575        }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15576 #ifdef __LITTLE_ENDIAN
15577                 .key    = "\x08\x00"            /* rta length */
15578                           "\x01\x00"            /* rta type */
15579 #else
15580                 .key    = "\x00\x08"            /* rta length */
15581                           "\x00\x01"            /* rta type */
15582 #endif
15583                           "\x00\x00\x00\x18"    /* enc key length */
15584                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15585                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15586                           "\x22\x33\x44\x55\x66\x77\x88\x99"
15587                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15588                           "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15589                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15590                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15591                 .klen   = 8 + 32 + 24,
15592                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
15593                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15594                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
15595                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15596                 .alen   = 16,
15597                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15598                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15599                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15600                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15601                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15602                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15603                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15604                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15605                 .ilen   = 64,
15606                 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15607                           "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15608                           "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15609                           "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15610                           "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15611                           "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15612                           "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15613                           "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15614                           "\x2f\xee\x5f\xdb\x66\xfe\x79\x09"
15615                           "\x61\x81\x31\xea\x5b\x3d\x8e\xfb"
15616                           "\xca\x71\x85\x93\xf7\x85\x55\x8b"
15617                           "\x7a\xe4\x94\xca\x8b\xba\x19\x33",
15618                 .rlen   = 64 + 32,
15619         }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15620 #ifdef __LITTLE_ENDIAN
15621                 .key    = "\x08\x00"            /* rta length */
15622                           "\x01\x00"            /* rta type */
15623 #else
15624                 .key    = "\x00\x08"            /* rta length */
15625                           "\x00\x01"            /* rta type */
15626 #endif
15627                           "\x00\x00\x00\x20"    /* enc key length */
15628                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15629                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15630                           "\x22\x33\x44\x55\x66\x77\x88\x99"
15631                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15632                           "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15633                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15634                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15635                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15636                 .klen   = 8 + 32 + 32,
15637                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
15638                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15639                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
15640                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15641                 .alen   = 16,
15642                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15643                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15644                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15645                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15646                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15647                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15648                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15649                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15650                 .ilen   = 64,
15651                 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15652                           "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15653                           "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15654                           "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15655                           "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15656                           "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15657                           "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15658                           "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15659                           "\x24\x29\xed\xc2\x31\x49\xdb\xb1"
15660                           "\x8f\x74\xbd\x17\x92\x03\xbe\x8f"
15661                           "\xf3\x61\xde\x1c\xe9\xdb\xcd\xd0"
15662                           "\xcc\xce\xe9\x85\x57\xcf\x6f\x5f",
15663                 .rlen   = 64 + 32,
15664         },
15665 };
15666
15667 static struct aead_testvec hmac_sha512_aes_cbc_enc_tv_temp[] = {
15668         { /* RFC 3602 Case 1 */
15669 #ifdef __LITTLE_ENDIAN
15670                 .key    = "\x08\x00"            /* rta length */
15671                           "\x01\x00"            /* rta type */
15672 #else
15673                 .key    = "\x00\x08"            /* rta length */
15674                           "\x00\x01"            /* rta type */
15675 #endif
15676                           "\x00\x00\x00\x10"    /* enc key length */
15677                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15678                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15679                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15680                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15681                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15682                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15683                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15684                           "\x00\x00\x00\x00\x00\x00\x00\x00"
15685                           "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
15686                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
15687                 .klen   = 8 + 64 + 16,
15688                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15689                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15690                 .assoc  = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
15691                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
15692                 .alen   = 16,
15693                 .input  = "Single block msg",
15694                 .ilen   = 16,
15695                 .result = "\xe3\x53\x77\x9c\x10\x79\xae\xb8"
15696                           "\x27\x08\x94\x2d\xbe\x77\x18\x1a"
15697                           "\x3f\xdc\xad\x90\x03\x63\x5e\x68"
15698                           "\xc3\x13\xdd\xa4\x5c\x4d\x54\xa7"
15699                           "\x19\x6e\x03\x75\x2b\xa1\x62\xce"
15700                           "\xe0\xc6\x96\x75\xb2\x14\xca\x96"
15701                           "\xec\xbd\x50\x08\x07\x64\x1a\x49"
15702                           "\xe8\x9a\x7c\x06\x3d\xcb\xff\xb2"
15703                           "\xfa\x20\x89\xdd\x9c\xac\x9e\x16"
15704                           "\x18\x8a\xa0\x6d\x01\x6c\xa3\x3a",
15705                 .rlen   = 16 + 64,
15706         }, { /* RFC 3602 Case 2 */
15707 #ifdef __LITTLE_ENDIAN
15708                 .key    = "\x08\x00"            /* rta length */
15709                           "\x01\x00"            /* rta type */
15710 #else
15711                 .key    = "\x00\x08"            /* rta length */
15712                           "\x00\x01"            /* rta type */
15713 #endif
15714                           "\x00\x00\x00\x10"    /* enc key length */
15715                           "\x20\x21\x22\x23\x24\x25\x26\x27"
15716                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15717                           "\x30\x31\x32\x33\x34\x35\x36\x37"
15718                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
15719                           "\x40\x41\x42\x43\x44\x45\x46\x47"
15720                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
15721                           "\x50\x51\x52\x53\x54\x55\x56\x57"
15722                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
15723                           "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
15724                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
15725                 .klen   = 8 + 64 + 16,
15726                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15727                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15728                 .assoc  = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
15729                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
15730                 .alen   = 16,
15731                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
15732                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15733                           "\x10\x11\x12\x13\x14\x15\x16\x17"
15734                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
15735                 .ilen   = 32,
15736                 .result = "\xd2\x96\xcd\x94\xc2\xcc\xcf\x8a"
15737                           "\x3a\x86\x30\x28\xb5\xe1\xdc\x0a"
15738                           "\x75\x86\x60\x2d\x25\x3c\xff\xf9"
15739                           "\x1b\x82\x66\xbe\xa6\xd6\x1a\xb1"
15740                           "\xda\xb2\x0c\xb2\x26\xc4\xd5\xef"
15741                           "\x60\x38\xa4\x5e\x9a\x8c\x1b\x41"
15742                           "\x03\x9f\xc4\x64\x7f\x01\x42\x9b"
15743                           "\x0e\x1b\xea\xef\xbc\x88\x19\x5e"
15744                           "\x31\x7e\xc2\x95\xfc\x09\x32\x0a"
15745                           "\x46\x32\x7c\x41\x9c\x59\x3e\xe9"
15746                           "\x8f\x9f\xd4\x31\xd6\x22\xbd\xf8"
15747                           "\xf7\x0a\x94\xe5\xa9\xc3\xf6\x9d",
15748                 .rlen   = 32 + 64,
15749         }, { /* RFC 3602 Case 3 */
15750 #ifdef __LITTLE_ENDIAN
15751                 .key    = "\x08\x00"            /* rta length */
15752                           "\x01\x00"            /* rta type */
15753 #else
15754                 .key    = "\x00\x08"            /* rta length */
15755                           "\x00\x01"            /* rta type */
15756 #endif
15757                           "\x00\x00\x00\x10"    /* enc key length */
15758                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15759                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15760                           "\x22\x33\x44\x55\x66\x77\x88\x99"
15761                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15762                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
15763                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15764                           "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15765                           "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15766                           "\x6c\x3e\xa0\x47\x76\x30\xce\x21"
15767                           "\xa2\xce\x33\x4a\xa7\x46\xc2\xcd",
15768                 .klen   = 8 + 64 + 16,
15769                 .iv     = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15770                           "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15771                 .assoc  = "\xc7\x82\xdc\x4c\x09\x8c\x66\xcb"
15772                           "\xd9\xcd\x27\xd8\x25\x68\x2c\x81",
15773                 .alen   = 16,
15774                 .input  = "This is a 48-byte message (exactly 3 AES blocks)",
15775                 .ilen   = 48,
15776                 .result = "\xd0\xa0\x2b\x38\x36\x45\x17\x53"
15777                           "\xd4\x93\x66\x5d\x33\xf0\xe8\x86"
15778                           "\x2d\xea\x54\xcd\xb2\x93\xab\xc7"
15779                           "\x50\x69\x39\x27\x67\x72\xf8\xd5"
15780                           "\x02\x1c\x19\x21\x6b\xad\x52\x5c"
15781                           "\x85\x79\x69\x5d\x83\xba\x26\x84"
15782                           "\x64\x19\x17\x5b\x57\xe0\x21\x0f"
15783                           "\xca\xdb\xa1\x26\x38\x14\xa2\x69"
15784                           "\xdb\x54\x67\x80\xc0\x54\xe0\xfd"
15785                           "\x3e\x91\xe7\x91\x7f\x13\x38\x44"
15786                           "\xb7\xb1\xd6\xc8\x7d\x48\x8d\x41"
15787                           "\x08\xea\x29\x6c\x74\x67\x3f\xb0"
15788                           "\xac\x7f\x5c\x1d\xf5\xee\x22\x66"
15789                           "\x27\xa6\xb6\x13\xba\xba\xf0\xc2",
15790                 .rlen   = 48 + 64,
15791         }, { /* RFC 3602 Case 4 */
15792 #ifdef __LITTLE_ENDIAN
15793                 .key    = "\x08\x00"            /* rta length */
15794                           "\x01\x00"            /* rta type */
15795 #else
15796                 .key    = "\x00\x08"            /* rta length */
15797                           "\x00\x01"            /* rta type */
15798 #endif
15799                           "\x00\x00\x00\x10"    /* enc key length */
15800                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15801                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15802                           "\x22\x33\x44\x55\x66\x77\x88\x99"
15803                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15804                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
15805                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15806                           "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15807                           "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15808                           "\x56\xe4\x7a\x38\xc5\x59\x89\x74"
15809                           "\xbc\x46\x90\x3d\xba\x29\x03\x49",
15810                 .klen   = 8 + 64 + 16,
15811                 .iv     = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15812                           "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15813                 .assoc  = "\x8c\xe8\x2e\xef\xbe\xa0\xda\x3c"
15814                           "\x44\x69\x9e\xd7\xdb\x51\xb7\xd9",
15815                 .alen   = 16,
15816                 .input  = "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
15817                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
15818                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
15819                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
15820                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
15821                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
15822                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
15823                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf",
15824                 .ilen   = 64,
15825                 .result = "\xc3\x0e\x32\xff\xed\xc0\x77\x4e"
15826                           "\x6a\xff\x6a\xf0\x86\x9f\x71\xaa"
15827                           "\x0f\x3a\xf0\x7a\x9a\x31\xa9\xc6"
15828                           "\x84\xdb\x20\x7e\xb0\xef\x8e\x4e"
15829                           "\x35\x90\x7a\xa6\x32\xc3\xff\xdf"
15830                           "\x86\x8b\xb7\xb2\x9d\x3d\x46\xad"
15831                           "\x83\xce\x9f\x9a\x10\x2e\xe9\x9d"
15832                           "\x49\xa5\x3e\x87\xf4\xc3\xda\x55"
15833                           "\x82\xcd\x42\x28\x21\x20\x15\xcc"
15834                           "\xb7\xb2\x48\x40\xc7\x64\x41\x3a"
15835                           "\x61\x32\x82\x85\xcf\x27\xed\xb4"
15836                           "\xe4\x68\xa2\xf5\x79\x26\x27\xb2"
15837                           "\x51\x67\x6a\xc4\xf0\x66\x55\x50"
15838                           "\xbc\x6f\xed\xd5\x8d\xde\x23\x7c"
15839                           "\x62\x98\x14\xd7\x2f\x37\x8d\xdf"
15840                           "\xf4\x33\x80\xeb\x8e\xb4\xa4\xda",
15841                 .rlen   = 64 + 64,
15842         }, { /* RFC 3602 Case 5 */
15843 #ifdef __LITTLE_ENDIAN
15844                 .key    = "\x08\x00"            /* rta length */
15845                           "\x01\x00"            /* rta type */
15846 #else
15847                 .key    = "\x00\x08"            /* rta length */
15848                           "\x00\x01"            /* rta type */
15849 #endif
15850                           "\x00\x00\x00\x10"    /* enc key length */
15851                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15852                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15853                           "\x22\x33\x44\x55\x66\x77\x88\x99"
15854                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15855                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
15856                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15857                           "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15858                           "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15859                           "\x90\xd3\x82\xb4\x10\xee\xba\x7a"
15860                           "\xd9\x38\xc4\x6c\xec\x1a\x82\xbf",
15861                 .klen   = 8 + 64 + 16,
15862                 .iv     = "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15863                           "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15864                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
15865                           "\xe9\x6e\x8c\x08\xab\x46\x57\x63"
15866                           "\xfd\x09\x8d\x45\xdd\x3f\xf8\x93",
15867                 .alen   = 24,
15868                 .input  = "\x08\x00\x0e\xbd\xa7\x0a\x00\x00"
15869                           "\x8e\x9c\x08\x3d\xb9\x5b\x07\x00"
15870                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
15871                           "\x10\x11\x12\x13\x14\x15\x16\x17"
15872                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
15873                           "\x20\x21\x22\x23\x24\x25\x26\x27"
15874                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
15875                           "\x30\x31\x32\x33\x34\x35\x36\x37"
15876                           "\x01\x02\x03\x04\x05\x06\x07\x08"
15877                           "\x09\x0a\x0b\x0c\x0d\x0e\x0e\x01",
15878                 .ilen   = 80,
15879                 .result = "\xf6\x63\xc2\x5d\x32\x5c\x18\xc6"
15880                           "\xa9\x45\x3e\x19\x4e\x12\x08\x49"
15881                           "\xa4\x87\x0b\x66\xcc\x6b\x99\x65"
15882                           "\x33\x00\x13\xb4\x89\x8d\xc8\x56"
15883                           "\xa4\x69\x9e\x52\x3a\x55\xdb\x08"
15884                           "\x0b\x59\xec\x3a\x8e\x4b\x7e\x52"
15885                           "\x77\x5b\x07\xd1\xdb\x34\xed\x9c"
15886                           "\x53\x8a\xb5\x0c\x55\x1b\x87\x4a"
15887                           "\xa2\x69\xad\xd0\x47\xad\x2d\x59"
15888                           "\x13\xac\x19\xb7\xcf\xba\xd4\xa6"
15889                           "\x74\x84\x94\xe2\xd7\x7a\xf9\xbf"
15890                           "\x00\x8a\xa2\xd5\xb7\xf3\x60\xcf"
15891                           "\xa0\x47\xdf\x4e\x09\xf4\xb1\x7f"
15892                           "\x14\xd9\x3d\x53\x8e\x12\xb3\x00"
15893                           "\x4c\x0a\x4e\x32\x40\x43\x88\xce"
15894                           "\x92\x26\xc1\x76\x20\x11\xeb\xba"
15895                           "\x62\x4f\x9a\x62\x25\xc3\x75\x80"
15896                           "\xb7\x0a\x17\xf5\xd7\x94\xb4\x14",
15897                 .rlen   = 80 + 64,
15898        }, { /* NIST SP800-38A F.2.3 CBC-AES192.Encrypt */
15899 #ifdef __LITTLE_ENDIAN
15900                 .key    = "\x08\x00"            /* rta length */
15901                           "\x01\x00"            /* rta type */
15902 #else
15903                 .key    = "\x00\x08"            /* rta length */
15904                           "\x00\x01"            /* rta type */
15905 #endif
15906                           "\x00\x00\x00\x18"    /* enc key length */
15907                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15908                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15909                           "\x22\x33\x44\x55\x66\x77\x88\x99"
15910                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15911                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
15912                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15913                           "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15914                           "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15915                           "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
15916                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
15917                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
15918                 .klen   = 8 + 64 + 24,
15919                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
15920                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15921                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
15922                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15923                 .alen   = 16,
15924                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15925                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15926                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15927                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15928                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15929                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15930                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15931                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15932                 .ilen   = 64,
15933                 .result = "\x4f\x02\x1d\xb2\x43\xbc\x63\x3d"
15934                           "\x71\x78\x18\x3a\x9f\xa0\x71\xe8"
15935                           "\xb4\xd9\xad\xa9\xad\x7d\xed\xf4"
15936                           "\xe5\xe7\x38\x76\x3f\x69\x14\x5a"
15937                           "\x57\x1b\x24\x20\x12\xfb\x7a\xe0"
15938                           "\x7f\xa9\xba\xac\x3d\xf1\x02\xe0"
15939                           "\x08\xb0\xe2\x79\x88\x59\x88\x81"
15940                           "\xd9\x20\xa9\xe6\x4f\x56\x15\xcd"
15941                           "\x77\x4b\x69\x9d\x3a\x0d\xb4\x99"
15942                           "\x8f\xc6\x8e\x0e\x72\x58\xe3\x56"
15943                           "\xbb\x21\xd2\x7d\x93\x11\x17\x91"
15944                           "\xc4\x83\xfd\x0a\xea\x71\xfe\x77"
15945                           "\xae\x6f\x0a\xa5\xf0\xcf\xe1\x35"
15946                           "\xba\x03\xd5\x32\xfa\x5f\x41\x58"
15947                           "\x8d\x43\x98\xa7\x94\x16\x07\x02"
15948                           "\x0f\xb6\x81\x50\x28\x95\x2e\x75",
15949                 .rlen   = 64 + 64,
15950         }, { /* NIST SP800-38A F.2.5 CBC-AES256.Encrypt */
15951 #ifdef __LITTLE_ENDIAN
15952                 .key    = "\x08\x00"            /* rta length */
15953                           "\x01\x00"            /* rta type */
15954 #else
15955                 .key    = "\x00\x08"            /* rta length */
15956                           "\x00\x01"            /* rta type */
15957 #endif
15958                           "\x00\x00\x00\x20"    /* enc key length */
15959                           "\x11\x22\x33\x44\x55\x66\x77\x88"
15960                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
15961                           "\x22\x33\x44\x55\x66\x77\x88\x99"
15962                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
15963                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
15964                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
15965                           "\x44\x55\x66\x77\x88\x99\xaa\xbb"
15966                           "\xcc\xdd\xee\xff\x11\x22\x33\x44"
15967                           "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
15968                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
15969                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
15970                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
15971                 .klen   = 8 + 64 + 32,
15972                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07"
15973                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15974                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
15975                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
15976                 .alen   = 16,
15977                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
15978                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
15979                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
15980                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
15981                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
15982                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
15983                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
15984                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
15985                 .ilen   = 64,
15986                 .result = "\xf5\x8c\x4c\x04\xd6\xe5\xf1\xba"
15987                           "\x77\x9e\xab\xfb\x5f\x7b\xfb\xd6"
15988                           "\x9c\xfc\x4e\x96\x7e\xdb\x80\x8d"
15989                           "\x67\x9f\x77\x7b\xc6\x70\x2c\x7d"
15990                           "\x39\xf2\x33\x69\xa9\xd9\xba\xcf"
15991                           "\xa5\x30\xe2\x63\x04\x23\x14\x61"
15992                           "\xb2\xeb\x05\xe2\xc3\x9b\xe9\xfc"
15993                           "\xda\x6c\x19\x07\x8c\x6a\x9d\x1b"
15994                           "\xb2\x27\x69\x7f\x45\x64\x79\x2b"
15995                           "\xb7\xb8\x4c\xd4\x75\x94\x68\x40"
15996                           "\x2a\xea\x91\xc7\x3f\x7c\xed\x7b"
15997                           "\x95\x2c\x9b\xa8\xf5\xe5\x52\x8d"
15998                           "\x6b\xe1\xae\xf1\x74\xfa\x0d\x0c"
15999                           "\xe3\x8d\x64\xc3\x8d\xff\x7c\x8c"
16000                           "\xdb\xbf\xa0\xb4\x01\xa2\xa8\xa2"
16001                           "\x2c\xb1\x62\x2c\x10\xca\xf1\x21",
16002                 .rlen   = 64 + 64,
16003         },
16004 };
16005
16006 #define HMAC_SHA1_DES_CBC_ENC_TEST_VEC  1
16007
16008 static struct aead_testvec hmac_sha1_des_cbc_enc_tv_temp[] = {
16009         { /*Generated with cryptopp*/
16010 #ifdef __LITTLE_ENDIAN
16011                 .key    = "\x08\x00"            /* rta length */
16012                           "\x01\x00"            /* rta type */
16013 #else
16014         .key    = "\x00\x08"            /* rta length */
16015                           "\x00\x01"            /* rta type */
16016 #endif
16017                           "\x00\x00\x00\x08"    /* enc key length */
16018                           "\x11\x22\x33\x44\x55\x66\x77\x88"
16019                   "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16020                           "\x22\x33\x44\x55"
16021                           "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16022                 .klen   = 8 + 20 + 8,
16023                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16024                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
16025                           "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16026                 .alen   = 16,
16027                 .input  = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16028                           "\x53\x20\x63\x65\x65\x72\x73\x74"
16029                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16030                           "\x20\x79\x65\x53\x72\x63\x74\x65"
16031                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16032                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
16033                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16034                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
16035                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16036                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16037                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16038                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16039                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
16040                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16041                           "\x63\x65\x65\x72\x73\x74\x54\x20"
16042                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16043                 .ilen   = 128,
16044                 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16045                           "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16046                           "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16047                           "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16048                           "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16049                           "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16050                           "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16051                           "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16052                           "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16053                           "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16054                           "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16055                           "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16056                           "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16057                           "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16058                           "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16059                           "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16060                           "\x95\x16\x20\x09\xf5\x95\x19\xfd"
16061                           "\x3c\xc7\xe0\x42\xc0\x14\x69\xfa"
16062                           "\x5c\x44\xa9\x37",
16063                           .rlen = 128 + 20,
16064         },
16065 };
16066
16067 #define HMAC_SHA224_DES_CBC_ENC_TEST_VEC        1
16068
16069 static struct aead_testvec hmac_sha224_des_cbc_enc_tv_temp[] = {
16070         { /*Generated with cryptopp*/
16071 #ifdef __LITTLE_ENDIAN
16072                 .key    = "\x08\x00"            /* rta length */
16073                           "\x01\x00"            /* rta type */
16074 #else
16075                 .key    = "\x00\x08"            /* rta length */
16076                           "\x00\x01"            /* rta type */
16077 #endif
16078                           "\x00\x00\x00\x08"    /* enc key length */
16079                           "\x11\x22\x33\x44\x55\x66\x77\x88"
16080                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16081                   "\x22\x33\x44\x55\x66\x77\x88\x99"
16082                           "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16083                 .klen   = 8 + 24 + 8,
16084                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16085                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
16086                           "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16087                 .alen   = 16,
16088                 .input  = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16089                           "\x53\x20\x63\x65\x65\x72\x73\x74"
16090                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16091                           "\x20\x79\x65\x53\x72\x63\x74\x65"
16092                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16093                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
16094                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16095                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
16096                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16097                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16098                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16099                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16100                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
16101                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16102                           "\x63\x65\x65\x72\x73\x74\x54\x20"
16103                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16104                 .ilen   = 128,
16105                 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16106                           "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16107                           "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16108                           "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16109                           "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16110                           "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16111                           "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16112                           "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16113                           "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16114                           "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16115                           "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16116                           "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16117                   "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16118                           "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16119                           "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16120                           "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16121                           "\x9c\x2d\x7e\xee\x20\x34\x55\x0a"
16122                           "\xce\xb5\x4e\x64\x53\xe7\xbf\x91"
16123                           "\xab\xd4\xd9\xda\xc9\x12\xae\xf7",
16124                 .rlen   = 128 + 24,
16125         },
16126 };
16127
16128 #define HMAC_SHA256_DES_CBC_ENC_TEST_VEC        1
16129
16130 static struct aead_testvec hmac_sha256_des_cbc_enc_tv_temp[] = {
16131         { /*Generated with cryptopp*/
16132 #ifdef __LITTLE_ENDIAN
16133                 .key    = "\x08\x00"            /* rta length */
16134                           "\x01\x00"            /* rta type */
16135 #else
16136                 .key    = "\x00\x08"            /* rta length */
16137                           "\x00\x01"            /* rta type */
16138 #endif
16139                           "\x00\x00\x00\x08"    /* enc key length */
16140                           "\x11\x22\x33\x44\x55\x66\x77\x88"
16141                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16142                           "\x22\x33\x44\x55\x66\x77\x88\x99"
16143                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16144                           "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16145                 .klen   = 8 + 32 + 8,
16146                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16147                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
16148                           "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16149                 .alen   = 16,
16150                 .input  = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16151                           "\x53\x20\x63\x65\x65\x72\x73\x74"
16152                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16153                           "\x20\x79\x65\x53\x72\x63\x74\x65"
16154                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16155                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
16156                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16157                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
16158                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16159                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16160                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16161                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16162                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
16163                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16164                           "\x63\x65\x65\x72\x73\x74\x54\x20"
16165                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16166                 .ilen   = 128,
16167                 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16168                           "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16169                           "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16170                           "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16171                           "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16172                           "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16173                           "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16174                           "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16175                           "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16176                           "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16177                           "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16178                   "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16179                           "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16180                   "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16181                   "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16182                           "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16183                           "\xc6\x58\xa1\x60\x70\x91\x39\x36"
16184                           "\x50\xf6\x5d\xab\x4b\x51\x4e\x5e"
16185                           "\xde\x63\xde\x76\x52\xde\x9f\xba"
16186                           "\x90\xcf\x15\xf2\xbb\x6e\x84\x00",
16187                 .rlen   = 128 + 32,
16188         },
16189 };
16190
16191 #define HMAC_SHA384_DES_CBC_ENC_TEST_VEC        1
16192
16193 static struct aead_testvec hmac_sha384_des_cbc_enc_tv_temp[] = {
16194         { /*Generated with cryptopp*/
16195 #ifdef __LITTLE_ENDIAN
16196                 .key    = "\x08\x00"            /* rta length */
16197                           "\x01\x00"            /* rta type */
16198 #else
16199                 .key    = "\x00\x08"            /* rta length */
16200                           "\x00\x01"            /* rta type */
16201 #endif
16202                           "\x00\x00\x00\x08"    /* enc key length */
16203                           "\x11\x22\x33\x44\x55\x66\x77\x88"
16204                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16205                           "\x22\x33\x44\x55\x66\x77\x88\x99"
16206                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16207                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
16208                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16209                           "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16210                 .klen   = 8 + 48 + 8,
16211                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16212                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
16213                           "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16214                 .alen   = 16,
16215                 .input  = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16216                           "\x53\x20\x63\x65\x65\x72\x73\x74"
16217                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16218                           "\x20\x79\x65\x53\x72\x63\x74\x65"
16219                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16220                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
16221                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16222                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
16223                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16224                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16225                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16226                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16227                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
16228                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16229                           "\x63\x65\x65\x72\x73\x74\x54\x20"
16230                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16231                 .ilen   = 128,
16232                 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16233                           "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16234                           "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16235                           "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16236                           "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16237                           "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16238                           "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16239                           "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16240                           "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16241                           "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16242                           "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16243                           "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16244                           "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16245                           "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16246                           "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16247                           "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16248                           "\xa8\x8e\x9c\x74\x8c\x2b\x99\xa0"
16249                           "\xc8\x8c\xef\x25\x07\x83\x11\x3a"
16250                           "\x31\x8d\xbe\x3b\x6a\xd7\x96\xfe"
16251                           "\x5e\x67\xb5\x74\xe7\xe7\x85\x61"
16252                           "\x6a\x95\x26\x75\xcc\x53\x89\xf3"
16253                           "\x74\xc9\x2a\x76\x20\xa2\x64\x62",
16254                 .rlen   = 128 + 48,
16255         },
16256 };
16257
16258 #define HMAC_SHA512_DES_CBC_ENC_TEST_VEC        1
16259
16260 static struct aead_testvec hmac_sha512_des_cbc_enc_tv_temp[] = {
16261         { /*Generated with cryptopp*/
16262 #ifdef __LITTLE_ENDIAN
16263                 .key    = "\x08\x00"            /* rta length */
16264                   "\x01\x00"            /* rta type */
16265 #else
16266                 .key    = "\x00\x08"            /* rta length */
16267                           "\x00\x01"            /* rta type */
16268 #endif
16269                           "\x00\x00\x00\x08"    /* enc key length */
16270                   "\x11\x22\x33\x44\x55\x66\x77\x88"
16271                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16272                           "\x22\x33\x44\x55\x66\x77\x88\x99"
16273                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16274                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
16275                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16276                           "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16277                           "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16278                           "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24",
16279                 .klen   = 8 + 64 + 8,
16280                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16281                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
16282                           "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16283                 .alen   = 16,
16284                 .input  = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16285                           "\x53\x20\x63\x65\x65\x72\x73\x74"
16286                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16287                           "\x20\x79\x65\x53\x72\x63\x74\x65"
16288                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16289                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
16290                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16291                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
16292                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16293                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16294                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16295                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16296                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
16297                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16298                           "\x63\x65\x65\x72\x73\x74\x54\x20"
16299                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16300                 .ilen   = 128,
16301                 .result = "\x70\xd6\xde\x64\x87\x17\xf1\xe8"
16302                           "\x54\x31\x85\x37\xed\x6b\x01\x8d"
16303                           "\xe3\xcc\xe0\x1d\x5e\xf3\xfe\xf1"
16304                           "\x41\xaa\x33\x91\xa7\x7d\x99\x88"
16305                           "\x4d\x85\x6e\x2f\xa3\x69\xf5\x82"
16306                           "\x3a\x6f\x25\xcb\x7d\x58\x1f\x9b"
16307                           "\xaa\x9c\x11\xd5\x76\x67\xce\xde"
16308                   "\x56\xd7\x5a\x80\x69\xea\x3a\x02"
16309                           "\xf0\xc7\x7c\xe3\xcb\x40\xe5\x52"
16310                   "\xd1\x10\x92\x78\x0b\x8e\x5b\xf1"
16311                           "\xe3\x26\x1f\xe1\x15\x41\xc7\xba"
16312                           "\x99\xdb\x08\x51\x1c\xd3\x01\xf4"
16313                           "\x87\x47\x39\xb8\xd2\xdd\xbd\xfb"
16314                           "\x66\x13\xdf\x1c\x01\x44\xf0\x7a"
16315                   "\x1a\x6b\x13\xf5\xd5\x0b\xb8\xba"
16316                           "\x53\xba\xe1\x76\xe3\x82\x07\x86"
16317                           "\xc6\x2c\x73\x88\xb0\x9d\x5f\x3e"
16318                           "\x5b\x78\xca\x0e\xab\x8a\xa3\xbb"
16319                           "\xd9\x1d\xc3\xe3\x05\xac\x76\xfb"
16320                           "\x58\x83\xda\x67\xfb\x21\x24\xa2"
16321                           "\xb1\xa7\xd7\x66\xa6\x8d\xa6\x93"
16322                           "\x97\xe2\xe3\xb8\xaa\x48\x85\xee"
16323                           "\x8c\xf6\x07\x95\x1f\xa6\x6c\x96"
16324                           "\x99\xc7\x5c\x8d\xd8\xb5\x68\x7b",
16325                 .rlen   = 128 + 64,
16326         },
16327 };
16328
16329 #define HMAC_SHA1_DES3_EDE_CBC_ENC_TEST_VEC     1
16330
16331 static struct aead_testvec hmac_sha1_des3_ede_cbc_enc_tv_temp[] = {
16332         { /*Generated with cryptopp*/
16333 #ifdef __LITTLE_ENDIAN
16334                 .key    = "\x08\x00"            /* rta length */
16335                           "\x01\x00"            /* rta type */
16336 #else
16337                 .key    = "\x00\x08"            /* rta length */
16338                           "\x00\x01"            /* rta type */
16339 #endif
16340                           "\x00\x00\x00\x18"    /* enc key length */
16341                           "\x11\x22\x33\x44\x55\x66\x77\x88"
16342                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16343                           "\x22\x33\x44\x55"
16344                   "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16345                           "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16346                           "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16347                 .klen   = 8 + 20 + 24,
16348                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16349                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
16350                           "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16351                 .alen   = 16,
16352                 .input  = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16353                           "\x53\x20\x63\x65\x65\x72\x73\x74"
16354                   "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16355                           "\x20\x79\x65\x53\x72\x63\x74\x65"
16356                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16357                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
16358                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16359                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
16360                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16361                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16362                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16363                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16364                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
16365                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16366                           "\x63\x65\x65\x72\x73\x74\x54\x20"
16367                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16368                 .ilen   = 128,
16369                 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16370                           "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16371                   "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16372                   "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16373                   "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16374                           "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16375                           "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16376                           "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16377                   "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16378                           "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16379                           "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16380                           "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16381                           "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16382                           "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16383                           "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16384                           "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16385                           "\x67\x6d\xb1\xf5\xb8\x10\xdc\xc6"
16386                           "\x75\x86\x96\x6b\xb1\xc5\xe4\xcf"
16387                           "\xd1\x60\x91\xb3",
16388                           .rlen = 128 + 20,
16389         },
16390 };
16391
16392 #define HMAC_SHA224_DES3_EDE_CBC_ENC_TEST_VEC   1
16393
16394 static struct aead_testvec hmac_sha224_des3_ede_cbc_enc_tv_temp[] = {
16395         { /*Generated with cryptopp*/
16396 #ifdef __LITTLE_ENDIAN
16397                 .key    = "\x08\x00"            /* rta length */
16398                           "\x01\x00"            /* rta type */
16399 #else
16400                 .key    = "\x00\x08"            /* rta length */
16401                           "\x00\x01"            /* rta type */
16402 #endif
16403                           "\x00\x00\x00\x18"    /* enc key length */
16404                           "\x11\x22\x33\x44\x55\x66\x77\x88"
16405                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16406                           "\x22\x33\x44\x55\x66\x77\x88\x99"
16407                           "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16408                           "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16409                           "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16410                 .klen   = 8 + 24 + 24,
16411                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16412                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
16413                           "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16414                 .alen   = 16,
16415                 .input  = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16416                           "\x53\x20\x63\x65\x65\x72\x73\x74"
16417                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16418                           "\x20\x79\x65\x53\x72\x63\x74\x65"
16419                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16420                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
16421                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16422                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
16423                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16424                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16425                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16426                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16427                   "\x72\x63\x74\x65\x20\x73\x6f\x54"
16428                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16429                           "\x63\x65\x65\x72\x73\x74\x54\x20"
16430                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16431                 .ilen   = 128,
16432                 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16433                   "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16434                           "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16435                           "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16436                           "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16437                           "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16438                           "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16439                   "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16440                           "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16441                           "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16442                           "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16443                           "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16444                           "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16445                   "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16446                           "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16447                   "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16448                           "\x15\x24\x7f\x5a\x45\x4a\x66\xce"
16449                           "\x2b\x0b\x93\x99\x2f\x9d\x0c\x6c"
16450                           "\x56\x1f\xe1\xa6\x41\xb2\x4c\xd0",
16451                           .rlen = 128 + 24,
16452         },
16453 };
16454
16455 #define HMAC_SHA256_DES3_EDE_CBC_ENC_TEST_VEC   1
16456
16457 static struct aead_testvec hmac_sha256_des3_ede_cbc_enc_tv_temp[] = {
16458         { /*Generated with cryptopp*/
16459 #ifdef __LITTLE_ENDIAN
16460                 .key    = "\x08\x00"            /* rta length */
16461                           "\x01\x00"            /* rta type */
16462 #else
16463                 .key    = "\x00\x08"            /* rta length */
16464                           "\x00\x01"            /* rta type */
16465 #endif
16466                           "\x00\x00\x00\x18"    /* enc key length */
16467                           "\x11\x22\x33\x44\x55\x66\x77\x88"
16468                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16469                           "\x22\x33\x44\x55\x66\x77\x88\x99"
16470                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16471                           "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16472                           "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16473                           "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16474                 .klen   = 8 + 32 + 24,
16475                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16476                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
16477                           "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16478                 .alen   = 16,
16479                 .input  = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16480                           "\x53\x20\x63\x65\x65\x72\x73\x74"
16481                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16482                           "\x20\x79\x65\x53\x72\x63\x74\x65"
16483                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16484                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
16485                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16486                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
16487                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16488                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16489                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16490                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16491                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
16492                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16493                           "\x63\x65\x65\x72\x73\x74\x54\x20"
16494                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16495                 .ilen   = 128,
16496                 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16497                           "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16498                           "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16499                           "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16500                           "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16501                           "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16502                           "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16503                           "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16504                           "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16505                           "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16506                           "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16507                           "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16508                           "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16509                           "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16510                           "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16511                           "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16512                           "\x73\xb0\xea\x9f\xe8\x18\x80\xd6"
16513                           "\x56\x38\x44\xc0\xdb\xe3\x4f\x71"
16514                           "\xf7\xce\xd1\xd3\xf8\xbd\x3e\x4f"
16515                           "\xca\x43\x95\xdf\x80\x61\x81\xa9",
16516                 .rlen   = 128 + 32,
16517         },
16518 };
16519
16520 #define HMAC_SHA384_DES3_EDE_CBC_ENC_TEST_VEC   1
16521
16522 static struct aead_testvec hmac_sha384_des3_ede_cbc_enc_tv_temp[] = {
16523         { /*Generated with cryptopp*/
16524 #ifdef __LITTLE_ENDIAN
16525                 .key    = "\x08\x00"            /* rta length */
16526                           "\x01\x00"            /* rta type */
16527 #else
16528                 .key    = "\x00\x08"            /* rta length */
16529                           "\x00\x01"            /* rta type */
16530 #endif
16531                           "\x00\x00\x00\x18"    /* enc key length */
16532                           "\x11\x22\x33\x44\x55\x66\x77\x88"
16533                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16534                           "\x22\x33\x44\x55\x66\x77\x88\x99"
16535                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16536                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
16537                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16538                           "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16539                           "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16540                           "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16541                 .klen   = 8 + 48 + 24,
16542                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16543                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
16544                           "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16545                 .alen   = 16,
16546                 .input  = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16547                           "\x53\x20\x63\x65\x65\x72\x73\x74"
16548                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16549                           "\x20\x79\x65\x53\x72\x63\x74\x65"
16550                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16551                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
16552                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16553                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
16554                           "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16555                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16556                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16557                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16558                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
16559                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16560                           "\x63\x65\x65\x72\x73\x74\x54\x20"
16561                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16562                 .ilen   = 128,
16563                 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16564                           "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16565                           "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16566                           "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16567                           "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16568                           "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16569                           "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16570                           "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16571                           "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16572                           "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16573                           "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16574                           "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16575                           "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16576                           "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16577                           "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16578                           "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16579                           "\x6d\x77\xfc\x80\x9d\x8a\x9c\xb7"
16580                   "\x70\xe7\x93\xbf\x73\xe6\x9f\x83"
16581                           "\x99\x62\x23\xe6\x5b\xd0\xda\x18"
16582                           "\xa4\x32\x8a\x0b\x46\xd7\xf0\x39"
16583                           "\x36\x5d\x13\x2f\x86\x10\x78\xd6"
16584                           "\xd6\xbe\x5c\xb9\x15\x89\xf9\x1b",
16585                 .rlen   = 128 + 48,
16586         },
16587 };
16588
16589 #define HMAC_SHA512_DES3_EDE_CBC_ENC_TEST_VEC   1
16590
16591 static struct aead_testvec hmac_sha512_des3_ede_cbc_enc_tv_temp[] = {
16592         { /*Generated with cryptopp*/
16593 #ifdef __LITTLE_ENDIAN
16594                 .key    = "\x08\x00"            /* rta length */
16595                           "\x01\x00"            /* rta type */
16596 #else
16597                 .key    = "\x00\x08"            /* rta length */
16598                           "\x00\x01"            /* rta type */
16599 #endif
16600                           "\x00\x00\x00\x18"    /* enc key length */
16601                           "\x11\x22\x33\x44\x55\x66\x77\x88"
16602                           "\x99\xaa\xbb\xcc\xdd\xee\xff\x11"
16603                           "\x22\x33\x44\x55\x66\x77\x88\x99"
16604                           "\xaa\xbb\xcc\xdd\xee\xff\x11\x22"
16605                           "\x33\x44\x55\x66\x77\x88\x99\xaa"
16606                           "\xbb\xcc\xdd\xee\xff\x11\x22\x33"
16607                           "\x44\x55\x66\x77\x88\x99\xaa\xbb"
16608                           "\xcc\xdd\xee\xff\x11\x22\x33\x44"
16609                           "\xE9\xC0\xFF\x2E\x76\x0B\x64\x24"
16610                   "\x44\x4D\x99\x5A\x12\xD6\x40\xC0"
16611                           "\xEA\xC2\x84\xE8\x14\x95\xDB\xE8",
16612                 .klen   = 8 + 64 + 24,
16613                 .iv     = "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16614                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x01"
16615                           "\x7D\x33\x88\x93\x0F\x93\xB2\x42",
16616                 .alen   = 16,
16617                 .input  = "\x6f\x54\x20\x6f\x61\x4d\x79\x6e"
16618                           "\x53\x20\x63\x65\x65\x72\x73\x74"
16619                           "\x54\x20\x6f\x6f\x4d\x20\x6e\x61"
16620                           "\x20\x79\x65\x53\x72\x63\x74\x65"
16621                           "\x20\x73\x6f\x54\x20\x6f\x61\x4d"
16622                           "\x79\x6e\x53\x20\x63\x65\x65\x72"
16623                           "\x73\x74\x54\x20\x6f\x6f\x4d\x20"
16624                           "\x6e\x61\x20\x79\x65\x53\x72\x63"
16625                   "\x74\x65\x20\x73\x6f\x54\x20\x6f"
16626                           "\x61\x4d\x79\x6e\x53\x20\x63\x65"
16627                           "\x65\x72\x73\x74\x54\x20\x6f\x6f"
16628                           "\x4d\x20\x6e\x61\x20\x79\x65\x53"
16629                           "\x72\x63\x74\x65\x20\x73\x6f\x54"
16630                           "\x20\x6f\x61\x4d\x79\x6e\x53\x20"
16631                           "\x63\x65\x65\x72\x73\x74\x54\x20"
16632                           "\x6f\x6f\x4d\x20\x6e\x61\x0a\x79",
16633                 .ilen   = 128,
16634                 .result = "\x0e\x2d\xb6\x97\x3c\x56\x33\xf4"
16635                           "\x67\x17\x21\xc7\x6e\x8a\xd5\x49"
16636                           "\x74\xb3\x49\x05\xc5\x1c\xd0\xed"
16637                           "\x12\x56\x5c\x53\x96\xb6\x00\x7d"
16638                           "\x90\x48\xfc\xf5\x8d\x29\x39\xcc"
16639                           "\x8a\xd5\x35\x18\x36\x23\x4e\xd7"
16640                           "\x76\xd1\xda\x0c\x94\x67\xbb\x04"
16641                           "\x8b\xf2\x03\x6c\xa8\xcf\xb6\xea"
16642                           "\x22\x64\x47\xaa\x8f\x75\x13\xbf"
16643                           "\x9f\xc2\xc3\xf0\xc9\x56\xc5\x7a"
16644                           "\x71\x63\x2e\x89\x7b\x1e\x12\xca"
16645                           "\xe2\x5f\xaf\xd8\xa4\xf8\xc9\x7a"
16646                           "\xd6\xf9\x21\x31\x62\x44\x45\xa6"
16647                           "\xd6\xbc\x5a\xd3\x2d\x54\x43\xcc"
16648                           "\x9d\xde\xa5\x70\xe9\x42\x45\x8a"
16649                           "\x6b\xfa\xb1\x91\x13\xb0\xd9\x19"
16650                           "\x41\xb5\x1f\xbb\xbd\x4e\xb8\x32"
16651                           "\x22\x86\x4e\x57\x1b\x2a\xd8\x6e"
16652                           "\xa9\xfb\xc8\xf3\xbf\x2d\xae\x2b"
16653                           "\x3b\xbc\x41\xe8\x38\xbb\xf1\x60"
16654                           "\x4c\x68\xa9\x4e\x8c\x73\xa7\xc0"
16655                           "\x2a\x74\xd4\x65\x12\xcb\x55\xf2"
16656                           "\xd5\x02\x6d\xe6\xaf\xc9\x2f\xf2"
16657                           "\x57\xaa\x85\xf7\xf3\x6a\xcb\xdb",
16658                 .rlen   = 128 + 64,
16659         },
16660 };
16661
16662 static struct cipher_testvec aes_lrw_enc_tv_template[] = {
16663         /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16664         { /* LRW-32-AES 1 */
16665                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16666                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16667                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16668                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16669                 .klen   = 32,
16670                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16671                           "\x00\x00\x00\x00\x00\x00\x00\x01",
16672                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16673                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16674                 .ilen   = 16,
16675                 .result = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16676                           "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16677                 .rlen   = 16,
16678         }, { /* LRW-32-AES 2 */
16679                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16680                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16681                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16682                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16683                 .klen   = 32,
16684                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16685                           "\x00\x00\x00\x00\x00\x00\x00\x02",
16686                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16687                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16688                 .ilen   = 16,
16689                 .result = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16690                           "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16691                 .rlen   = 16,
16692         }, { /* LRW-32-AES 3 */
16693                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16694                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16695                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16696                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16697                 .klen   = 32,
16698                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16699                           "\x00\x00\x00\x02\x00\x00\x00\x00",
16700                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16701                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16702                 .ilen   = 16,
16703                 .result = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16704                           "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16705                 .rlen   = 16,
16706         }, { /* LRW-32-AES 4 */
16707                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16708                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16709                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16710                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16711                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16712                 .klen   = 40,
16713                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16714                           "\x00\x00\x00\x00\x00\x00\x00\x01",
16715                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16716                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16717                 .ilen   = 16,
16718                 .result = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16719                           "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16720                 .rlen   = 16,
16721         }, { /* LRW-32-AES 5 */
16722                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16723                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16724                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16725                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16726                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16727                 .klen   = 40,
16728                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16729                           "\x00\x00\x00\x02\x00\x00\x00\x00",
16730                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16731                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16732                 .ilen   = 16,
16733                 .result = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16734                           "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16735                 .rlen   = 16,
16736         }, { /* LRW-32-AES 6 */
16737                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16738                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16739                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16740                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16741                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16742                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16743                 .klen   = 48,
16744                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16745                           "\x00\x00\x00\x00\x00\x00\x00\x01",
16746                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16747                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16748                 .ilen   = 16,
16749                 .result = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
16750                           "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
16751                 .rlen   = 16,
16752         }, { /* LRW-32-AES 7 */
16753                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
16754                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
16755                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
16756                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
16757                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
16758                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
16759                 .klen   = 48,
16760                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16761                           "\x00\x00\x00\x02\x00\x00\x00\x00",
16762                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16763                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16764                 .ilen   = 16,
16765                 .result = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
16766                           "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
16767                 .rlen   = 16,
16768         }, {
16769 /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
16770                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16771                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16772                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16773                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16774                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16775                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16776                 .klen   = 48,
16777                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16778                           "\x00\x00\x00\x00\x00\x00\x00\x01",
16779                 .input  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
16780                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
16781                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
16782                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
16783                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
16784                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
16785                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
16786                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
16787                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
16788                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
16789                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
16790                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
16791                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
16792                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
16793                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
16794                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
16795                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
16796                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
16797                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
16798                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
16799                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
16800                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
16801                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
16802                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
16803                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
16804                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
16805                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
16806                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
16807                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
16808                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
16809                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
16810                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
16811                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
16812                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
16813                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
16814                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
16815                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
16816                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
16817                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
16818                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
16819                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
16820                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
16821                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
16822                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
16823                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
16824                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
16825                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
16826                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
16827                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
16828                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
16829                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
16830                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
16831                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
16832                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
16833                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
16834                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
16835                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
16836                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
16837                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
16838                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
16839                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
16840                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
16841                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
16842                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
16843                 .ilen   = 512,
16844                 .result = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
16845                           "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
16846                           "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
16847                           "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
16848                           "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
16849                           "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
16850                           "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
16851                           "\xe8\x58\x46\x97\x39\x51\x07\xde"
16852                           "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
16853                           "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
16854                           "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
16855                           "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
16856                           "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
16857                           "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
16858                           "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
16859                           "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
16860                           "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
16861                           "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
16862                           "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
16863                           "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
16864                           "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
16865                           "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
16866                           "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
16867                           "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
16868                           "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
16869                           "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
16870                           "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
16871                           "\x41\x30\x58\xc5\x62\x74\x52\x1d"
16872                           "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
16873                           "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
16874                           "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
16875                           "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
16876                           "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
16877                           "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
16878                           "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
16879                           "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
16880                           "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
16881                           "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
16882                           "\xb8\x79\x78\x97\x94\xff\x72\x13"
16883                           "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
16884                           "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
16885                           "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
16886                           "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
16887                           "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
16888                           "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
16889                           "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
16890                           "\x1e\x86\x53\x11\x53\x94\x00\xee"
16891                           "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
16892                           "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
16893                           "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
16894                           "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
16895                           "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
16896                           "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
16897                           "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
16898                           "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
16899                           "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
16900                           "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
16901                           "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
16902                           "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
16903                           "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
16904                           "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
16905                           "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
16906                           "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
16907                           "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
16908                 .rlen   = 512,
16909                 .also_non_np = 1,
16910                 .np     = 3,
16911                 .tap    = { 512 - 20, 4, 16 },
16912         }
16913 };
16914
16915 static struct cipher_testvec aes_lrw_dec_tv_template[] = {
16916         /* from http://grouper.ieee.org/groups/1619/email/pdf00017.pdf */
16917         /* same as enc vectors with input and result reversed */
16918         { /* LRW-32-AES 1 */
16919                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
16920                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
16921                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
16922                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
16923                 .klen   = 32,
16924                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16925                           "\x00\x00\x00\x00\x00\x00\x00\x01",
16926                 .input  = "\xf1\xb2\x73\xcd\x65\xa3\xdf\x5f"
16927                           "\xe9\x5d\x48\x92\x54\x63\x4e\xb8",
16928                 .ilen   = 16,
16929                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16930                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16931                 .rlen   = 16,
16932         }, { /* LRW-32-AES 2 */
16933                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
16934                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
16935                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
16936                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
16937                 .klen   = 32,
16938                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16939                           "\x00\x00\x00\x00\x00\x00\x00\x02",
16940                 .input  = "\x00\xc8\x2b\xae\x95\xbb\xcd\xe5"
16941                           "\x27\x4f\x07\x69\xb2\x60\xe1\x36",
16942                 .ilen   = 16,
16943                 .result  = "\x30\x31\x32\x33\x34\x35\x36\x37"
16944                            "\x38\x39\x41\x42\x43\x44\x45\x46",
16945                 .rlen   = 16,
16946         }, { /* LRW-32-AES 3 */
16947                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
16948                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
16949                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
16950                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
16951                 .klen   = 32,
16952                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16953                           "\x00\x00\x00\x02\x00\x00\x00\x00",
16954                 .input  = "\x76\x32\x21\x83\xed\x8f\xf1\x82"
16955                           "\xf9\x59\x62\x03\x69\x0e\x5e\x01",
16956                 .ilen   = 16,
16957                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16958                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16959                 .rlen   = 16,
16960         }, { /* LRW-32-AES 4 */
16961                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
16962                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
16963                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
16964                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
16965                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
16966                 .klen   = 40,
16967                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16968                           "\x00\x00\x00\x00\x00\x00\x00\x01",
16969                 .input  = "\x9c\x0f\x15\x2f\x55\xa2\xd8\xf0"
16970                           "\xd6\x7b\x8f\x9e\x28\x22\xbc\x41",
16971                 .ilen   = 16,
16972                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16973                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16974                 .rlen   = 16,
16975         }, { /* LRW-32-AES 5 */
16976                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
16977                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
16978                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
16979                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
16980                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
16981                 .klen   = 40,
16982                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16983                           "\x00\x00\x00\x02\x00\x00\x00\x00",
16984                 .input  = "\xd4\x27\x6a\x7f\x14\x91\x3d\x65"
16985                           "\xc8\x60\x48\x02\x87\xe3\x34\x06",
16986                 .ilen   = 16,
16987                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
16988                           "\x38\x39\x41\x42\x43\x44\x45\x46",
16989                 .rlen   = 16,
16990         }, { /* LRW-32-AES 6 */
16991                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
16992                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
16993                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
16994                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
16995                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
16996                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
16997                 .klen   = 48,
16998                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
16999                           "\x00\x00\x00\x00\x00\x00\x00\x01",
17000                 .input  = "\xbd\x06\xb8\xe1\xdb\x98\x89\x9e"
17001                           "\xc4\x98\xe4\x91\xcf\x1c\x70\x2b",
17002                 .ilen   = 16,
17003                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17004                           "\x38\x39\x41\x42\x43\x44\x45\x46",
17005                 .rlen   = 16,
17006         }, { /* LRW-32-AES 7 */
17007                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
17008                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
17009                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
17010                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
17011                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
17012                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
17013                 .klen   = 48,
17014                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17015                           "\x00\x00\x00\x02\x00\x00\x00\x00",
17016                 .input  = "\x5b\x90\x8e\xc1\xab\xdd\x67\x5f"
17017                           "\x3d\x69\x8a\x95\x53\xc8\x9c\xe5",
17018                 .ilen   = 16,
17019                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
17020                           "\x38\x39\x41\x42\x43\x44\x45\x46",
17021                 .rlen   = 16,
17022         }, {
17023 /* http://www.mail-archive.com/stds-p1619@listserv.ieee.org/msg00173.html */
17024                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
17025                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
17026                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
17027                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
17028                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
17029                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
17030                 .klen   = 48,
17031                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17032                           "\x00\x00\x00\x00\x00\x00\x00\x01",
17033                 .input  = "\x1a\x1d\xa9\x30\xad\xf9\x2f\x9b"
17034                           "\xb6\x1d\xae\xef\xf0\x2f\xf8\x5a"
17035                           "\x39\x3c\xbf\x2a\xb2\x45\xb2\x23"
17036                           "\x1b\x63\x3c\xcf\xaa\xbe\xcf\x4e"
17037                           "\xfa\xe8\x29\xc2\x20\x68\x2b\x3c"
17038                           "\x2e\x8b\xf7\x6e\x25\xbd\xe3\x3d"
17039                           "\x66\x27\xd6\xaf\xd6\x64\x3e\xe3"
17040                           "\xe8\x58\x46\x97\x39\x51\x07\xde"
17041                           "\xcb\x37\xbc\xa9\xc0\x5f\x75\xc3"
17042                           "\x0e\x84\x23\x1d\x16\xd4\x1c\x59"
17043                           "\x9c\x1a\x02\x55\xab\x3a\x97\x1d"
17044                           "\xdf\xdd\xc7\x06\x51\xd7\x70\xae"
17045                           "\x23\xc6\x8c\xf5\x1e\xa0\xe5\x82"
17046                           "\xb8\xb2\xbf\x04\xa0\x32\x8e\x68"
17047                           "\xeb\xaf\x6e\x2d\x94\x22\x2f\xce"
17048                           "\x4c\xb5\x59\xe2\xa2\x2f\xa0\x98"
17049                           "\x1a\x97\xc6\xd4\xb5\x00\x59\xf2"
17050                           "\x84\x14\x72\xb1\x9a\x6e\xa3\x7f"
17051                           "\xea\x20\xe7\xcb\x65\x77\x3a\xdf"
17052                           "\xc8\x97\x67\x15\xc2\x2a\x27\xcc"
17053                           "\x18\x55\xa1\x24\x0b\x24\x24\xaf"
17054                           "\x5b\xec\x68\xb8\xc8\xf5\xba\x63"
17055                           "\xff\xed\x89\xce\xd5\x3d\x88\xf3"
17056                           "\x25\xef\x05\x7c\x3a\xef\xeb\xd8"
17057                           "\x7a\x32\x0d\xd1\x1e\x58\x59\x99"
17058                           "\x90\x25\xb5\x26\xb0\xe3\x2b\x6c"
17059                           "\x4c\xa9\x8b\x84\x4f\x5e\x01\x50"
17060                           "\x41\x30\x58\xc5\x62\x74\x52\x1d"
17061                           "\x45\x24\x6a\x42\x64\x4f\x97\x1c"
17062                           "\xa8\x66\xb5\x6d\x79\xd4\x0d\x48"
17063                           "\xc5\x5f\xf3\x90\x32\xdd\xdd\xe1"
17064                           "\xe4\xa9\x9f\xfc\xc3\x52\x5a\x46"
17065                           "\xe4\x81\x84\x95\x36\x59\x7a\x6b"
17066                           "\xaa\xb3\x60\xad\xce\x9f\x9f\x28"
17067                           "\xe0\x01\x75\x22\xc4\x4e\xa9\x62"
17068                           "\x5c\x62\x0d\x00\xcb\x13\xe8\x43"
17069                           "\x72\xd4\x2d\x53\x46\xb5\xd1\x16"
17070                           "\x22\x18\xdf\x34\x33\xf5\xd6\x1c"
17071                           "\xb8\x79\x78\x97\x94\xff\x72\x13"
17072                           "\x4c\x27\xfc\xcb\xbf\x01\x53\xa6"
17073                           "\xb4\x50\x6e\xde\xdf\xb5\x43\xa4"
17074                           "\x59\xdf\x52\xf9\x7c\xe0\x11\x6f"
17075                           "\x2d\x14\x8e\x24\x61\x2c\xe1\x17"
17076                           "\xcc\xce\x51\x0c\x19\x8a\x82\x30"
17077                           "\x94\xd5\x3d\x6a\x53\x06\x5e\xbd"
17078                           "\xb7\xeb\xfa\xfd\x27\x51\xde\x85"
17079                           "\x1e\x86\x53\x11\x53\x94\x00\xee"
17080                           "\x2b\x8c\x08\x2a\xbf\xdd\xae\x11"
17081                           "\xcb\x1e\xa2\x07\x9a\x80\xcf\x62"
17082                           "\x9b\x09\xdc\x95\x3c\x96\x8e\xb1"
17083                           "\x09\xbd\xe4\xeb\xdb\xca\x70\x7a"
17084                           "\x9e\xfa\x31\x18\x45\x3c\x21\x33"
17085                           "\xb0\xb3\x2b\xea\xf3\x71\x2d\xe1"
17086                           "\x03\xad\x1b\x48\xd4\x67\x27\xf0"
17087                           "\x62\xe4\x3d\xfb\x9b\x08\x76\xe7"
17088                           "\xdd\x2b\x01\x39\x04\x5a\x58\x7a"
17089                           "\xf7\x11\x90\xec\xbd\x51\x5c\x32"
17090                           "\x6b\xd7\x35\x39\x02\x6b\xf2\xa6"
17091                           "\xd0\x0d\x07\xe1\x06\xc4\x5b\x7d"
17092                           "\xe4\x6a\xd7\xee\x15\x1f\x83\xb4"
17093                           "\xa3\xa7\x5e\xc3\x90\xb7\xef\xd3"
17094                           "\xb7\x4f\xf8\x92\x4c\xb7\x3c\x29"
17095                           "\xcd\x7e\x2b\x5d\x43\xea\x42\xe7"
17096                           "\x74\x3f\x7d\x58\x88\x75\xde\x3e",
17097                 .ilen   = 512,
17098                 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
17099                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
17100                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
17101                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
17102                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
17103                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
17104                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
17105                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
17106                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
17107                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
17108                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
17109                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
17110                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
17111                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
17112                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
17113                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
17114                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
17115                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
17116                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
17117                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
17118                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
17119                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
17120                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
17121                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
17122                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
17123                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
17124                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
17125                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
17126                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
17127                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
17128                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
17129                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
17130                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
17131                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
17132                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
17133                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
17134                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
17135                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
17136                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
17137                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
17138                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
17139                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
17140                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
17141                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
17142                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
17143                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
17144                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
17145                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
17146                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
17147                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
17148                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
17149                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
17150                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
17151                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
17152                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
17153                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
17154                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
17155                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
17156                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
17157                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
17158                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
17159                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
17160                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
17161                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
17162                 .rlen   = 512,
17163                 .also_non_np = 1,
17164                 .np     = 3,
17165                 .tap    = { 512 - 20, 4, 16 },
17166         }
17167 };
17168
17169 static struct cipher_testvec aes_xts_enc_tv_template[] = {
17170         /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17171         { /* XTS-AES 1 */
17172                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
17173                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17174                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17175                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17176                 .klen   = 32,
17177                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17178                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17179                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
17180                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17181                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17182                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17183                 .ilen   = 32,
17184                 .result = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17185                           "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17186                           "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17187                           "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17188                 .rlen   = 32,
17189         }, { /* XTS-AES 2 */
17190                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
17191                           "\x11\x11\x11\x11\x11\x11\x11\x11"
17192                           "\x22\x22\x22\x22\x22\x22\x22\x22"
17193                           "\x22\x22\x22\x22\x22\x22\x22\x22",
17194                 .klen   = 32,
17195                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
17196                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17197                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
17198                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17199                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17200                           "\x44\x44\x44\x44\x44\x44\x44\x44",
17201                 .ilen   = 32,
17202                 .result = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17203                           "\x39\x33\x40\x38\xac\xef\x83\x8b"
17204                           "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17205                           "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17206                 .rlen   = 32,
17207         }, { /* XTS-AES 3 */
17208                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17209                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17210                           "\x22\x22\x22\x22\x22\x22\x22\x22"
17211                           "\x22\x22\x22\x22\x22\x22\x22\x22",
17212                 .klen   = 32,
17213                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
17214                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17215                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
17216                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17217                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17218                           "\x44\x44\x44\x44\x44\x44\x44\x44",
17219                 .ilen   = 32,
17220                 .result = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17221                           "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17222                           "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17223                           "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17224                 .rlen   = 32,
17225         }, { /* XTS-AES 4 */
17226                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
17227                           "\x23\x53\x60\x28\x74\x71\x35\x26"
17228                           "\x31\x41\x59\x26\x53\x58\x97\x93"
17229                           "\x23\x84\x62\x64\x33\x83\x27\x95",
17230                 .klen   = 32,
17231                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17232                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17233                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
17234                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17235                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17236                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17237                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17238                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17239                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17240                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17241                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17242                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17243                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17244                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17245                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17246                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17247                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17248                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17249                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17250                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17251                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17252                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17253                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17254                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17255                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17256                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17257                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17258                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17259                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17260                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17261                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17262                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17263                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17264                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17265                           "\x00\x01\x02\x03\x04\x05\x06\x07"
17266                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17267                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17268                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17269                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17270                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17271                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17272                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17273                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17274                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17275                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17276                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17277                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17278                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17279                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17280                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17281                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17282                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17283                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17284                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17285                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17286                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17287                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17288                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17289                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17290                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17291                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17292                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17293                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17294                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17295                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17296                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17297                 .ilen   = 512,
17298                 .result = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17299                           "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17300                           "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17301                           "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17302                           "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17303                           "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17304                           "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17305                           "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17306                           "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17307                           "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17308                           "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17309                           "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17310                           "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17311                           "\x22\x97\x61\x46\xae\x20\xce\x84"
17312                           "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17313                           "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17314                           "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17315                           "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17316                           "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17317                           "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17318                           "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17319                           "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17320                           "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17321                           "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17322                           "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17323                           "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17324                           "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17325                           "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17326                           "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17327                           "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17328                           "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17329                           "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17330                           "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17331                           "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17332                           "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17333                           "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17334                           "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17335                           "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17336                           "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17337                           "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17338                           "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17339                           "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17340                           "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17341                           "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17342                           "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17343                           "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17344                           "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17345                           "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17346                           "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17347                           "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17348                           "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17349                           "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17350                           "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17351                           "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17352                           "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17353                           "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17354                           "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17355                           "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17356                           "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17357                           "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17358                           "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17359                           "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17360                           "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17361                           "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17362                 .rlen   = 512,
17363         }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17364                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
17365                           "\x23\x53\x60\x28\x74\x71\x35\x26"
17366                           "\x62\x49\x77\x57\x24\x70\x93\x69"
17367                           "\x99\x59\x57\x49\x66\x96\x76\x27"
17368                           "\x31\x41\x59\x26\x53\x58\x97\x93"
17369                           "\x23\x84\x62\x64\x33\x83\x27\x95"
17370                           "\x02\x88\x41\x97\x16\x93\x99\x37"
17371                           "\x51\x05\x82\x09\x74\x94\x45\x92",
17372                 .klen   = 64,
17373                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
17374                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17375                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
17376                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17377                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17378                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17379                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17380                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17381                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17382                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17383                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17384                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17385                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17386                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17387                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17388                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17389                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17390                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17391                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17392                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17393                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17394                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17395                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17396                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17397                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17398                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17399                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17400                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17401                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17402                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17403                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17404                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17405                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17406                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17407                           "\x00\x01\x02\x03\x04\x05\x06\x07"
17408                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17409                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17410                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17411                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17412                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17413                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17414                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17415                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17416                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17417                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17418                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17419                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17420                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17421                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17422                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17423                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17424                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17425                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17426                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17427                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17428                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17429                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17430                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17431                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17432                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17433                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17434                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17435                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17436                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17437                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17438                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17439                 .ilen   = 512,
17440                 .result = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17441                           "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17442                           "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17443                           "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17444                           "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17445                           "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17446                           "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17447                           "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17448                           "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17449                           "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17450                           "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17451                           "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17452                           "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17453                           "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17454                           "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17455                           "\x00\x02\x08\x87\x89\x14\x29\xca"
17456                           "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17457                           "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17458                           "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17459                           "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17460                           "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17461                           "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17462                           "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17463                           "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17464                           "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17465                           "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17466                           "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17467                           "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17468                           "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17469                           "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17470                           "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17471                           "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17472                           "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17473                           "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17474                           "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17475                           "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17476                           "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17477                           "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17478                           "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17479                           "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17480                           "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17481                           "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17482                           "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17483                           "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17484                           "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17485                           "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17486                           "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17487                           "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17488                           "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17489                           "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17490                           "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17491                           "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17492                           "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17493                           "\x94\x30\x54\xff\x84\x01\x14\x93"
17494                           "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17495                           "\x53\x76\x44\x1a\x77\xed\x43\x85"
17496                           "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17497                           "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17498                           "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17499                           "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17500                           "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17501                           "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17502                           "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17503                           "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17504                 .rlen   = 512,
17505                 .also_non_np = 1,
17506                 .np     = 3,
17507                 .tap    = { 512 - 20, 4, 16 },
17508         }
17509 };
17510
17511 static struct cipher_testvec aes_xts_dec_tv_template[] = {
17512         /* http://grouper.ieee.org/groups/1619/email/pdf00086.pdf */
17513         { /* XTS-AES 1 */
17514                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
17515                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17516                           "\x00\x00\x00\x00\x00\x00\x00\x00"
17517                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17518                 .klen   = 32,
17519                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17520                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17521                 .input = "\x91\x7c\xf6\x9e\xbd\x68\xb2\xec"
17522                          "\x9b\x9f\xe9\xa3\xea\xdd\xa6\x92"
17523                          "\xcd\x43\xd2\xf5\x95\x98\xed\x85"
17524                          "\x8c\x02\xc2\x65\x2f\xbf\x92\x2e",
17525                 .ilen   = 32,
17526                 .result  = "\x00\x00\x00\x00\x00\x00\x00\x00"
17527                            "\x00\x00\x00\x00\x00\x00\x00\x00"
17528                            "\x00\x00\x00\x00\x00\x00\x00\x00"
17529                            "\x00\x00\x00\x00\x00\x00\x00\x00",
17530                 .rlen   = 32,
17531         }, { /* XTS-AES 2 */
17532                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
17533                           "\x11\x11\x11\x11\x11\x11\x11\x11"
17534                           "\x22\x22\x22\x22\x22\x22\x22\x22"
17535                           "\x22\x22\x22\x22\x22\x22\x22\x22",
17536                 .klen   = 32,
17537                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
17538                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17539                 .input  = "\xc4\x54\x18\x5e\x6a\x16\x93\x6e"
17540                           "\x39\x33\x40\x38\xac\xef\x83\x8b"
17541                           "\xfb\x18\x6f\xff\x74\x80\xad\xc4"
17542                           "\x28\x93\x82\xec\xd6\xd3\x94\xf0",
17543                 .ilen   = 32,
17544                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
17545                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17546                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17547                           "\x44\x44\x44\x44\x44\x44\x44\x44",
17548                 .rlen   = 32,
17549         }, { /* XTS-AES 3 */
17550                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
17551                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
17552                           "\x22\x22\x22\x22\x22\x22\x22\x22"
17553                           "\x22\x22\x22\x22\x22\x22\x22\x22",
17554                 .klen   = 32,
17555                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
17556                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17557                 .input = "\xaf\x85\x33\x6b\x59\x7a\xfc\x1a"
17558                           "\x90\x0b\x2e\xb2\x1e\xc9\x49\xd2"
17559                           "\x92\xdf\x4c\x04\x7e\x0b\x21\x53"
17560                           "\x21\x86\xa5\x97\x1a\x22\x7a\x89",
17561                 .ilen   = 32,
17562                 .result  = "\x44\x44\x44\x44\x44\x44\x44\x44"
17563                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17564                           "\x44\x44\x44\x44\x44\x44\x44\x44"
17565                           "\x44\x44\x44\x44\x44\x44\x44\x44",
17566                 .rlen   = 32,
17567         }, { /* XTS-AES 4 */
17568                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
17569                           "\x23\x53\x60\x28\x74\x71\x35\x26"
17570                           "\x31\x41\x59\x26\x53\x58\x97\x93"
17571                           "\x23\x84\x62\x64\x33\x83\x27\x95",
17572                 .klen   = 32,
17573                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
17574                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17575                 .input  = "\x27\xa7\x47\x9b\xef\xa1\xd4\x76"
17576                           "\x48\x9f\x30\x8c\xd4\xcf\xa6\xe2"
17577                           "\xa9\x6e\x4b\xbe\x32\x08\xff\x25"
17578                           "\x28\x7d\xd3\x81\x96\x16\xe8\x9c"
17579                           "\xc7\x8c\xf7\xf5\xe5\x43\x44\x5f"
17580                           "\x83\x33\xd8\xfa\x7f\x56\x00\x00"
17581                           "\x05\x27\x9f\xa5\xd8\xb5\xe4\xad"
17582                           "\x40\xe7\x36\xdd\xb4\xd3\x54\x12"
17583                           "\x32\x80\x63\xfd\x2a\xab\x53\xe5"
17584                           "\xea\x1e\x0a\x9f\x33\x25\x00\xa5"
17585                           "\xdf\x94\x87\xd0\x7a\x5c\x92\xcc"
17586                           "\x51\x2c\x88\x66\xc7\xe8\x60\xce"
17587                           "\x93\xfd\xf1\x66\xa2\x49\x12\xb4"
17588                           "\x22\x97\x61\x46\xae\x20\xce\x84"
17589                           "\x6b\xb7\xdc\x9b\xa9\x4a\x76\x7a"
17590                           "\xae\xf2\x0c\x0d\x61\xad\x02\x65"
17591                           "\x5e\xa9\x2d\xc4\xc4\xe4\x1a\x89"
17592                           "\x52\xc6\x51\xd3\x31\x74\xbe\x51"
17593                           "\xa1\x0c\x42\x11\x10\xe6\xd8\x15"
17594                           "\x88\xed\xe8\x21\x03\xa2\x52\xd8"
17595                           "\xa7\x50\xe8\x76\x8d\xef\xff\xed"
17596                           "\x91\x22\x81\x0a\xae\xb9\x9f\x91"
17597                           "\x72\xaf\x82\xb6\x04\xdc\x4b\x8e"
17598                           "\x51\xbc\xb0\x82\x35\xa6\xf4\x34"
17599                           "\x13\x32\xe4\xca\x60\x48\x2a\x4b"
17600                           "\xa1\xa0\x3b\x3e\x65\x00\x8f\xc5"
17601                           "\xda\x76\xb7\x0b\xf1\x69\x0d\xb4"
17602                           "\xea\xe2\x9c\x5f\x1b\xad\xd0\x3c"
17603                           "\x5c\xcf\x2a\x55\xd7\x05\xdd\xcd"
17604                           "\x86\xd4\x49\x51\x1c\xeb\x7e\xc3"
17605                           "\x0b\xf1\x2b\x1f\xa3\x5b\x91\x3f"
17606                           "\x9f\x74\x7a\x8a\xfd\x1b\x13\x0e"
17607                           "\x94\xbf\xf9\x4e\xff\xd0\x1a\x91"
17608                           "\x73\x5c\xa1\x72\x6a\xcd\x0b\x19"
17609                           "\x7c\x4e\x5b\x03\x39\x36\x97\xe1"
17610                           "\x26\x82\x6f\xb6\xbb\xde\x8e\xcc"
17611                           "\x1e\x08\x29\x85\x16\xe2\xc9\xed"
17612                           "\x03\xff\x3c\x1b\x78\x60\xf6\xde"
17613                           "\x76\xd4\xce\xcd\x94\xc8\x11\x98"
17614                           "\x55\xef\x52\x97\xca\x67\xe9\xf3"
17615                           "\xe7\xff\x72\xb1\xe9\x97\x85\xca"
17616                           "\x0a\x7e\x77\x20\xc5\xb3\x6d\xc6"
17617                           "\xd7\x2c\xac\x95\x74\xc8\xcb\xbc"
17618                           "\x2f\x80\x1e\x23\xe5\x6f\xd3\x44"
17619                           "\xb0\x7f\x22\x15\x4b\xeb\xa0\xf0"
17620                           "\x8c\xe8\x89\x1e\x64\x3e\xd9\x95"
17621                           "\xc9\x4d\x9a\x69\xc9\xf1\xb5\xf4"
17622                           "\x99\x02\x7a\x78\x57\x2a\xee\xbd"
17623                           "\x74\xd2\x0c\xc3\x98\x81\xc2\x13"
17624                           "\xee\x77\x0b\x10\x10\xe4\xbe\xa7"
17625                           "\x18\x84\x69\x77\xae\x11\x9f\x7a"
17626                           "\x02\x3a\xb5\x8c\xca\x0a\xd7\x52"
17627                           "\xaf\xe6\x56\xbb\x3c\x17\x25\x6a"
17628                           "\x9f\x6e\x9b\xf1\x9f\xdd\x5a\x38"
17629                           "\xfc\x82\xbb\xe8\x72\xc5\x53\x9e"
17630                           "\xdb\x60\x9e\xf4\xf7\x9c\x20\x3e"
17631                           "\xbb\x14\x0f\x2e\x58\x3c\xb2\xad"
17632                           "\x15\xb4\xaa\x5b\x65\x50\x16\xa8"
17633                           "\x44\x92\x77\xdb\xd4\x77\xef\x2c"
17634                           "\x8d\x6c\x01\x7d\xb7\x38\xb1\x8d"
17635                           "\xeb\x4a\x42\x7d\x19\x23\xce\x3f"
17636                           "\xf2\x62\x73\x57\x79\xa4\x18\xf2"
17637                           "\x0a\x28\x2d\xf9\x20\x14\x7b\xea"
17638                           "\xbe\x42\x1e\xe5\x31\x9d\x05\x68",
17639                 .ilen   = 512,
17640                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17641                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17642                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17643                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17644                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17645                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17646                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17647                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17648                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17649                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17650                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17651                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17652                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17653                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17654                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17655                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17656                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17657                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17658                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17659                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17660                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17661                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17662                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17663                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17664                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17665                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17666                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17667                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17668                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17669                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17670                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17671                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17672                           "\x00\x01\x02\x03\x04\x05\x06\x07"
17673                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17674                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17675                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17676                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17677                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17678                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17679                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17680                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17681                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17682                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17683                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17684                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17685                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17686                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17687                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17688                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17689                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17690                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17691                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17692                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17693                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17694                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17695                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17696                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17697                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17698                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17699                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17700                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17701                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17702                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17703                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17704                 .rlen   = 512,
17705         }, { /* XTS-AES 10, XTS-AES-256, data unit 512 bytes */
17706                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
17707                           "\x23\x53\x60\x28\x74\x71\x35\x26"
17708                           "\x62\x49\x77\x57\x24\x70\x93\x69"
17709                           "\x99\x59\x57\x49\x66\x96\x76\x27"
17710                           "\x31\x41\x59\x26\x53\x58\x97\x93"
17711                           "\x23\x84\x62\x64\x33\x83\x27\x95"
17712                           "\x02\x88\x41\x97\x16\x93\x99\x37"
17713                           "\x51\x05\x82\x09\x74\x94\x45\x92",
17714                 .klen   = 64,
17715                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
17716                           "\x00\x00\x00\x00\x00\x00\x00\x00",
17717                 .input  = "\x1c\x3b\x3a\x10\x2f\x77\x03\x86"
17718                           "\xe4\x83\x6c\x99\xe3\x70\xcf\x9b"
17719                           "\xea\x00\x80\x3f\x5e\x48\x23\x57"
17720                           "\xa4\xae\x12\xd4\x14\xa3\xe6\x3b"
17721                           "\x5d\x31\xe2\x76\xf8\xfe\x4a\x8d"
17722                           "\x66\xb3\x17\xf9\xac\x68\x3f\x44"
17723                           "\x68\x0a\x86\xac\x35\xad\xfc\x33"
17724                           "\x45\xbe\xfe\xcb\x4b\xb1\x88\xfd"
17725                           "\x57\x76\x92\x6c\x49\xa3\x09\x5e"
17726                           "\xb1\x08\xfd\x10\x98\xba\xec\x70"
17727                           "\xaa\xa6\x69\x99\xa7\x2a\x82\xf2"
17728                           "\x7d\x84\x8b\x21\xd4\xa7\x41\xb0"
17729                           "\xc5\xcd\x4d\x5f\xff\x9d\xac\x89"
17730                           "\xae\xba\x12\x29\x61\xd0\x3a\x75"
17731                           "\x71\x23\xe9\x87\x0f\x8a\xcf\x10"
17732                           "\x00\x02\x08\x87\x89\x14\x29\xca"
17733                           "\x2a\x3e\x7a\x7d\x7d\xf7\xb1\x03"
17734                           "\x55\x16\x5c\x8b\x9a\x6d\x0a\x7d"
17735                           "\xe8\xb0\x62\xc4\x50\x0d\xc4\xcd"
17736                           "\x12\x0c\x0f\x74\x18\xda\xe3\xd0"
17737                           "\xb5\x78\x1c\x34\x80\x3f\xa7\x54"
17738                           "\x21\xc7\x90\xdf\xe1\xde\x18\x34"
17739                           "\xf2\x80\xd7\x66\x7b\x32\x7f\x6c"
17740                           "\x8c\xd7\x55\x7e\x12\xac\x3a\x0f"
17741                           "\x93\xec\x05\xc5\x2e\x04\x93\xef"
17742                           "\x31\xa1\x2d\x3d\x92\x60\xf7\x9a"
17743                           "\x28\x9d\x6a\x37\x9b\xc7\x0c\x50"
17744                           "\x84\x14\x73\xd1\xa8\xcc\x81\xec"
17745                           "\x58\x3e\x96\x45\xe0\x7b\x8d\x96"
17746                           "\x70\x65\x5b\xa5\xbb\xcf\xec\xc6"
17747                           "\xdc\x39\x66\x38\x0a\xd8\xfe\xcb"
17748                           "\x17\xb6\xba\x02\x46\x9a\x02\x0a"
17749                           "\x84\xe1\x8e\x8f\x84\x25\x20\x70"
17750                           "\xc1\x3e\x9f\x1f\x28\x9b\xe5\x4f"
17751                           "\xbc\x48\x14\x57\x77\x8f\x61\x60"
17752                           "\x15\xe1\x32\x7a\x02\xb1\x40\xf1"
17753                           "\x50\x5e\xb3\x09\x32\x6d\x68\x37"
17754                           "\x8f\x83\x74\x59\x5c\x84\x9d\x84"
17755                           "\xf4\xc3\x33\xec\x44\x23\x88\x51"
17756                           "\x43\xcb\x47\xbd\x71\xc5\xed\xae"
17757                           "\x9b\xe6\x9a\x2f\xfe\xce\xb1\xbe"
17758                           "\xc9\xde\x24\x4f\xbe\x15\x99\x2b"
17759                           "\x11\xb7\x7c\x04\x0f\x12\xbd\x8f"
17760                           "\x6a\x97\x5a\x44\xa0\xf9\x0c\x29"
17761                           "\xa9\xab\xc3\xd4\xd8\x93\x92\x72"
17762                           "\x84\xc5\x87\x54\xcc\xe2\x94\x52"
17763                           "\x9f\x86\x14\xdc\xd2\xab\xa9\x91"
17764                           "\x92\x5f\xed\xc4\xae\x74\xff\xac"
17765                           "\x6e\x33\x3b\x93\xeb\x4a\xff\x04"
17766                           "\x79\xda\x9a\x41\x0e\x44\x50\xe0"
17767                           "\xdd\x7a\xe4\xc6\xe2\x91\x09\x00"
17768                           "\x57\x5d\xa4\x01\xfc\x07\x05\x9f"
17769                           "\x64\x5e\x8b\x7e\x9b\xfd\xef\x33"
17770                           "\x94\x30\x54\xff\x84\x01\x14\x93"
17771                           "\xc2\x7b\x34\x29\xea\xed\xb4\xed"
17772                           "\x53\x76\x44\x1a\x77\xed\x43\x85"
17773                           "\x1a\xd7\x7f\x16\xf5\x41\xdf\xd2"
17774                           "\x69\xd5\x0d\x6a\x5f\x14\xfb\x0a"
17775                           "\xab\x1c\xbb\x4c\x15\x50\xbe\x97"
17776                           "\xf7\xab\x40\x66\x19\x3c\x4c\xaa"
17777                           "\x77\x3d\xad\x38\x01\x4b\xd2\x09"
17778                           "\x2f\xa7\x55\xc8\x24\xbb\x5e\x54"
17779                           "\xc4\xf3\x6f\xfd\xa9\xfc\xea\x70"
17780                           "\xb9\xc6\xe6\x93\xe1\x48\xc1\x51",
17781                 .ilen   = 512,
17782                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
17783                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17784                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17785                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17786                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17787                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17788                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17789                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17790                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17791                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17792                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17793                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17794                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17795                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17796                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17797                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17798                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17799                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17800                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17801                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17802                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17803                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17804                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17805                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17806                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17807                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17808                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17809                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17810                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17811                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17812                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17813                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
17814                           "\x00\x01\x02\x03\x04\x05\x06\x07"
17815                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
17816                           "\x10\x11\x12\x13\x14\x15\x16\x17"
17817                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
17818                           "\x20\x21\x22\x23\x24\x25\x26\x27"
17819                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
17820                           "\x30\x31\x32\x33\x34\x35\x36\x37"
17821                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
17822                           "\x40\x41\x42\x43\x44\x45\x46\x47"
17823                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
17824                           "\x50\x51\x52\x53\x54\x55\x56\x57"
17825                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
17826                           "\x60\x61\x62\x63\x64\x65\x66\x67"
17827                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
17828                           "\x70\x71\x72\x73\x74\x75\x76\x77"
17829                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
17830                           "\x80\x81\x82\x83\x84\x85\x86\x87"
17831                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
17832                           "\x90\x91\x92\x93\x94\x95\x96\x97"
17833                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
17834                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
17835                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
17836                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
17837                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
17838                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
17839                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
17840                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
17841                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
17842                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
17843                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
17844                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17845                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17846                 .rlen   = 512,
17847                 .also_non_np = 1,
17848                 .np     = 3,
17849                 .tap    = { 512 - 20, 4, 16 },
17850         }
17851 };
17852
17853
17854 static struct cipher_testvec aes_ctr_enc_tv_template[] = {
17855         { /* From NIST Special Publication 800-38A, Appendix F.5 */
17856                 .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
17857                           "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
17858                 .klen   = 16,
17859                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17860                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17861                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17862                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17863                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17864                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17865                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17866                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17867                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17868                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17869                 .ilen   = 64,
17870                 .result = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
17871                           "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
17872                           "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
17873                           "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
17874                           "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
17875                           "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
17876                           "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
17877                           "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
17878                 .rlen   = 64,
17879         }, {
17880                 .key    = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
17881                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
17882                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
17883                 .klen   = 24,
17884                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17885                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17886                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17887                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17888                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17889                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17890                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17891                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17892                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17893                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17894                 .ilen   = 64,
17895                 .result = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
17896                           "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
17897                           "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
17898                           "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
17899                           "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
17900                           "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
17901                           "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
17902                           "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
17903                 .rlen   = 64,
17904         }, {
17905                 .key    = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
17906                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
17907                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
17908                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
17909                 .klen   = 32,
17910                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
17911                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
17912                 .input  = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
17913                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
17914                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
17915                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
17916                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
17917                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
17918                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
17919                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
17920                 .ilen   = 64,
17921                 .result = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
17922                           "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
17923                           "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
17924                           "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
17925                           "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
17926                           "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
17927                           "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
17928                           "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
17929                 .rlen   = 64,
17930         }, { /* Generated with Crypto++ */
17931                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
17932                           "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
17933                           "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
17934                           "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
17935                 .klen   = 32,
17936                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
17937                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
17938                 .input  = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
17939                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
17940                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
17941                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
17942                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
17943                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
17944                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
17945                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
17946                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
17947                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
17948                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
17949                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
17950                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
17951                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
17952                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
17953                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
17954                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
17955                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
17956                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
17957                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
17958                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
17959                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
17960                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
17961                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
17962                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
17963                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
17964                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
17965                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
17966                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
17967                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
17968                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
17969                           "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
17970                           "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
17971                           "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
17972                           "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
17973                           "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
17974                           "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
17975                           "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
17976                           "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
17977                           "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
17978                           "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
17979                           "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
17980                           "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
17981                           "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
17982                           "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
17983                           "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
17984                           "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
17985                           "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
17986                           "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
17987                           "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
17988                           "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
17989                           "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
17990                           "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
17991                           "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
17992                           "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
17993                           "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
17994                           "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
17995                           "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
17996                           "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
17997                           "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
17998                           "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
17999                           "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18000                 .ilen   = 496,
18001                 .result = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18002                           "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18003                           "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18004                           "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18005                           "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18006                           "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18007                           "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18008                           "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18009                           "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18010                           "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18011                           "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18012                           "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18013                           "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18014                           "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18015                           "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18016                           "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18017                           "\x34\x4B\x31\x69\x84\x66\x96\x44"
18018                           "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18019                           "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18020                           "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18021                           "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18022                           "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18023                           "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18024                           "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18025                           "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18026                           "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18027                           "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18028                           "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18029                           "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18030                           "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18031                           "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18032                           "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18033                           "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18034                           "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18035                           "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18036                           "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18037                           "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18038                           "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18039                           "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18040                           "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18041                           "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18042                           "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18043                           "\x85\x99\x22\xE8\x91\x38\x70\x83"
18044                           "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18045                           "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18046                           "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18047                           "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18048                           "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18049                           "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18050                           "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18051                           "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18052                           "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18053                           "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18054                           "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18055                           "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18056                           "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18057                           "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18058                           "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18059                           "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18060                           "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18061                           "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18062                           "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18063                 .rlen   = 496,
18064                 .also_non_np = 1,
18065                 .np     = 3,
18066                 .tap    = { 496 - 20, 4, 16 },
18067         }, { /* Generated with Crypto++ */
18068                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18069                           "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18070                           "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18071                           "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18072                 .klen   = 32,
18073                 .iv     = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18074                           "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18075                 .input  = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18076                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18077                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18078                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18079                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18080                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18081                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18082                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18083                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18084                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18085                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18086                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18087                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18088                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18089                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18090                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18091                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18092                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18093                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18094                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18095                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18096                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18097                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18098                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18099                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18100                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18101                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18102                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18103                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18104                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18105                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18106                           "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18107                           "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18108                           "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18109                           "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18110                           "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18111                           "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18112                           "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18113                           "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18114                           "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18115                           "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18116                           "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18117                           "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18118                           "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18119                           "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18120                           "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18121                           "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18122                           "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18123                           "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18124                           "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18125                           "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18126                           "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18127                           "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18128                           "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18129                           "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18130                           "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18131                           "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18132                           "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18133                           "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18134                           "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18135                           "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18136                           "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18137                           "\x7B\xE4\x4D",
18138                 .ilen   = 499,
18139                 .result = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18140                           "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18141                           "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18142                           "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18143                           "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18144                           "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18145                           "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18146                           "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18147                           "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18148                           "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18149                           "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18150                           "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18151                           "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18152                           "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18153                           "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18154                           "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18155                           "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18156                           "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18157                           "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18158                           "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18159                           "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18160                           "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18161                           "\x45\x18\x18\x74\x19\xAD\x71\x01"
18162                           "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18163                           "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18164                           "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18165                           "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18166                           "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18167                           "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18168                           "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18169                           "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18170                           "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18171                           "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18172                           "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18173                           "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18174                           "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18175                           "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18176                           "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18177                           "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18178                           "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18179                           "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18180                           "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18181                           "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18182                           "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18183                           "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18184                           "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18185                           "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18186                           "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18187                           "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18188                           "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18189                           "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18190                           "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18191                           "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18192                           "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18193                           "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18194                           "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18195                           "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18196                           "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18197                           "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18198                           "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18199                           "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18200                           "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18201                           "\xFB\xF2\x3F",
18202                 .rlen   = 499,
18203                 .also_non_np = 1,
18204                 .np     = 2,
18205                 .tap    = { 499 - 16, 16 },
18206         },
18207 };
18208
18209 static struct cipher_testvec aes_ctr_dec_tv_template[] = {
18210         { /* From NIST Special Publication 800-38A, Appendix F.5 */
18211                 .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
18212                           "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
18213                 .klen   = 16,
18214                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18215                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18216                 .input  = "\x87\x4d\x61\x91\xb6\x20\xe3\x26"
18217                           "\x1b\xef\x68\x64\x99\x0d\xb6\xce"
18218                           "\x98\x06\xf6\x6b\x79\x70\xfd\xff"
18219                           "\x86\x17\x18\x7b\xb9\xff\xfd\xff"
18220                           "\x5a\xe4\xdf\x3e\xdb\xd5\xd3\x5e"
18221                           "\x5b\x4f\x09\x02\x0d\xb0\x3e\xab"
18222                           "\x1e\x03\x1d\xda\x2f\xbe\x03\xd1"
18223                           "\x79\x21\x70\xa0\xf3\x00\x9c\xee",
18224                 .ilen   = 64,
18225                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18226                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18227                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18228                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18229                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18230                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18231                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18232                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18233                 .rlen   = 64,
18234         }, {
18235                 .key    = "\x8e\x73\xb0\xf7\xda\x0e\x64\x52"
18236                           "\xc8\x10\xf3\x2b\x80\x90\x79\xe5"
18237                           "\x62\xf8\xea\xd2\x52\x2c\x6b\x7b",
18238                 .klen   = 24,
18239                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18240                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18241                 .input  = "\x1a\xbc\x93\x24\x17\x52\x1c\xa2"
18242                           "\x4f\x2b\x04\x59\xfe\x7e\x6e\x0b"
18243                           "\x09\x03\x39\xec\x0a\xa6\xfa\xef"
18244                           "\xd5\xcc\xc2\xc6\xf4\xce\x8e\x94"
18245                           "\x1e\x36\xb2\x6b\xd1\xeb\xc6\x70"
18246                           "\xd1\xbd\x1d\x66\x56\x20\xab\xf7"
18247                           "\x4f\x78\xa7\xf6\xd2\x98\x09\x58"
18248                           "\x5a\x97\xda\xec\x58\xc6\xb0\x50",
18249                 .ilen   = 64,
18250                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18251                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18252                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18253                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18254                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18255                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18256                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18257                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18258                 .rlen   = 64,
18259         }, {
18260                 .key    = "\x60\x3d\xeb\x10\x15\xca\x71\xbe"
18261                           "\x2b\x73\xae\xf0\x85\x7d\x77\x81"
18262                           "\x1f\x35\x2c\x07\x3b\x61\x08\xd7"
18263                           "\x2d\x98\x10\xa3\x09\x14\xdf\xf4",
18264                 .klen   = 32,
18265                 .iv     = "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18266                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
18267                 .input  = "\x60\x1e\xc3\x13\x77\x57\x89\xa5"
18268                           "\xb7\xa7\xf5\x04\xbb\xf3\xd2\x28"
18269                           "\xf4\x43\xe3\xca\x4d\x62\xb5\x9a"
18270                           "\xca\x84\xe9\x90\xca\xca\xf5\xc5"
18271                           "\x2b\x09\x30\xda\xa2\x3d\xe9\x4c"
18272                           "\xe8\x70\x17\xba\x2d\x84\x98\x8d"
18273                           "\xdf\xc9\xc5\x8d\xb6\x7a\xad\xa6"
18274                           "\x13\xc2\xdd\x08\x45\x79\x41\xa6",
18275                 .ilen   = 64,
18276                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
18277                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
18278                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
18279                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
18280                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
18281                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
18282                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
18283                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
18284                 .rlen   = 64,
18285         }, { /* Generated with Crypto++ */
18286                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18287                           "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18288                           "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18289                           "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18290                 .klen   = 32,
18291                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
18292                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
18293                 .input  = "\x04\xF3\xD3\x88\x17\xEF\xDC\xEF"
18294                           "\x8B\x04\xF8\x3A\x66\x8D\x1A\x53"
18295                           "\x57\x1F\x4B\x23\xE4\xA0\xAF\xF9"
18296                           "\x69\x95\x35\x98\x8D\x4D\x8C\xC1"
18297                           "\xF0\xB2\x7F\x80\xBB\x54\x28\xA2"
18298                           "\x7A\x1B\x9F\x77\xEC\x0E\x6E\xDE"
18299                           "\xF0\xEC\xB8\xE4\x20\x62\xEE\xDB"
18300                           "\x5D\xF5\xDD\xE3\x54\xFC\xDD\xEB"
18301                           "\x6A\xEE\x65\xA1\x21\xD6\xD7\x81"
18302                           "\x47\x61\x12\x4D\xC2\x8C\xFA\x78"
18303                           "\x1F\x28\x02\x01\xC3\xFC\x1F\xEC"
18304                           "\x0F\x10\x4F\xB3\x12\x45\xC6\x3B"
18305                           "\x7E\x08\xF9\x5A\xD0\x5D\x73\x2D"
18306                           "\x58\xA4\xE5\xCB\x1C\xB4\xCE\x74"
18307                           "\x32\x41\x1F\x31\x9C\x08\xA2\x5D"
18308                           "\x67\xEB\x72\x1D\xF8\xE7\x70\x54"
18309                           "\x34\x4B\x31\x69\x84\x66\x96\x44"
18310                           "\x56\xCC\x1E\xD9\xE6\x13\x6A\xB9"
18311                           "\x2D\x0A\x05\x45\x2D\x90\xCC\xDF"
18312                           "\x16\x5C\x5F\x79\x34\x52\x54\xFE"
18313                           "\xFE\xCD\xAD\x04\x2E\xAD\x86\x06"
18314                           "\x1F\x37\xE8\x28\xBC\xD3\x8F\x5B"
18315                           "\x92\x66\x87\x3B\x8A\x0A\x1A\xCC"
18316                           "\x6E\xAB\x9F\x0B\xFA\x5C\xE6\xFD"
18317                           "\x3C\x98\x08\x12\xEC\xAA\x9E\x11"
18318                           "\xCA\xB2\x1F\xCE\x5E\x5B\xB2\x72"
18319                           "\x9C\xCC\x5D\xC5\xE0\x32\xC0\x56"
18320                           "\xD5\x45\x16\xD2\xAF\x13\x66\xF7"
18321                           "\x8C\x67\xAC\x79\xB2\xAF\x56\x27"
18322                           "\x3F\xCC\xFE\xCB\x1E\xC0\x75\xF1"
18323                           "\xA7\xC9\xC3\x1D\x8E\xDD\xF9\xD4"
18324                           "\x42\xC8\x21\x08\x16\xF7\x01\xD7"
18325                           "\xAC\x8E\x3F\x1D\x56\xC1\x06\xE4"
18326                           "\x9C\x62\xD6\xA5\x6A\x50\x44\xB3"
18327                           "\x35\x1C\x82\xB9\x10\xF9\x42\xA1"
18328                           "\xFC\x74\x9B\x44\x4F\x25\x02\xE3"
18329                           "\x08\xF5\xD4\x32\x39\x08\x11\xE8"
18330                           "\xD2\x6B\x50\x53\xD4\x08\xD1\x6B"
18331                           "\x3A\x4A\x68\x7B\x7C\xCD\x46\x5E"
18332                           "\x0D\x07\x19\xDB\x67\xD7\x98\x91"
18333                           "\xD7\x17\x10\x9B\x7B\x8A\x9B\x33"
18334                           "\xAE\xF3\x00\xA6\xD4\x15\xD9\xEA"
18335                           "\x85\x99\x22\xE8\x91\x38\x70\x83"
18336                           "\x93\x01\x24\x6C\xFA\x9A\xB9\x07"
18337                           "\xEA\x8D\x3B\xD9\x2A\x43\x59\x16"
18338                           "\x2F\x69\xEE\x84\x36\x44\x76\x98"
18339                           "\xF3\x04\x2A\x7C\x74\x3D\x29\x2B"
18340                           "\x0D\xAD\x8F\x44\x82\x9E\x57\x8D"
18341                           "\xAC\xED\x18\x1F\x50\xA4\xF5\x98"
18342                           "\x1F\xBD\x92\x91\x1B\x2D\xA6\xD6"
18343                           "\xD2\xE3\x02\xAA\x92\x3B\xC6\xB3"
18344                           "\x1B\x39\x72\xD5\x26\xCA\x04\xE0"
18345                           "\xFC\x58\x78\xBB\xB1\x3F\xA1\x9C"
18346                           "\x42\x24\x3E\x2E\x22\xBB\x4B\xBA"
18347                           "\xF4\x52\x0A\xE6\xAE\x47\xB4\x7D"
18348                           "\x1D\xA8\xBE\x81\x1A\x75\xDA\xAC"
18349                           "\xA6\x25\x1E\xEF\x3A\xC0\x6C\x63"
18350                           "\xEF\xDC\xC9\x79\x10\x26\xE8\x61"
18351                           "\x29\xFC\xA4\x05\xDF\x7D\x5C\x63"
18352                           "\x10\x09\x9B\x46\x9B\xF2\x2C\x2B"
18353                           "\xFA\x3A\x05\x4C\xFA\xD1\xFF\xFE"
18354                           "\xF1\x4C\xE5\xB2\x91\x64\x0C\x51",
18355                 .ilen   = 496,
18356                 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18357                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18358                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18359                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18360                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18361                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18362                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18363                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18364                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18365                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18366                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18367                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18368                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18369                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18370                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18371                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18372                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18373                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18374                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18375                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18376                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18377                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18378                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18379                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18380                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18381                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18382                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18383                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18384                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18385                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18386                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18387                           "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18388                           "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18389                           "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18390                           "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18391                           "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18392                           "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18393                           "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18394                           "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18395                           "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18396                           "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18397                           "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18398                           "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18399                           "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18400                           "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18401                           "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18402                           "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18403                           "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18404                           "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18405                           "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18406                           "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18407                           "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18408                           "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18409                           "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18410                           "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18411                           "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18412                           "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18413                           "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18414                           "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18415                           "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18416                           "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18417                           "\xED\x56\xBF\x28\xB4\x1D\x86\x12",
18418                 .rlen   = 496,
18419                 .also_non_np = 1,
18420                 .np     = 3,
18421                 .tap    = { 496 - 20, 4, 16 },
18422         }, { /* Generated with Crypto++ */
18423                 .key    = "\xC9\x83\xA6\xC9\xEC\x0F\x32\x55"
18424                           "\x0F\x32\x55\x78\x9B\xBE\x78\x9B"
18425                           "\xBE\xE1\x04\x27\xE1\x04\x27\x4A"
18426                           "\x6D\x90\x4A\x6D\x90\xB3\xD6\xF9",
18427                 .klen   = 32,
18428                 .iv     = "\xE7\x82\x1D\xB8\x53\x11\xAC\x47"
18429                           "\xE2\x7D\x18\xD6\x71\x0C\xA7\x42",
18430                 .input  = "\xDA\x4E\x3F\xBC\xE8\xB6\x3A\xA2"
18431                           "\xD5\x4D\x84\x4A\xA9\x0C\xE1\xA5"
18432                           "\xB8\x73\xBC\xF9\xBB\x59\x2F\x44"
18433                           "\x8B\xAB\x82\x6C\xB4\x32\x9A\xDE"
18434                           "\x5A\x0B\xDB\x7A\x6B\xF2\x38\x9F"
18435                           "\x06\xF7\xF7\xFF\xFF\xC0\x8A\x2E"
18436                           "\x76\xEA\x06\x32\x23\xF3\x59\x2E"
18437                           "\x75\xDE\x71\x86\x3C\x98\x23\x44"
18438                           "\x5B\xF2\xFA\x6A\x00\xBB\xC1\xAD"
18439                           "\x58\xBD\x3E\x6F\x2E\xB4\x19\x04"
18440                           "\x70\x8B\x92\x55\x23\xE9\x6A\x3A"
18441                           "\x78\x7A\x1B\x10\x85\x52\x9C\x12"
18442                           "\xE4\x55\x81\x21\xCE\x53\xD0\x3B"
18443                           "\x63\x77\x2C\x74\xD1\xF5\x60\xF3"
18444                           "\xA1\xDE\x44\x3C\x8F\x4D\x2F\xDD"
18445                           "\x8A\xFE\x3C\x42\x8E\xD3\xF2\x8E"
18446                           "\xA8\x28\x69\x65\x31\xE1\x45\x83"
18447                           "\xE4\x49\xC4\x9C\xA7\x28\xAA\x21"
18448                           "\xCD\x5D\x0F\x15\xB7\x93\x07\x26"
18449                           "\xB0\x65\x6D\x91\x90\x23\x7A\xC6"
18450                           "\xDB\x68\xB0\xA1\x8E\xA4\x76\x4E"
18451                           "\xC6\x91\x83\x20\x92\x4D\x63\x7A"
18452                           "\x45\x18\x18\x74\x19\xAD\x71\x01"
18453                           "\x6B\x23\xAD\x9D\x4E\xE4\x6E\x46"
18454                           "\xC9\x73\x7A\xF9\x02\x95\xF4\x07"
18455                           "\x0E\x7A\xA6\xC5\xAE\xFA\x15\x2C"
18456                           "\x51\x71\xF1\xDC\x22\xB6\xAC\xD8"
18457                           "\x19\x24\x44\xBC\x0C\xFB\x3C\x2D"
18458                           "\xB1\x50\x47\x15\x0E\xDB\xB6\xD7"
18459                           "\xE8\x61\xE5\x95\x52\x1E\x3E\x49"
18460                           "\x70\xE9\x66\x04\x4C\xE1\xAF\xBD"
18461                           "\xDD\x15\x3B\x20\x59\x24\xFF\xB0"
18462                           "\x39\xAA\xE7\xBF\x23\xA3\x6E\xD5"
18463                           "\x15\xF0\x61\x4F\xAE\x89\x10\x58"
18464                           "\x5A\x33\x95\x52\x2A\xB5\x77\x9C"
18465                           "\xA5\x43\x80\x40\x27\x2D\xAE\xD9"
18466                           "\x3F\xE0\x80\x94\x78\x79\xCB\x7E"
18467                           "\xAD\x12\x44\x4C\xEC\x27\xB0\xEE"
18468                           "\x0B\x05\x2A\x82\x99\x58\xBB\x7A"
18469                           "\x8D\x6D\x9D\x8E\xE2\x8E\xE7\x93"
18470                           "\x2F\xB3\x09\x8D\x06\xD5\xEE\x70"
18471                           "\x16\xAE\x35\xC5\x52\x0F\x46\x1F"
18472                           "\x71\xF9\x5E\xF2\x67\xDC\x98\x2F"
18473                           "\xA3\x23\xAA\xD5\xD0\x49\xF4\xA6"
18474                           "\xF6\xB8\x32\xCD\xD6\x85\x73\x60"
18475                           "\x59\x20\xE7\x55\x0E\x91\xE2\x0C"
18476                           "\x3F\x1C\xEB\x3D\xDF\x52\x64\xF2"
18477                           "\x7D\x8B\x5D\x63\x16\xB9\xB2\x5D"
18478                           "\x5E\xAB\xB2\x97\xAB\x78\x44\xE7"
18479                           "\xC6\x72\x20\xC5\x90\x9B\xDC\x5D"
18480                           "\xB0\xEF\x44\xEF\x87\x31\x8D\xF4"
18481                           "\xFB\x81\x5D\xF7\x96\x96\xD4\x50"
18482                           "\x89\xA7\xF6\xB9\x67\x76\x40\x9E"
18483                           "\x9D\x40\xD5\x2C\x30\xB8\x01\x8F"
18484                           "\xE4\x7B\x71\x48\xA9\xA0\xA0\x1D"
18485                           "\x87\x52\xA4\x91\xA9\xD7\xA9\x51"
18486                           "\xD9\x59\xF7\xCC\x63\x22\xC1\x8D"
18487                           "\x84\x7B\xD8\x22\x32\x5C\x6F\x1D"
18488                           "\x6E\x9F\xFA\xDD\x49\x40\xDC\x37"
18489                           "\x14\x8C\xE1\x80\x1B\xDD\x36\x2A"
18490                           "\xD0\xE9\x54\x99\x5D\xBA\x3B\x11"
18491                           "\xD8\xFE\xC9\x5B\x5C\x25\xE5\x76"
18492                           "\xFB\xF2\x3F",
18493                 .ilen   = 499,
18494                 .result = "\x50\xB9\x22\xAE\x17\x80\x0C\x75"
18495                           "\xDE\x47\xD3\x3C\xA5\x0E\x9A\x03"
18496                           "\x6C\xF8\x61\xCA\x33\xBF\x28\x91"
18497                           "\x1D\x86\xEF\x58\xE4\x4D\xB6\x1F"
18498                           "\xAB\x14\x7D\x09\x72\xDB\x44\xD0"
18499                           "\x39\xA2\x0B\x97\x00\x69\xF5\x5E"
18500                           "\xC7\x30\xBC\x25\x8E\x1A\x83\xEC"
18501                           "\x55\xE1\x4A\xB3\x1C\xA8\x11\x7A"
18502                           "\x06\x6F\xD8\x41\xCD\x36\x9F\x08"
18503                           "\x94\xFD\x66\xF2\x5B\xC4\x2D\xB9"
18504                           "\x22\x8B\x17\x80\xE9\x52\xDE\x47"
18505                           "\xB0\x19\xA5\x0E\x77\x03\x6C\xD5"
18506                           "\x3E\xCA\x33\x9C\x05\x91\xFA\x63"
18507                           "\xEF\x58\xC1\x2A\xB6\x1F\x88\x14"
18508                           "\x7D\xE6\x4F\xDB\x44\xAD\x16\xA2"
18509                           "\x0B\x74\x00\x69\xD2\x3B\xC7\x30"
18510                           "\x99\x02\x8E\xF7\x60\xEC\x55\xBE"
18511                           "\x27\xB3\x1C\x85\x11\x7A\xE3\x4C"
18512                           "\xD8\x41\xAA\x13\x9F\x08\x71\xFD"
18513                           "\x66\xCF\x38\xC4\x2D\x96\x22\x8B"
18514                           "\xF4\x5D\xE9\x52\xBB\x24\xB0\x19"
18515                           "\x82\x0E\x77\xE0\x49\xD5\x3E\xA7"
18516                           "\x10\x9C\x05\x6E\xFA\x63\xCC\x35"
18517                           "\xC1\x2A\x93\x1F\x88\xF1\x5A\xE6"
18518                           "\x4F\xB8\x21\xAD\x16\x7F\x0B\x74"
18519                           "\xDD\x46\xD2\x3B\xA4\x0D\x99\x02"
18520                           "\x6B\xF7\x60\xC9\x32\xBE\x27\x90"
18521                           "\x1C\x85\xEE\x57\xE3\x4C\xB5\x1E"
18522                           "\xAA\x13\x7C\x08\x71\xDA\x43\xCF"
18523                           "\x38\xA1\x0A\x96\xFF\x68\xF4\x5D"
18524                           "\xC6\x2F\xBB\x24\x8D\x19\x82\xEB"
18525                           "\x54\xE0\x49\xB2\x1B\xA7\x10\x79"
18526                           "\x05\x6E\xD7\x40\xCC\x35\x9E\x07"
18527                           "\x93\xFC\x65\xF1\x5A\xC3\x2C\xB8"
18528                           "\x21\x8A\x16\x7F\xE8\x51\xDD\x46"
18529                           "\xAF\x18\xA4\x0D\x76\x02\x6B\xD4"
18530                           "\x3D\xC9\x32\x9B\x04\x90\xF9\x62"
18531                           "\xEE\x57\xC0\x29\xB5\x1E\x87\x13"
18532                           "\x7C\xE5\x4E\xDA\x43\xAC\x15\xA1"
18533                           "\x0A\x73\xFF\x68\xD1\x3A\xC6\x2F"
18534                           "\x98\x01\x8D\xF6\x5F\xEB\x54\xBD"
18535                           "\x26\xB2\x1B\x84\x10\x79\xE2\x4B"
18536                           "\xD7\x40\xA9\x12\x9E\x07\x70\xFC"
18537                           "\x65\xCE\x37\xC3\x2C\x95\x21\x8A"
18538                           "\xF3\x5C\xE8\x51\xBA\x23\xAF\x18"
18539                           "\x81\x0D\x76\xDF\x48\xD4\x3D\xA6"
18540                           "\x0F\x9B\x04\x6D\xF9\x62\xCB\x34"
18541                           "\xC0\x29\x92\x1E\x87\xF0\x59\xE5"
18542                           "\x4E\xB7\x20\xAC\x15\x7E\x0A\x73"
18543                           "\xDC\x45\xD1\x3A\xA3\x0C\x98\x01"
18544                           "\x6A\xF6\x5F\xC8\x31\xBD\x26\x8F"
18545                           "\x1B\x84\xED\x56\xE2\x4B\xB4\x1D"
18546                           "\xA9\x12\x7B\x07\x70\xD9\x42\xCE"
18547                           "\x37\xA0\x09\x95\xFE\x67\xF3\x5C"
18548                           "\xC5\x2E\xBA\x23\x8C\x18\x81\xEA"
18549                           "\x53\xDF\x48\xB1\x1A\xA6\x0F\x78"
18550                           "\x04\x6D\xD6\x3F\xCB\x34\x9D\x06"
18551                           "\x92\xFB\x64\xF0\x59\xC2\x2B\xB7"
18552                           "\x20\x89\x15\x7E\xE7\x50\xDC\x45"
18553                           "\xAE\x17\xA3\x0C\x75\x01\x6A\xD3"
18554                           "\x3C\xC8\x31\x9A\x03\x8F\xF8\x61"
18555                           "\xED\x56\xBF\x28\xB4\x1D\x86\x12"
18556                           "\x7B\xE4\x4D",
18557                 .rlen   = 499,
18558                 .also_non_np = 1,
18559                 .np     = 2,
18560                 .tap    = { 499 - 16, 16 },
18561         },
18562 };
18563
18564 static struct cipher_testvec aes_ctr_rfc3686_enc_tv_template[] = {
18565         { /* From RFC 3686 */
18566                 .key    = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
18567                           "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
18568                           "\x00\x00\x00\x30",
18569                 .klen   = 20,
18570                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
18571                 .input  = "Single block msg",
18572                 .ilen   = 16,
18573                 .result = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
18574                           "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
18575                 .rlen   = 16,
18576         }, {
18577                 .key    = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
18578                           "\x43\xd6\xce\x1f\x32\x53\x91\x63"
18579                           "\x00\x6c\xb6\xdb",
18580                 .klen   = 20,
18581                 .iv     = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
18582                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
18583                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18584                           "\x10\x11\x12\x13\x14\x15\x16\x17"
18585                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18586                 .ilen   = 32,
18587                 .result = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
18588                           "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
18589                           "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
18590                           "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
18591                 .rlen   = 32,
18592         }, {
18593                 .key    = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
18594                           "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
18595                           "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
18596                           "\x00\x00\x00\x48",
18597                 .klen   = 28,
18598                 .iv     = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
18599                 .input  = "Single block msg",
18600                 .ilen   = 16,
18601                 .result = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
18602                           "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
18603                 .rlen   = 16,
18604         }, {
18605                 .key    = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
18606                           "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
18607                           "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
18608                           "\x00\x96\xb0\x3b",
18609                 .klen   = 28,
18610                 .iv     = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
18611                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
18612                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18613                           "\x10\x11\x12\x13\x14\x15\x16\x17"
18614                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18615                 .ilen   = 32,
18616                 .result = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
18617                           "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
18618                           "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
18619                           "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
18620                 .rlen   = 32,
18621         }, {
18622                 .key    = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
18623                           "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
18624                           "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
18625                           "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
18626                           "\x00\x00\x00\x60",
18627                 .klen   = 36,
18628                 .iv     = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
18629                 .input  = "Single block msg",
18630                 .ilen   = 16,
18631                 .result = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
18632                           "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
18633                 .rlen   = 16,
18634         }, {
18635                 .key    = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
18636                           "\x07\x96\x36\x58\x79\xef\xf8\x86"
18637                           "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
18638                           "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
18639                           "\x00\xfa\xac\x24",
18640                 .klen   = 36,
18641                 .iv     = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
18642                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
18643                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18644                           "\x10\x11\x12\x13\x14\x15\x16\x17"
18645                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
18646                 .ilen   = 32,
18647                 .result = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
18648                           "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
18649                           "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
18650                           "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
18651                 .rlen   = 32,
18652         }, {
18653         // generated using Crypto++
18654                 .key = "\x00\x01\x02\x03\x04\x05\x06\x07"
18655                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18656                         "\x10\x11\x12\x13\x14\x15\x16\x17"
18657                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18658                         "\x00\x00\x00\x00",
18659                 .klen = 32 + 4,
18660                 .iv = "\x00\x00\x00\x00\x00\x00\x00\x00",
18661                 .input =
18662                         "\x00\x01\x02\x03\x04\x05\x06\x07"
18663                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
18664                         "\x10\x11\x12\x13\x14\x15\x16\x17"
18665                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
18666                         "\x20\x21\x22\x23\x24\x25\x26\x27"
18667                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
18668                         "\x30\x31\x32\x33\x34\x35\x36\x37"
18669                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
18670                         "\x40\x41\x42\x43\x44\x45\x46\x47"
18671                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
18672                         "\x50\x51\x52\x53\x54\x55\x56\x57"
18673                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
18674                         "\x60\x61\x62\x63\x64\x65\x66\x67"
18675                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
18676                         "\x70\x71\x72\x73\x74\x75\x76\x77"
18677                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
18678                         "\x80\x81\x82\x83\x84\x85\x86\x87"
18679                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
18680                         "\x90\x91\x92\x93\x94\x95\x96\x97"
18681                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
18682                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
18683                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
18684                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
18685                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
18686                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
18687                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
18688                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
18689                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
18690                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
18691                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
18692                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
18693                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
18694                         "\x00\x03\x06\x09\x0c\x0f\x12\x15"
18695                         "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
18696                         "\x30\x33\x36\x39\x3c\x3f\x42\x45"
18697                         "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
18698                         "\x60\x63\x66\x69\x6c\x6f\x72\x75"
18699                         "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
18700                         "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
18701                         "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
18702                         "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
18703                         "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
18704                         "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
18705                         "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
18706                         "\x20\x23\x26\x29\x2c\x2f\x32\x35"
18707                         "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
18708                         "\x50\x53\x56\x59\x5c\x5f\x62\x65"
18709                         "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
18710                         "\x80\x83\x86\x89\x8c\x8f\x92\x95"
18711                         "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
18712                         "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
18713                         "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
18714                         "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
18715                         "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
18716                         "\x10\x13\x16\x19\x1c\x1f\x22\x25"
18717                         "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
18718                         "\x40\x43\x46\x49\x4c\x4f\x52\x55"
18719                         "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
18720                         "\x70\x73\x76\x79\x7c\x7f\x82\x85"
18721                         "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
18722                         "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
18723                         "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
18724                         "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
18725                         "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
18726                         "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
18727                         "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
18728                         "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
18729                         "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
18730                         "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
18731                         "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
18732                         "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
18733                         "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
18734                         "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
18735                         "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
18736                         "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
18737                         "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
18738                         "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
18739                         "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
18740                         "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
18741                         "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
18742                         "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
18743                         "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
18744                         "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
18745                         "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
18746                         "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
18747                         "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
18748                         "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
18749                         "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
18750                         "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
18751                         "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
18752                         "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
18753                         "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
18754                         "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
18755                         "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
18756                         "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
18757                         "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
18758                         "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
18759                         "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
18760                         "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
18761                         "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
18762                         "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
18763                         "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
18764                         "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
18765                         "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
18766                         "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
18767                         "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
18768                         "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
18769                         "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
18770                         "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
18771                         "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
18772                         "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
18773                         "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
18774                         "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
18775                         "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
18776                         "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
18777                         "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
18778                         "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
18779                         "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
18780                         "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
18781                         "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
18782                         "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
18783                         "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
18784                         "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
18785                         "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
18786                         "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
18787                         "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
18788                         "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
18789                         "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
18790                         "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
18791                         "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
18792                         "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
18793                         "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
18794                         "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
18795                         "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
18796                         "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
18797                         "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
18798                         "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
18799                         "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
18800                         "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
18801                         "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
18802                         "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
18803                         "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
18804                         "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
18805                         "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
18806                         "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
18807                         "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
18808                         "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
18809                         "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
18810                         "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
18811                         "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
18812                         "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
18813                         "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
18814                         "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
18815                         "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
18816                         "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
18817                         "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
18818                         "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
18819                         "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
18820                         "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
18821                         "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
18822                         "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
18823                         "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
18824                         "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
18825                         "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
18826                         "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
18827                         "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
18828                         "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
18829                         "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
18830                         "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
18831                         "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
18832                         "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
18833                         "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
18834                         "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
18835                         "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
18836                         "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
18837                         "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
18838                         "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
18839                         "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
18840                         "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
18841                         "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
18842                         "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
18843                         "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
18844                         "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
18845                         "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
18846                         "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
18847                         "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
18848                         "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
18849                         "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
18850                         "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
18851                         "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
18852                         "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
18853                         "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
18854                         "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
18855                         "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
18856                         "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
18857                         "\x38\x45\x52\x5f\x6c\x79\x86\x93"
18858                         "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
18859                         "\x08\x15\x22\x2f\x3c\x49\x56\x63"
18860                         "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
18861                         "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
18862                         "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
18863                         "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
18864                         "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
18865                         "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
18866                         "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
18867                         "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
18868                         "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
18869                         "\x18\x25\x32\x3f\x4c\x59\x66\x73"
18870                         "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
18871                         "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
18872                         "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
18873                         "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
18874                         "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
18875                         "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
18876                         "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
18877                         "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
18878                         "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
18879                         "\x28\x35\x42\x4f\x5c\x69\x76\x83"
18880                         "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
18881                         "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
18882                         "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
18883                         "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
18884                         "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
18885                         "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
18886                         "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
18887                         "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
18888                         "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
18889                         "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
18890                         "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
18891                         "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
18892                         "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
18893                         "\x48\x57\x66\x75\x84\x93\xa2\xb1"
18894                         "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
18895                         "\x38\x47\x56\x65\x74\x83\x92\xa1"
18896                         "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
18897                         "\x28\x37\x46\x55\x64\x73\x82\x91"
18898                         "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
18899                         "\x18\x27\x36\x45\x54\x63\x72\x81"
18900                         "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
18901                         "\x08\x17\x26\x35\x44\x53\x62\x71"
18902                         "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
18903                         "\xf8\x07\x16\x25\x34\x43\x52\x61"
18904                         "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
18905                         "\xe8\xf7\x06\x15\x24\x33\x42\x51"
18906                         "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
18907                         "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
18908                         "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
18909                         "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
18910                         "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
18911                         "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
18912                         "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
18913                         "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
18914                         "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
18915                         "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
18916                         "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
18917                         "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
18918                         "\x00\x11\x22\x33\x44\x55\x66\x77"
18919                         "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
18920                         "\x10\x21\x32\x43\x54\x65\x76\x87"
18921                         "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
18922                         "\x20\x31\x42\x53\x64\x75\x86\x97"
18923                         "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
18924                         "\x30\x41\x52\x63\x74\x85\x96\xa7"
18925                         "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
18926                         "\x40\x51\x62\x73\x84\x95\xa6\xb7"
18927                         "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
18928                         "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
18929                         "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
18930                         "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
18931                         "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
18932                         "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
18933                         "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
18934                         "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
18935                         "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
18936                         "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
18937                         "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
18938                         "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
18939                         "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
18940                         "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
18941                         "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
18942                         "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
18943                         "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
18944                         "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
18945                         "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
18946                         "\xe0\xf1\x02\x13\x24\x35\x46\x57"
18947                         "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
18948                         "\xf0\x01\x12\x23\x34\x45\x56\x67"
18949                         "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
18950                         "\x00\x13\x26\x39\x4c\x5f\x72\x85"
18951                         "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
18952                         "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
18953                         "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
18954                         "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
18955                         "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
18956                         "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
18957                         "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
18958                         "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
18959                         "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
18960                         "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
18961                         "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
18962                         "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
18963                         "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
18964                         "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
18965                         "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
18966                         "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
18967                         "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
18968                         "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
18969                         "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
18970                         "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
18971                         "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
18972                         "\x10\x23\x36\x49\x5c\x6f\x82\x95"
18973                         "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
18974                         "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
18975                         "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
18976                         "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
18977                         "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
18978                         "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
18979                         "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
18980                         "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
18981                         "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
18982                         "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
18983                         "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
18984                         "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
18985                         "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
18986                         "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
18987                         "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
18988                         "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
18989                         "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
18990                         "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
18991                         "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
18992                         "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
18993                         "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
18994                         "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
18995                         "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
18996                         "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
18997                         "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
18998                         "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
18999                         "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
19000                         "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
19001                         "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
19002                         "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
19003                         "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
19004                         "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
19005                         "\x18\x2d\x42\x57\x6c\x81\x96\xab"
19006                         "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
19007                         "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
19008                         "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
19009                         "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
19010                         "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
19011                         "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
19012                         "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
19013                         "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
19014                         "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
19015                         "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
19016                         "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
19017                         "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
19018                         "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
19019                         "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
19020                         "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
19021                         "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
19022                         "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
19023                         "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
19024                         "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
19025                         "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
19026                         "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
19027                         "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
19028                         "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
19029                         "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
19030                         "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
19031                         "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
19032                         "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
19033                         "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
19034                         "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
19035                         "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
19036                         "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
19037                         "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
19038                         "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
19039                         "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
19040                         "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
19041                         "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
19042                         "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
19043                         "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
19044                         "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
19045                         "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
19046                         "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
19047                         "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
19048                         "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
19049                         "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
19050                         "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
19051                         "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
19052                         "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
19053                         "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
19054                         "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
19055                         "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
19056                         "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
19057                         "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
19058                         "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
19059                         "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
19060                         "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
19061                         "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
19062                         "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
19063                         "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
19064                         "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
19065                         "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
19066                         "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
19067                         "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
19068                         "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
19069                         "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
19070                         "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
19071                         "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
19072                         "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
19073                         "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
19074                         "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
19075                         "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
19076                         "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
19077                         "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
19078                         "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
19079                         "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
19080                         "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
19081                         "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
19082                         "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
19083                         "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
19084                         "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
19085                         "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
19086                         "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
19087                         "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
19088                         "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
19089                         "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
19090                         "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
19091                         "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
19092                         "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
19093                         "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
19094                         "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
19095                         "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
19096                         "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
19097                         "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
19098                         "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
19099                         "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
19100                         "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
19101                         "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
19102                         "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
19103                         "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
19104                         "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
19105                         "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
19106                         "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
19107                         "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
19108                         "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
19109                         "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
19110                         "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
19111                         "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
19112                         "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
19113                         "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
19114                         "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
19115                         "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
19116                         "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
19117                         "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
19118                         "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
19119                         "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
19120                         "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
19121                         "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
19122                         "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
19123                         "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
19124                         "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
19125                         "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
19126                         "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
19127                         "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
19128                         "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
19129                         "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
19130                         "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
19131                         "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
19132                         "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
19133                         "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
19134                         "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
19135                         "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
19136                         "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
19137                         "\x78\x95\xb2\xcf\xec\x09\x26\x43"
19138                         "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
19139                         "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
19140                         "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
19141                         "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
19142                         "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
19143                         "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
19144                         "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
19145                         "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
19146                         "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
19147                         "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
19148                         "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
19149                         "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
19150                         "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
19151                         "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
19152                         "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
19153                         "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
19154                         "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
19155                         "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
19156                         "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
19157                         "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
19158                         "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
19159                         "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
19160                         "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
19161                         "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
19162                         "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
19163                         "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
19164                         "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
19165                         "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
19166                         "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
19167                         "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
19168                         "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
19169                         "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
19170                         "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
19171                         "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
19172                         "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
19173                         "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
19174                         "\x00\x21\x42\x63",
19175                 .ilen = 4100,
19176                 .result =
19177                         "\xf0\x5c\x74\xad\x4e\xbc\x99\xe2"
19178                         "\xae\xff\x91\x3a\x44\xcf\x38\x32"
19179                         "\x1e\xad\xa7\xcd\xa1\x39\x95\xaa"
19180                         "\x10\xb1\xb3\x2e\x04\x31\x8f\x86"
19181                         "\xf2\x62\x74\x70\x0c\xa4\x46\x08"
19182                         "\xa8\xb7\x99\xa8\xe9\xd2\x73\x79"
19183                         "\x7e\x6e\xd4\x8f\x1e\xc7\x8e\x31"
19184                         "\x0b\xfa\x4b\xce\xfd\xf3\x57\x71"
19185                         "\xe9\x46\x03\xa5\x3d\x34\x00\xe2"
19186                         "\x18\xff\x75\x6d\x06\x2d\x00\xab"
19187                         "\xb9\x3e\x6c\x59\xc5\x84\x06\xb5"
19188                         "\x8b\xd0\x89\x9c\x4a\x79\x16\xc6"
19189                         "\x3d\x74\x54\xfa\x44\xcd\x23\x26"
19190                         "\x5c\xcf\x7e\x28\x92\x32\xbf\xdf"
19191                         "\xa7\x20\x3c\x74\x58\x2a\x9a\xde"
19192                         "\x61\x00\x1c\x4f\xff\x59\xc4\x22"
19193                         "\xac\x3c\xd0\xe8\x6c\xf9\x97\x1b"
19194                         "\x58\x9b\xad\x71\xe8\xa9\xb5\x0d"
19195                         "\xee\x2f\x04\x1f\x7f\xbc\x99\xee"
19196                         "\x84\xff\x42\x60\xdc\x3a\x18\xa5"
19197                         "\x81\xf9\xef\xdc\x7a\x0f\x65\x41"
19198                         "\x2f\xa3\xd3\xf9\xc2\xcb\xc0\x4d"
19199                         "\x8f\xd3\x76\x96\xad\x49\x6d\x38"
19200                         "\x3d\x39\x0b\x6c\x80\xb7\x54\x69"
19201                         "\xf0\x2c\x90\x02\x29\x0d\x1c\x12"
19202                         "\xad\x55\xc3\x8b\x68\xd9\xcc\xb3"
19203                         "\xb2\x64\x33\x90\x5e\xca\x4b\xe2"
19204                         "\xfb\x75\xdc\x63\xf7\x9f\x82\x74"
19205                         "\xf0\xc9\xaa\x7f\xe9\x2a\x9b\x33"
19206                         "\xbc\x88\x00\x7f\xca\xb2\x1f\x14"
19207                         "\xdb\xc5\x8e\x7b\x11\x3c\x3e\x08"
19208                         "\xf3\x83\xe8\xe0\x94\x86\x2e\x92"
19209                         "\x78\x6b\x01\xc9\xc7\x83\xba\x21"
19210                         "\x6a\x25\x15\x33\x4e\x45\x08\xec"
19211                         "\x35\xdb\xe0\x6e\x31\x51\x79\xa9"
19212                         "\x42\x44\x65\xc1\xa0\xf1\xf9\x2a"
19213                         "\x70\xd5\xb6\xc6\xc1\x8c\x39\xfc"
19214                         "\x25\xa6\x55\xd9\xdd\x2d\x4c\xec"
19215                         "\x49\xc6\xeb\x0e\xa8\x25\x2a\x16"
19216                         "\x1b\x66\x84\xda\xe2\x92\xe5\xc0"
19217                         "\xc8\x53\x07\xaf\x80\x84\xec\xfd"
19218                         "\xcd\xd1\x6e\xcd\x6f\x6a\xf5\x36"
19219                         "\xc5\x15\xe5\x25\x7d\x77\xd1\x1a"
19220                         "\x93\x36\xa9\xcf\x7c\xa4\x54\x4a"
19221                         "\x06\x51\x48\x4e\xf6\x59\x87\xd2"
19222                         "\x04\x02\xef\xd3\x44\xde\x76\x31"
19223                         "\xb3\x34\x17\x1b\x9d\x66\x11\x9f"
19224                         "\x1e\xcc\x17\xe9\xc7\x3c\x1b\xe7"
19225                         "\xcb\x50\x08\xfc\xdc\x2b\x24\xdb"
19226                         "\x65\x83\xd0\x3b\xe3\x30\xea\x94"
19227                         "\x6c\xe7\xe8\x35\x32\xc7\xdb\x64"
19228                         "\xb4\x01\xab\x36\x2c\x77\x13\xaf"
19229                         "\xf8\x2b\x88\x3f\x54\x39\xc4\x44"
19230                         "\xfe\xef\x6f\x68\x34\xbe\x0f\x05"
19231                         "\x16\x6d\xf6\x0a\x30\xe7\xe3\xed"
19232                         "\xc4\xde\x3c\x1b\x13\xd8\xdb\xfe"
19233                         "\x41\x62\xe5\x28\xd4\x8d\xa3\xc7"
19234                         "\x93\x97\xc6\x48\x45\x1d\x9f\x83"
19235                         "\xdf\x4b\x40\x3e\x42\x25\x87\x80"
19236                         "\x4c\x7d\xa8\xd4\x98\x23\x95\x75"
19237                         "\x41\x8c\xda\x41\x9b\xd4\xa7\x06"
19238                         "\xb5\xf1\x71\x09\x53\xbe\xca\xbf"
19239                         "\x32\x03\xed\xf0\x50\x1c\x56\x39"
19240                         "\x5b\xa4\x75\x18\xf7\x9b\x58\xef"
19241                         "\x53\xfc\x2a\x38\x23\x15\x75\xcd"
19242                         "\x45\xe5\x5a\x82\x55\xba\x21\xfa"
19243                         "\xd4\xbd\xc6\x94\x7c\xc5\x80\x12"
19244                         "\xf7\x4b\x32\xc4\x9a\x82\xd8\x28"
19245                         "\x8f\xd9\xc2\x0f\x60\x03\xbe\x5e"
19246                         "\x21\xd6\x5f\x58\xbf\x5c\xb1\x32"
19247                         "\x82\x8d\xa9\xe5\xf2\x66\x1a\xc0"
19248                         "\xa0\xbc\x58\x2f\x71\xf5\x2f\xed"
19249                         "\xd1\x26\xb9\xd8\x49\x5a\x07\x19"
19250                         "\x01\x7c\x59\xb0\xf8\xa4\xb7\xd3"
19251                         "\x7b\x1a\x8c\x38\xf4\x50\xa4\x59"
19252                         "\xb0\xcc\x41\x0b\x88\x7f\xe5\x31"
19253                         "\xb3\x42\xba\xa2\x7e\xd4\x32\x71"
19254                         "\x45\x87\x48\xa9\xc2\xf2\x89\xb3"
19255                         "\xe4\xa7\x7e\x52\x15\x61\xfa\xfe"
19256                         "\xc9\xdd\x81\xeb\x13\xab\xab\xc3"
19257                         "\x98\x59\xd8\x16\x3d\x14\x7a\x1c"
19258                         "\x3c\x41\x9a\x16\x16\x9b\xd2\xd2"
19259                         "\x69\x3a\x29\x23\xac\x86\x32\xa5"
19260                         "\x48\x9c\x9e\xf3\x47\x77\x81\x70"
19261                         "\x24\xe8\x85\xd2\xf5\xb5\xfa\xff"
19262                         "\x59\x6a\xd3\x50\x59\x43\x59\xde"
19263                         "\xd9\xf1\x55\xa5\x0c\xc3\x1a\x1a"
19264                         "\x18\x34\x0d\x1a\x63\x33\xed\x10"
19265                         "\xe0\x1d\x2a\x18\xd2\xc0\x54\xa8"
19266                         "\xca\xb5\x9a\xd3\xdd\xca\x45\x84"
19267                         "\x50\xe7\x0f\xfe\xa4\x99\x5a\xbe"
19268                         "\x43\x2d\x9a\xcb\x92\x3f\x5a\x1d"
19269                         "\x85\xd8\xc9\xdf\x68\xc9\x12\x80"
19270                         "\x56\x0c\xdc\x00\xdc\x3a\x7d\x9d"
19271                         "\xa3\xa2\xe8\x4d\xbf\xf9\x70\xa0"
19272                         "\xa4\x13\x4f\x6b\xaf\x0a\x89\x7f"
19273                         "\xda\xf0\xbf\x9b\xc8\x1d\xe5\xf8"
19274                         "\x2e\x8b\x07\xb5\x73\x1b\xcc\xa2"
19275                         "\xa6\xad\x30\xbc\x78\x3c\x5b\x10"
19276                         "\xfa\x5e\x62\x2d\x9e\x64\xb3\x33"
19277                         "\xce\xf9\x1f\x86\xe7\x8b\xa2\xb8"
19278                         "\xe8\x99\x57\x8c\x11\xed\x66\xd9"
19279                         "\x3c\x72\xb9\xc3\xe6\x4e\x17\x3a"
19280                         "\x6a\xcb\x42\x24\x06\xed\x3e\x4e"
19281                         "\xa3\xe8\x6a\x94\xda\x0d\x4e\xd5"
19282                         "\x14\x19\xcf\xb6\x26\xd8\x2e\xcc"
19283                         "\x64\x76\x38\x49\x4d\xfe\x30\x6d"
19284                         "\xe4\xc8\x8c\x7b\xc4\xe0\x35\xba"
19285                         "\x22\x6e\x76\xe1\x1a\xf2\x53\xc3"
19286                         "\x28\xa2\x82\x1f\x61\x69\xad\xc1"
19287                         "\x7b\x28\x4b\x1e\x6c\x85\x95\x9b"
19288                         "\x51\xb5\x17\x7f\x12\x69\x8c\x24"
19289                         "\xd5\xc7\x5a\x5a\x11\x54\xff\x5a"
19290                         "\xf7\x16\xc3\x91\xa6\xf0\xdc\x0a"
19291                         "\xb6\xa7\x4a\x0d\x7a\x58\xfe\xa5"
19292                         "\xf5\xcb\x8f\x7b\x0e\xea\x57\xe7"
19293                         "\xbd\x79\xd6\x1c\x88\x23\x6c\xf2"
19294                         "\x4d\x29\x77\x53\x35\x6a\x00\x8d"
19295                         "\xcd\xa3\x58\xbe\x77\x99\x18\xf8"
19296                         "\xe6\xe1\x8f\xe9\x37\x8f\xe3\xe2"
19297                         "\x5a\x8a\x93\x25\xaf\xf3\x78\x80"
19298                         "\xbe\xa6\x1b\xc6\xac\x8b\x1c\x91"
19299                         "\x58\xe1\x9f\x89\x35\x9d\x1d\x21"
19300                         "\x29\x9f\xf4\x99\x02\x27\x0f\xa8"
19301                         "\x4f\x79\x94\x2b\x33\x2c\xda\xa2"
19302                         "\x26\x39\x83\x94\xef\x27\xd8\x53"
19303                         "\x8f\x66\x0d\xe4\x41\x7d\x34\xcd"
19304                         "\x43\x7c\x95\x0a\x53\xef\x66\xda"
19305                         "\x7e\x9b\xf3\x93\xaf\xd0\x73\x71"
19306                         "\xba\x40\x9b\x74\xf8\xd7\xd7\x41"
19307                         "\x6d\xaf\x72\x9c\x8d\x21\x87\x3c"
19308                         "\xfd\x0a\x90\xa9\x47\x96\x9e\xd3"
19309                         "\x88\xee\x73\xcf\x66\x2f\x52\x56"
19310                         "\x6d\xa9\x80\x4c\xe2\x6f\x62\x88"
19311                         "\x3f\x0e\x54\x17\x48\x80\x5d\xd3"
19312                         "\xc3\xda\x25\x3d\xa1\xc8\xcb\x9f"
19313                         "\x9b\x70\xb3\xa1\xeb\x04\x52\xa1"
19314                         "\xf2\x22\x0f\xfc\xc8\x18\xfa\xf9"
19315                         "\x85\x9c\xf1\xac\xeb\x0c\x02\x46"
19316                         "\x75\xd2\xf5\x2c\xe3\xd2\x59\x94"
19317                         "\x12\xf3\x3c\xfc\xd7\x92\xfa\x36"
19318                         "\xba\x61\x34\x38\x7c\xda\x48\x3e"
19319                         "\x08\xc9\x39\x23\x5e\x02\x2c\x1a"
19320                         "\x18\x7e\xb4\xd9\xfd\x9e\x40\x02"
19321                         "\xb1\x33\x37\x32\xe7\xde\xd6\xd0"
19322                         "\x7c\x58\x65\x4b\xf8\x34\x27\x9c"
19323                         "\x44\xb4\xbd\xe9\xe9\x4c\x78\x7d"
19324                         "\x4b\x9f\xce\xb1\xcd\x47\xa5\x37"
19325                         "\xe5\x6d\xbd\xb9\x43\x94\x0a\xd4"
19326                         "\xd6\xf9\x04\x5f\xb5\x66\x6c\x1a"
19327                         "\x35\x12\xe3\x36\x28\x27\x36\x58"
19328                         "\x01\x2b\x79\xe4\xba\x6d\x10\x7d"
19329                         "\x65\xdf\x84\x95\xf4\xd5\xb6\x8f"
19330                         "\x2b\x9f\x96\x00\x86\x60\xf0\x21"
19331                         "\x76\xa8\x6a\x8c\x28\x1c\xb3\x6b"
19332                         "\x97\xd7\xb6\x53\x2a\xcc\xab\x40"
19333                         "\x9d\x62\x79\x58\x52\xe6\x65\xb7"
19334                         "\xab\x55\x67\x9c\x89\x7c\x03\xb0"
19335                         "\x73\x59\xc5\x81\xf5\x18\x17\x5c"
19336                         "\x89\xf3\x78\x35\x44\x62\x78\x72"
19337                         "\xd0\x96\xeb\x31\xe7\x87\x77\x14"
19338                         "\x99\x51\xf2\x59\x26\x9e\xb5\xa6"
19339                         "\x45\xfe\x6e\xbd\x07\x4c\x94\x5a"
19340                         "\xa5\x7d\xfc\xf1\x2b\x77\xe2\xfe"
19341                         "\x17\xd4\x84\xa0\xac\xb5\xc7\xda"
19342                         "\xa9\x1a\xb6\xf3\x74\x11\xb4\x9d"
19343                         "\xfb\x79\x2e\x04\x2d\x50\x28\x83"
19344                         "\xbf\xc6\x52\xd3\x34\xd6\xe8\x7a"
19345                         "\xb6\xea\xe7\xa8\x6c\x15\x1e\x2c"
19346                         "\x57\xbc\x48\x4e\x5f\x5c\xb6\x92"
19347                         "\xd2\x49\x77\x81\x6d\x90\x70\xae"
19348                         "\x98\xa1\x03\x0d\x6b\xb9\x77\x14"
19349                         "\xf1\x4e\x23\xd3\xf8\x68\xbd\xc2"
19350                         "\xfe\x04\xb7\x5c\xc5\x17\x60\x8f"
19351                         "\x65\x54\xa4\x7a\x42\xdc\x18\x0d"
19352                         "\xb5\xcf\x0f\xd3\xc7\x91\x66\x1b"
19353                         "\x45\x42\x27\x75\x50\xe5\xee\xb8"
19354                         "\x7f\x33\x2c\xba\x4a\x92\x4d\x2c"
19355                         "\x3c\xe3\x0d\x80\x01\xba\x0d\x29"
19356                         "\xd8\x3c\xe9\x13\x16\x57\xe6\xea"
19357                         "\x94\x52\xe7\x00\x4d\x30\xb0\x0f"
19358                         "\x35\xb8\xb8\xa7\xb1\xb5\x3b\x44"
19359                         "\xe1\x2f\xfd\x88\xed\x43\xe7\x52"
19360                         "\x10\x93\xb3\x8a\x30\x6b\x0a\xf7"
19361                         "\x23\xc6\x50\x9d\x4a\xb0\xde\xc3"
19362                         "\xdc\x9b\x2f\x01\x56\x36\x09\xc5"
19363                         "\x2f\x6b\xfe\xf1\xd8\x27\x45\x03"
19364                         "\x30\x5e\x5c\x5b\xb4\x62\x0e\x1a"
19365                         "\xa9\x21\x2b\x92\x94\x87\x62\x57"
19366                         "\x4c\x10\x74\x1a\xf1\x0a\xc5\x84"
19367                         "\x3b\x9e\x72\x02\xd7\xcc\x09\x56"
19368                         "\xbd\x54\xc1\xf0\xc3\xe3\xb3\xf8"
19369                         "\xd2\x0d\x61\xcb\xef\xce\x0d\x05"
19370                         "\xb0\x98\xd9\x8e\x4f\xf9\xbc\x93"
19371                         "\xa6\xea\xc8\xcf\x10\x53\x4b\xf1"
19372                         "\xec\xfc\x89\xf9\x64\xb0\x22\xbf"
19373                         "\x9e\x55\x46\x9f\x7c\x50\x8e\x84"
19374                         "\x54\x20\x98\xd7\x6c\x40\x1e\xdb"
19375                         "\x69\x34\x78\x61\x24\x21\x9c\x8a"
19376                         "\xb3\x62\x31\x8b\x6e\xf5\x2a\x35"
19377                         "\x86\x13\xb1\x6c\x64\x2e\x41\xa5"
19378                         "\x05\xf2\x42\xba\xd2\x3a\x0d\x8e"
19379                         "\x8a\x59\x94\x3c\xcf\x36\x27\x82"
19380                         "\xc2\x45\xee\x58\xcd\x88\xb4\xec"
19381                         "\xde\xb2\x96\x0a\xaf\x38\x6f\x88"
19382                         "\xd7\xd8\xe1\xdf\xb9\x96\xa9\x0a"
19383                         "\xb1\x95\x28\x86\x20\xe9\x17\x49"
19384                         "\xa2\x29\x38\xaa\xa5\xe9\x6e\xf1"
19385                         "\x19\x27\xc0\xd5\x2a\x22\xc3\x0b"
19386                         "\xdb\x7c\x73\x10\xb9\xba\x89\x76"
19387                         "\x54\xae\x7d\x71\xb3\x93\xf6\x32"
19388                         "\xe6\x47\x43\x55\xac\xa0\x0d\xc2"
19389                         "\x93\x27\x4a\x8e\x0e\x74\x15\xc7"
19390                         "\x0b\x85\xd9\x0c\xa9\x30\x7a\x3e"
19391                         "\xea\x8f\x85\x6d\x3a\x12\x4f\x72"
19392                         "\x69\x58\x7a\x80\xbb\xb5\x97\xf3"
19393                         "\xcf\x70\xd2\x5d\xdd\x4d\x21\x79"
19394                         "\x54\x4d\xe4\x05\xe8\xbd\xc2\x62"
19395                         "\xb1\x3b\x77\x1c\xd6\x5c\xf3\xa0"
19396                         "\x79\x00\xa8\x6c\x29\xd9\x18\x24"
19397                         "\x36\xa2\x46\xc0\x96\x65\x7f\xbd"
19398                         "\x2a\xed\x36\x16\x0c\xaa\x9f\xf4"
19399                         "\xc5\xb4\xe2\x12\xed\x69\xed\x4f"
19400                         "\x26\x2c\x39\x52\x89\x98\xe7\x2c"
19401                         "\x99\xa4\x9e\xa3\x9b\x99\x46\x7a"
19402                         "\x3a\xdc\xa8\x59\xa3\xdb\xc3\x3b"
19403                         "\x95\x0d\x3b\x09\x6e\xee\x83\x5d"
19404                         "\x32\x4d\xed\xab\xfa\x98\x14\x4e"
19405                         "\xc3\x15\x45\x53\x61\xc4\x93\xbd"
19406                         "\x90\xf4\x99\x95\x4c\xe6\x76\x92"
19407                         "\x29\x90\x46\x30\x92\x69\x7d\x13"
19408                         "\xf2\xa5\xcd\x69\x49\x44\xb2\x0f"
19409                         "\x63\x40\x36\x5f\x09\xe2\x78\xf8"
19410                         "\x91\xe3\xe2\xfa\x10\xf7\xc8\x24"
19411                         "\xa8\x89\x32\x5c\x37\x25\x1d\xb2"
19412                         "\xea\x17\x8a\x0a\xa9\x64\xc3\x7c"
19413                         "\x3c\x7c\xbd\xc6\x79\x34\xe7\xe2"
19414                         "\x85\x8e\xbf\xf8\xde\x92\xa0\xae"
19415                         "\x20\xc4\xf6\xbb\x1f\x38\x19\x0e"
19416                         "\xe8\x79\x9c\xa1\x23\xe9\x54\x7e"
19417                         "\x37\x2f\xe2\x94\x32\xaf\xa0\x23"
19418                         "\x49\xe4\xc0\xb3\xac\x00\x8f\x36"
19419                         "\x05\xc4\xa6\x96\xec\x05\x98\x4f"
19420                         "\x96\x67\x57\x1f\x20\x86\x1b\x2d"
19421                         "\x69\xe4\x29\x93\x66\x5f\xaf\x6b"
19422                         "\x88\x26\x2c\x67\x02\x4b\x52\xd0"
19423                         "\x83\x7a\x43\x1f\xc0\x71\x15\x25"
19424                         "\x77\x65\x08\x60\x11\x76\x4c\x8d"
19425                         "\xed\xa9\x27\xc6\xb1\x2a\x2c\x6a"
19426                         "\x4a\x97\xf5\xc6\xb7\x70\x42\xd3"
19427                         "\x03\xd1\x24\x95\xec\x6d\xab\x38"
19428                         "\x72\xce\xe2\x8b\x33\xd7\x51\x09"
19429                         "\xdc\x45\xe0\x09\x96\x32\xf3\xc4"
19430                         "\x84\xdc\x73\x73\x2d\x1b\x11\x98"
19431                         "\xc5\x0e\x69\x28\x94\xc7\xb5\x4d"
19432                         "\xc8\x8a\xd0\xaa\x13\x2e\x18\x74"
19433                         "\xdd\xd1\x1e\xf3\x90\xe8\xfc\x9a"
19434                         "\x72\x4a\x0e\xd1\xe4\xfb\x0d\x96"
19435                         "\xd1\x0c\x79\x85\x1b\x1c\xfe\xe1"
19436                         "\x62\x8f\x7a\x73\x32\xab\xc8\x18"
19437                         "\x69\xe3\x34\x30\xdf\x13\xa6\xe5"
19438                         "\xe8\x0e\x67\x7f\x81\x11\xb4\x60"
19439                         "\xc7\xbd\x79\x65\x50\xdc\xc4\x5b"
19440                         "\xde\x39\xa4\x01\x72\x63\xf3\xd1"
19441                         "\x64\x4e\xdf\xfc\x27\x92\x37\x0d"
19442                         "\x57\xcd\x11\x4f\x11\x04\x8e\x1d"
19443                         "\x16\xf7\xcd\x92\x9a\x99\x30\x14"
19444                         "\xf1\x7c\x67\x1b\x1f\x41\x0b\xe8"
19445                         "\x32\xe8\xb8\xc1\x4f\x54\x86\x4f"
19446                         "\xe5\x79\x81\x73\xcd\x43\x59\x68"
19447                         "\x73\x02\x3b\x78\x21\x72\x43\x00"
19448                         "\x49\x17\xf7\x00\xaf\x68\x24\x53"
19449                         "\x05\x0a\xc3\x33\xe0\x33\x3f\x69"
19450                         "\xd2\x84\x2f\x0b\xed\xde\x04\xf4"
19451                         "\x11\x94\x13\x69\x51\x09\x28\xde"
19452                         "\x57\x5c\xef\xdc\x9a\x49\x1c\x17"
19453                         "\x97\xf3\x96\xc1\x7f\x5d\x2e\x7d"
19454                         "\x55\xb8\xb3\x02\x09\xb3\x1f\xe7"
19455                         "\xc9\x8d\xa3\x36\x34\x8a\x77\x13"
19456                         "\x30\x63\x4c\xa5\xcd\xc3\xe0\x7e"
19457                         "\x05\xa1\x7b\x0c\xcb\x74\x47\x31"
19458                         "\x62\x03\x43\xf1\x87\xb4\xb0\x85"
19459                         "\x87\x8e\x4b\x25\xc7\xcf\xae\x4b"
19460                         "\x36\x46\x3e\x62\xbc\x6f\xeb\x5f"
19461                         "\x73\xac\xe6\x07\xee\xc1\xa1\xd6"
19462                         "\xc4\xab\xc9\xd6\x89\x45\xe1\xf1"
19463                         "\x04\x4e\x1a\x6f\xbb\x4f\x3a\xa3"
19464                         "\xa0\xcb\xa3\x0a\xd8\x71\x35\x55"
19465                         "\xe4\xbc\x2e\x04\x06\xe6\xff\x5b"
19466                         "\x1c\xc0\x11\x7c\xc5\x17\xf3\x38"
19467                         "\xcf\xe9\xba\x0f\x0e\xef\x02\xc2"
19468                         "\x8d\xc6\xbc\x4b\x67\x20\x95\xd7"
19469                         "\x2c\x45\x5b\x86\x44\x8c\x6f\x2e"
19470                         "\x7e\x9f\x1c\x77\xba\x6b\x0e\xa3"
19471                         "\x69\xdc\xab\x24\x57\x60\x47\xc1"
19472                         "\xd1\xa5\x9d\x23\xe6\xb1\x37\xfe"
19473                         "\x93\xd2\x4c\x46\xf9\x0c\xc6\xfb"
19474                         "\xd6\x9d\x99\x69\xab\x7a\x07\x0c"
19475                         "\x65\xe7\xc4\x08\x96\xe2\xa5\x01"
19476                         "\x3f\x46\x07\x05\x7e\xe8\x9a\x90"
19477                         "\x50\xdc\xe9\x7a\xea\xa1\x39\x6e"
19478                         "\x66\xe4\x6f\xa5\x5f\xb2\xd9\x5b"
19479                         "\xf5\xdb\x2a\x32\xf0\x11\x6f\x7c"
19480                         "\x26\x10\x8f\x3d\x80\xe9\x58\xf7"
19481                         "\xe0\xa8\x57\xf8\xdb\x0e\xce\x99"
19482                         "\x63\x19\x3d\xd5\xec\x1b\x77\x69"
19483                         "\x98\xf6\xe4\x5f\x67\x17\x4b\x09"
19484                         "\x85\x62\x82\x70\x18\xe2\x9a\x78"
19485                         "\xe2\x62\xbd\xb4\xf1\x42\xc6\xfb"
19486                         "\x08\xd0\xbd\xeb\x4e\x09\xf2\xc8"
19487                         "\x1e\xdc\x3d\x32\x21\x56\x9c\x4f"
19488                         "\x35\xf3\x61\x06\x72\x84\xc4\x32"
19489                         "\xf2\xf1\xfa\x0b\x2f\xc3\xdb\x02"
19490                         "\x04\xc2\xde\x57\x64\x60\x8d\xcf"
19491                         "\xcb\x86\x5d\x97\x3e\xb1\x9c\x01"
19492                         "\xd6\x28\x8f\x99\xbc\x46\xeb\x05"
19493                         "\xaf\x7e\xb8\x21\x2a\x56\x85\x1c"
19494                         "\xb3\x71\xa0\xde\xca\x96\xf1\x78"
19495                         "\x49\xa2\x99\x81\x80\x5c\x01\xf5"
19496                         "\xa0\xa2\x56\x63\xe2\x70\x07\xa5"
19497                         "\x95\xd6\x85\xeb\x36\x9e\xa9\x51"
19498                         "\x66\x56\x5f\x1d\x02\x19\xe2\xf6"
19499                         "\x4f\x73\x38\x09\x75\x64\x48\xe0"
19500                         "\xf1\x7e\x0e\xe8\x9d\xf9\xed\x94"
19501                         "\xfe\x16\x26\x62\x49\x74\xf4\xb0"
19502                         "\xd4\xa9\x6c\xb0\xfd\x53\xe9\x81"
19503                         "\xe0\x7a\xbf\xcf\xb5\xc4\x01\x81"
19504                         "\x79\x99\x77\x01\x3b\xe9\xa2\xb6"
19505                         "\xe6\x6a\x8a\x9e\x56\x1c\x8d\x1e"
19506                         "\x8f\x06\x55\x2c\x6c\xdc\x92\x87"
19507                         "\x64\x3b\x4b\x19\xa1\x13\x64\x1d"
19508                         "\x4a\xe9\xc0\x00\xb8\x95\xef\x6b"
19509                         "\x1a\x86\x6d\x37\x52\x02\xc2\xe0"
19510                         "\xc8\xbb\x42\x0c\x02\x21\x4a\xc9"
19511                         "\xef\xa0\x54\xe4\x5e\x16\x53\x81"
19512                         "\x70\x62\x10\xaf\xde\xb8\xb5\xd3"
19513                         "\xe8\x5e\x6c\xc3\x8a\x3e\x18\x07"
19514                         "\xf2\x2f\x7d\xa7\xe1\x3d\x4e\xb4"
19515                         "\x26\xa7\xa3\x93\x86\xb2\x04\x1e"
19516                         "\x53\x5d\x86\xd6\xde\x65\xca\xe3"
19517                         "\x4e\xc1\xcf\xef\xc8\x70\x1b\x83"
19518                         "\x13\xdd\x18\x8b\x0d\x76\xd2\xf6"
19519                         "\x37\x7a\x93\x7a\x50\x11\x9f\x96"
19520                         "\x86\x25\xfd\xac\xdc\xbe\x18\x93"
19521                         "\x19\x6b\xec\x58\x4f\xb9\x75\xa7"
19522                         "\xdd\x3f\x2f\xec\xc8\x5a\x84\xab"
19523                         "\xd5\xe4\x8a\x07\xf6\x4d\x23\xd6"
19524                         "\x03\xfb\x03\x6a\xea\x66\xbf\xd4"
19525                         "\xb1\x34\xfb\x78\xe9\x55\xdc\x7c"
19526                         "\x3d\x9c\xe5\x9a\xac\xc3\x7a\x80"
19527                         "\x24\x6d\xa0\xef\x25\x7c\xb7\xea"
19528                         "\xce\x4d\x5f\x18\x60\xce\x87\x22"
19529                         "\x66\x2f\xd5\xdd\xdd\x02\x21\x75"
19530                         "\x82\xa0\x1f\x58\xc6\xd3\x62\xf7"
19531                         "\x32\xd8\xaf\x1e\x07\x77\x51\x96"
19532                         "\xd5\x6b\x1e\x7e\x80\x02\xe8\x67"
19533                         "\xea\x17\x0b\x10\xd2\x3f\x28\x25"
19534                         "\x4f\x05\x77\x02\x14\x69\xf0\x2c"
19535                         "\xbe\x0c\xf1\x74\x30\xd1\xb9\x9b"
19536                         "\xfc\x8c\xbb\x04\x16\xd9\xba\xc3"
19537                         "\xbc\x91\x8a\xc4\x30\xa4\xb0\x12"
19538                         "\x4c\x21\x87\xcb\xc9\x1d\x16\x96"
19539                         "\x07\x6f\x23\x54\xb9\x6f\x79\xe5"
19540                         "\x64\xc0\x64\xda\xb1\xae\xdd\x60"
19541                         "\x6c\x1a\x9d\xd3\x04\x8e\x45\xb0"
19542                         "\x92\x61\xd0\x48\x81\xed\x5e\x1d"
19543                         "\xa0\xc9\xa4\x33\xc7\x13\x51\x5d"
19544                         "\x7f\x83\x73\xb6\x70\x18\x65\x3e"
19545                         "\x2f\x0e\x7a\x12\x39\x98\xab\xd8"
19546                         "\x7e\x6f\xa3\xd1\xba\x56\xad\xbd"
19547                         "\xf0\x03\x01\x1c\x85\x35\x9f\xeb"
19548                         "\x19\x63\xa1\xaf\xfe\x2d\x35\x50"
19549                         "\x39\xa0\x65\x7c\x95\x7e\x6b\xfe"
19550                         "\xc1\xac\x07\x7c\x98\x4f\xbe\x57"
19551                         "\xa7\x22\xec\xe2\x7e\x29\x09\x53"
19552                         "\xe8\xbf\xb4\x7e\x3f\x8f\xfc\x14"
19553                         "\xce\x54\xf9\x18\x58\xb5\xff\x44"
19554                         "\x05\x9d\xce\x1b\xb6\x82\x23\xc8"
19555                         "\x2e\xbc\x69\xbb\x4a\x29\x0f\x65"
19556                         "\x94\xf0\x63\x06\x0e\xef\x8c\xbd"
19557                         "\xff\xfd\xb0\x21\x6e\x57\x05\x75"
19558                         "\xda\xd5\xc4\xeb\x8d\x32\xf7\x50"
19559                         "\xd3\x6f\x22\xed\x5f\x8e\xa2\x5b"
19560                         "\x80\x8c\xc8\x78\x40\x24\x4b\x89"
19561                         "\x30\xce\x7a\x97\x0e\xc4\xaf\xef"
19562                         "\x9b\xb4\xcd\x66\x74\x14\x04\x2b"
19563                         "\xf7\xce\x0b\x1c\x6e\xc2\x78\x8c"
19564                         "\xca\xc5\xd0\x1c\x95\x4a\x91\x2d"
19565                         "\xa7\x20\xeb\x86\x52\xb7\x67\xd8"
19566                         "\x0c\xd6\x04\x14\xde\x51\x74\x75"
19567                         "\xe7\x11\xb4\x87\xa3\x3d\x2d\xad"
19568                         "\x4f\xef\xa0\x0f\x70\x00\x6d\x13"
19569                         "\x19\x1d\x41\x50\xe9\xd8\xf0\x32"
19570                         "\x71\xbc\xd3\x11\xf2\xac\xbe\xaf"
19571                         "\x75\x46\x65\x4e\x07\x34\x37\xa3"
19572                         "\x89\xfe\x75\xd4\x70\x4c\xc6\x3f"
19573                         "\x69\x24\x0e\x38\x67\x43\x8c\xde"
19574                         "\x06\xb5\xb8\xe7\xc4\xf0\x41\x8f"
19575                         "\xf0\xbd\x2f\x0b\xb9\x18\xf8\xde"
19576                         "\x64\xb1\xdb\xee\x00\x50\x77\xe1"
19577                         "\xc7\xff\xa6\xfa\xdd\x70\xf4\xe3"
19578                         "\x93\xe9\x77\x35\x3d\x4b\x2f\x2b"
19579                         "\x6d\x55\xf0\xfc\x88\x54\x4e\x89"
19580                         "\xc1\x8a\x23\x31\x2d\x14\x2a\xb8"
19581                         "\x1b\x15\xdd\x9e\x6e\x7b\xda\x05"
19582                         "\x91\x7d\x62\x64\x96\x72\xde\xfc"
19583                         "\xc1\xec\xf0\x23\x51\x6f\xdb\x5b"
19584                         "\x1d\x08\x57\xce\x09\xb8\xf6\xcd"
19585                         "\x8d\x95\xf2\x20\xbf\x0f\x20\x57"
19586                         "\x98\x81\x84\x4f\x15\x5c\x76\xe7"
19587                         "\x3e\x0a\x3a\x6c\xc4\x8a\xbe\x78"
19588                         "\x74\x77\xc3\x09\x4b\x5d\x48\xe4"
19589                         "\xc8\xcb\x0b\xea\x17\x28\xcf\xcf"
19590                         "\x31\x32\x44\xa4\xe5\x0e\x1a\x98"
19591                         "\x94\xc4\xf0\xff\xae\x3e\x44\xe8"
19592                         "\xa5\xb3\xb5\x37\x2f\xe8\xaf\x6f"
19593                         "\x28\xc1\x37\x5f\x31\xd2\xb9\x33"
19594                         "\xb1\xb2\x52\x94\x75\x2c\x29\x59"
19595                         "\x06\xc2\x25\xe8\x71\x65\x4e\xed"
19596                         "\xc0\x9c\xb1\xbb\x25\xdc\x6c\xe7"
19597                         "\x4b\xa5\x7a\x54\x7a\x60\xff\x7a"
19598                         "\xe0\x50\x40\x96\x35\x63\xe4\x0b"
19599                         "\x76\xbd\xa4\x65\x00\x1b\x57\x88"
19600                         "\xae\xed\x39\x88\x42\x11\x3c\xed"
19601                         "\x85\x67\x7d\xb9\x68\x82\xe9\x43"
19602                         "\x3c\x47\x53\xfa\xe8\xf8\x9f\x1f"
19603                         "\x9f\xef\x0f\xf7\x30\xd9\x30\x0e"
19604                         "\xb9\x9f\x69\x18\x2f\x7e\xf8\xf8"
19605                         "\xf8\x8c\x0f\xd4\x02\x4d\xea\xcd"
19606                         "\x0a\x9c\x6f\x71\x6d\x5a\x4c\x60"
19607                         "\xce\x20\x56\x32\xc6\xc5\x99\x1f"
19608                         "\x09\xe6\x4e\x18\x1a\x15\x13\xa8"
19609                         "\x7d\xb1\x6b\xc0\xb2\x6d\xf8\x26"
19610                         "\x66\xf8\x3d\x18\x74\x70\x66\x7a"
19611                         "\x34\x17\xde\xba\x47\xf1\x06\x18"
19612                         "\xcb\xaf\xeb\x4a\x1e\x8f\xa7\x77"
19613                         "\xe0\x3b\x78\x62\x66\xc9\x10\xea"
19614                         "\x1f\xb7\x29\x0a\x45\xa1\x1d\x1e"
19615                         "\x1d\xe2\x65\x61\x50\x9c\xd7\x05"
19616                         "\xf2\x0b\x5b\x12\x61\x02\xc8\xe5"
19617                         "\x63\x4f\x20\x0c\x07\x17\x33\x5e"
19618                         "\x03\x9a\x53\x0f\x2e\x55\xfe\x50"
19619                         "\x43\x7d\xd0\xb6\x7e\x5a\xda\xae"
19620                         "\x58\xef\x15\xa9\x83\xd9\x46\xb1"
19621                         "\x42\xaa\xf5\x02\x6c\xce\x92\x06"
19622                         "\x1b\xdb\x66\x45\x91\x79\xc2\x2d"
19623                         "\xe6\x53\xd3\x14\xfd\xbb\x44\x63"
19624                         "\xc6\xd7\x3d\x7a\x0c\x75\x78\x9d"
19625                         "\x5c\xa6\x39\xb3\xe5\x63\xca\x8b"
19626                         "\xfe\xd3\xef\x60\x83\xf6\x8e\x70"
19627                         "\xb6\x67\xc7\x77\xed\x23\xef\x4c"
19628                         "\xf0\xed\x2d\x07\x59\x6f\xc1\x01"
19629                         "\x34\x37\x08\xab\xd9\x1f\x09\xb1"
19630                         "\xce\x5b\x17\xff\x74\xf8\x9c\xd5"
19631                         "\x2c\x56\x39\x79\x0f\x69\x44\x75"
19632                         "\x58\x27\x01\xc4\xbf\xa7\xa1\x1d"
19633                         "\x90\x17\x77\x86\x5a\x3f\xd9\xd1"
19634                         "\x0e\xa0\x10\xf8\xec\x1e\xa5\x7f"
19635                         "\x5e\x36\xd1\xe3\x04\x2c\x70\xf7"
19636                         "\x8e\xc0\x98\x2f\x6c\x94\x2b\x41"
19637                         "\xb7\x60\x00\xb7\x2e\xb8\x02\x8d"
19638                         "\xb8\xb0\xd3\x86\xba\x1d\xd7\x90"
19639                         "\xd6\xb6\xe1\xfc\xd7\xd8\x28\x06"
19640                         "\x63\x9b\xce\x61\x24\x79\xc0\x70"
19641                         "\x52\xd0\xb6\xd4\x28\x95\x24\x87"
19642                         "\x03\x1f\xb7\x9a\xda\xa3\xfb\x52"
19643                         "\x5b\x68\xe7\x4c\x8c\x24\xe1\x42"
19644                         "\xf7\xd5\xfd\xad\x06\x32\x9f\xba"
19645                         "\xc1\xfc\xdd\xc6\xfc\xfc\xb3\x38"
19646                         "\x74\x56\x58\x40\x02\x37\x52\x2c"
19647                         "\x55\xcc\xb3\x9e\x7a\xe9\xd4\x38"
19648                         "\x41\x5e\x0c\x35\xe2\x11\xd1\x13"
19649                         "\xf8\xb7\x8d\x72\x6b\x22\x2a\xb0"
19650                         "\xdb\x08\xba\x35\xb9\x3f\xc8\xd3"
19651                         "\x24\x90\xec\x58\xd2\x09\xc7\x2d"
19652                         "\xed\x38\x80\x36\x72\x43\x27\x49"
19653                         "\x4a\x80\x8a\xa2\xe8\xd3\xda\x30"
19654                         "\x7d\xb6\x82\x37\x86\x92\x86\x3e"
19655                         "\x08\xb2\x28\x5a\x55\x44\x24\x7d"
19656                         "\x40\x48\x8a\xb6\x89\x58\x08\xa0"
19657                         "\xd6\x6d\x3a\x17\xbf\xf6\x54\xa2"
19658                         "\xf5\xd3\x8c\x0f\x78\x12\x57\x8b"
19659                         "\xd5\xc2\xfd\x58\x5b\x7f\x38\xe3"
19660                         "\xcc\xb7\x7c\x48\xb3\x20\xe8\x81"
19661                         "\x14\x32\x45\x05\xe0\xdb\x9f\x75"
19662                         "\x85\xb4\x6a\xfc\x95\xe3\x54\x22"
19663                         "\x12\xee\x30\xfe\xd8\x30\xef\x34"
19664                         "\x50\xab\x46\x30\x98\x2f\xb7\xc0"
19665                         "\x15\xa2\x83\xb6\xf2\x06\x21\xa2"
19666                         "\xc3\x26\x37\x14\xd1\x4d\xb5\x10"
19667                         "\x52\x76\x4d\x6a\xee\xb5\x2b\x15"
19668                         "\xb7\xf9\x51\xe8\x2a\xaf\xc7\xfa"
19669                         "\x77\xaf\xb0\x05\x4d\xd1\x68\x8e"
19670                         "\x74\x05\x9f\x9d\x93\xa5\x3e\x7f"
19671                         "\x4e\x5f\x9d\xcb\x09\xc7\x83\xe3"
19672                         "\x02\x9d\x27\x1f\xef\x85\x05\x8d"
19673                         "\xec\x55\x88\x0f\x0d\x7c\x4c\xe8"
19674                         "\xa1\x75\xa0\xd8\x06\x47\x14\xef"
19675                         "\xaa\x61\xcf\x26\x15\xad\xd8\xa3"
19676                         "\xaa\x75\xf2\x78\x4a\x5a\x61\xdf"
19677                         "\x8b\xc7\x04\xbc\xb2\x32\xd2\x7e"
19678                         "\x42\xee\xb4\x2f\x51\xff\x7b\x2e"
19679                         "\xd3\x02\xe8\xdc\x5d\x0d\x50\xdc"
19680                         "\xae\xb7\x46\xf9\xa8\xe6\xd0\x16"
19681                         "\xcc\xe6\x2c\x81\xc7\xad\xe9\xf0"
19682                         "\x05\x72\x6d\x3d\x0a\x7a\xa9\x02"
19683                         "\xac\x82\x93\x6e\xb6\x1c\x28\xfc"
19684                         "\x44\x12\xfb\x73\x77\xd4\x13\x39"
19685                         "\x29\x88\x8a\xf3\x5c\xa6\x36\xa0"
19686                         "\x2a\xed\x7e\xb1\x1d\xd6\x4c\x6b"
19687                         "\x41\x01\x18\x5d\x5d\x07\x97\xa6"
19688                         "\x4b\xef\x31\x18\xea\xac\xb1\x84"
19689                         "\x21\xed\xda\x86",
19690                 .rlen = 4100,
19691                 .np     = 2,
19692                 .tap    = { 4064, 36 },
19693         },
19694 };
19695
19696 static struct cipher_testvec aes_ctr_rfc3686_dec_tv_template[] = {
19697         { /* From RFC 3686 */
19698                 .key    = "\xae\x68\x52\xf8\x12\x10\x67\xcc"
19699                           "\x4b\xf7\xa5\x76\x55\x77\xf3\x9e"
19700                           "\x00\x00\x00\x30",
19701                 .klen   = 20,
19702                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
19703                 .input  = "\xe4\x09\x5d\x4f\xb7\xa7\xb3\x79"
19704                           "\x2d\x61\x75\xa3\x26\x13\x11\xb8",
19705                 .ilen   = 16,
19706                 .result = "Single block msg",
19707                 .rlen   = 16,
19708         }, {
19709                 .key    = "\x7e\x24\x06\x78\x17\xfa\xe0\xd7"
19710                           "\x43\xd6\xce\x1f\x32\x53\x91\x63"
19711                           "\x00\x6c\xb6\xdb",
19712                 .klen   = 20,
19713                 .iv     = "\xc0\x54\x3b\x59\xda\x48\xd9\x0b",
19714                 .input  = "\x51\x04\xa1\x06\x16\x8a\x72\xd9"
19715                           "\x79\x0d\x41\xee\x8e\xda\xd3\x88"
19716                           "\xeb\x2e\x1e\xfc\x46\xda\x57\xc8"
19717                           "\xfc\xe6\x30\xdf\x91\x41\xbe\x28",
19718                 .ilen   = 32,
19719                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19720                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19721                           "\x10\x11\x12\x13\x14\x15\x16\x17"
19722                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19723                 .rlen   = 32,
19724         }, {
19725                 .key    = "\x16\xaf\x5b\x14\x5f\xc9\xf5\x79"
19726                           "\xc1\x75\xf9\x3e\x3b\xfb\x0e\xed"
19727                           "\x86\x3d\x06\xcc\xfd\xb7\x85\x15"
19728                           "\x00\x00\x00\x48",
19729                 .klen   = 28,
19730                 .iv     = "\x36\x73\x3c\x14\x7d\x6d\x93\xcb",
19731                 .input  = "\x4b\x55\x38\x4f\xe2\x59\xc9\xc8"
19732                           "\x4e\x79\x35\xa0\x03\xcb\xe9\x28",
19733                 .ilen   = 16,
19734                 .result = "Single block msg",
19735                 .rlen   = 16,
19736         }, {
19737                 .key    = "\x7c\x5c\xb2\x40\x1b\x3d\xc3\x3c"
19738                           "\x19\xe7\x34\x08\x19\xe0\xf6\x9c"
19739                           "\x67\x8c\x3d\xb8\xe6\xf6\xa9\x1a"
19740                           "\x00\x96\xb0\x3b",
19741                 .klen   = 28,
19742                 .iv     = "\x02\x0c\x6e\xad\xc2\xcb\x50\x0d",
19743                 .input  = "\x45\x32\x43\xfc\x60\x9b\x23\x32"
19744                           "\x7e\xdf\xaa\xfa\x71\x31\xcd\x9f"
19745                           "\x84\x90\x70\x1c\x5a\xd4\xa7\x9c"
19746                           "\xfc\x1f\xe0\xff\x42\xf4\xfb\x00",
19747                 .ilen   = 32,
19748                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19749                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19750                           "\x10\x11\x12\x13\x14\x15\x16\x17"
19751                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19752                 .rlen   = 32,
19753         }, {
19754                 .key    = "\x77\x6b\xef\xf2\x85\x1d\xb0\x6f"
19755                           "\x4c\x8a\x05\x42\xc8\x69\x6f\x6c"
19756                           "\x6a\x81\xaf\x1e\xec\x96\xb4\xd3"
19757                           "\x7f\xc1\xd6\x89\xe6\xc1\xc1\x04"
19758                           "\x00\x00\x00\x60",
19759                 .klen   = 36,
19760                 .iv     = "\xdb\x56\x72\xc9\x7a\xa8\xf0\xb2",
19761                 .input  = "\x14\x5a\xd0\x1d\xbf\x82\x4e\xc7"
19762                           "\x56\x08\x63\xdc\x71\xe3\xe0\xc0",
19763                 .ilen   = 16,
19764                 .result = "Single block msg",
19765                 .rlen   = 16,
19766         }, {
19767                 .key    = "\xf6\xd6\x6d\x6b\xd5\x2d\x59\xbb"
19768                           "\x07\x96\x36\x58\x79\xef\xf8\x86"
19769                           "\xc6\x6d\xd5\x1a\x5b\x6a\x99\x74"
19770                           "\x4b\x50\x59\x0c\x87\xa2\x38\x84"
19771                           "\x00\xfa\xac\x24",
19772                 .klen   = 36,
19773                 .iv     = "\xc1\x58\x5e\xf1\x5a\x43\xd8\x75",
19774                 .input  = "\xf0\x5e\x23\x1b\x38\x94\x61\x2c"
19775                           "\x49\xee\x00\x0b\x80\x4e\xb2\xa9"
19776                           "\xb8\x30\x6b\x50\x8f\x83\x9d\x6a"
19777                           "\x55\x30\x83\x1d\x93\x44\xaf\x1c",
19778                 .ilen   = 32,
19779                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
19780                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
19781                           "\x10\x11\x12\x13\x14\x15\x16\x17"
19782                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
19783                 .rlen   = 32,
19784         },
19785 };
19786
19787 static struct cipher_testvec aes_ofb_enc_tv_template[] = {
19788          /* From NIST Special Publication 800-38A, Appendix F.5 */
19789         {
19790                 .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19791                           "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19792                 .klen   = 16,
19793                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19794                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19795                 .input = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19796                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19797                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19798                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19799                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19800                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19801                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19802                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19803                 .ilen   = 64,
19804                 .result = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19805                           "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19806                           "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19807                           "\x3c\x52\xda\xc5\x4e\xd8\x25"
19808                           "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19809                           "\x44\xf7\xa8\x22\x60\xed\xcc"
19810                           "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19811                           "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19812                 .rlen   = 64,
19813         }
19814 };
19815
19816 static struct cipher_testvec aes_ofb_dec_tv_template[] = {
19817          /* From NIST Special Publication 800-38A, Appendix F.5 */
19818         {
19819                 .key    = "\x2b\x7e\x15\x16\x28\xae\xd2\xa6"
19820                           "\xab\xf7\x15\x88\x09\xcf\x4f\x3c",
19821                 .klen   = 16,
19822                 .iv     = "\x00\x01\x02\x03\x04\x05\x06\x07\x08"
19823                           "\x09\x0a\x0b\x0c\x0d\x0e\x0f",
19824                 .input = "\x3b\x3f\xd9\x2e\xb7\x2d\xad\x20"
19825                           "\x33\x34\x49\xf8\xe8\x3c\xfb\x4a"
19826                           "\x77\x89\x50\x8d\x16\x91\x8f\x03\xf5"
19827                           "\x3c\x52\xda\xc5\x4e\xd8\x25"
19828                           "\x97\x40\x05\x1e\x9c\x5f\xec\xf6\x43"
19829                           "\x44\xf7\xa8\x22\x60\xed\xcc"
19830                           "\x30\x4c\x65\x28\xf6\x59\xc7\x78"
19831                           "\x66\xa5\x10\xd9\xc1\xd6\xae\x5e",
19832                 .ilen   = 64,
19833                 .result = "\x6b\xc1\xbe\xe2\x2e\x40\x9f\x96"
19834                           "\xe9\x3d\x7e\x11\x73\x93\x17\x2a"
19835                           "\xae\x2d\x8a\x57\x1e\x03\xac\x9c"
19836                           "\x9e\xb7\x6f\xac\x45\xaf\x8e\x51"
19837                           "\x30\xc8\x1c\x46\xa3\x5c\xe4\x11"
19838                           "\xe5\xfb\xc1\x19\x1a\x0a\x52\xef"
19839                           "\xf6\x9f\x24\x45\xdf\x4f\x9b\x17"
19840                           "\xad\x2b\x41\x7b\xe6\x6c\x37\x10",
19841                 .rlen   = 64,
19842         }
19843 };
19844
19845 static struct aead_testvec aes_gcm_enc_tv_template[] = {
19846         { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
19847                 .key    = zeroed_string,
19848                 .klen   = 16,
19849                 .result = "\x58\xe2\xfc\xce\xfa\x7e\x30\x61"
19850                           "\x36\x7f\x1d\x57\xa4\xe7\x45\x5a",
19851                 .rlen   = 16,
19852         }, {
19853                 .key    = zeroed_string,
19854                 .klen   = 16,
19855                 .input  = zeroed_string,
19856                 .ilen   = 16,
19857                 .result = "\x03\x88\xda\xce\x60\xb6\xa3\x92"
19858                           "\xf3\x28\xc2\xb9\x71\xb2\xfe\x78"
19859                           "\xab\x6e\x47\xd4\x2c\xec\x13\xbd"
19860                           "\xf5\x3a\x67\xb2\x12\x57\xbd\xdf",
19861                 .rlen   = 32,
19862         }, {
19863                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19864                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19865                 .klen   = 16,
19866                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19867                           "\xde\xca\xf8\x88",
19868                 .input  = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19869                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19870                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19871                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19872                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19873                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19874                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19875                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19876                 .ilen   = 64,
19877                 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19878                           "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19879                           "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19880                           "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19881                           "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19882                           "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19883                           "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19884                           "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
19885                           "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
19886                           "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
19887                 .rlen   = 80,
19888         }, {
19889                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19890                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
19891                 .klen   = 16,
19892                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19893                           "\xde\xca\xf8\x88",
19894                 .input  = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19895                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19896                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19897                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19898                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19899                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19900                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19901                           "\xba\x63\x7b\x39",
19902                 .ilen   = 60,
19903                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19904                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19905                           "\xab\xad\xda\xd2",
19906                 .alen   = 20,
19907                 .result = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
19908                           "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
19909                           "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
19910                           "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
19911                           "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
19912                           "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
19913                           "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
19914                           "\x3d\x58\xe0\x91"
19915                           "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
19916                           "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
19917                 .rlen   = 76,
19918         }, {
19919                 .key    = zeroed_string,
19920                 .klen   = 24,
19921                 .result = "\xcd\x33\xb2\x8a\xc7\x73\xf7\x4b"
19922                           "\xa0\x0e\xd1\xf3\x12\x57\x24\x35",
19923                 .rlen   = 16,
19924         }, {
19925                 .key    = zeroed_string,
19926                 .klen   = 24,
19927                 .input  = zeroed_string,
19928                 .ilen   = 16,
19929                 .result = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
19930                           "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
19931                           "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
19932                           "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
19933                 .rlen   = 32,
19934         }, {
19935                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19936                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19937                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19938                 .klen   = 24,
19939                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19940                           "\xde\xca\xf8\x88",
19941                 .input  = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19942                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19943                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19944                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19945                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19946                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19947                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19948                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
19949                 .ilen   = 64,
19950                 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19951                           "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19952                           "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19953                           "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19954                           "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19955                           "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19956                           "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19957                           "\xcc\xda\x27\x10\xac\xad\xe2\x56"
19958                           "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
19959                           "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
19960                 .rlen   = 80,
19961         }, {
19962                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
19963                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
19964                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
19965                 .klen   = 24,
19966                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
19967                           "\xde\xca\xf8\x88",
19968                 .input  = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
19969                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
19970                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
19971                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
19972                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
19973                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
19974                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
19975                           "\xba\x63\x7b\x39",
19976                 .ilen   = 60,
19977                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19978                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
19979                           "\xab\xad\xda\xd2",
19980                 .alen   = 20,
19981                 .result = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
19982                           "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
19983                           "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
19984                           "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
19985                           "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
19986                           "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
19987                           "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
19988                           "\xcc\xda\x27\x10"
19989                           "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
19990                           "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
19991                 .rlen   = 76,
19992                 .np     = 2,
19993                 .tap    = { 32, 28 },
19994                 .anp    = 2,
19995                 .atap   = { 8, 12 }
19996         }, {
19997                 .key    = zeroed_string,
19998                 .klen   = 32,
19999                 .result = "\x53\x0f\x8a\xfb\xc7\x45\x36\xb9"
20000                           "\xa9\x63\xb4\xf1\xc4\xcb\x73\x8b",
20001                 .rlen   = 16,
20002         }
20003 };
20004
20005 static struct aead_testvec aes_gcm_dec_tv_template[] = {
20006         { /* From McGrew & Viega - http://citeseer.ist.psu.edu/656989.html */
20007                 .key    = zeroed_string,
20008                 .klen   = 32,
20009                 .input  = "\xce\xa7\x40\x3d\x4d\x60\x6b\x6e"
20010                           "\x07\x4e\xc5\xd3\xba\xf3\x9d\x18"
20011                           "\xd0\xd1\xc8\xa7\x99\x99\x6b\xf0"
20012                           "\x26\x5b\x98\xb5\xd4\x8a\xb9\x19",
20013                 .ilen   = 32,
20014                 .result  = zeroed_string,
20015                 .rlen   = 16,
20016         }, {
20017                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20018                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20019                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20020                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20021                 .klen   = 32,
20022                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20023                           "\xde\xca\xf8\x88",
20024                 .input  = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
20025                           "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
20026                           "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
20027                           "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
20028                           "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
20029                           "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
20030                           "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
20031                           "\xbc\xc9\xf6\x62\x89\x80\x15\xad"
20032                           "\xb0\x94\xda\xc5\xd9\x34\x71\xbd"
20033                           "\xec\x1a\x50\x22\x70\xe3\xcc\x6c",
20034                 .ilen   = 80,
20035                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20036                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20037                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20038                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20039                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20040                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20041                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20042                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20043                 .rlen   = 64,
20044         }, {
20045                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20046                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20047                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20048                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20049                 .klen   = 32,
20050                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20051                           "\xde\xca\xf8\x88",
20052                 .input  = "\x52\x2d\xc1\xf0\x99\x56\x7d\x07"
20053                           "\xf4\x7f\x37\xa3\x2a\x84\x42\x7d"
20054                           "\x64\x3a\x8c\xdc\xbf\xe5\xc0\xc9"
20055                           "\x75\x98\xa2\xbd\x25\x55\xd1\xaa"
20056                           "\x8c\xb0\x8e\x48\x59\x0d\xbb\x3d"
20057                           "\xa7\xb0\x8b\x10\x56\x82\x88\x38"
20058                           "\xc5\xf6\x1e\x63\x93\xba\x7a\x0a"
20059                           "\xbc\xc9\xf6\x62"
20060                           "\x76\xfc\x6e\xce\x0f\x4e\x17\x68"
20061                           "\xcd\xdf\x88\x53\xbb\x2d\x55\x1b",
20062                 .ilen   = 76,
20063                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20064                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20065                           "\xab\xad\xda\xd2",
20066                 .alen   = 20,
20067                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20068                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20069                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20070                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20071                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20072                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20073                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20074                           "\xba\x63\x7b\x39",
20075                 .rlen   = 60,
20076                 .np     = 2,
20077                 .tap    = { 48, 28 },
20078                 .anp    = 3,
20079                 .atap   = { 8, 8, 4 }
20080         }, {
20081                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20082                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20083                 .klen   = 16,
20084                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20085                           "\xde\xca\xf8\x88",
20086                 .input  = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20087                           "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20088                           "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20089                           "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20090                           "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20091                           "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20092                           "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20093                           "\x3d\x58\xe0\x91\x47\x3f\x59\x85"
20094                           "\x4d\x5c\x2a\xf3\x27\xcd\x64\xa6"
20095                           "\x2c\xf3\x5a\xbd\x2b\xa6\xfa\xb4",
20096                 .ilen   = 80,
20097                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20098                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20099                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20100                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20101                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20102                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20103                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20104                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20105                 .rlen   = 64,
20106         }, {
20107                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20108                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08",
20109                 .klen   = 16,
20110                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20111                           "\xde\xca\xf8\x88",
20112                 .input  = "\x42\x83\x1e\xc2\x21\x77\x74\x24"
20113                           "\x4b\x72\x21\xb7\x84\xd0\xd4\x9c"
20114                           "\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0"
20115                           "\x35\xc1\x7e\x23\x29\xac\xa1\x2e"
20116                           "\x21\xd5\x14\xb2\x54\x66\x93\x1c"
20117                           "\x7d\x8f\x6a\x5a\xac\x84\xaa\x05"
20118                           "\x1b\xa3\x0b\x39\x6a\x0a\xac\x97"
20119                           "\x3d\x58\xe0\x91"
20120                           "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb"
20121                           "\x94\xfa\xe9\x5a\xe7\x12\x1a\x47",
20122                 .ilen   = 76,
20123                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20124                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20125                           "\xab\xad\xda\xd2",
20126                 .alen   = 20,
20127                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20128                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20129                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20130                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20131                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20132                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20133                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20134                           "\xba\x63\x7b\x39",
20135                 .rlen   = 60,
20136         }, {
20137                 .key    = zeroed_string,
20138                 .klen   = 24,
20139                 .input  = "\x98\xe7\x24\x7c\x07\xf0\xfe\x41"
20140                           "\x1c\x26\x7e\x43\x84\xb0\xf6\x00"
20141                           "\x2f\xf5\x8d\x80\x03\x39\x27\xab"
20142                           "\x8e\xf4\xd4\x58\x75\x14\xf0\xfb",
20143                 .ilen   = 32,
20144                 .result  = zeroed_string,
20145                 .rlen   = 16,
20146         }, {
20147                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20148                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20149                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20150                 .klen   = 24,
20151                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20152                           "\xde\xca\xf8\x88",
20153                 .input  = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20154                           "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20155                           "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20156                           "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20157                           "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20158                           "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20159                           "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20160                           "\xcc\xda\x27\x10\xac\xad\xe2\x56"
20161                           "\x99\x24\xa7\xc8\x58\x73\x36\xbf"
20162                           "\xb1\x18\x02\x4d\xb8\x67\x4a\x14",
20163                 .ilen   = 80,
20164                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20165                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20166                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20167                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20168                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20169                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20170                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20171                           "\xba\x63\x7b\x39\x1a\xaf\xd2\x55",
20172                 .rlen   = 64,
20173         }, {
20174                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20175                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20176                           "\xfe\xff\xe9\x92\x86\x65\x73\x1c",
20177                 .klen   = 24,
20178                 .iv     = "\xca\xfe\xba\xbe\xfa\xce\xdb\xad"
20179                           "\xde\xca\xf8\x88",
20180                 .input  = "\x39\x80\xca\x0b\x3c\x00\xe8\x41"
20181                           "\xeb\x06\xfa\xc4\x87\x2a\x27\x57"
20182                           "\x85\x9e\x1c\xea\xa6\xef\xd9\x84"
20183                           "\x62\x85\x93\xb4\x0c\xa1\xe1\x9c"
20184                           "\x7d\x77\x3d\x00\xc1\x44\xc5\x25"
20185                           "\xac\x61\x9d\x18\xc8\x4a\x3f\x47"
20186                           "\x18\xe2\x44\x8b\x2f\xe3\x24\xd9"
20187                           "\xcc\xda\x27\x10"
20188                           "\x25\x19\x49\x8e\x80\xf1\x47\x8f"
20189                           "\x37\xba\x55\xbd\x6d\x27\x61\x8c",
20190                 .ilen   = 76,
20191                 .assoc  = "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20192                           "\xfe\xed\xfa\xce\xde\xad\xbe\xef"
20193                           "\xab\xad\xda\xd2",
20194                 .alen   = 20,
20195                 .result = "\xd9\x31\x32\x25\xf8\x84\x06\xe5"
20196                           "\xa5\x59\x09\xc5\xaf\xf5\x26\x9a"
20197                           "\x86\xa7\xa9\x53\x15\x34\xf7\xda"
20198                           "\x2e\x4c\x30\x3d\x8a\x31\x8a\x72"
20199                           "\x1c\x3c\x0c\x95\x95\x68\x09\x53"
20200                           "\x2f\xcf\x0e\x24\x49\xa6\xb5\x25"
20201                           "\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57"
20202                           "\xba\x63\x7b\x39",
20203                 .rlen   = 60,
20204         }
20205 };
20206
20207 static struct aead_testvec aes_gcm_rfc4106_enc_tv_template[] = {
20208         { /* Generated using Crypto++ */
20209                 .key    = zeroed_string,
20210                 .klen   = 20,
20211                 .iv     = zeroed_string,
20212                 .input  = zeroed_string,
20213                 .ilen   = 16,
20214                 .assoc  = zeroed_string,
20215                 .alen   = 16,
20216                 .result = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
20217                           "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20218                           "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20219                           "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
20220                 .rlen   = 32,
20221         },{
20222                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20223                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20224                           "\x00\x00\x00\x00",
20225                 .klen   = 20,
20226                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01",
20227                 .input  = zeroed_string,
20228                 .ilen   = 16,
20229                 .assoc  = "\x00\x00\x00\x00\x00\x00\x00\x00"
20230                           "\x00\x00\x00\x00\x00\x00\x00\x01",
20231                 .alen   = 16,
20232                 .result = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
20233                           "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20234                           "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20235                           "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
20236                 .rlen   = 32,
20237
20238         }, {
20239                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20240                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20241                           "\x00\x00\x00\x00",
20242                 .klen   = 20,
20243                 .iv     = zeroed_string,
20244                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
20245                           "\x01\x01\x01\x01\x01\x01\x01\x01",
20246                 .ilen   = 16,
20247                 .assoc  = zeroed_string,
20248                 .alen   = 16,
20249                 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20250                           "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20251                           "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20252                           "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
20253                 .rlen   = 32,
20254         }, {
20255                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20256                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20257                           "\x00\x00\x00\x00",
20258                 .klen   = 20,
20259                 .iv     = zeroed_string,
20260                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
20261                           "\x01\x01\x01\x01\x01\x01\x01\x01",
20262                 .ilen   = 16,
20263                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01"
20264                           "\x00\x00\x00\x00\x00\x00\x00\x00",
20265                 .alen   = 16,
20266                 .result = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20267                           "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20268                           "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20269                           "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
20270                 .rlen   = 32,
20271         }, {
20272                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20273                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20274                           "\x00\x00\x00\x00",
20275                 .klen   = 20,
20276                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01",
20277                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
20278                           "\x01\x01\x01\x01\x01\x01\x01\x01",
20279                 .ilen   = 16,
20280                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01"
20281                           "\x00\x00\x00\x00\x00\x00\x00\x01",
20282                 .alen   = 16,
20283                 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20284                           "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20285                           "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20286                           "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
20287                 .rlen   = 32,
20288         }, {
20289                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20290                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20291                           "\x00\x00\x00\x00",
20292                 .klen   = 20,
20293                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01",
20294                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
20295                           "\x01\x01\x01\x01\x01\x01\x01\x01"
20296                           "\x01\x01\x01\x01\x01\x01\x01\x01"
20297                           "\x01\x01\x01\x01\x01\x01\x01\x01"
20298                           "\x01\x01\x01\x01\x01\x01\x01\x01"
20299                           "\x01\x01\x01\x01\x01\x01\x01\x01"
20300                           "\x01\x01\x01\x01\x01\x01\x01\x01"
20301                           "\x01\x01\x01\x01\x01\x01\x01\x01",
20302                 .ilen   = 64,
20303                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01"
20304                           "\x00\x00\x00\x00\x00\x00\x00\x01",
20305                 .alen   = 16,
20306                 .result = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20307                           "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20308                           "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20309                           "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20310                           "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20311                           "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20312                           "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20313                           "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20314                           "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20315                           "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
20316                 .rlen   = 80,
20317         }, {
20318                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
20319                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20320                           "\x00\x00\x00\x00",
20321                 .klen   = 20,
20322                 .iv     = "\x00\x00\x45\x67\x89\xab\xcd\xef",
20323                 .input  = "\xff\xff\xff\xff\xff\xff\xff\xff"
20324                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20325                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20326                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20327                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20328                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20329                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20330                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20331                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20332                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20333                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20334                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20335                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20336                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20337                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20338                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20339                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20340                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20341                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20342                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20343                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20344                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20345                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20346                           "\xff\xff\xff\xff\xff\xff\xff\xff",
20347                 .ilen   = 192,
20348                 .assoc  = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20349                           "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
20350                           "\x89\xab\xcd\xef",
20351                 .alen   = 20,
20352                 .result = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20353                           "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20354                           "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20355                           "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20356                           "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20357                           "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20358                           "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20359                           "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20360                           "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20361                           "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20362                           "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20363                           "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20364                           "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20365                           "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20366                           "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20367                           "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20368                           "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20369                           "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20370                           "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20371                           "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20372                           "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20373                           "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20374                           "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20375                           "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20376                           "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20377                           "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20378                 .rlen   = 208,
20379         }, { /* From draft-mcgrew-gcm-test-01 */
20380                 .key    = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20381                           "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20382                           "\x2E\x44\x3B\x68",
20383                 .klen   = 20,
20384                 .iv     = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
20385                 .input  = "\x45\x00\x00\x48\x69\x9A\x00\x00"
20386                           "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
20387                           "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
20388                           "\x38\xD3\x01\x00\x00\x01\x00\x00"
20389                           "\x00\x00\x00\x00\x04\x5F\x73\x69"
20390                           "\x70\x04\x5F\x75\x64\x70\x03\x73"
20391                           "\x69\x70\x09\x63\x79\x62\x65\x72"
20392                           "\x63\x69\x74\x79\x02\x64\x6B\x00"
20393                           "\x00\x21\x00\x01\x01\x02\x02\x01",
20394                 .ilen   = 72,
20395                 .assoc  = "\x00\x00\x43\x21\x87\x65\x43\x21"
20396                           "\x00\x00\x00\x00\x49\x56\xED\x7E"
20397                           "\x3B\x24\x4C\xFE",
20398                 .alen   = 20,
20399                 .result = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
20400                           "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
20401                           "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
20402                           "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
20403                           "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
20404                           "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
20405                           "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
20406                           "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
20407                           "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
20408                           "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
20409                           "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
20410                 .rlen   = 88,
20411         }, {
20412                 .key    = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20413                           "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20414                           "\xCA\xFE\xBA\xBE",
20415                 .klen   = 20,
20416                 .iv     = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20417                 .input  = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
20418                           "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
20419                           "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
20420                           "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
20421                           "\x00\x01\x00\x00\x00\x00\x00\x00"
20422                           "\x03\x73\x69\x70\x09\x63\x79\x62"
20423                           "\x65\x72\x63\x69\x74\x79\x02\x64"
20424                           "\x6B\x00\x00\x01\x00\x01\x00\x01",
20425                 .ilen   = 64,
20426                 .assoc  = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
20427                           "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20428                 .alen   = 16,
20429                 .result = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
20430                           "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
20431                           "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
20432                           "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
20433                           "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
20434                           "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
20435                           "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
20436                           "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
20437                           "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
20438                           "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
20439                 .rlen   = 80,
20440         }, {
20441                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20442                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20443                           "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20444                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20445                           "\x11\x22\x33\x44",
20446                 .klen   = 36,
20447                 .iv     = "\x01\x02\x03\x04\x05\x06\x07\x08",
20448                 .input  = "\x45\x00\x00\x30\x69\xA6\x40\x00"
20449                           "\x80\x06\x26\x90\xC0\xA8\x01\x02"
20450                           "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
20451                           "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
20452                           "\x70\x02\x40\x00\x20\xBF\x00\x00"
20453                           "\x02\x04\x05\xB4\x01\x01\x04\x02"
20454                           "\x01\x02\x02\x01",
20455                 .ilen   = 52,
20456                 .assoc  = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
20457                           "\x01\x02\x03\x04\x05\x06\x07\x08",
20458                 .alen   = 16,
20459                 .result = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
20460                           "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
20461                           "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
20462                           "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
20463                           "\x74\x8A\x63\x79\x85\x77\x1D\x34"
20464                           "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
20465                           "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
20466                           "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
20467                           "\x15\x95\x6C\x96",
20468                 .rlen   = 68,
20469         }, {
20470                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
20471                           "\x00\x00\x00\x00\x00\x00\x00\x00"
20472                           "\x00\x00\x00\x00",
20473                 .klen   = 20,
20474                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
20475                 .input  = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
20476                           "\x80\x01\xCB\x7A\x40\x67\x93\x18"
20477                           "\x01\x01\x01\x01\x08\x00\x07\x5C"
20478                           "\x02\x00\x44\x00\x61\x62\x63\x64"
20479                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20480                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20481                           "\x75\x76\x77\x61\x62\x63\x64\x65"
20482                           "\x66\x67\x68\x69\x01\x02\x02\x01",
20483                 .ilen   = 64,
20484                 .assoc  = "\x00\x00\x00\x00\x00\x00\x00\x01"
20485                           "\x00\x00\x00\x00\x00\x00\x00\x00",
20486                 .alen   = 16,
20487                 .result = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
20488                           "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
20489                           "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
20490                           "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
20491                           "\x45\x64\x76\x49\x27\x19\xFF\xB6"
20492                           "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
20493                           "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
20494                           "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
20495                           "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
20496                           "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
20497                 .rlen   = 80,
20498         }, {
20499                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20500                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20501                           "\x57\x69\x0E\x43",
20502                 .klen   = 20,
20503                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20504                 .input  = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
20505                           "\x80\x01\xCB\x7C\x40\x67\x93\x18"
20506                           "\x01\x01\x01\x01\x08\x00\x08\x5C"
20507                           "\x02\x00\x43\x00\x61\x62\x63\x64"
20508                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20509                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20510                           "\x75\x76\x77\x61\x62\x63\x64\x65"
20511                           "\x66\x67\x68\x69\x01\x02\x02\x01",
20512                 .ilen   = 64,
20513                 .assoc  = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
20514                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
20515                           "\xA2\xFC\xA1\xA3",
20516                 .alen   = 20,
20517                 .result = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
20518                           "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
20519                           "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
20520                           "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
20521                           "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20522                           "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20523                           "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
20524                           "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
20525                           "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
20526                           "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
20527                 .rlen   = 80,
20528         }, {
20529                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20530                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20531                           "\x57\x69\x0E\x43",
20532                 .klen   = 20,
20533                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20534                 .input  = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
20535                           "\x80\x01\x44\x1F\x40\x67\x93\xB6"
20536                           "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
20537                           "\x01\x02\x02\x01",
20538                 .ilen   = 28,
20539                 .assoc  = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
20540                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
20541                           "\xA2\xFC\xA1\xA3",
20542                 .alen   = 20,
20543                 .result = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
20544                           "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
20545                           "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
20546                           "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
20547                           "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
20548                           "\xE7\xD0\x5D\x35",
20549                 .rlen   = 44,
20550         }, {
20551                 .key    = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20552                           "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
20553                           "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
20554                           "\xCA\xFE\xBA\xBE",
20555                 .klen   = 28,
20556                 .iv     = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20557                 .input  = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
20558                           "\x40\x06\x78\x80\x0A\x01\x03\x8F"
20559                           "\x0A\x01\x06\x12\x80\x23\x06\xB8"
20560                           "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
20561                           "\x50\x10\x16\xD0\x75\x68\x00\x01",
20562                 .ilen   = 40,
20563                 .assoc  = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
20564                           "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
20565                 .alen   = 16,
20566                 .result = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
20567                           "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
20568                           "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
20569                           "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
20570                           "\x31\x5B\x27\x45\x21\x44\xCC\x77"
20571                           "\x95\x45\x7B\x96\x52\x03\x7F\x53"
20572                           "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
20573                 .rlen   = 56,
20574         }, {
20575                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20576                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20577                           "\xDE\xCA\xF8\x88",
20578                 .klen   = 20,
20579                 .iv     = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20580                 .input  = "\x45\x00\x00\x49\x33\xBA\x00\x00"
20581                           "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
20582                           "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20583                           "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
20584                           "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
20585                           "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
20586                           "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
20587                           "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
20588                           "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
20589                           "\x23\x01\x01\x01",
20590                 .ilen   = 76,
20591                 .assoc  = "\x00\x00\x01\x00\x00\x00\x00\x00"
20592                           "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
20593                           "\xCE\xFA\xCE\x74",
20594                 .alen   = 20,
20595                 .result = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
20596                           "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
20597                           "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
20598                           "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
20599                           "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
20600                           "\x84\xE6\x58\x63\x96\x5D\x74\x72"
20601                           "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
20602                           "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
20603                           "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
20604                           "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
20605                           "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
20606                           "\x69\x62\x34\x36",
20607                 .rlen   = 92,
20608         }, {
20609                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20610                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20611                           "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20612                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20613                           "\x73\x61\x6C\x74",
20614                 .klen   = 36,
20615                 .iv     = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20616                 .input  = "\x45\x08\x00\x28\x73\x2C\x00\x00"
20617                           "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
20618                           "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
20619                           "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
20620                           "\x50\x10\x1F\x64\x6D\x54\x00\x01",
20621                 .ilen   = 40,
20622                 .assoc  = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
20623                           "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
20624                           "\x69\x76\x65\x63",
20625                 .alen   = 20,
20626                 .result = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
20627                           "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
20628                           "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
20629                           "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
20630                           "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
20631                           "\x45\x16\x26\xC2\x41\x57\x71\xE3"
20632                           "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
20633                 .rlen   = 56,
20634         }, {
20635                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20636                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20637                           "\x57\x69\x0E\x43",
20638                 .klen   = 20,
20639                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20640                 .input  = "\x45\x00\x00\x49\x33\x3E\x00\x00"
20641                           "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
20642                           "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
20643                           "\x00\x35\xCB\x45\x80\x03\x02\x5B"
20644                           "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
20645                           "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
20646                           "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
20647                           "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
20648                           "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
20649                           "\x15\x01\x01\x01",
20650                 .ilen   = 76,
20651                 .assoc  = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
20652                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
20653                           "\xA2\xFC\xA1\xA3",
20654                 .alen   = 20,
20655                 .result = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
20656                           "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
20657                           "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
20658                           "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
20659                           "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
20660                           "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
20661                           "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
20662                           "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
20663                           "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
20664                           "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
20665                           "\x76\x91\x89\x60\x97\x63\xB8\xE1"
20666                           "\x8C\xAA\x81\xE2",
20667                 .rlen   = 92,
20668         }, {
20669                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20670                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20671                           "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20672                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20673                           "\x73\x61\x6C\x74",
20674                 .klen   = 36,
20675                 .iv     = "\x61\x6E\x64\x01\x69\x76\x65\x63",
20676                 .input  = "\x63\x69\x73\x63\x6F\x01\x72\x75"
20677                           "\x6C\x65\x73\x01\x74\x68\x65\x01"
20678                           "\x6E\x65\x74\x77\x65\x01\x64\x65"
20679                           "\x66\x69\x6E\x65\x01\x74\x68\x65"
20680                           "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
20681                           "\x67\x69\x65\x73\x01\x74\x68\x61"
20682                           "\x74\x77\x69\x6C\x6C\x01\x64\x65"
20683                           "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
20684                           "\x72\x72\x6F\x77\x01\x02\x02\x01",
20685                 .ilen   = 72,
20686                 .assoc  = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
20687                           "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
20688                           "\x69\x76\x65\x63",
20689                 .alen   = 20,
20690                 .result = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
20691                           "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
20692                           "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
20693                           "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
20694                           "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
20695                           "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
20696                           "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
20697                           "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
20698                           "\x12\xA4\x93\x63\x41\x23\x64\xF8"
20699                           "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
20700                           "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
20701                 .rlen   = 88,
20702         }, {
20703                 .key    = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
20704                           "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
20705                           "\xD9\x66\x42\x67",
20706                 .klen   = 20,
20707                 .iv     = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
20708                 .input  = "\x01\x02\x02\x01",
20709                 .ilen   = 4,
20710                 .assoc  = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
20711                           "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
20712                 .alen   = 16,
20713                 .result = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
20714                           "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
20715                           "\x04\xBE\xF2\x70",
20716                 .rlen   = 20,
20717         }, {
20718                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
20719                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
20720                           "\xDE\xCA\xF8\x88",
20721                 .klen   = 20,
20722                 .iv     = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
20723                 .input  = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
20724                           "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
20725                           "\x62\x65\x00\x01",
20726                 .ilen   = 20,
20727                 .assoc  = "\x00\x00\x01\x00\x00\x00\x00\x00"
20728                           "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
20729                           "\xCE\xFA\xCE\x74",
20730                 .alen   = 20,
20731                 .result = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
20732                           "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
20733                           "\x43\x33\x21\x64\x41\x25\x03\x52"
20734                           "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
20735                           "\x43\xAF\x8C\x3E",
20736                 .rlen   = 36,
20737         }, {
20738                 .key    = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
20739                           "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
20740                           "\x61\x61\x6E\x64\x64\x6F\x69\x74"
20741                           "\x62\x65\x66\x6F\x72\x65\x69\x61"
20742                           "\x74\x75\x72\x6E",
20743                 .klen   = 36,
20744                 .iv     = "\x33\x30\x21\x69\x67\x65\x74\x6D",
20745                 .input  = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
20746                           "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
20747                           "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
20748                           "\x02\x00\x07\x00\x61\x62\x63\x64"
20749                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20750                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20751                           "\x01\x02\x02\x01",
20752                 .ilen   = 52,
20753                 .assoc  = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
20754                           "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
20755                           "\x67\x65\x74\x6D",
20756                 .alen   = 20,
20757                 .result = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
20758                           "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
20759                           "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
20760                           "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
20761                           "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
20762                           "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
20763                           "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
20764                           "\x94\x5F\x66\x93\x68\x66\x1A\x32"
20765                           "\x9F\xB4\xC0\x53",
20766                 .rlen   = 68,
20767         }, {
20768                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
20769                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
20770                           "\x57\x69\x0E\x43",
20771                 .klen   = 20,
20772                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
20773                 .input  = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
20774                           "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
20775                           "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
20776                           "\x02\x00\x07\x00\x61\x62\x63\x64"
20777                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
20778                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
20779                           "\x01\x02\x02\x01",
20780                 .ilen   = 52,
20781                 .assoc  = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
20782                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
20783                           "\xA2\xFC\xA1\xA3",
20784                 .alen   = 20,
20785                 .result = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
20786                           "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
20787                           "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
20788                           "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
20789                           "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
20790                           "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
20791                           "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
20792                           "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
20793                           "\x40\xD7\xCB\x05",
20794                 .rlen   = 68,
20795         }, {
20796                 .key    = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20797                           "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20798                           "\x22\x43\x3C\x64",
20799                 .klen   = 20,
20800                 .iv     = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
20801                 .input  = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
20802                           "\x61\x62\x63\x64\x65\x66\x67\x68"
20803                           "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
20804                           "\x71\x72\x73\x74\x01\x02\x02\x01",
20805                 .ilen   = 32,
20806                 .assoc  = "\x00\x00\x43\x21\x87\x65\x43\x21"
20807                           "\x00\x00\x00\x07\x48\x55\xEC\x7D"
20808                           "\x3A\x23\x4B\xFD",
20809                 .alen   = 20,
20810                 .result = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
20811                           "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
20812                           "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
20813                           "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
20814                           "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
20815                           "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
20816                 .rlen   = 48,
20817         }
20818 };
20819
20820 static struct aead_testvec aes_gcm_rfc4106_dec_tv_template[] = {
20821         { /* Generated using Crypto++ */
20822                 .key    = zeroed_string,
20823                 .klen   = 20,
20824                 .iv     = zeroed_string,
20825                 .input  = "\x03\x88\xDA\xCE\x60\xB6\xA3\x92"
20826                           "\xF3\x28\xC2\xB9\x71\xB2\xFE\x78"
20827                           "\x97\xFE\x4C\x23\x37\x42\x01\xE0"
20828                           "\x81\x9F\x8D\xC5\xD7\x41\xA0\x1B",
20829                 .ilen   = 32,
20830                 .assoc  = zeroed_string,
20831                 .alen   = 16,
20832                 .result = zeroed_string,
20833                 .rlen   = 16,
20834
20835         },{
20836                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20837                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20838                           "\x00\x00\x00\x00",
20839                 .klen   = 20,
20840                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01",
20841                 .input  = "\xC0\x0D\x8B\x42\x0F\x8F\x34\x18"
20842                           "\x88\xB1\xC5\xBC\xC5\xB6\xD6\x28"
20843                           "\x6A\x9D\xDF\x11\x5E\xFE\x5E\x9D"
20844                           "\x2F\x70\x44\x92\xF7\xF2\xE3\xEF",
20845                 .ilen   = 32,
20846                 .assoc  = "\x00\x00\x00\x00\x00\x00\x00\x00"
20847                           "\x00\x00\x00\x00\x00\x00\x00\x01",
20848                 .alen   = 16,
20849                 .result = zeroed_string,
20850                 .rlen   = 16,
20851         }, {
20852                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20853                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20854                           "\x00\x00\x00\x00",
20855                 .klen   = 20,
20856                 .iv     = zeroed_string,
20857                 .input  = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20858                           "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20859                           "\x0B\x8F\x88\x69\x17\xE6\xB4\x3C"
20860                           "\xB1\x68\xFD\x14\x52\x64\x61\xB2",
20861                 .ilen   = 32,
20862                 .assoc  = zeroed_string,
20863                 .alen   = 16,
20864                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20865                           "\x01\x01\x01\x01\x01\x01\x01\x01",
20866                 .rlen   = 16,
20867         }, {
20868                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20869                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20870                           "\x00\x00\x00\x00",
20871                 .klen   = 20,
20872                 .iv     = zeroed_string,
20873                 .input  = "\x4B\xB1\xB5\xE3\x25\x71\x70\xDE"
20874                           "\x7F\xC9\x9C\xA5\x14\x19\xF2\xAC"
20875                           "\x90\x92\xB7\xE3\x5F\xA3\x9A\x63"
20876                           "\x7E\xD7\x1F\xD8\xD3\x7C\x4B\xF5",
20877                 .ilen   = 32,
20878                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01"
20879                           "\x00\x00\x00\x00\x00\x00\x00\x00",
20880                 .alen   = 16,
20881                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20882                           "\x01\x01\x01\x01\x01\x01\x01\x01",
20883                 .rlen   = 16,
20884
20885         }, {
20886                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20887                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20888                           "\x00\x00\x00\x00",
20889                 .klen   = 20,
20890                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01",
20891                 .input  = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20892                           "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20893                           "\x64\x50\xF9\x32\x13\xFB\x74\x61"
20894                           "\xF4\xED\x52\xD3\xC5\x10\x55\x3C",
20895                 .ilen   = 32,
20896                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01"
20897                           "\x00\x00\x00\x00\x00\x00\x00\x01",
20898                 .alen   = 16,
20899                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20900                           "\x01\x01\x01\x01\x01\x01\x01\x01",
20901                 .rlen   = 16,
20902         }, {
20903                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
20904                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
20905                           "\x00\x00\x00\x00",
20906                 .klen   = 20,
20907                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01",
20908                 .input  = "\xC1\x0C\x8A\x43\x0E\x8E\x35\x19"
20909                           "\x89\xB0\xC4\xBD\xC4\xB7\xD7\x29"
20910                           "\x98\x14\xA1\x42\x37\x80\xFD\x90"
20911                           "\x68\x12\x01\xA8\x91\x89\xB9\x83"
20912                           "\x5B\x11\x77\x12\x9B\xFF\x24\x89"
20913                           "\x94\x5F\x18\x12\xBA\x27\x09\x39"
20914                           "\x99\x96\x76\x42\x15\x1C\xCD\xCB"
20915                           "\xDC\xD3\xDA\x65\x73\xAF\x80\xCD"
20916                           "\xD2\xB6\xC2\x4A\x76\xC2\x92\x85"
20917                           "\xBD\xCF\x62\x98\x58\x14\xE5\xBD",
20918                 .ilen   = 80,
20919                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01"
20920                           "\x00\x00\x00\x00\x00\x00\x00\x01",
20921                 .alen   = 16,
20922                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
20923                           "\x01\x01\x01\x01\x01\x01\x01\x01"
20924                           "\x01\x01\x01\x01\x01\x01\x01\x01"
20925                           "\x01\x01\x01\x01\x01\x01\x01\x01"
20926                           "\x01\x01\x01\x01\x01\x01\x01\x01"
20927                           "\x01\x01\x01\x01\x01\x01\x01\x01"
20928                           "\x01\x01\x01\x01\x01\x01\x01\x01"
20929                           "\x01\x01\x01\x01\x01\x01\x01\x01",
20930                 .rlen   = 64,
20931         }, {
20932                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
20933                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
20934                           "\x00\x00\x00\x00",
20935                 .klen   = 20,
20936                 .iv     = "\x00\x00\x45\x67\x89\xab\xcd\xef",
20937                 .input  = "\xC1\x76\x33\x85\xE2\x9B\x5F\xDE"
20938                           "\xDE\x89\x3D\x42\xE7\xC9\x69\x8A"
20939                           "\x44\x6D\xC3\x88\x46\x2E\xC2\x01"
20940                           "\x5E\xF6\x0C\x39\xF0\xC4\xA5\x82"
20941                           "\xCD\xE8\x31\xCC\x0A\x4C\xE4\x44"
20942                           "\x41\xA9\x82\x6F\x22\xA1\x23\x1A"
20943                           "\xA8\xE3\x16\xFD\x31\x5C\x27\x31"
20944                           "\xF1\x7F\x01\x63\xA3\xAF\x70\xA1"
20945                           "\xCF\x07\x57\x41\x67\xD0\xC4\x42"
20946                           "\xDB\x18\xC6\x4C\x4C\xE0\x3D\x9F"
20947                           "\x05\x07\xFB\x13\x7D\x4A\xCA\x5B"
20948                           "\xF0\xBF\x64\x7E\x05\xB1\x72\xEE"
20949                           "\x7C\x3B\xD4\xCD\x14\x03\xB2\x2C"
20950                           "\xD3\xA9\xEE\xFA\x17\xFC\x9C\xDF"
20951                           "\xC7\x75\x40\xFF\xAE\xAD\x1E\x59"
20952                           "\x2F\x30\x24\xFB\xAD\x6B\x10\xFA"
20953                           "\x6C\x9F\x5B\xE7\x25\xD5\xD0\x25"
20954                           "\xAC\x4A\x4B\xDA\xFC\x7A\x85\x1B"
20955                           "\x7E\x13\x06\x82\x08\x17\xA4\x35"
20956                           "\xEC\xC5\x8D\x63\x96\x81\x0A\x8F"
20957                           "\xA3\x05\x38\x95\x20\x1A\x47\x04"
20958                           "\x6F\x6D\xDA\x8F\xEF\xC1\x76\x35"
20959                           "\x6B\xC7\x4D\x0F\x94\x12\xCA\x3E"
20960                           "\x2E\xD5\x03\x2E\x86\x7E\xAA\x3B"
20961                           "\x37\x08\x1C\xCF\xBA\x5D\x71\x46"
20962                           "\x80\x72\xB0\x4C\x82\x0D\x60\x3C",
20963                 .ilen   = 208,
20964                 .assoc  = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
20965                           "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
20966                           "\x89\xab\xcd\xef",
20967                 .alen   = 20,
20968                 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
20969                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20970                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20971                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20972                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20973                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20974                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20975                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20976                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20977                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20978                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20979                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20980                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20981                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20982                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20983                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20984                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20985                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20986                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20987                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20988                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20989                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20990                           "\xff\xff\xff\xff\xff\xff\xff\xff"
20991                           "\xff\xff\xff\xff\xff\xff\xff\xff",
20992                 .rlen   = 192,
20993         }, {
20994                 .key    = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
20995                           "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
20996                           "\x2E\x44\x3B\x68",
20997                 .klen   = 20,
20998                 .iv     = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
20999                 .result = "\x45\x00\x00\x48\x69\x9A\x00\x00"
21000                           "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
21001                           "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
21002                           "\x38\xD3\x01\x00\x00\x01\x00\x00"
21003                           "\x00\x00\x00\x00\x04\x5F\x73\x69"
21004                           "\x70\x04\x5F\x75\x64\x70\x03\x73"
21005                           "\x69\x70\x09\x63\x79\x62\x65\x72"
21006                           "\x63\x69\x74\x79\x02\x64\x6B\x00"
21007                           "\x00\x21\x00\x01\x01\x02\x02\x01",
21008                 .rlen   = 72,
21009                 .assoc  = "\x00\x00\x43\x21\x87\x65\x43\x21"
21010                           "\x00\x00\x00\x00\x49\x56\xED\x7E"
21011                           "\x3B\x24\x4C\xFE",
21012                 .alen   = 20,
21013                 .input  = "\xFE\xCF\x53\x7E\x72\x9D\x5B\x07"
21014                           "\xDC\x30\xDF\x52\x8D\xD2\x2B\x76"
21015                           "\x8D\x1B\x98\x73\x66\x96\xA6\xFD"
21016                           "\x34\x85\x09\xFA\x13\xCE\xAC\x34"
21017                           "\xCF\xA2\x43\x6F\x14\xA3\xF3\xCF"
21018                           "\x65\x92\x5B\xF1\xF4\xA1\x3C\x5D"
21019                           "\x15\xB2\x1E\x18\x84\xF5\xFF\x62"
21020                           "\x47\xAE\xAB\xB7\x86\xB9\x3B\xCE"
21021                           "\x61\xBC\x17\xD7\x68\xFD\x97\x32"
21022                           "\x45\x90\x18\x14\x8F\x6C\xBE\x72"
21023                           "\x2F\xD0\x47\x96\x56\x2D\xFD\xB4",
21024                 .ilen   = 88,
21025         }, {
21026                 .key    = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21027                           "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
21028                           "\xCA\xFE\xBA\xBE",
21029                 .klen   = 20,
21030                 .iv     = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21031                 .result = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
21032                           "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
21033                           "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
21034                           "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
21035                           "\x00\x01\x00\x00\x00\x00\x00\x00"
21036                           "\x03\x73\x69\x70\x09\x63\x79\x62"
21037                           "\x65\x72\x63\x69\x74\x79\x02\x64"
21038                           "\x6B\x00\x00\x01\x00\x01\x00\x01",
21039                 .rlen   = 64,
21040                 .assoc  = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
21041                           "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21042                 .alen   = 16,
21043                 .input  = "\xDE\xB2\x2C\xD9\xB0\x7C\x72\xC1"
21044                           "\x6E\x3A\x65\xBE\xEB\x8D\xF3\x04"
21045                           "\xA5\xA5\x89\x7D\x33\xAE\x53\x0F"
21046                           "\x1B\xA7\x6D\x5D\x11\x4D\x2A\x5C"
21047                           "\x3D\xE8\x18\x27\xC1\x0E\x9A\x4F"
21048                           "\x51\x33\x0D\x0E\xEC\x41\x66\x42"
21049                           "\xCF\xBB\x85\xA5\xB4\x7E\x48\xA4"
21050                           "\xEC\x3B\x9B\xA9\x5D\x91\x8B\xD1"
21051                           "\x83\xB7\x0D\x3A\xA8\xBC\x6E\xE4"
21052                           "\xC3\x09\xE9\xD8\x5A\x41\xAD\x4A",
21053                 .ilen   = 80,
21054         }, {
21055                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21056                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21057                           "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21058                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21059                           "\x11\x22\x33\x44",
21060                 .klen   = 36,
21061                 .iv     = "\x01\x02\x03\x04\x05\x06\x07\x08",
21062                 .result = "\x45\x00\x00\x30\x69\xA6\x40\x00"
21063                           "\x80\x06\x26\x90\xC0\xA8\x01\x02"
21064                           "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
21065                           "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
21066                           "\x70\x02\x40\x00\x20\xBF\x00\x00"
21067                           "\x02\x04\x05\xB4\x01\x01\x04\x02"
21068                           "\x01\x02\x02\x01",
21069                 .rlen   = 52,
21070                 .assoc  = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
21071                           "\x01\x02\x03\x04\x05\x06\x07\x08",
21072                 .alen   = 16,
21073                 .input  = "\xFF\x42\x5C\x9B\x72\x45\x99\xDF"
21074                           "\x7A\x3B\xCD\x51\x01\x94\xE0\x0D"
21075                           "\x6A\x78\x10\x7F\x1B\x0B\x1C\xBF"
21076                           "\x06\xEF\xAE\x9D\x65\xA5\xD7\x63"
21077                           "\x74\x8A\x63\x79\x85\x77\x1D\x34"
21078                           "\x7F\x05\x45\x65\x9F\x14\xE9\x9D"
21079                           "\xEF\x84\x2D\x8E\xB3\x35\xF4\xEE"
21080                           "\xCF\xDB\xF8\x31\x82\x4B\x4C\x49"
21081                           "\x15\x95\x6C\x96",
21082                 .ilen   = 68,
21083         }, {
21084                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
21085                           "\x00\x00\x00\x00\x00\x00\x00\x00"
21086                           "\x00\x00\x00\x00",
21087                 .klen   = 20,
21088                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
21089                 .result = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
21090                           "\x80\x01\xCB\x7A\x40\x67\x93\x18"
21091                           "\x01\x01\x01\x01\x08\x00\x07\x5C"
21092                           "\x02\x00\x44\x00\x61\x62\x63\x64"
21093                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21094                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21095                           "\x75\x76\x77\x61\x62\x63\x64\x65"
21096                           "\x66\x67\x68\x69\x01\x02\x02\x01",
21097                 .rlen   = 64,
21098                 .assoc  = "\x00\x00\x00\x00\x00\x00\x00\x01"
21099                           "\x00\x00\x00\x00\x00\x00\x00\x00",
21100                 .alen   = 16,
21101                 .input  = "\x46\x88\xDA\xF2\xF9\x73\xA3\x92"
21102                           "\x73\x29\x09\xC3\x31\xD5\x6D\x60"
21103                           "\xF6\x94\xAB\xAA\x41\x4B\x5E\x7F"
21104                           "\xF5\xFD\xCD\xFF\xF5\xE9\xA2\x84"
21105                           "\x45\x64\x76\x49\x27\x19\xFF\xB6"
21106                           "\x4D\xE7\xD9\xDC\xA1\xE1\xD8\x94"
21107                           "\xBC\x3B\xD5\x78\x73\xED\x4D\x18"
21108                           "\x1D\x19\xD4\xD5\xC8\xC1\x8A\xF3"
21109                           "\xF8\x21\xD4\x96\xEE\xB0\x96\xE9"
21110                           "\x8A\xD2\xB6\x9E\x47\x99\xC7\x1D",
21111                 .ilen   = 80,
21112         }, {
21113                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21114                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21115                           "\x57\x69\x0E\x43",
21116                 .klen   = 20,
21117                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21118                 .result = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
21119                           "\x80\x01\xCB\x7C\x40\x67\x93\x18"
21120                           "\x01\x01\x01\x01\x08\x00\x08\x5C"
21121                           "\x02\x00\x43\x00\x61\x62\x63\x64"
21122                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21123                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21124                           "\x75\x76\x77\x61\x62\x63\x64\x65"
21125                           "\x66\x67\x68\x69\x01\x02\x02\x01",
21126                 .rlen   = 64,
21127                 .assoc  = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
21128                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
21129                           "\xA2\xFC\xA1\xA3",
21130                 .alen   = 20,
21131                 .input  = "\xFB\xA2\xCA\xA4\x85\x3C\xF9\xF0"
21132                           "\xF2\x2C\xB1\x0D\x86\xDD\x83\xB0"
21133                           "\xFE\xC7\x56\x91\xCF\x1A\x04\xB0"
21134                           "\x0D\x11\x38\xEC\x9C\x35\x79\x17"
21135                           "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21136                           "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21137                           "\x17\x55\xE6\x66\x2B\x4C\x8D\x0D"
21138                           "\x1F\x5E\x22\x73\x95\x30\x32\x0A"
21139                           "\xE0\xD7\x31\xCC\x97\x8E\xCA\xFA"
21140                           "\xEA\xE8\x8F\x00\xE8\x0D\x6E\x48",
21141                 .ilen   = 80,
21142         }, {
21143                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21144                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21145                           "\x57\x69\x0E\x43",
21146                 .klen   = 20,
21147                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21148                 .result = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
21149                           "\x80\x01\x44\x1F\x40\x67\x93\xB6"
21150                           "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
21151                           "\x01\x02\x02\x01",
21152                 .rlen   = 28,
21153                 .assoc  = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
21154                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
21155                           "\xA2\xFC\xA1\xA3",
21156                 .alen   = 20,
21157                 .input  = "\xFB\xA2\xCA\x84\x5E\x5D\xF9\xF0"
21158                           "\xF2\x2C\x3E\x6E\x86\xDD\x83\x1E"
21159                           "\x1F\xC6\x57\x92\xCD\x1A\xF9\x13"
21160                           "\x0E\x13\x79\xED\x36\x9F\x07\x1F"
21161                           "\x35\xE0\x34\xBE\x95\xF1\x12\xE4"
21162                           "\xE7\xD0\x5D\x35",
21163                 .ilen   = 44,
21164         }, {
21165                 .key    = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21166                           "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
21167                           "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
21168                           "\xCA\xFE\xBA\xBE",
21169                 .klen   = 28,
21170                 .iv     = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21171                 .result = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
21172                           "\x40\x06\x78\x80\x0A\x01\x03\x8F"
21173                           "\x0A\x01\x06\x12\x80\x23\x06\xB8"
21174                           "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
21175                           "\x50\x10\x16\xD0\x75\x68\x00\x01",
21176                 .rlen   = 40,
21177                 .assoc  = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
21178                           "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
21179                 .alen   = 16,
21180                 .input  = "\xA5\xB1\xF8\x06\x60\x29\xAE\xA4"
21181                           "\x0E\x59\x8B\x81\x22\xDE\x02\x42"
21182                           "\x09\x38\xB3\xAB\x33\xF8\x28\xE6"
21183                           "\x87\xB8\x85\x8B\x5B\xFB\xDB\xD0"
21184                           "\x31\x5B\x27\x45\x21\x44\xCC\x77"
21185                           "\x95\x45\x7B\x96\x52\x03\x7F\x53"
21186                           "\x18\x02\x7B\x5B\x4C\xD7\xA6\x36",
21187                 .ilen   = 56,
21188         }, {
21189                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21190                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21191                           "\xDE\xCA\xF8\x88",
21192                 .klen   = 20,
21193                 .iv     = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21194                 .result = "\x45\x00\x00\x49\x33\xBA\x00\x00"
21195                           "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
21196                           "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21197                           "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
21198                           "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
21199                           "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
21200                           "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
21201                           "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
21202                           "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
21203                           "\x23\x01\x01\x01",
21204                 .rlen   = 76,
21205                 .assoc  = "\x00\x00\x01\x00\x00\x00\x00\x00"
21206                           "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
21207                           "\xCE\xFA\xCE\x74",
21208                 .alen   = 20,
21209                 .input  = "\x18\xA6\xFD\x42\xF7\x2C\xBF\x4A"
21210                           "\xB2\xA2\xEA\x90\x1F\x73\xD8\x14"
21211                           "\xE3\xE7\xF2\x43\xD9\x54\x12\xE1"
21212                           "\xC3\x49\xC1\xD2\xFB\xEC\x16\x8F"
21213                           "\x91\x90\xFE\xEB\xAF\x2C\xB0\x19"
21214                           "\x84\xE6\x58\x63\x96\x5D\x74\x72"
21215                           "\xB7\x9D\xA3\x45\xE0\xE7\x80\x19"
21216                           "\x1F\x0D\x2F\x0E\x0F\x49\x6C\x22"
21217                           "\x6F\x21\x27\xB2\x7D\xB3\x57\x24"
21218                           "\xE7\x84\x5D\x68\x65\x1F\x57\xE6"
21219                           "\x5F\x35\x4F\x75\xFF\x17\x01\x57"
21220                           "\x69\x62\x34\x36",
21221                 .ilen   = 92,
21222         }, {
21223                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21224                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21225                           "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21226                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21227                           "\x73\x61\x6C\x74",
21228                 .klen   = 36,
21229                 .iv     = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21230                 .result = "\x45\x08\x00\x28\x73\x2C\x00\x00"
21231                           "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
21232                           "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
21233                           "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
21234                           "\x50\x10\x1F\x64\x6D\x54\x00\x01",
21235                 .rlen   = 40,
21236                 .assoc  = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
21237                           "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
21238                           "\x69\x76\x65\x63",
21239                 .alen   = 20,
21240                 .input  = "\xF2\xD6\x9E\xCD\xBD\x5A\x0D\x5B"
21241                           "\x8D\x5E\xF3\x8B\xAD\x4D\xA5\x8D"
21242                           "\x1F\x27\x8F\xDE\x98\xEF\x67\x54"
21243                           "\x9D\x52\x4A\x30\x18\xD9\xA5\x7F"
21244                           "\xF4\xD3\xA3\x1C\xE6\x73\x11\x9E"
21245                           "\x45\x16\x26\xC2\x41\x57\x71\xE3"
21246                           "\xB7\xEE\xBC\xA6\x14\xC8\x9B\x35",
21247                 .ilen   = 56,
21248         }, {
21249                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21250                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21251                           "\x57\x69\x0E\x43",
21252                 .klen   = 20,
21253                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21254                 .result = "\x45\x00\x00\x49\x33\x3E\x00\x00"
21255                           "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
21256                           "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
21257                           "\x00\x35\xCB\x45\x80\x03\x02\x5B"
21258                           "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
21259                           "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
21260                           "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
21261                           "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
21262                           "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
21263                           "\x15\x01\x01\x01",
21264                 .rlen   = 76,
21265                 .assoc  = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
21266                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
21267                           "\xA2\xFC\xA1\xA3",
21268                 .alen   = 20,
21269                 .input  = "\xFB\xA2\xCA\xD1\x2F\xC1\xF9\xF0"
21270                           "\x0D\x3C\xEB\xF3\x05\x41\x0D\xB8"
21271                           "\x3D\x77\x84\xB6\x07\x32\x3D\x22"
21272                           "\x0F\x24\xB0\xA9\x7D\x54\x18\x28"
21273                           "\x00\xCA\xDB\x0F\x68\xD9\x9E\xF0"
21274                           "\xE0\xC0\xC8\x9A\xE9\xBE\xA8\x88"
21275                           "\x4E\x52\xD6\x5B\xC1\xAF\xD0\x74"
21276                           "\x0F\x74\x24\x44\x74\x7B\x5B\x39"
21277                           "\xAB\x53\x31\x63\xAA\xD4\x55\x0E"
21278                           "\xE5\x16\x09\x75\xCD\xB6\x08\xC5"
21279                           "\x76\x91\x89\x60\x97\x63\xB8\xE1"
21280                           "\x8C\xAA\x81\xE2",
21281                 .ilen   = 92,
21282         }, {
21283                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21284                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21285                           "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21286                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21287                           "\x73\x61\x6C\x74",
21288                 .klen   = 36,
21289                 .iv     = "\x61\x6E\x64\x01\x69\x76\x65\x63",
21290                 .result = "\x63\x69\x73\x63\x6F\x01\x72\x75"
21291                           "\x6C\x65\x73\x01\x74\x68\x65\x01"
21292                           "\x6E\x65\x74\x77\x65\x01\x64\x65"
21293                           "\x66\x69\x6E\x65\x01\x74\x68\x65"
21294                           "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
21295                           "\x67\x69\x65\x73\x01\x74\x68\x61"
21296                           "\x74\x77\x69\x6C\x6C\x01\x64\x65"
21297                           "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
21298                           "\x72\x72\x6F\x77\x01\x02\x02\x01",
21299                 .rlen   = 72,
21300                 .assoc  = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
21301                           "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
21302                           "\x69\x76\x65\x63",
21303                 .alen   = 20,
21304                 .input  = "\xD4\xB7\xED\x86\xA1\x77\x7F\x2E"
21305                           "\xA1\x3D\x69\x73\xD3\x24\xC6\x9E"
21306                           "\x7B\x43\xF8\x26\xFB\x56\x83\x12"
21307                           "\x26\x50\x8B\xEB\xD2\xDC\xEB\x18"
21308                           "\xD0\xA6\xDF\x10\xE5\x48\x7D\xF0"
21309                           "\x74\x11\x3E\x14\xC6\x41\x02\x4E"
21310                           "\x3E\x67\x73\xD9\x1A\x62\xEE\x42"
21311                           "\x9B\x04\x3A\x10\xE3\xEF\xE6\xB0"
21312                           "\x12\xA4\x93\x63\x41\x23\x64\xF8"
21313                           "\xC0\xCA\xC5\x87\xF2\x49\xE5\x6B"
21314                           "\x11\xE2\x4F\x30\xE4\x4C\xCC\x76",
21315                 .ilen   = 88,
21316         }, {
21317                 .key    = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
21318                           "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
21319                           "\xD9\x66\x42\x67",
21320                 .klen   = 20,
21321                 .iv     = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21322                 .result = "\x01\x02\x02\x01",
21323                 .rlen   = 4,
21324                 .assoc  = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
21325                           "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
21326                 .alen   = 16,
21327                 .input  = "\x43\x7F\x86\x6B\xCB\x3F\x69\x9F"
21328                           "\xE9\xB0\x82\x2B\xAC\x96\x1C\x45"
21329                           "\x04\xBE\xF2\x70",
21330                 .ilen   = 20,
21331         }, {
21332                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
21333                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
21334                           "\xDE\xCA\xF8\x88",
21335                 .klen   = 20,
21336                 .iv     = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
21337                 .result = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
21338                           "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
21339                           "\x62\x65\x00\x01",
21340                 .rlen   = 20,
21341                 .assoc  = "\x00\x00\x01\x00\x00\x00\x00\x00"
21342                           "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
21343                           "\xCE\xFA\xCE\x74",
21344                 .alen   = 20,
21345                 .input  = "\x29\xC9\xFC\x69\xA1\x97\xD0\x38"
21346                           "\xCC\xDD\x14\xE2\xDD\xFC\xAA\x05"
21347                           "\x43\x33\x21\x64\x41\x25\x03\x52"
21348                           "\x43\x03\xED\x3C\x6C\x5F\x28\x38"
21349                           "\x43\xAF\x8C\x3E",
21350                 .ilen   = 36,
21351         }, {
21352                 .key    = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
21353                           "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
21354                           "\x61\x61\x6E\x64\x64\x6F\x69\x74"
21355                           "\x62\x65\x66\x6F\x72\x65\x69\x61"
21356                           "\x74\x75\x72\x6E",
21357                 .klen   = 36,
21358                 .iv     = "\x33\x30\x21\x69\x67\x65\x74\x6D",
21359                 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21360                           "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21361                           "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21362                           "\x02\x00\x07\x00\x61\x62\x63\x64"
21363                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21364                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21365                           "\x01\x02\x02\x01",
21366                 .rlen   = 52,
21367                 .assoc  = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
21368                           "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
21369                           "\x67\x65\x74\x6D",
21370                 .alen   = 20,
21371                 .input  = "\xF9\x7A\xB2\xAA\x35\x6D\x8E\xDC"
21372                           "\xE1\x76\x44\xAC\x8C\x78\xE2\x5D"
21373                           "\xD2\x4D\xED\xBB\x29\xEB\xF1\xB6"
21374                           "\x4A\x27\x4B\x39\xB4\x9C\x3A\x86"
21375                           "\x4C\xD3\xD7\x8C\xA4\xAE\x68\xA3"
21376                           "\x2B\x42\x45\x8F\xB5\x7D\xBE\x82"
21377                           "\x1D\xCC\x63\xB9\xD0\x93\x7B\xA2"
21378                           "\x94\x5F\x66\x93\x68\x66\x1A\x32"
21379                           "\x9F\xB4\xC0\x53",
21380                 .ilen   = 68,
21381         }, {
21382                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
21383                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
21384                           "\x57\x69\x0E\x43",
21385                 .klen   = 20,
21386                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
21387                 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
21388                           "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
21389                           "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
21390                           "\x02\x00\x07\x00\x61\x62\x63\x64"
21391                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
21392                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
21393                           "\x01\x02\x02\x01",
21394                 .rlen   = 52,
21395                 .assoc  = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
21396                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
21397                           "\xA2\xFC\xA1\xA3",
21398                 .alen   = 20,
21399                 .input  = "\xFB\xA2\xCA\xA8\xC6\xC5\xF9\xF0"
21400                           "\xF2\x2C\xA5\x4A\x06\x12\x10\xAD"
21401                           "\x3F\x6E\x57\x91\xCF\x1A\xCA\x21"
21402                           "\x0D\x11\x7C\xEC\x9C\x35\x79\x17"
21403                           "\x65\xAC\xBD\x87\x01\xAD\x79\x84"
21404                           "\x5B\xF9\xFE\x3F\xBA\x48\x7B\xC9"
21405                           "\x63\x21\x93\x06\x84\xEE\xCA\xDB"
21406                           "\x56\x91\x25\x46\xE7\xA9\x5C\x97"
21407                           "\x40\xD7\xCB\x05",
21408                 .ilen   = 68,
21409         }, {
21410                 .key    = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
21411                           "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
21412                           "\x22\x43\x3C\x64",
21413                 .klen   = 20,
21414                 .iv     = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
21415                 .result = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
21416                           "\x61\x62\x63\x64\x65\x66\x67\x68"
21417                           "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
21418                           "\x71\x72\x73\x74\x01\x02\x02\x01",
21419                 .rlen   = 32,
21420                 .assoc  = "\x00\x00\x43\x21\x87\x65\x43\x21"
21421                           "\x00\x00\x00\x07\x48\x55\xEC\x7D"
21422                           "\x3A\x23\x4B\xFD",
21423                 .alen   = 20,
21424                 .input  = "\x74\x75\x2E\x8A\xEB\x5D\x87\x3C"
21425                           "\xD7\xC0\xF4\xAC\xC3\x6C\x4B\xFF"
21426                           "\x84\xB7\xD7\xB9\x8F\x0C\xA8\xB6"
21427                           "\xAC\xDA\x68\x94\xBC\x61\x90\x69"
21428                           "\xEF\x9C\xBC\x28\xFE\x1B\x56\xA7"
21429                           "\xC4\xE0\xD5\x8C\x86\xCD\x2B\xC0",
21430                 .ilen   = 48,
21431         }
21432 };
21433
21434 static struct aead_testvec aes_gcm_rfc4543_enc_tv_template[] = {
21435         { /* From draft-mcgrew-gcm-test-01 */
21436                 .key    = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21437                           "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21438                           "\x22\x43\x3c\x64",
21439                 .klen   = 20,
21440                 .iv     = zeroed_string,
21441                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x07"
21442                           "\x00\x00\x00\x00\x00\x00\x00\x00",
21443                 .alen   = 16,
21444                 .input  = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21445                           "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21446                           "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21447                           "\x02\x00\x07\x00\x61\x62\x63\x64"
21448                           "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21449                           "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21450                           "\x01\x02\x02\x01",
21451                 .ilen   = 52,
21452                 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21453                           "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21454                           "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21455                           "\x02\x00\x07\x00\x61\x62\x63\x64"
21456                           "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21457                           "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21458                           "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21459                           "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21460                           "\xe4\x09\x9a\xaa",
21461                 .rlen   = 68,
21462         }
21463 };
21464
21465 static struct aead_testvec aes_gcm_rfc4543_dec_tv_template[] = {
21466         { /* From draft-mcgrew-gcm-test-01 */
21467                 .key    = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21468                           "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21469                           "\x22\x43\x3c\x64",
21470                 .klen   = 20,
21471                 .iv     = zeroed_string,
21472                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x07"
21473                           "\x00\x00\x00\x00\x00\x00\x00\x00",
21474                 .alen   = 16,
21475                 .input  = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21476                           "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21477                           "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21478                           "\x02\x00\x07\x00\x61\x62\x63\x64"
21479                           "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21480                           "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21481                           "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21482                           "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21483                           "\xe4\x09\x9a\xaa",
21484                 .ilen   = 68,
21485                 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21486                           "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21487                           "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21488                           "\x02\x00\x07\x00\x61\x62\x63\x64"
21489                           "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21490                           "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21491                           "\x01\x02\x02\x01",
21492                 .rlen   = 52,
21493         }, { /* nearly same as previous, but should fail */
21494                 .key    = "\x4c\x80\xcd\xef\xbb\x5d\x10\xda"
21495                           "\x90\x6a\xc7\x3c\x36\x13\xa6\x34"
21496                           "\x22\x43\x3c\x64",
21497                 .klen   = 20,
21498                 .iv     = zeroed_string,
21499                 .assoc  = "\x00\x00\x43\x21\x00\x00\x00\x07"
21500                           "\x00\x00\x00\x00\x00\x00\x00\x00",
21501                 .alen   = 16,
21502                 .input  = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21503                           "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21504                           "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21505                           "\x02\x00\x07\x00\x61\x62\x63\x64"
21506                           "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21507                           "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21508                           "\x01\x02\x02\x01\xf2\xa9\xa8\x36"
21509                           "\xe1\x55\x10\x6a\xa8\xdc\xd6\x18"
21510                           "\x00\x00\x00\x00",
21511                 .ilen   = 68,
21512                 .novrfy = 1,
21513                 .result = "\x45\x00\x00\x30\xda\x3a\x00\x00"
21514                           "\x80\x01\xdf\x3b\xc0\xa8\x00\x05"
21515                           "\xc0\xa8\x00\x01\x08\x00\xc6\xcd"
21516                           "\x02\x00\x07\x00\x61\x62\x63\x64"
21517                           "\x65\x66\x67\x68\x69\x6a\x6b\x6c"
21518                           "\x6d\x6e\x6f\x70\x71\x72\x73\x74"
21519                           "\x01\x02\x02\x01",
21520                 .rlen   = 52,
21521         },
21522 };
21523
21524 static struct aead_testvec aes_ccm_enc_tv_template[] = {
21525         { /* From RFC 3610 */
21526                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21527                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21528                 .klen   = 16,
21529                 .iv     = "\x01\x00\x00\x00\x03\x02\x01\x00"
21530                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21531                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07",
21532                 .alen   = 8,
21533                 .input  = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21534                           "\x10\x11\x12\x13\x14\x15\x16\x17"
21535                           "\x18\x19\x1a\x1b\x1c\x1d\x1e",
21536                 .ilen   = 23,
21537                 .result = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
21538                           "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
21539                           "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
21540                           "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
21541                 .rlen   = 31,
21542         }, {
21543                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21544                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21545                 .klen   = 16,
21546                 .iv     = "\x01\x00\x00\x00\x07\x06\x05\x04"
21547                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21548                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
21549                           "\x08\x09\x0a\x0b",
21550                 .alen   = 12,
21551                 .input  = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21552                           "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21553                           "\x1c\x1d\x1e\x1f",
21554                 .ilen   = 20,
21555                 .result = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
21556                           "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
21557                           "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
21558                           "\x7d\x9c\x2d\x93",
21559                 .rlen   = 28,
21560         }, {
21561                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21562                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21563                 .klen   = 16,
21564                 .iv     = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
21565                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21566                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07",
21567                 .alen   = 8,
21568                 .input  = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21569                           "\x10\x11\x12\x13\x14\x15\x16\x17"
21570                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
21571                           "\x20",
21572                 .ilen   = 25,
21573                 .result = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
21574                           "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
21575                           "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
21576                           "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
21577                           "\x7e\x5f\x4e",
21578                 .rlen   = 35,
21579         }, {
21580                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21581                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21582                 .klen   = 16,
21583                 .iv     = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
21584                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21585                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
21586                           "\x08\x09\x0a\x0b",
21587                 .alen   = 12,
21588                 .input  = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21589                           "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21590                           "\x1c\x1d\x1e",
21591                 .ilen   = 19,
21592                 .result = "\x07\x34\x25\x94\x15\x77\x85\x15"
21593                           "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
21594                           "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
21595                           "\x4d\x99\x99\x88\xdd",
21596                 .rlen   = 29,
21597         }, {
21598                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21599                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21600                 .klen   = 16,
21601                 .iv     = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
21602                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21603                 .assoc  = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
21604                 .alen   = 8,
21605                 .input  = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
21606                           "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
21607                           "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
21608                 .ilen   = 24,
21609                 .result = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
21610                           "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
21611                           "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
21612                           "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
21613                 .rlen   = 32,
21614         }, {
21615                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21616                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21617                 .klen   = 16,
21618                 .iv     = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
21619                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21620                 .assoc  = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
21621                           "\x20\xea\x60\xc0",
21622                 .alen   = 12,
21623                 .input  = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
21624                           "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
21625                           "\x3a\x80\x3b\xa8\x7f",
21626                 .ilen   = 21,
21627                 .result = "\x00\x97\x69\xec\xab\xdf\x48\x62"
21628                           "\x55\x94\xc5\x92\x51\xe6\x03\x57"
21629                           "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
21630                           "\x5a\xe0\x70\x45\x51",
21631                 .rlen   = 29,
21632         }, {
21633                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21634                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21635                 .klen   = 16,
21636                 .iv     = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
21637                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21638                 .assoc  = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
21639                 .alen   = 8,
21640                 .input  = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
21641                           "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
21642                           "\x98\x09\xd6\x7d\xbe\xdd\x18",
21643                 .ilen   = 23,
21644                 .result = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
21645                           "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
21646                           "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
21647                           "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
21648                           "\xba",
21649                 .rlen   = 33,
21650         }, {
21651                 /* This is taken from FIPS CAVS. */
21652                 .key    = "\x83\xac\x54\x66\xc2\xeb\xe5\x05"
21653                           "\x2e\x01\xd1\xfc\x5d\x82\x66\x2e",
21654                 .klen   = 16,
21655                 .iv     = "\x03\x96\xac\x59\x30\x07\xa1\xe2\xa2\xc7\x55\x24\0\0\0\0",
21656                 .alen   = 0,
21657                 .input  = "\x19\xc8\x81\xf6\xe9\x86\xff\x93"
21658                           "\x0b\x78\x67\xe5\xbb\xb7\xfc\x6e"
21659                           "\x83\x77\xb3\xa6\x0c\x8c\x9f\x9c"
21660                           "\x35\x2e\xad\xe0\x62\xf9\x91\xa1",
21661                 .ilen   = 32,
21662                 .result = "\xab\x6f\xe1\x69\x1d\x19\x99\xa8"
21663                           "\x92\xa0\xc4\x6f\x7e\xe2\x8b\xb1"
21664                           "\x70\xbb\x8c\xa6\x4c\x6e\x97\x8a"
21665                           "\x57\x2b\xbe\x5d\x98\xa6\xb1\x32"
21666                           "\xda\x24\xea\xd9\xa1\x39\x98\xfd"
21667                           "\xa4\xbe\xd9\xf2\x1a\x6d\x22\xa8",
21668                 .rlen   = 48,
21669         }, {
21670                 .key    = "\x1e\x2c\x7e\x01\x41\x9a\xef\xc0"
21671                           "\x0d\x58\x96\x6e\x5c\xa2\x4b\xd3",
21672                 .klen   = 16,
21673                 .iv     = "\x03\x4f\xa3\x19\xd3\x01\x5a\xd8"
21674                           "\x30\x60\x15\x56\x00\x00\x00\x00",
21675                 .assoc  = "\xda\xe6\x28\x9c\x45\x2d\xfd\x63"
21676                           "\x5e\xda\x4c\xb6\xe6\xfc\xf9\xb7"
21677                           "\x0c\x56\xcb\xe4\xe0\x05\x7a\xe1"
21678                           "\x0a\x63\x09\x78\xbc\x2c\x55\xde",
21679                 .alen   = 32,
21680                 .input  = "\x87\xa3\x36\xfd\x96\xb3\x93\x78"
21681                           "\xa9\x28\x63\xba\x12\xa3\x14\x85"
21682                           "\x57\x1e\x06\xc9\x7b\x21\xef\x76"
21683                           "\x7f\x38\x7e\x8e\x29\xa4\x3e\x7e",
21684                 .ilen   = 32,
21685                 .result = "\x8a\x1e\x11\xf0\x02\x6b\xe2\x19"
21686                           "\xfc\x70\xc4\x6d\x8e\xb7\x99\xab"
21687                           "\xc5\x4b\xa2\xac\xd3\xf3\x48\xff"
21688                           "\x3b\xb5\xce\x53\xef\xde\xbb\x02"
21689                           "\xa9\x86\x15\x6c\x13\xfe\xda\x0a"
21690                           "\x22\xb8\x29\x3d\xd8\x39\x9a\x23",
21691                 .rlen   = 48,
21692         }, {
21693                 .key    = "\xf4\x6b\xc2\x75\x62\xfe\xb4\xe1"
21694                           "\xa3\xf0\xff\xdd\x4e\x4b\x12\x75"
21695                           "\x53\x14\x73\x66\x8d\x88\xf6\x80",
21696                 .klen   = 24,
21697                 .iv     = "\x03\xa0\x20\x35\x26\xf2\x21\x8d"
21698                           "\x50\x20\xda\xe2\x00\x00\x00\x00",
21699                 .assoc  = "\x5b\x9e\x13\x67\x02\x5e\xef\xc1"
21700                           "\x6c\xf9\xd7\x1e\x52\x8f\x7a\x47"
21701                           "\xe9\xd4\xcf\x20\x14\x6e\xf0\x2d"
21702                           "\xd8\x9e\x2b\x56\x10\x23\x56\xe7",
21703                 .alen   = 32,
21704                 .result = "\x36\xea\x7a\x70\x08\xdc\x6a\xbc"
21705                           "\xad\x0c\x7a\x63\xf6\x61\xfd\x9b",
21706                 .rlen   = 16,
21707         }, {
21708                 .key    = "\x56\xdf\x5c\x8f\x26\x3f\x0e\x42"
21709                           "\xef\x7a\xd3\xce\xfc\x84\x60\x62"
21710                           "\xca\xb4\x40\xaf\x5f\xc9\xc9\x01",
21711                 .klen   = 24,
21712                 .iv     = "\x03\xd6\x3c\x8c\x86\x84\xb6\xcd"
21713                           "\xef\x09\x2e\x94\x00\x00\x00\x00",
21714                 .assoc  = "\x02\x65\x78\x3c\xe9\x21\x30\x91"
21715                           "\xb1\xb9\xda\x76\x9a\x78\x6d\x95"
21716                           "\xf2\x88\x32\xa3\xf2\x50\xcb\x4c"
21717                           "\xe3\x00\x73\x69\x84\x69\x87\x79",
21718                 .alen   = 32,
21719                 .input  = "\x9f\xd2\x02\x4b\x52\x49\x31\x3c"
21720                           "\x43\x69\x3a\x2d\x8e\x70\xad\x7e"
21721                           "\xe0\xe5\x46\x09\x80\x89\x13\xb2"
21722                           "\x8c\x8b\xd9\x3f\x86\xfb\xb5\x6b",
21723                 .ilen   = 32,
21724                 .result = "\x39\xdf\x7c\x3c\x5a\x29\xb9\x62"
21725                           "\x5d\x51\xc2\x16\xd8\xbd\x06\x9f"
21726                           "\x9b\x6a\x09\x70\xc1\x51\x83\xc2"
21727                           "\x66\x88\x1d\x4f\x9a\xda\xe0\x1e"
21728                           "\xc7\x79\x11\x58\xe5\x6b\x20\x40"
21729                           "\x7a\xea\x46\x42\x8b\xe4\x6f\xe1",
21730                 .rlen   = 48,
21731         }, {
21732                 .key    = "\xe0\x8d\x99\x71\x60\xd7\x97\x1a"
21733                           "\xbd\x01\x99\xd5\x8a\xdf\x71\x3a"
21734                           "\xd3\xdf\x24\x4b\x5e\x3d\x4b\x4e"
21735                           "\x30\x7a\xb9\xd8\x53\x0a\x5e\x2b",
21736                 .klen   = 32,
21737                 .iv     = "\x03\x1e\x29\x91\xad\x8e\xc1\x53"
21738                           "\x0a\xcf\x2d\xbe\x00\x00\x00\x00",
21739                 .assoc  = "\x19\xb6\x1f\x57\xc4\xf3\xf0\x8b"
21740                           "\x78\x2b\x94\x02\x29\x0f\x42\x27"
21741                           "\x6b\x75\xcb\x98\x34\x08\x7e\x79"
21742                           "\xe4\x3e\x49\x0d\x84\x8b\x22\x87",
21743                 .alen   = 32,
21744                 .input  = "\xe1\xd9\xd8\x13\xeb\x3a\x75\x3f"
21745                           "\x9d\xbd\x5f\x66\xbe\xdc\xbb\x66"
21746                           "\xbf\x17\x99\x62\x4a\x39\x27\x1f"
21747                           "\x1d\xdc\x24\xae\x19\x2f\x98\x4c",
21748                 .ilen   = 32,
21749                 .result = "\x19\xb8\x61\x33\x45\x2b\x43\x96"
21750                           "\x6f\x51\xd0\x20\x30\x7d\x9b\xc6"
21751                           "\x26\x3d\xf8\xc9\x65\x16\xa8\x9f"
21752                           "\xf0\x62\x17\x34\xf2\x1e\x8d\x75"
21753                           "\x4e\x13\xcc\xc0\xc3\x2a\x54\x2d",
21754                 .rlen   = 40,
21755         }, {
21756                 .key    = "\x7c\xc8\x18\x3b\x8d\x99\xe0\x7c"
21757                           "\x45\x41\xb8\xbd\x5c\xa7\xc2\x32"
21758                           "\x8a\xb8\x02\x59\xa4\xfe\xa9\x2c"
21759                           "\x09\x75\x9a\x9b\x3c\x9b\x27\x39",
21760                 .klen   = 32,
21761                 .iv     = "\x03\xf9\xd9\x4e\x63\xb5\x3d\x9d"
21762                           "\x43\xf6\x1e\x50",
21763                 .assoc  = "\x57\xf5\x6b\x8b\x57\x5c\x3d\x3b"
21764                           "\x13\x02\x01\x0c\x83\x4c\x96\x35"
21765                           "\x8e\xd6\x39\xcf\x7d\x14\x9b\x94"
21766                           "\xb0\x39\x36\xe6\x8f\x57\xe0\x13",
21767                 .alen   = 32,
21768                 .input  = "\x3b\x6c\x29\x36\xb6\xef\x07\xa6"
21769                           "\x83\x72\x07\x4f\xcf\xfa\x66\x89"
21770                           "\x5f\xca\xb1\xba\xd5\x8f\x2c\x27"
21771                           "\x30\xdb\x75\x09\x93\xd4\x65\xe4",
21772                 .ilen   = 32,
21773                 .result = "\xb0\x88\x5a\x33\xaa\xe5\xc7\x1d"
21774                           "\x85\x23\xc7\xc6\x2f\xf4\x1e\x3d"
21775                           "\xcc\x63\x44\x25\x07\x78\x4f\x9e"
21776                           "\x96\xb8\x88\xeb\xbc\x48\x1f\x06"
21777                           "\x39\xaf\x39\xac\xd8\x4a\x80\x39"
21778                           "\x7b\x72\x8a\xf7",
21779                 .rlen   = 44,
21780         }, {
21781                 .key    = "\xab\xd0\xe9\x33\x07\x26\xe5\x83"
21782                           "\x8c\x76\x95\xd4\xb6\xdc\xf3\x46"
21783                           "\xf9\x8f\xad\xe3\x02\x13\x83\x77"
21784                           "\x3f\xb0\xf1\xa1\xa1\x22\x0f\x2b",
21785                 .klen   = 32,
21786                 .iv     = "\x03\x24\xa7\x8b\x07\xcb\xcc\x0e"
21787                           "\xe6\x33\xbf\xf5\x00\x00\x00\x00",
21788                 .assoc  = "\xd4\xdb\x30\x1d\x03\xfe\xfd\x5f"
21789                           "\x87\xd4\x8c\xb6\xb6\xf1\x7a\x5d"
21790                           "\xab\x90\x65\x8d\x8e\xca\x4d\x4f"
21791                           "\x16\x0c\x40\x90\x4b\xc7\x36\x73",
21792                 .alen   = 32,
21793                 .input  = "\xf5\xc6\x7d\x48\xc1\xb7\xe6\x92"
21794                           "\x97\x5a\xca\xc4\xa9\x6d\xf9\x3d"
21795                           "\x6c\xde\xbc\xf1\x90\xea\x6a\xb2"
21796                           "\x35\x86\x36\xaf\x5c\xfe\x4b\x3a",
21797                 .ilen   = 32,
21798                 .result = "\x83\x6f\x40\x87\x72\xcf\xc1\x13"
21799                           "\xef\xbb\x80\x21\x04\x6c\x58\x09"
21800                           "\x07\x1b\xfc\xdf\xc0\x3f\x5b\xc7"
21801                           "\xe0\x79\xa8\x6e\x71\x7c\x3f\xcf"
21802                           "\x5c\xda\xb2\x33\xe5\x13\xe2\x0d"
21803                           "\x74\xd1\xef\xb5\x0f\x3a\xb5\xf8",
21804                 .rlen   = 48,
21805         }
21806 };
21807
21808 static struct aead_testvec aes_ccm_dec_tv_template[] = {
21809         { /* From RFC 3610 */
21810                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21811                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21812                 .klen   = 16,
21813                 .iv     = "\x01\x00\x00\x00\x03\x02\x01\x00"
21814                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21815                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07",
21816                 .alen   = 8,
21817                 .input  = "\x58\x8c\x97\x9a\x61\xc6\x63\xd2"
21818                           "\xf0\x66\xd0\xc2\xc0\xf9\x89\x80"
21819                           "\x6d\x5f\x6b\x61\xda\xc3\x84\x17"
21820                           "\xe8\xd1\x2c\xfd\xf9\x26\xe0",
21821                 .ilen   = 31,
21822                 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21823                           "\x10\x11\x12\x13\x14\x15\x16\x17"
21824                           "\x18\x19\x1a\x1b\x1c\x1d\x1e",
21825                 .rlen   = 23,
21826         }, {
21827                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21828                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21829                 .klen   = 16,
21830                 .iv     = "\x01\x00\x00\x00\x07\x06\x05\x04"
21831                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21832                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
21833                           "\x08\x09\x0a\x0b",
21834                 .alen   = 12,
21835                 .input  = "\xdc\xf1\xfb\x7b\x5d\x9e\x23\xfb"
21836                           "\x9d\x4e\x13\x12\x53\x65\x8a\xd8"
21837                           "\x6e\xbd\xca\x3e\x51\xe8\x3f\x07"
21838                           "\x7d\x9c\x2d\x93",
21839                 .ilen   = 28,
21840                 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21841                           "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21842                           "\x1c\x1d\x1e\x1f",
21843                 .rlen   = 20,
21844         }, {
21845                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21846                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21847                 .klen   = 16,
21848                 .iv     = "\x01\x00\x00\x00\x0b\x0a\x09\x08"
21849                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21850                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07",
21851                 .alen   = 8,
21852                 .input  = "\x82\x53\x1a\x60\xcc\x24\x94\x5a"
21853                           "\x4b\x82\x79\x18\x1a\xb5\xc8\x4d"
21854                           "\xf2\x1c\xe7\xf9\xb7\x3f\x42\xe1"
21855                           "\x97\xea\x9c\x07\xe5\x6b\x5e\xb1"
21856                           "\x7e\x5f\x4e",
21857                 .ilen   = 35,
21858                 .result = "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
21859                           "\x10\x11\x12\x13\x14\x15\x16\x17"
21860                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
21861                           "\x20",
21862                 .rlen   = 25,
21863         }, {
21864                 .key    = "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
21865                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf",
21866                 .klen   = 16,
21867                 .iv     = "\x01\x00\x00\x00\x0c\x0b\x0a\x09"
21868                           "\xa0\xa1\xa2\xa3\xa4\xa5\x00\x00",
21869                 .assoc  = "\x00\x01\x02\x03\x04\x05\x06\x07"
21870                           "\x08\x09\x0a\x0b",
21871                 .alen   = 12,
21872                 .input  = "\x07\x34\x25\x94\x15\x77\x85\x15"
21873                           "\x2b\x07\x40\x98\x33\x0a\xbb\x14"
21874                           "\x1b\x94\x7b\x56\x6a\xa9\x40\x6b"
21875                           "\x4d\x99\x99\x88\xdd",
21876                 .ilen   = 29,
21877                 .result = "\x0c\x0d\x0e\x0f\x10\x11\x12\x13"
21878                           "\x14\x15\x16\x17\x18\x19\x1a\x1b"
21879                           "\x1c\x1d\x1e",
21880                 .rlen   = 19,
21881         }, {
21882                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21883                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21884                 .klen   = 16,
21885                 .iv     = "\x01\x00\x33\x56\x8e\xf7\xb2\x63"
21886                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21887                 .assoc  = "\x63\x01\x8f\x76\xdc\x8a\x1b\xcb",
21888                 .alen   = 8,
21889                 .input  = "\x4c\xcb\x1e\x7c\xa9\x81\xbe\xfa"
21890                           "\xa0\x72\x6c\x55\xd3\x78\x06\x12"
21891                           "\x98\xc8\x5c\x92\x81\x4a\xbc\x33"
21892                           "\xc5\x2e\xe8\x1d\x7d\x77\xc0\x8a",
21893                 .ilen   = 32,
21894                 .result = "\x90\x20\xea\x6f\x91\xbd\xd8\x5a"
21895                           "\xfa\x00\x39\xba\x4b\xaf\xf9\xbf"
21896                           "\xb7\x9c\x70\x28\x94\x9c\xd0\xec",
21897                 .rlen   = 24,
21898         }, {
21899                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21900                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21901                 .klen   = 16,
21902                 .iv     = "\x01\x00\xd5\x60\x91\x2d\x3f\x70"
21903                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21904                 .assoc  = "\xcd\x90\x44\xd2\xb7\x1f\xdb\x81"
21905                           "\x20\xea\x60\xc0",
21906                 .alen   = 12,
21907                 .input  = "\x00\x97\x69\xec\xab\xdf\x48\x62"
21908                           "\x55\x94\xc5\x92\x51\xe6\x03\x57"
21909                           "\x22\x67\x5e\x04\xc8\x47\x09\x9e"
21910                           "\x5a\xe0\x70\x45\x51",
21911                 .ilen   = 29,
21912                 .result = "\x64\x35\xac\xba\xfb\x11\xa8\x2e"
21913                           "\x2f\x07\x1d\x7c\xa4\xa5\xeb\xd9"
21914                           "\x3a\x80\x3b\xa8\x7f",
21915                 .rlen   = 21,
21916         }, {
21917                 .key    = "\xd7\x82\x8d\x13\xb2\xb0\xbd\xc3"
21918                           "\x25\xa7\x62\x36\xdf\x93\xcc\x6b",
21919                 .klen   = 16,
21920                 .iv     = "\x01\x00\x42\xff\xf8\xf1\x95\x1c"
21921                           "\x3c\x96\x96\x76\x6c\xfa\x00\x00",
21922                 .assoc  = "\xd8\x5b\xc7\xe6\x9f\x94\x4f\xb8",
21923                 .alen   = 8,
21924                 .input  = "\xbc\x21\x8d\xaa\x94\x74\x27\xb6"
21925                           "\xdb\x38\x6a\x99\xac\x1a\xef\x23"
21926                           "\xad\xe0\xb5\x29\x39\xcb\x6a\x63"
21927                           "\x7c\xf9\xbe\xc2\x40\x88\x97\xc6"
21928                           "\xba",
21929                 .ilen   = 33,
21930                 .result = "\x8a\x19\xb9\x50\xbc\xf7\x1a\x01"
21931                           "\x8e\x5e\x67\x01\xc9\x17\x87\x65"
21932                           "\x98\x09\xd6\x7d\xbe\xdd\x18",
21933                 .rlen   = 23,
21934         }, {
21935                 /* This is taken from FIPS CAVS. */
21936                 .key    = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
21937                           "\xff\x80\x2e\x48\x7d\x82\xf8\xb9",
21938                 .klen   = 16,
21939                 .iv     = "\x03\xc6\xfb\x7d\x80\x0d\x13\xab"
21940                           "\xd8\xa6\xb2\xd8\x00\x00\x00\x00",
21941                 .alen   = 0,
21942                 .input  = "\xd5\xe8\x93\x9f\xc7\x89\x2e\x2b",
21943                 .ilen   = 8,
21944                 .result = "\x00",
21945                 .rlen   = 0,
21946                 .novrfy = 1,
21947         }, {
21948                 .key    = "\xab\x2f\x8a\x74\xb7\x1c\xd2\xb1"
21949                           "\xff\x80\x2e\x48\x7d\x82\xf8\xb9",
21950                 .klen   = 16,
21951                 .iv     = "\x03\xaf\x94\x87\x78\x35\x82\x81"
21952                           "\x7f\x88\x94\x68\x00\x00\x00\x00",
21953                 .alen   = 0,
21954                 .input  = "\x41\x3c\xb8\x87\x73\xcb\xf3\xf3",
21955                 .ilen   = 8,
21956                 .result = "\x00",
21957                 .rlen   = 0,
21958         }, {
21959                 .key    = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
21960                           "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8",
21961                 .klen   = 16,
21962                 .iv     = "\x03\xc6\xfb\x7d\x80\x0d\x13\xab"
21963                           "\xd8\xa6\xb2\xd8\x00\x00\x00\x00",
21964                 .assoc  = "\xf3\x94\x87\x78\x35\x82\x81\x7f"
21965                           "\x88\x94\x68\xb1\x78\x6b\x2b\xd6"
21966                           "\x04\x1f\x4e\xed\x78\xd5\x33\x66"
21967                           "\xd8\x94\x99\x91\x81\x54\x62\x57",
21968                 .alen   = 32,
21969                 .input  = "\xf0\x7c\x29\x02\xae\x1c\x2f\x55"
21970                           "\xd0\xd1\x3d\x1a\xa3\x6d\xe4\x0a"
21971                           "\x86\xb0\x87\x6b\x62\x33\x8c\x34"
21972                           "\xce\xab\x57\xcc\x79\x0b\xe0\x6f"
21973                           "\x5c\x3e\x48\x1f\x6c\x46\xf7\x51"
21974                           "\x8b\x84\x83\x2a\xc1\x05\xb8\xc5",
21975                 .ilen   = 48,
21976                 .result = "\x50\x82\x3e\x07\xe2\x1e\xb6\xfb"
21977                           "\x33\xe4\x73\xce\xd2\xfb\x95\x79"
21978                           "\xe8\xb4\xb5\x77\x11\x10\x62\x6f"
21979                           "\x6a\x82\xd1\x13\xec\xf5\xd0\x48",
21980                 .rlen   = 32,
21981                 .novrfy = 1,
21982         }, {
21983                 .key    = "\x61\x0e\x8c\xae\xe3\x23\xb6\x38"
21984                           "\x76\x1c\xf6\x3a\x67\xa3\x9c\xd8",
21985                 .klen   = 16,
21986                 .iv     = "\x03\x05\xe0\xc9\x0f\xed\x34\xea"
21987                           "\x97\xd4\x3b\xdf\x00\x00\x00\x00",
21988                 .assoc  = "\x49\x5c\x50\x1f\x1d\x94\xcc\x81"
21989                           "\xba\xb7\xb6\x03\xaf\xa5\xc1\xa1"
21990                           "\xd8\x5c\x42\x68\xe0\x6c\xda\x89"
21991                           "\x05\xac\x56\xac\x1b\x2a\xd3\x86",
21992                 .alen   = 32,
21993                 .input  = "\x39\xbe\x7d\x15\x62\x77\xf3\x3c"
21994                           "\xad\x83\x52\x6d\x71\x03\x25\x1c"
21995                           "\xed\x81\x3a\x9a\x16\x7d\x19\x80"
21996                           "\x72\x04\x72\xd0\xf6\xff\x05\x0f"
21997                           "\xb7\x14\x30\x00\x32\x9e\xa0\xa6"
21998                           "\x9e\x5a\x18\xa1\xb8\xfe\xdb\xd3",
21999                 .ilen   = 48,
22000                 .result = "\x75\x05\xbe\xc2\xd9\x1e\xde\x60"
22001                           "\x47\x3d\x8c\x7d\xbd\xb5\xd9\xb7"
22002                           "\xf2\xae\x61\x05\x8f\x82\x24\x3f"
22003                           "\x9c\x67\x91\xe1\x38\x4f\xe4\x0c",
22004                 .rlen   = 32,
22005         }, {
22006                 .key    = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
22007                           "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
22008                           "\xa4\x48\x93\x39\x26\x71\x4a\xc6",
22009                 .klen   = 24,
22010                 .iv     = "\x03\xee\x49\x83\xe9\xa9\xff\xe9"
22011                           "\x57\xba\xfd\x9e\x00\x00\x00\x00",
22012                 .assoc  = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
22013                           "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
22014                           "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
22015                           "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
22016                 .alen   = 32,
22017                 .input  = "\x71\x99\xfa\xf4\x44\x12\x68\x9b",
22018                 .ilen   = 8,
22019                 .result = "\x00",
22020                 .rlen   = 0,
22021         }, {
22022                 .key    = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22023                           "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
22024                           "\x29\xa0\xba\x9e\x48\x78\xd1\xba",
22025                 .klen   = 24,
22026                 .iv     = "\x03\xee\x49\x83\xe9\xa9\xff\xe9"
22027                           "\x57\xba\xfd\x9e\x00\x00\x00\x00",
22028                 .assoc  = "\x44\xa6\x2c\x05\xe9\xe1\x43\xb1"
22029                           "\x58\x7c\xf2\x5c\x6d\x39\x0a\x64"
22030                           "\xa4\xf0\x13\x05\xd1\x77\x99\x67"
22031                           "\x11\xc4\xc6\xdb\x00\x56\x36\x61",
22032                 .alen   = 32,
22033                 .input  = "\xfb\xe5\x5d\x34\xbe\xe5\xe8\xe7"
22034                           "\x5a\xef\x2f\xbf\x1f\x7f\xd4\xb2"
22035                           "\x66\xca\x61\x1e\x96\x7a\x61\xb3"
22036                           "\x1c\x16\x45\x52\xba\x04\x9c\x9f"
22037                           "\xb1\xd2\x40\xbc\x52\x7c\x6f\xb1",
22038                 .ilen   = 40,
22039                 .result = "\x85\x34\x66\x42\xc8\x92\x0f\x36"
22040                           "\x58\xe0\x6b\x91\x3c\x98\x5c\xbb"
22041                           "\x0a\x85\xcc\x02\xad\x7a\x96\xe9"
22042                           "\x65\x43\xa4\xc3\x0f\xdc\x55\x81",
22043                 .rlen   = 32,
22044         }, {
22045                 .key    = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22046                           "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
22047                           "\x29\xa0\xba\x9e\x48\x78\xd1\xba",
22048                 .klen   = 24,
22049                 .iv     = "\x03\xd1\xfc\x57\x9c\xfe\xb8\x9c"
22050                           "\xad\x71\xaa\x1f\x00\x00\x00\x00",
22051                 .assoc  = "\x86\x67\xa5\xa9\x14\x5f\x0d\xc6"
22052                           "\xff\x14\xc7\x44\xbf\x6c\x3a\xc3"
22053                           "\xff\xb6\x81\xbd\xe2\xd5\x06\xc7"
22054                           "\x3c\xa1\x52\x13\x03\x8a\x23\x3a",
22055                 .alen   = 32,
22056                 .input  = "\x3f\x66\xb0\x9d\xe5\x4b\x38\x00"
22057                           "\xc6\x0e\x6e\xe5\xd6\x98\xa6\x37"
22058                           "\x8c\x26\x33\xc6\xb2\xa2\x17\xfa"
22059                           "\x64\x19\xc0\x30\xd7\xfc\x14\x6b"
22060                           "\xe3\x33\xc2\x04\xb0\x37\xbe\x3f"
22061                           "\xa9\xb4\x2d\x68\x03\xa3\x44\xef",
22062                 .ilen   = 48,
22063                 .result = "\x02\x87\x4d\x28\x80\x6e\xb2\xed"
22064                           "\x99\x2a\xa8\xca\x04\x25\x45\x90"
22065                           "\x1d\xdd\x5a\xd9\xe4\xdb\x9c\x9c"
22066                           "\x49\xe9\x01\xfe\xa7\x80\x6d\x6b",
22067                 .rlen   = 32,
22068                 .novrfy = 1,
22069         }, {
22070                 .key    = "\xa4\x4b\x54\x29\x0a\xb8\x6d\x01"
22071                           "\x5b\x80\x2a\xcf\x25\xc4\xb7\x5c"
22072                           "\x20\x2c\xad\x30\xc2\x2b\x41\xfb"
22073                           "\x0e\x85\xbc\x33\xad\x0f\x2b\xff",
22074                 .klen   = 32,
22075                 .iv     = "\x03\xee\x49\x83\xe9\xa9\xff\xe9"
22076                           "\x57\xba\xfd\x9e\x00\x00\x00\x00",
22077                 .alen   = 0,
22078                 .input  = "\x1f\xb8\x8f\xa3\xdd\x54\x00\xf2",
22079                 .ilen   = 8,
22080                 .result = "\x00",
22081                 .rlen   = 0,
22082         }, {
22083                 .key    = "\x39\xbb\xa7\xbe\x59\x97\x9e\x73"
22084                           "\xa2\xbc\x6b\x98\xd7\x75\x7f\xe3"
22085                           "\xa4\x48\x93\x39\x26\x71\x4a\xc6"
22086                           "\xae\x8f\x11\x4c\xc2\x9c\x4a\xbb",
22087                 .klen   = 32,
22088                 .iv     = "\x03\x85\x34\x66\x42\xc8\x92\x0f"
22089                           "\x36\x58\xe0\x6b\x00\x00\x00\x00",
22090                 .alen   = 0,
22091                 .input  = "\x48\x01\x5e\x02\x24\x04\x66\x47"
22092                           "\xa1\xea\x6f\xaf\xe8\xfc\xfb\xdd"
22093                           "\xa5\xa9\x87\x8d\x84\xee\x2e\x77"
22094                           "\xbb\x86\xb9\xf5\x5c\x6c\xff\xf6"
22095                           "\x72\xc3\x8e\xf7\x70\xb1\xb2\x07"
22096                           "\xbc\xa8\xa3\xbd\x83\x7c\x1d\x2a",
22097                 .ilen   = 48,
22098                 .result = "\xdc\x56\xf2\x71\xb0\xb1\xa0\x6c"
22099                           "\xf0\x97\x3a\xfb\x6d\xe7\x32\x99"
22100                           "\x3e\xaf\x70\x5e\xb2\x4d\xea\x39"
22101                           "\x89\xd4\x75\x7a\x63\xb1\xda\x93",
22102                 .rlen   = 32,
22103                 .novrfy = 1,
22104         }, {
22105                 .key    = "\x58\x5d\xa0\x96\x65\x1a\x04\xd7"
22106                           "\x96\xe5\xc5\x68\xaa\x95\x35\xe0"
22107                           "\x29\xa0\xba\x9e\x48\x78\xd1\xba"
22108                           "\x0d\x1a\x53\x3b\xb5\xe3\xf8\x8b",
22109                 .klen   = 32,
22110                 .iv     = "\x03\xcf\x76\x3f\xd9\x95\x75\x8f"
22111                           "\x44\x89\x40\x7b\x00\x00\x00\x00",
22112                 .assoc  = "\x8f\x86\x6c\x4d\x1d\xc5\x39\x88"
22113                           "\xc8\xf3\x5c\x52\x10\x63\x6f\x2b"
22114                           "\x8a\x2a\xc5\x6f\x30\x23\x58\x7b"
22115                           "\xfb\x36\x03\x11\xb4\xd9\xf2\xfe",
22116                 .alen   = 32,
22117                 .input  = "\x48\x58\xd6\xf3\xad\x63\x58\xbf"
22118                           "\xae\xc7\x5e\xae\x83\x8f\x7b\xe4"
22119                           "\x78\x5c\x4c\x67\x71\x89\x94\xbf"
22120                           "\x47\xf1\x63\x7e\x1c\x59\xbd\xc5"
22121                           "\x7f\x44\x0a\x0c\x01\x18\x07\x92"
22122                           "\xe1\xd3\x51\xce\x32\x6d\x0c\x5b",
22123                 .ilen   = 48,
22124                 .result = "\xc2\x54\xc8\xde\x78\x87\x77\x40"
22125                           "\x49\x71\xe4\xb7\xe7\xcb\x76\x61"
22126                           "\x0a\x41\xb9\xe9\xc0\x76\x54\xab"
22127                           "\x04\x49\x3b\x19\x93\x57\x25\x5d",
22128                 .rlen   = 32,
22129         },
22130 };
22131
22132 /*
22133  * rfc4309 refers to section 8 of rfc3610 for test vectors, but they all
22134  * use a 13-byte nonce, we only support an 11-byte nonce.  Worse,
22135  * they use AD lengths which are not valid ESP header lengths.
22136  *
22137  * These vectors are copied/generated from the ones for rfc4106 with
22138  * the key truncated by one byte..
22139  */
22140 static struct aead_testvec aes_ccm_rfc4309_enc_tv_template[] = {
22141         { /* Generated using Crypto++ */
22142                 .key    = zeroed_string,
22143                 .klen   = 19,
22144                 .iv     = zeroed_string,
22145                 .input  = zeroed_string,
22146                 .ilen   = 16,
22147                 .assoc  = zeroed_string,
22148                 .alen   = 16,
22149                 .result = "\x2E\x9A\xCA\x6B\xDA\x54\xFC\x6F"
22150                           "\x12\x50\xE8\xDE\x81\x3C\x63\x08"
22151                           "\x1A\x22\xBA\x75\xEE\xD4\xD5\xB5"
22152                           "\x27\x50\x01\xAC\x03\x33\x39\xFB",
22153                 .rlen   = 32,
22154         },{
22155                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22156                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22157                           "\x00\x00\x00",
22158                 .klen   = 19,
22159                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01",
22160                 .input  = zeroed_string,
22161                 .ilen   = 16,
22162                 .assoc  = "\x00\x00\x00\x00\x00\x00\x00\x00"
22163                           "\x00\x00\x00\x00\x00\x00\x00\x01",
22164                 .alen   = 16,
22165                 .result = "\xCF\xB9\x99\x17\xC8\x86\x0E\x7F"
22166                           "\x7E\x76\xF8\xE6\xF8\xCC\x1F\x17"
22167                           "\x6A\xE0\x53\x9F\x4B\x73\x7E\xDA"
22168                           "\x08\x09\x4E\xC4\x1E\xAD\xC6\xB0",
22169                 .rlen   = 32,
22170
22171         }, {
22172                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22173                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22174                           "\x00\x00\x00",
22175                 .klen   = 19,
22176                 .iv     = zeroed_string,
22177                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
22178                           "\x01\x01\x01\x01\x01\x01\x01\x01",
22179                 .ilen   = 16,
22180                 .assoc  = zeroed_string,
22181                 .alen   = 16,
22182                 .result = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22183                           "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22184                           "\xA1\xE2\xC2\x42\x2B\x81\x70\x40"
22185                           "\xFD\x7F\x76\xD1\x03\x07\xBB\x0C",
22186                 .rlen   = 32,
22187         }, {
22188                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22189                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22190                           "\x00\x00\x00",
22191                 .klen   = 19,
22192                 .iv     = zeroed_string,
22193                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
22194                           "\x01\x01\x01\x01\x01\x01\x01\x01",
22195                 .ilen   = 16,
22196                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01"
22197                           "\x00\x00\x00\x00\x00\x00\x00\x00",
22198                 .alen   = 16,
22199                 .result = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22200                           "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22201                           "\x5B\xC0\x73\xE0\x2B\x73\x68\xC9"
22202                           "\x2D\x8C\x58\xC2\x90\x3D\xB0\x3E",
22203                 .rlen   = 32,
22204         }, {
22205                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22206                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22207                           "\x00\x00\x00",
22208                 .klen   = 19,
22209                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01",
22210                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
22211                           "\x01\x01\x01\x01\x01\x01\x01\x01",
22212                 .ilen   = 16,
22213                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01"
22214                           "\x00\x00\x00\x00\x00\x00\x00\x01",
22215                 .alen   = 16,
22216                 .result = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22217                           "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22218                           "\x43\x8E\x76\x57\x3B\xB4\x05\xE8"
22219                           "\xA9\x9B\xBF\x25\xE0\x4F\xC0\xED",
22220                 .rlen   = 32,
22221         }, {
22222                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22223                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22224                           "\x00\x00\x00",
22225                 .klen   = 19,
22226                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01",
22227                 .input  = "\x01\x01\x01\x01\x01\x01\x01\x01"
22228                           "\x01\x01\x01\x01\x01\x01\x01\x01"
22229                           "\x01\x01\x01\x01\x01\x01\x01\x01"
22230                           "\x01\x01\x01\x01\x01\x01\x01\x01"
22231                           "\x01\x01\x01\x01\x01\x01\x01\x01"
22232                           "\x01\x01\x01\x01\x01\x01\x01\x01"
22233                           "\x01\x01\x01\x01\x01\x01\x01\x01"
22234                           "\x01\x01\x01\x01\x01\x01\x01\x01",
22235                 .ilen   = 64,
22236                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01"
22237                           "\x00\x00\x00\x00\x00\x00\x00\x01",
22238                 .alen   = 16,
22239                 .result = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22240                           "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22241                           "\x9C\xA4\x97\x83\x3F\x01\xA5\xF4"
22242                           "\x43\x09\xE7\xB8\xE9\xD1\xD7\x02"
22243                           "\x9B\xAB\x39\x18\xEB\x94\x34\x36"
22244                           "\xE6\xC5\xC8\x9B\x00\x81\x9E\x49"
22245                           "\x1D\x78\xE1\x48\xE3\xE9\xEA\x8E"
22246                           "\x3A\x2B\x67\x5D\x35\x6A\x0F\xDB"
22247                           "\x02\x73\xDD\xE7\x30\x4A\x30\x54"
22248                           "\x1A\x9D\x09\xCA\xC8\x1C\x32\x5F",
22249                 .rlen   = 80,
22250         }, {
22251                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
22252                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22253                           "\x00\x00\x00",
22254                 .klen   = 19,
22255                 .iv     = "\x00\x00\x45\x67\x89\xab\xcd\xef",
22256                 .input  = "\xff\xff\xff\xff\xff\xff\xff\xff"
22257                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22258                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22259                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22260                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22261                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22262                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22263                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22264                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22265                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22266                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22267                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22268                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22269                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22270                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22271                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22272                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22273                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22274                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22275                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22276                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22277                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22278                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22279                           "\xff\xff\xff\xff\xff\xff\xff\xff",
22280                 .ilen   = 192,
22281                 .assoc  = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
22282                           "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
22283                           "\x89\xab\xcd\xef",
22284                 .alen   = 20,
22285                 .result = "\x64\x17\xDC\x24\x9D\x92\xBA\x5E"
22286                           "\x7C\x64\x6D\x33\x46\x77\xAC\xB1"
22287                           "\x5C\x9E\xE2\xC7\x27\x11\x3E\x95"
22288                           "\x7D\xBE\x28\xC8\xC1\xCA\x5E\x8C"
22289                           "\xB4\xE2\xDE\x9F\x53\x59\x26\xDB"
22290                           "\x0C\xD4\xE4\x07\x9A\xE6\x3E\x01"
22291                           "\x58\x0D\x3E\x3D\xD5\x21\xEB\x04"
22292                           "\x06\x9D\x5F\xB9\x02\x49\x1A\x2B"
22293                           "\xBA\xF0\x4E\x3B\x85\x50\x5B\x09"
22294                           "\xFE\xEC\xFC\x54\xEC\x0C\xE2\x79"
22295                           "\x8A\x2F\x5F\xD7\x05\x5D\xF1\x6D"
22296                           "\x22\xEB\xD1\x09\x80\x3F\x5A\x70"
22297                           "\xB2\xB9\xD3\x63\x99\xC2\x4D\x1B"
22298                           "\x36\x12\x00\x89\xAA\x5D\x55\xDA"
22299                           "\x1D\x5B\xD8\x3C\x5F\x09\xD2\xE6"
22300                           "\x39\x41\x5C\xF0\xBE\x26\x4E\x5F"
22301                           "\x2B\x50\x44\x52\xC2\x10\x7D\x38"
22302                           "\x82\x64\x83\x0C\xAE\x49\xD0\xE5"
22303                           "\x4F\xE5\x66\x4C\x58\x7A\xEE\x43"
22304                           "\x3B\x51\xFE\xBA\x24\x8A\xFE\xDC"
22305                           "\x19\x6D\x60\x66\x61\xF9\x9A\x3F"
22306                           "\x75\xFC\x38\x53\x5B\xB5\xCD\x52"
22307                           "\x4F\xE5\xE4\xC9\xFE\x10\xCB\x98"
22308                           "\xF0\x06\x5B\x07\xAB\xBB\xF4\x0E"
22309                           "\x2D\xC2\xDD\x5D\xDD\x22\x9A\xCC"
22310                           "\x39\xAB\x63\xA5\x3D\x9C\x51\x8A",
22311                 .rlen   = 208,
22312         }, { /* From draft-mcgrew-gcm-test-01 */
22313                 .key    = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
22314                           "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
22315                           "\x2E\x44\x3B",
22316                 .klen   = 19,
22317                 .iv     = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
22318                 .input  = "\x45\x00\x00\x48\x69\x9A\x00\x00"
22319                           "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
22320                           "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
22321                           "\x38\xD3\x01\x00\x00\x01\x00\x00"
22322                           "\x00\x00\x00\x00\x04\x5F\x73\x69"
22323                           "\x70\x04\x5F\x75\x64\x70\x03\x73"
22324                           "\x69\x70\x09\x63\x79\x62\x65\x72"
22325                           "\x63\x69\x74\x79\x02\x64\x6B\x00"
22326                           "\x00\x21\x00\x01\x01\x02\x02\x01",
22327                 .ilen   = 72,
22328                 .assoc  = "\x00\x00\x43\x21\x87\x65\x43\x21"
22329                           "\x00\x00\x00\x00\x49\x56\xED\x7E"
22330                           "\x3B\x24\x4C\xFE",
22331                 .alen   = 20,
22332                 .result = "\x89\xBA\x3E\xEF\xE6\xD6\xCF\xDB"
22333                           "\x83\x60\xF5\xBA\x3A\x56\x79\xE6"
22334                           "\x7E\x0C\x53\xCF\x9E\x87\xE0\x4E"
22335                           "\x1A\x26\x01\x24\xC7\x2E\x3D\xBF"
22336                           "\x29\x2C\x91\xC1\xB8\xA8\xCF\xE0"
22337                           "\x39\xF8\x53\x6D\x31\x22\x2B\xBF"
22338                           "\x98\x81\xFC\x34\xEE\x85\x36\xCD"
22339                           "\x26\xDB\x6C\x7A\x0C\x77\x8A\x35"
22340                           "\x18\x85\x54\xB2\xBC\xDD\x3F\x43"
22341                           "\x61\x06\x8A\xDF\x86\x3F\xB4\xAC"
22342                           "\x97\xDC\xBD\xFD\x92\x10\xC5\xFF",
22343                 .rlen   = 88,
22344         }, {
22345                 .key    = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22346                           "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
22347                           "\xCA\xFE\xBA",
22348                 .klen   = 19,
22349                 .iv     = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22350                 .input  = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
22351                           "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
22352                           "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
22353                           "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
22354                           "\x00\x01\x00\x00\x00\x00\x00\x00"
22355                           "\x03\x73\x69\x70\x09\x63\x79\x62"
22356                           "\x65\x72\x63\x69\x74\x79\x02\x64"
22357                           "\x6B\x00\x00\x01\x00\x01\x00\x01",
22358                 .ilen   = 64,
22359                 .assoc  = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
22360                           "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22361                 .alen   = 16,
22362                 .result = "\x4B\xC2\x70\x60\x64\xD2\xF3\xC8"
22363                           "\xE5\x26\x8A\xDE\xB8\x7E\x7D\x16"
22364                           "\x56\xC7\xD2\x88\xBA\x8D\x58\xAF"
22365                           "\xF5\x71\xB6\x37\x84\xA7\xB1\x99"
22366                           "\x51\x5C\x0D\xA0\x27\xDE\xE7\x2D"
22367                           "\xEF\x25\x88\x1F\x1D\x77\x11\xFF"
22368                           "\xDB\xED\xEE\x56\x16\xC5\x5C\x9B"
22369                           "\x00\x62\x1F\x68\x4E\x7C\xA0\x97"
22370                           "\x10\x72\x7E\x53\x13\x3B\x68\xE4"
22371                           "\x30\x99\x91\x79\x09\xEA\xFF\x6A",
22372                 .rlen   = 80,
22373         }, {
22374                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22375                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22376                           "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22377                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22378                           "\x11\x22\x33",
22379                 .klen   = 35,
22380                 .iv     = "\x01\x02\x03\x04\x05\x06\x07\x08",
22381                 .input  = "\x45\x00\x00\x30\x69\xA6\x40\x00"
22382                           "\x80\x06\x26\x90\xC0\xA8\x01\x02"
22383                           "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
22384                           "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
22385                           "\x70\x02\x40\x00\x20\xBF\x00\x00"
22386                           "\x02\x04\x05\xB4\x01\x01\x04\x02"
22387                           "\x01\x02\x02\x01",
22388                 .ilen   = 52,
22389                 .assoc  = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
22390                           "\x01\x02\x03\x04\x05\x06\x07\x08",
22391                 .alen   = 16,
22392                 .result = "\xD6\x31\x0D\x2B\x3D\x6F\xBD\x2F"
22393                           "\x58\x41\x7E\xFF\x9A\x9E\x09\xB4"
22394                           "\x1A\xF7\xF6\x42\x31\xCD\xBF\xAD"
22395                           "\x27\x0E\x2C\xF2\xDB\x10\xDF\x55"
22396                           "\x8F\x0D\xD7\xAC\x23\xBD\x42\x10"
22397                           "\xD0\xB2\xAF\xD8\x37\xAC\x6B\x0B"
22398                           "\x11\xD4\x0B\x12\xEC\xB4\xB1\x92"
22399                           "\x23\xA6\x10\xB0\x26\xD6\xD9\x26"
22400                           "\x5A\x48\x6A\x3E",
22401                 .rlen   = 68,
22402         }, {
22403                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
22404                           "\x00\x00\x00\x00\x00\x00\x00\x00"
22405                           "\x00\x00\x00",
22406                 .klen   = 19,
22407                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
22408                 .input  = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
22409                           "\x80\x01\xCB\x7A\x40\x67\x93\x18"
22410                           "\x01\x01\x01\x01\x08\x00\x07\x5C"
22411                           "\x02\x00\x44\x00\x61\x62\x63\x64"
22412                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22413                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22414                           "\x75\x76\x77\x61\x62\x63\x64\x65"
22415                           "\x66\x67\x68\x69\x01\x02\x02\x01",
22416                 .ilen   = 64,
22417                 .assoc  = "\x00\x00\x00\x00\x00\x00\x00\x01"
22418                           "\x00\x00\x00\x00\x00\x00\x00\x00",
22419                 .alen   = 16,
22420                 .result = "\x6B\x9A\xCA\x57\x43\x91\xFC\x6F"
22421                           "\x92\x51\x23\xA4\xC1\x5B\xF0\x10"
22422                           "\xF3\x13\xF4\xF8\xA1\x9A\xB4\xDC"
22423                           "\x89\xC8\xF8\x42\x62\x95\xB7\xCB"
22424                           "\xB8\xF5\x0F\x1B\x2E\x94\xA2\xA7"
22425                           "\xBF\xFB\x8A\x92\x13\x63\xD1\x3C"
22426                           "\x08\xF5\xE8\xA6\xAA\xF6\x34\xF9"
22427                           "\x42\x05\xAF\xB3\xE7\x9A\xFC\xEE"
22428                           "\x36\x25\xC1\x10\x12\x1C\xCA\x82"
22429                           "\xEA\xE6\x63\x5A\x57\x28\xA9\x9A",
22430                 .rlen   = 80,
22431         }, {
22432                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22433                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22434                           "\x57\x69\x0E",
22435                 .klen   = 19,
22436                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22437                 .input  = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
22438                           "\x80\x01\xCB\x7C\x40\x67\x93\x18"
22439                           "\x01\x01\x01\x01\x08\x00\x08\x5C"
22440                           "\x02\x00\x43\x00\x61\x62\x63\x64"
22441                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22442                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22443                           "\x75\x76\x77\x61\x62\x63\x64\x65"
22444                           "\x66\x67\x68\x69\x01\x02\x02\x01",
22445                 .ilen   = 64,
22446                 .assoc  = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
22447                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
22448                           "\xA2\xFC\xA1\xA3",
22449                 .alen   = 20,
22450                 .result = "\x6A\x6B\x45\x2B\x7C\x67\x52\xF6"
22451                           "\x10\x60\x40\x62\x6B\x4F\x97\x8E"
22452                           "\x0B\xB2\x22\x97\xCB\x21\xE0\x90"
22453                           "\xA2\xE7\xD1\x41\x30\xE4\x4B\x1B"
22454                           "\x79\x01\x58\x50\x01\x06\xE1\xE0"
22455                           "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
22456                           "\x30\xB8\xE5\xDF\xD7\x12\x56\x75"
22457                           "\xD0\x95\xB7\xB8\x91\x42\xF7\xFD"
22458                           "\x97\x57\xCA\xC1\x20\xD0\x86\xB9"
22459                           "\x66\x9D\xB4\x2B\x96\x22\xAC\x67",
22460                 .rlen   = 80,
22461         }, {
22462                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22463                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22464                           "\x57\x69\x0E",
22465                 .klen   = 19,
22466                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22467                 .input  = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
22468                           "\x80\x01\x44\x1F\x40\x67\x93\xB6"
22469                           "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
22470                           "\x01\x02\x02\x01",
22471                 .ilen   = 28,
22472                 .assoc  = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
22473                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
22474                           "\xA2\xFC\xA1\xA3",
22475                 .alen   = 20,
22476                 .result = "\x6A\x6B\x45\x0B\xA7\x06\x52\xF6"
22477                           "\x10\x60\xCF\x01\x6B\x4F\x97\x20"
22478                           "\xEA\xB3\x23\x94\xC9\x21\x1D\x33"
22479                           "\xA1\xE5\x90\x40\x05\x37\x45\x70"
22480                           "\xB5\xD6\x09\x0A\x23\x73\x33\xF9"
22481                           "\x08\xB4\x22\xE4",
22482                 .rlen   = 44,
22483         }, {
22484                 .key    = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22485                           "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
22486                           "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22487                           "\xCA\xFE\xBA",
22488                 .klen   = 27,
22489                 .iv     = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22490                 .input  = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
22491                           "\x40\x06\x78\x80\x0A\x01\x03\x8F"
22492                           "\x0A\x01\x06\x12\x80\x23\x06\xB8"
22493                           "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
22494                           "\x50\x10\x16\xD0\x75\x68\x00\x01",
22495                 .ilen   = 40,
22496                 .assoc  = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
22497                           "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22498                 .alen   = 16,
22499                 .result = "\x05\x22\x15\xD1\x52\x56\x85\x04"
22500                           "\xA8\x5C\x5D\x6D\x7E\x6E\xF5\xFA"
22501                           "\xEA\x16\x37\x50\xF3\xDF\x84\x3B"
22502                           "\x2F\x32\x18\x57\x34\x2A\x8C\x23"
22503                           "\x67\xDF\x6D\x35\x7B\x54\x0D\xFB"
22504                           "\x34\xA5\x9F\x6C\x48\x30\x1E\x22"
22505                           "\xFE\xB1\x22\x17\x17\x8A\xB9\x5B",
22506                 .rlen   = 56,
22507         }, {
22508                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22509                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22510                           "\xDE\xCA\xF8",
22511                 .klen   = 19,
22512                 .iv     = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
22513                 .input  = "\x45\x00\x00\x49\x33\xBA\x00\x00"
22514                           "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
22515                           "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
22516                           "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
22517                           "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
22518                           "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
22519                           "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
22520                           "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
22521                           "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
22522                           "\x23\x01\x01\x01",
22523                 .ilen   = 76,
22524                 .assoc  = "\x00\x00\x01\x00\x00\x00\x00\x00"
22525                           "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
22526                           "\xCE\xFA\xCE\x74",
22527                 .alen   = 20,
22528                 .result = "\x92\xD0\x53\x79\x33\x38\xD5\xF3"
22529                           "\x7D\xE4\x7A\x8E\x86\x03\xC9\x90"
22530                           "\x96\x35\xAB\x9C\xFB\xE8\xA3\x76"
22531                           "\xE9\xE9\xE2\xD1\x2E\x11\x0E\x00"
22532                           "\xFA\xCE\xB5\x9E\x02\xA7\x7B\xEA"
22533                           "\x71\x9A\x58\xFB\xA5\x8A\xE1\xB7"
22534                           "\x9C\x39\x9D\xE3\xB5\x6E\x69\xE6"
22535                           "\x63\xC9\xDB\x05\x69\x51\x12\xAD"
22536                           "\x3E\x00\x32\x73\x86\xF2\xEE\xF5"
22537                           "\x0F\xE8\x81\x7E\x84\xD3\xC0\x0D"
22538                           "\x76\xD6\x55\xC6\xB4\xC2\x34\xC7"
22539                           "\x12\x25\x0B\xF9",
22540                 .rlen   = 92,
22541         }, {
22542                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22543                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22544                           "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22545                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22546                           "\x73\x61\x6C",
22547                 .klen   = 35,
22548                 .iv     = "\x61\x6E\x64\x01\x69\x76\x65\x63",
22549                 .input  = "\x45\x08\x00\x28\x73\x2C\x00\x00"
22550                           "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
22551                           "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
22552                           "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
22553                           "\x50\x10\x1F\x64\x6D\x54\x00\x01",
22554                 .ilen   = 40,
22555                 .assoc  = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
22556                           "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
22557                           "\x69\x76\x65\x63",
22558                 .alen   = 20,
22559                 .result = "\xCC\x74\xB7\xD3\xB0\x38\x50\x42"
22560                           "\x2C\x64\x87\x46\x1E\x34\x10\x05"
22561                           "\x29\x6B\xBB\x36\xE9\x69\xAD\x92"
22562                           "\x82\xA1\x10\x6A\xEB\x0F\xDC\x7D"
22563                           "\x08\xBA\xF3\x91\xCA\xAA\x61\xDA"
22564                           "\x62\xF4\x14\x61\x5C\x9D\xB5\xA7"
22565                           "\xEE\xD7\xB9\x7E\x87\x99\x9B\x7D",
22566                 .rlen   = 56,
22567         }, {
22568                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22569                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22570                           "\x57\x69\x0E",
22571                 .klen   = 19,
22572                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22573                 .input  = "\x45\x00\x00\x49\x33\x3E\x00\x00"
22574                           "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
22575                           "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
22576                           "\x00\x35\xCB\x45\x80\x03\x02\x5B"
22577                           "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
22578                           "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
22579                           "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
22580                           "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
22581                           "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
22582                           "\x15\x01\x01\x01",
22583                 .ilen   = 76,
22584                 .assoc  = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
22585                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
22586                           "\xA2\xFC\xA1\xA3",
22587                 .alen   = 20,
22588                 .result = "\x6A\x6B\x45\x5E\xD6\x9A\x52\xF6"
22589                           "\xEF\x70\x1A\x9C\xE8\xD3\x19\x86"
22590                           "\xC8\x02\xF0\xB0\x03\x09\xD9\x02"
22591                           "\xA0\xD2\x59\x04\xD1\x85\x2A\x24"
22592                           "\x1C\x67\x3E\xD8\x68\x72\x06\x94"
22593                           "\x97\xBA\x4F\x76\x8D\xB0\x44\x5B"
22594                           "\x69\xBF\xD5\xE2\x3D\xF1\x0B\x0C"
22595                           "\xC0\xBF\xB1\x8F\x70\x09\x9E\xCE"
22596                           "\xA5\xF2\x55\x58\x84\xFA\xF9\xB5"
22597                           "\x23\xF4\x84\x40\x74\x14\x8A\x6B"
22598                           "\xDB\xD7\x67\xED\xA4\x93\xF3\x47"
22599                           "\xCC\xF7\x46\x6F",
22600                 .rlen   = 92,
22601         }, {
22602                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22603                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22604                           "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22605                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22606                           "\x73\x61\x6C",
22607                 .klen   = 35,
22608                 .iv     = "\x61\x6E\x64\x01\x69\x76\x65\x63",
22609                 .input  = "\x63\x69\x73\x63\x6F\x01\x72\x75"
22610                           "\x6C\x65\x73\x01\x74\x68\x65\x01"
22611                           "\x6E\x65\x74\x77\x65\x01\x64\x65"
22612                           "\x66\x69\x6E\x65\x01\x74\x68\x65"
22613                           "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
22614                           "\x67\x69\x65\x73\x01\x74\x68\x61"
22615                           "\x74\x77\x69\x6C\x6C\x01\x64\x65"
22616                           "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
22617                           "\x72\x72\x6F\x77\x01\x02\x02\x01",
22618                 .ilen   = 72,
22619                 .assoc  = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
22620                           "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
22621                           "\x69\x76\x65\x63",
22622                 .alen   = 20,
22623                 .result = "\xEA\x15\xC4\x98\xAC\x15\x22\x37"
22624                           "\x00\x07\x1D\xBE\x60\x5D\x73\x16"
22625                           "\x4D\x0F\xCC\xCE\x8A\xD0\x49\xD4"
22626                           "\x39\xA3\xD1\xB1\x21\x0A\x92\x1A"
22627                           "\x2C\xCF\x8F\x9D\xC9\x91\x0D\xB4"
22628                           "\x15\xFC\xBC\xA5\xC5\xBF\x54\xE5"
22629                           "\x1C\xC7\x32\x41\x07\x7B\x2C\xB6"
22630                           "\x5C\x23\x7C\x93\xEA\xEF\x23\x1C"
22631                           "\x73\xF4\xE7\x12\x84\x4C\x37\x0A"
22632                           "\x4A\x8F\x06\x37\x48\xF9\xF9\x05"
22633                           "\x55\x13\x40\xC3\xD5\x55\x3A\x3D",
22634                 .rlen   = 88,
22635         }, {
22636                 .key    = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
22637                           "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
22638                           "\xD9\x66\x42",
22639                 .klen   = 19,
22640                 .iv     = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
22641                 .input  = "\x01\x02\x02\x01",
22642                 .ilen   = 4,
22643                 .assoc  = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
22644                           "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
22645                 .alen   = 16,
22646                 .result = "\x4C\x72\x63\x30\x2F\xE6\x56\xDD"
22647                           "\xD0\xD8\x60\x9D\x8B\xEF\x85\x90"
22648                           "\xF7\x61\x24\x62",
22649                 .rlen   = 20,
22650         }, {
22651                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22652                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22653                           "\xDE\xCA\xF8",
22654                 .klen   = 19,
22655                 .iv     = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
22656                 .input  = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
22657                           "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
22658                           "\x62\x65\x00\x01",
22659                 .ilen   = 20,
22660                 .assoc  = "\x00\x00\x01\x00\x00\x00\x00\x00"
22661                           "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
22662                           "\xCE\xFA\xCE\x74",
22663                 .alen   = 20,
22664                 .result = "\xA3\xBF\x52\x52\x65\x83\xBA\x81"
22665                           "\x03\x9B\x84\xFC\x44\x8C\xBB\x81"
22666                           "\x36\xE1\x78\xBB\xA5\x49\x3A\xD0"
22667                           "\xF0\x6B\x21\xAF\x98\xC0\x34\xDC"
22668                           "\x17\x17\x65\xAD",
22669                 .rlen   = 36,
22670         }, {
22671                 .key    = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
22672                           "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
22673                           "\x61\x61\x6E\x64\x64\x6F\x69\x74"
22674                           "\x62\x65\x66\x6F\x72\x65\x69\x61"
22675                           "\x74\x75\x72",
22676                 .klen   = 35,
22677                 .iv     = "\x33\x30\x21\x69\x67\x65\x74\x6D",
22678                 .input  = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
22679                           "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
22680                           "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
22681                           "\x02\x00\x07\x00\x61\x62\x63\x64"
22682                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22683                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22684                           "\x01\x02\x02\x01",
22685                 .ilen   = 52,
22686                 .assoc  = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
22687                           "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
22688                           "\x67\x65\x74\x6D",
22689                 .alen   = 20,
22690                 .result = "\x96\xFD\x86\xF8\xD1\x98\xFF\x10"
22691                           "\xAB\x8C\xDA\x8A\x5A\x08\x38\x1A"
22692                           "\x48\x59\x80\x18\x1A\x18\x1A\x04"
22693                           "\xC9\x0D\xE3\xE7\x0E\xA4\x0B\x75"
22694                           "\x92\x9C\x52\x5C\x0B\xFB\xF8\xAF"
22695                           "\x16\xC3\x35\xA8\xE7\xCE\x84\x04"
22696                           "\xEB\x40\x6B\x7A\x8E\x75\xBB\x42"
22697                           "\xE0\x63\x4B\x21\x44\xA2\x2B\x2B"
22698                           "\x39\xDB\xC8\xDC",
22699                 .rlen   = 68,
22700         }, {
22701                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
22702                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
22703                           "\x57\x69\x0E",
22704                 .klen   = 19,
22705                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
22706                 .input  = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
22707                           "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
22708                           "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
22709                           "\x02\x00\x07\x00\x61\x62\x63\x64"
22710                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
22711                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
22712                           "\x01\x02\x02\x01",
22713                 .ilen   = 52,
22714                 .assoc  = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
22715                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
22716                           "\xA2\xFC\xA1\xA3",
22717                 .alen   = 20,
22718                 .result = "\x6A\x6B\x45\x27\x3F\x9E\x52\xF6"
22719                           "\x10\x60\x54\x25\xEB\x80\x04\x93"
22720                           "\xCA\x1B\x23\x97\xCB\x21\x2E\x01"
22721                           "\xA2\xE7\x95\x41\x30\xE4\x4B\x1B"
22722                           "\x79\x01\x58\x50\x01\x06\xE1\xE0"
22723                           "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
22724                           "\x44\xCC\x90\xBF\x00\x94\x94\x92"
22725                           "\x20\x17\x0C\x1B\x55\xDE\x7E\x68"
22726                           "\xF4\x95\x5D\x4F",
22727                 .rlen   = 68,
22728         }, {
22729                 .key    = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
22730                           "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
22731                           "\x22\x43\x3C",
22732                 .klen   = 19,
22733                 .iv     = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
22734                 .input  = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
22735                           "\x61\x62\x63\x64\x65\x66\x67\x68"
22736                           "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
22737                           "\x71\x72\x73\x74\x01\x02\x02\x01",
22738                 .ilen   = 32,
22739                 .assoc  = "\x00\x00\x43\x21\x87\x65\x43\x21"
22740                           "\x00\x00\x00\x07\x48\x55\xEC\x7D"
22741                           "\x3A\x23\x4B\xFD",
22742                 .alen   = 20,
22743                 .result = "\x67\xE9\x28\xB3\x1C\xA4\x6D\x02"
22744                           "\xF0\xB5\x37\xB6\x6B\x2F\xF5\x4F"
22745                           "\xF8\xA3\x4C\x53\xB8\x12\x09\xBF"
22746                           "\x58\x7D\xCF\x29\xA3\x41\x68\x6B"
22747                           "\xCE\xE8\x79\x85\x3C\xB0\x3A\x8F"
22748                           "\x16\xB0\xA1\x26\xC9\xBC\xBC\xA6",
22749                 .rlen   = 48,
22750         }
22751 };
22752
22753 static struct aead_testvec aes_ccm_rfc4309_dec_tv_template[]    = {
22754         { /* Generated using Crypto++ */
22755                 .key    = zeroed_string,
22756                 .klen   = 19,
22757                 .iv     = zeroed_string,
22758                 .result = zeroed_string,
22759                 .rlen   = 16,
22760                 .assoc  = zeroed_string,
22761                 .alen   = 16,
22762                 .input  = "\x2E\x9A\xCA\x6B\xDA\x54\xFC\x6F"
22763                           "\x12\x50\xE8\xDE\x81\x3C\x63\x08"
22764                           "\x1A\x22\xBA\x75\xEE\xD4\xD5\xB5"
22765                           "\x27\x50\x01\xAC\x03\x33\x39\xFB",
22766                 .ilen   = 32,
22767         },{
22768                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22769                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22770                           "\x00\x00\x00",
22771                 .klen   = 19,
22772                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01",
22773                 .result = zeroed_string,
22774                 .rlen   = 16,
22775                 .assoc  = "\x00\x00\x00\x00\x00\x00\x00\x00"
22776                           "\x00\x00\x00\x00\x00\x00\x00\x01",
22777                 .alen   = 16,
22778                 .input  = "\xCF\xB9\x99\x17\xC8\x86\x0E\x7F"
22779                           "\x7E\x76\xF8\xE6\xF8\xCC\x1F\x17"
22780                           "\x6A\xE0\x53\x9F\x4B\x73\x7E\xDA"
22781                           "\x08\x09\x4E\xC4\x1E\xAD\xC6\xB0",
22782                 .ilen   = 32,
22783
22784         }, {
22785                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22786                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22787                           "\x00\x00\x00",
22788                 .klen   = 19,
22789                 .iv     = zeroed_string,
22790                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
22791                           "\x01\x01\x01\x01\x01\x01\x01\x01",
22792                 .rlen   = 16,
22793                 .assoc  = zeroed_string,
22794                 .alen   = 16,
22795                 .input  = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22796                           "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22797                           "\xA1\xE2\xC2\x42\x2B\x81\x70\x40"
22798                           "\xFD\x7F\x76\xD1\x03\x07\xBB\x0C",
22799                 .ilen   = 32,
22800         }, {
22801                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22802                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22803                           "\x00\x00\x00",
22804                 .klen   = 19,
22805                 .iv     = zeroed_string,
22806                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
22807                           "\x01\x01\x01\x01\x01\x01\x01\x01",
22808                 .rlen   = 16,
22809                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01"
22810                           "\x00\x00\x00\x00\x00\x00\x00\x00",
22811                 .alen   = 16,
22812                 .input  = "\x33\xDE\x73\xBC\xA6\xCE\x4E\xA6"
22813                           "\x61\xF4\xF5\x41\x03\x4A\xE3\x86"
22814                           "\x5B\xC0\x73\xE0\x2B\x73\x68\xC9"
22815                           "\x2D\x8C\x58\xC2\x90\x3D\xB0\x3E",
22816                 .ilen   = 32,
22817         }, {
22818                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22819                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22820                           "\x00\x00\x00",
22821                 .klen   = 19,
22822                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01",
22823                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
22824                           "\x01\x01\x01\x01\x01\x01\x01\x01",
22825                 .rlen   = 16,
22826                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01"
22827                           "\x00\x00\x00\x00\x00\x00\x00\x01",
22828                 .alen   = 16,
22829                 .input  = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22830                           "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22831                           "\x43\x8E\x76\x57\x3B\xB4\x05\xE8"
22832                           "\xA9\x9B\xBF\x25\xE0\x4F\xC0\xED",
22833                 .ilen   = 32,
22834         }, {
22835                 .key    = "\xfe\xff\xe9\x92\x86\x65\x73\x1c"
22836                           "\x6d\x6a\x8f\x94\x67\x30\x83\x08"
22837                           "\x00\x00\x00",
22838                 .klen   = 19,
22839                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x01",
22840                 .result = "\x01\x01\x01\x01\x01\x01\x01\x01"
22841                           "\x01\x01\x01\x01\x01\x01\x01\x01"
22842                           "\x01\x01\x01\x01\x01\x01\x01\x01"
22843                           "\x01\x01\x01\x01\x01\x01\x01\x01"
22844                           "\x01\x01\x01\x01\x01\x01\x01\x01"
22845                           "\x01\x01\x01\x01\x01\x01\x01\x01"
22846                           "\x01\x01\x01\x01\x01\x01\x01\x01"
22847                           "\x01\x01\x01\x01\x01\x01\x01\x01",
22848                 .rlen   = 64,
22849                 .assoc  = "\x01\x01\x01\x01\x01\x01\x01\x01"
22850                           "\x00\x00\x00\x00\x00\x00\x00\x01",
22851                 .alen   = 16,
22852                 .input  = "\xCE\xB8\x98\x16\xC9\x87\x0F\x7E"
22853                           "\x7F\x77\xF9\xE7\xF9\xCD\x1E\x16"
22854                           "\x9C\xA4\x97\x83\x3F\x01\xA5\xF4"
22855                           "\x43\x09\xE7\xB8\xE9\xD1\xD7\x02"
22856                           "\x9B\xAB\x39\x18\xEB\x94\x34\x36"
22857                           "\xE6\xC5\xC8\x9B\x00\x81\x9E\x49"
22858                           "\x1D\x78\xE1\x48\xE3\xE9\xEA\x8E"
22859                           "\x3A\x2B\x67\x5D\x35\x6A\x0F\xDB"
22860                           "\x02\x73\xDD\xE7\x30\x4A\x30\x54"
22861                           "\x1A\x9D\x09\xCA\xC8\x1C\x32\x5F",
22862                 .ilen   = 80,
22863         }, {
22864                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
22865                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
22866                           "\x00\x00\x00",
22867                 .klen   = 19,
22868                 .iv     = "\x00\x00\x45\x67\x89\xab\xcd\xef",
22869                 .result = "\xff\xff\xff\xff\xff\xff\xff\xff"
22870                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22871                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22872                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22873                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22874                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22875                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22876                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22877                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22878                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22879                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22880                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22881                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22882                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22883                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22884                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22885                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22886                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22887                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22888                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22889                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22890                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22891                           "\xff\xff\xff\xff\xff\xff\xff\xff"
22892                           "\xff\xff\xff\xff\xff\xff\xff\xff",
22893                 .rlen   = 192,
22894                 .assoc  = "\xaa\xaa\xaa\xaa\xaa\xaa\xaa\xaa"
22895                           "\xaa\xaa\xaa\xaa\x00\x00\x45\x67"
22896                           "\x89\xab\xcd\xef",
22897                 .alen   = 20,
22898                 .input  = "\x64\x17\xDC\x24\x9D\x92\xBA\x5E"
22899                           "\x7C\x64\x6D\x33\x46\x77\xAC\xB1"
22900                           "\x5C\x9E\xE2\xC7\x27\x11\x3E\x95"
22901                           "\x7D\xBE\x28\xC8\xC1\xCA\x5E\x8C"
22902                           "\xB4\xE2\xDE\x9F\x53\x59\x26\xDB"
22903                           "\x0C\xD4\xE4\x07\x9A\xE6\x3E\x01"
22904                           "\x58\x0D\x3E\x3D\xD5\x21\xEB\x04"
22905                           "\x06\x9D\x5F\xB9\x02\x49\x1A\x2B"
22906                           "\xBA\xF0\x4E\x3B\x85\x50\x5B\x09"
22907                           "\xFE\xEC\xFC\x54\xEC\x0C\xE2\x79"
22908                           "\x8A\x2F\x5F\xD7\x05\x5D\xF1\x6D"
22909                           "\x22\xEB\xD1\x09\x80\x3F\x5A\x70"
22910                           "\xB2\xB9\xD3\x63\x99\xC2\x4D\x1B"
22911                           "\x36\x12\x00\x89\xAA\x5D\x55\xDA"
22912                           "\x1D\x5B\xD8\x3C\x5F\x09\xD2\xE6"
22913                           "\x39\x41\x5C\xF0\xBE\x26\x4E\x5F"
22914                           "\x2B\x50\x44\x52\xC2\x10\x7D\x38"
22915                           "\x82\x64\x83\x0C\xAE\x49\xD0\xE5"
22916                           "\x4F\xE5\x66\x4C\x58\x7A\xEE\x43"
22917                           "\x3B\x51\xFE\xBA\x24\x8A\xFE\xDC"
22918                           "\x19\x6D\x60\x66\x61\xF9\x9A\x3F"
22919                           "\x75\xFC\x38\x53\x5B\xB5\xCD\x52"
22920                           "\x4F\xE5\xE4\xC9\xFE\x10\xCB\x98"
22921                           "\xF0\x06\x5B\x07\xAB\xBB\xF4\x0E"
22922                           "\x2D\xC2\xDD\x5D\xDD\x22\x9A\xCC"
22923                           "\x39\xAB\x63\xA5\x3D\x9C\x51\x8A",
22924                 .ilen   = 208,
22925         }, { /* From draft-mcgrew-gcm-test-01 */
22926                 .key    = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
22927                           "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
22928                           "\x2E\x44\x3B",
22929                 .klen   = 19,
22930                 .iv     = "\x49\x56\xED\x7E\x3B\x24\x4C\xFE",
22931                 .result = "\x45\x00\x00\x48\x69\x9A\x00\x00"
22932                           "\x80\x11\x4D\xB7\xC0\xA8\x01\x02"
22933                           "\xC0\xA8\x01\x01\x0A\x9B\xF1\x56"
22934                           "\x38\xD3\x01\x00\x00\x01\x00\x00"
22935                           "\x00\x00\x00\x00\x04\x5F\x73\x69"
22936                           "\x70\x04\x5F\x75\x64\x70\x03\x73"
22937                           "\x69\x70\x09\x63\x79\x62\x65\x72"
22938                           "\x63\x69\x74\x79\x02\x64\x6B\x00"
22939                           "\x00\x21\x00\x01\x01\x02\x02\x01",
22940                 .rlen   = 72,
22941                 .assoc  = "\x00\x00\x43\x21\x87\x65\x43\x21"
22942                           "\x00\x00\x00\x00\x49\x56\xED\x7E"
22943                           "\x3B\x24\x4C\xFE",
22944                 .alen   = 20,
22945                 .input  = "\x89\xBA\x3E\xEF\xE6\xD6\xCF\xDB"
22946                           "\x83\x60\xF5\xBA\x3A\x56\x79\xE6"
22947                           "\x7E\x0C\x53\xCF\x9E\x87\xE0\x4E"
22948                           "\x1A\x26\x01\x24\xC7\x2E\x3D\xBF"
22949                           "\x29\x2C\x91\xC1\xB8\xA8\xCF\xE0"
22950                           "\x39\xF8\x53\x6D\x31\x22\x2B\xBF"
22951                           "\x98\x81\xFC\x34\xEE\x85\x36\xCD"
22952                           "\x26\xDB\x6C\x7A\x0C\x77\x8A\x35"
22953                           "\x18\x85\x54\xB2\xBC\xDD\x3F\x43"
22954                           "\x61\x06\x8A\xDF\x86\x3F\xB4\xAC"
22955                           "\x97\xDC\xBD\xFD\x92\x10\xC5\xFF",
22956                 .ilen   = 88,
22957         }, {
22958                 .key    = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
22959                           "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
22960                           "\xCA\xFE\xBA",
22961                 .klen   = 19,
22962                 .iv     = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22963                 .result = "\x45\x00\x00\x3E\x69\x8F\x00\x00"
22964                           "\x80\x11\x4D\xCC\xC0\xA8\x01\x02"
22965                           "\xC0\xA8\x01\x01\x0A\x98\x00\x35"
22966                           "\x00\x2A\x23\x43\xB2\xD0\x01\x00"
22967                           "\x00\x01\x00\x00\x00\x00\x00\x00"
22968                           "\x03\x73\x69\x70\x09\x63\x79\x62"
22969                           "\x65\x72\x63\x69\x74\x79\x02\x64"
22970                           "\x6B\x00\x00\x01\x00\x01\x00\x01",
22971                 .rlen   = 64,
22972                 .assoc  = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
22973                           "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
22974                 .alen   = 16,
22975                 .input  = "\x4B\xC2\x70\x60\x64\xD2\xF3\xC8"
22976                           "\xE5\x26\x8A\xDE\xB8\x7E\x7D\x16"
22977                           "\x56\xC7\xD2\x88\xBA\x8D\x58\xAF"
22978                           "\xF5\x71\xB6\x37\x84\xA7\xB1\x99"
22979                           "\x51\x5C\x0D\xA0\x27\xDE\xE7\x2D"
22980                           "\xEF\x25\x88\x1F\x1D\x77\x11\xFF"
22981                           "\xDB\xED\xEE\x56\x16\xC5\x5C\x9B"
22982                           "\x00\x62\x1F\x68\x4E\x7C\xA0\x97"
22983                           "\x10\x72\x7E\x53\x13\x3B\x68\xE4"
22984                           "\x30\x99\x91\x79\x09\xEA\xFF\x6A",
22985                 .ilen   = 80,
22986         }, {
22987                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22988                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22989                           "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
22990                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
22991                           "\x11\x22\x33",
22992                 .klen   = 35,
22993                 .iv     = "\x01\x02\x03\x04\x05\x06\x07\x08",
22994                 .result = "\x45\x00\x00\x30\x69\xA6\x40\x00"
22995                           "\x80\x06\x26\x90\xC0\xA8\x01\x02"
22996                           "\x93\x89\x15\x5E\x0A\x9E\x00\x8B"
22997                           "\x2D\xC5\x7E\xE0\x00\x00\x00\x00"
22998                           "\x70\x02\x40\x00\x20\xBF\x00\x00"
22999                           "\x02\x04\x05\xB4\x01\x01\x04\x02"
23000                           "\x01\x02\x02\x01",
23001                 .rlen   = 52,
23002                 .assoc  = "\x4A\x2C\xBF\xE3\x00\x00\x00\x02"
23003                           "\x01\x02\x03\x04\x05\x06\x07\x08",
23004                 .alen   = 16,
23005                 .input  = "\xD6\x31\x0D\x2B\x3D\x6F\xBD\x2F"
23006                           "\x58\x41\x7E\xFF\x9A\x9E\x09\xB4"
23007                           "\x1A\xF7\xF6\x42\x31\xCD\xBF\xAD"
23008                           "\x27\x0E\x2C\xF2\xDB\x10\xDF\x55"
23009                           "\x8F\x0D\xD7\xAC\x23\xBD\x42\x10"
23010                           "\xD0\xB2\xAF\xD8\x37\xAC\x6B\x0B"
23011                           "\x11\xD4\x0B\x12\xEC\xB4\xB1\x92"
23012                           "\x23\xA6\x10\xB0\x26\xD6\xD9\x26"
23013                           "\x5A\x48\x6A\x3E",
23014                 .ilen   = 68,
23015         }, {
23016                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
23017                           "\x00\x00\x00\x00\x00\x00\x00\x00"
23018                           "\x00\x00\x00",
23019                 .klen   = 19,
23020                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
23021                 .result = "\x45\x00\x00\x3C\x99\xC5\x00\x00"
23022                           "\x80\x01\xCB\x7A\x40\x67\x93\x18"
23023                           "\x01\x01\x01\x01\x08\x00\x07\x5C"
23024                           "\x02\x00\x44\x00\x61\x62\x63\x64"
23025                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23026                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23027                           "\x75\x76\x77\x61\x62\x63\x64\x65"
23028                           "\x66\x67\x68\x69\x01\x02\x02\x01",
23029                 .rlen   = 64,
23030                 .assoc  = "\x00\x00\x00\x00\x00\x00\x00\x01"
23031                           "\x00\x00\x00\x00\x00\x00\x00\x00",
23032                 .alen   = 16,
23033                 .input  = "\x6B\x9A\xCA\x57\x43\x91\xFC\x6F"
23034                           "\x92\x51\x23\xA4\xC1\x5B\xF0\x10"
23035                           "\xF3\x13\xF4\xF8\xA1\x9A\xB4\xDC"
23036                           "\x89\xC8\xF8\x42\x62\x95\xB7\xCB"
23037                           "\xB8\xF5\x0F\x1B\x2E\x94\xA2\xA7"
23038                           "\xBF\xFB\x8A\x92\x13\x63\xD1\x3C"
23039                           "\x08\xF5\xE8\xA6\xAA\xF6\x34\xF9"
23040                           "\x42\x05\xAF\xB3\xE7\x9A\xFC\xEE"
23041                           "\x36\x25\xC1\x10\x12\x1C\xCA\x82"
23042                           "\xEA\xE6\x63\x5A\x57\x28\xA9\x9A",
23043                 .ilen   = 80,
23044         }, {
23045                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23046                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23047                           "\x57\x69\x0E",
23048                 .klen   = 19,
23049                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23050                 .result = "\x45\x00\x00\x3C\x99\xC3\x00\x00"
23051                           "\x80\x01\xCB\x7C\x40\x67\x93\x18"
23052                           "\x01\x01\x01\x01\x08\x00\x08\x5C"
23053                           "\x02\x00\x43\x00\x61\x62\x63\x64"
23054                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23055                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23056                           "\x75\x76\x77\x61\x62\x63\x64\x65"
23057                           "\x66\x67\x68\x69\x01\x02\x02\x01",
23058                 .rlen   = 64,
23059                 .assoc  = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23060                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
23061                           "\xA2\xFC\xA1\xA3",
23062                 .alen   = 20,
23063                 .input  = "\x6A\x6B\x45\x2B\x7C\x67\x52\xF6"
23064                           "\x10\x60\x40\x62\x6B\x4F\x97\x8E"
23065                           "\x0B\xB2\x22\x97\xCB\x21\xE0\x90"
23066                           "\xA2\xE7\xD1\x41\x30\xE4\x4B\x1B"
23067                           "\x79\x01\x58\x50\x01\x06\xE1\xE0"
23068                           "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
23069                           "\x30\xB8\xE5\xDF\xD7\x12\x56\x75"
23070                           "\xD0\x95\xB7\xB8\x91\x42\xF7\xFD"
23071                           "\x97\x57\xCA\xC1\x20\xD0\x86\xB9"
23072                           "\x66\x9D\xB4\x2B\x96\x22\xAC\x67",
23073                 .ilen   = 80,
23074         }, {
23075                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23076                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23077                           "\x57\x69\x0E",
23078                 .klen   = 19,
23079                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23080                 .result = "\x45\x00\x00\x1C\x42\xA2\x00\x00"
23081                           "\x80\x01\x44\x1F\x40\x67\x93\xB6"
23082                           "\xE0\x00\x00\x02\x0A\x00\xF5\xFF"
23083                           "\x01\x02\x02\x01",
23084                 .rlen   = 28,
23085                 .assoc  = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23086                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
23087                           "\xA2\xFC\xA1\xA3",
23088                 .alen   = 20,
23089                 .input  = "\x6A\x6B\x45\x0B\xA7\x06\x52\xF6"
23090                           "\x10\x60\xCF\x01\x6B\x4F\x97\x20"
23091                           "\xEA\xB3\x23\x94\xC9\x21\x1D\x33"
23092                           "\xA1\xE5\x90\x40\x05\x37\x45\x70"
23093                           "\xB5\xD6\x09\x0A\x23\x73\x33\xF9"
23094                           "\x08\xB4\x22\xE4",
23095                 .ilen   = 44,
23096         }, {
23097                 .key    = "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
23098                           "\x6D\x6A\x8F\x94\x67\x30\x83\x08"
23099                           "\xFE\xFF\xE9\x92\x86\x65\x73\x1C"
23100                           "\xCA\xFE\xBA",
23101                 .klen   = 27,
23102                 .iv     = "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
23103                 .result = "\x45\x00\x00\x28\xA4\xAD\x40\x00"
23104                           "\x40\x06\x78\x80\x0A\x01\x03\x8F"
23105                           "\x0A\x01\x06\x12\x80\x23\x06\xB8"
23106                           "\xCB\x71\x26\x02\xDD\x6B\xB0\x3E"
23107                           "\x50\x10\x16\xD0\x75\x68\x00\x01",
23108                 .rlen   = 40,
23109                 .assoc  = "\x00\x00\xA5\xF8\x00\x00\x00\x0A"
23110                           "\xFA\xCE\xDB\xAD\xDE\xCA\xF8\x88",
23111                 .alen   = 16,
23112                 .input  = "\x05\x22\x15\xD1\x52\x56\x85\x04"
23113                           "\xA8\x5C\x5D\x6D\x7E\x6E\xF5\xFA"
23114                           "\xEA\x16\x37\x50\xF3\xDF\x84\x3B"
23115                           "\x2F\x32\x18\x57\x34\x2A\x8C\x23"
23116                           "\x67\xDF\x6D\x35\x7B\x54\x0D\xFB"
23117                           "\x34\xA5\x9F\x6C\x48\x30\x1E\x22"
23118                           "\xFE\xB1\x22\x17\x17\x8A\xB9\x5B",
23119                 .ilen   = 56,
23120         }, {
23121                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23122                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23123                           "\xDE\xCA\xF8",
23124                 .klen   = 19,
23125                 .iv     = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
23126                 .result = "\x45\x00\x00\x49\x33\xBA\x00\x00"
23127                           "\x7F\x11\x91\x06\xC3\xFB\x1D\x10"
23128                           "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
23129                           "\x00\x35\xDD\x7B\x80\x03\x02\xD5"
23130                           "\x00\x00\x4E\x20\x00\x1E\x8C\x18"
23131                           "\xD7\x5B\x81\xDC\x91\xBA\xA0\x47"
23132                           "\x6B\x91\xB9\x24\xB2\x80\x38\x9D"
23133                           "\x92\xC9\x63\xBA\xC0\x46\xEC\x95"
23134                           "\x9B\x62\x66\xC0\x47\x22\xB1\x49"
23135                           "\x23\x01\x01\x01",
23136                 .rlen   = 76,
23137                 .assoc  = "\x00\x00\x01\x00\x00\x00\x00\x00"
23138                           "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
23139                           "\xCE\xFA\xCE\x74",
23140                 .alen   = 20,
23141                 .input  = "\x92\xD0\x53\x79\x33\x38\xD5\xF3"
23142                           "\x7D\xE4\x7A\x8E\x86\x03\xC9\x90"
23143                           "\x96\x35\xAB\x9C\xFB\xE8\xA3\x76"
23144                           "\xE9\xE9\xE2\xD1\x2E\x11\x0E\x00"
23145                           "\xFA\xCE\xB5\x9E\x02\xA7\x7B\xEA"
23146                           "\x71\x9A\x58\xFB\xA5\x8A\xE1\xB7"
23147                           "\x9C\x39\x9D\xE3\xB5\x6E\x69\xE6"
23148                           "\x63\xC9\xDB\x05\x69\x51\x12\xAD"
23149                           "\x3E\x00\x32\x73\x86\xF2\xEE\xF5"
23150                           "\x0F\xE8\x81\x7E\x84\xD3\xC0\x0D"
23151                           "\x76\xD6\x55\xC6\xB4\xC2\x34\xC7"
23152                           "\x12\x25\x0B\xF9",
23153                 .ilen   = 92,
23154         }, {
23155                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23156                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23157                           "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23158                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23159                           "\x73\x61\x6C",
23160                 .klen   = 35,
23161                 .iv     = "\x61\x6E\x64\x01\x69\x76\x65\x63",
23162                 .result = "\x45\x08\x00\x28\x73\x2C\x00\x00"
23163                           "\x40\x06\xE9\xF9\x0A\x01\x06\x12"
23164                           "\x0A\x01\x03\x8F\x06\xB8\x80\x23"
23165                           "\xDD\x6B\xAF\xBE\xCB\x71\x26\x02"
23166                           "\x50\x10\x1F\x64\x6D\x54\x00\x01",
23167                 .rlen   = 40,
23168                 .assoc  = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
23169                           "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
23170                           "\x69\x76\x65\x63",
23171                 .alen   = 20,
23172                 .input  = "\xCC\x74\xB7\xD3\xB0\x38\x50\x42"
23173                           "\x2C\x64\x87\x46\x1E\x34\x10\x05"
23174                           "\x29\x6B\xBB\x36\xE9\x69\xAD\x92"
23175                           "\x82\xA1\x10\x6A\xEB\x0F\xDC\x7D"
23176                           "\x08\xBA\xF3\x91\xCA\xAA\x61\xDA"
23177                           "\x62\xF4\x14\x61\x5C\x9D\xB5\xA7"
23178                           "\xEE\xD7\xB9\x7E\x87\x99\x9B\x7D",
23179                 .ilen   = 56,
23180         }, {
23181                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23182                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23183                           "\x57\x69\x0E",
23184                 .klen   = 19,
23185                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23186                 .result = "\x45\x00\x00\x49\x33\x3E\x00\x00"
23187                           "\x7F\x11\x91\x82\xC3\xFB\x1D\x10"
23188                           "\xC2\xB1\xD3\x26\xC0\x28\x31\xCE"
23189                           "\x00\x35\xCB\x45\x80\x03\x02\x5B"
23190                           "\x00\x00\x01\xE0\x00\x1E\x8C\x18"
23191                           "\xD6\x57\x59\xD5\x22\x84\xA0\x35"
23192                           "\x2C\x71\x47\x5C\x88\x80\x39\x1C"
23193                           "\x76\x4D\x6E\x5E\xE0\x49\x6B\x32"
23194                           "\x5A\xE2\x70\xC0\x38\x99\x49\x39"
23195                           "\x15\x01\x01\x01",
23196                 .rlen   = 76,
23197                 .assoc  = "\x42\xF6\x7E\x3F\x10\x10\x10\x10"
23198                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
23199                           "\xA2\xFC\xA1\xA3",
23200                 .alen   = 20,
23201                 .input  = "\x6A\x6B\x45\x5E\xD6\x9A\x52\xF6"
23202                           "\xEF\x70\x1A\x9C\xE8\xD3\x19\x86"
23203                           "\xC8\x02\xF0\xB0\x03\x09\xD9\x02"
23204                           "\xA0\xD2\x59\x04\xD1\x85\x2A\x24"
23205                           "\x1C\x67\x3E\xD8\x68\x72\x06\x94"
23206                           "\x97\xBA\x4F\x76\x8D\xB0\x44\x5B"
23207                           "\x69\xBF\xD5\xE2\x3D\xF1\x0B\x0C"
23208                           "\xC0\xBF\xB1\x8F\x70\x09\x9E\xCE"
23209                           "\xA5\xF2\x55\x58\x84\xFA\xF9\xB5"
23210                           "\x23\xF4\x84\x40\x74\x14\x8A\x6B"
23211                           "\xDB\xD7\x67\xED\xA4\x93\xF3\x47"
23212                           "\xCC\xF7\x46\x6F",
23213                 .ilen   = 92,
23214         }, {
23215                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23216                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23217                           "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23218                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23219                           "\x73\x61\x6C",
23220                 .klen   = 35,
23221                 .iv     = "\x61\x6E\x64\x01\x69\x76\x65\x63",
23222                 .result = "\x63\x69\x73\x63\x6F\x01\x72\x75"
23223                           "\x6C\x65\x73\x01\x74\x68\x65\x01"
23224                           "\x6E\x65\x74\x77\x65\x01\x64\x65"
23225                           "\x66\x69\x6E\x65\x01\x74\x68\x65"
23226                           "\x74\x65\x63\x68\x6E\x6F\x6C\x6F"
23227                           "\x67\x69\x65\x73\x01\x74\x68\x61"
23228                           "\x74\x77\x69\x6C\x6C\x01\x64\x65"
23229                           "\x66\x69\x6E\x65\x74\x6F\x6D\x6F"
23230                           "\x72\x72\x6F\x77\x01\x02\x02\x01",
23231                 .rlen   = 72,
23232                 .assoc  = "\x17\x40\x5E\x67\x15\x6F\x31\x26"
23233                           "\xDD\x0D\xB9\x9B\x61\x6E\x64\x01"
23234                           "\x69\x76\x65\x63",
23235                 .alen   = 20,
23236                 .input  = "\xEA\x15\xC4\x98\xAC\x15\x22\x37"
23237                           "\x00\x07\x1D\xBE\x60\x5D\x73\x16"
23238                           "\x4D\x0F\xCC\xCE\x8A\xD0\x49\xD4"
23239                           "\x39\xA3\xD1\xB1\x21\x0A\x92\x1A"
23240                           "\x2C\xCF\x8F\x9D\xC9\x91\x0D\xB4"
23241                           "\x15\xFC\xBC\xA5\xC5\xBF\x54\xE5"
23242                           "\x1C\xC7\x32\x41\x07\x7B\x2C\xB6"
23243                           "\x5C\x23\x7C\x93\xEA\xEF\x23\x1C"
23244                           "\x73\xF4\xE7\x12\x84\x4C\x37\x0A"
23245                           "\x4A\x8F\x06\x37\x48\xF9\xF9\x05"
23246                           "\x55\x13\x40\xC3\xD5\x55\x3A\x3D",
23247                 .ilen   = 88,
23248         }, {
23249                 .key    = "\x7D\x77\x3D\x00\xC1\x44\xC5\x25"
23250                           "\xAC\x61\x9D\x18\xC8\x4A\x3F\x47"
23251                           "\xD9\x66\x42",
23252                 .klen   = 19,
23253                 .iv     = "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
23254                 .result = "\x01\x02\x02\x01",
23255                 .rlen   = 4,
23256                 .assoc  = "\x33\x54\x67\xAE\xFF\xFF\xFF\xFF"
23257                           "\x43\x45\x7E\x91\x82\x44\x3B\xC6",
23258                 .alen   = 16,
23259                 .input  = "\x4C\x72\x63\x30\x2F\xE6\x56\xDD"
23260                           "\xD0\xD8\x60\x9D\x8B\xEF\x85\x90"
23261                           "\xF7\x61\x24\x62",
23262                 .ilen   = 20,
23263         }, {
23264                 .key    = "\xAB\xBC\xCD\xDE\xF0\x01\x12\x23"
23265                           "\x34\x45\x56\x67\x78\x89\x9A\xAB"
23266                           "\xDE\xCA\xF8",
23267                 .klen   = 19,
23268                 .iv     = "\xCA\xFE\xDE\xBA\xCE\xFA\xCE\x74",
23269                 .result = "\x74\x6F\x01\x62\x65\x01\x6F\x72"
23270                           "\x01\x6E\x6F\x74\x01\x74\x6F\x01"
23271                           "\x62\x65\x00\x01",
23272                 .rlen   = 20,
23273                 .assoc  = "\x00\x00\x01\x00\x00\x00\x00\x00"
23274                           "\x00\x00\x00\x01\xCA\xFE\xDE\xBA"
23275                           "\xCE\xFA\xCE\x74",
23276                 .alen   = 20,
23277                 .input  = "\xA3\xBF\x52\x52\x65\x83\xBA\x81"
23278                           "\x03\x9B\x84\xFC\x44\x8C\xBB\x81"
23279                           "\x36\xE1\x78\xBB\xA5\x49\x3A\xD0"
23280                           "\xF0\x6B\x21\xAF\x98\xC0\x34\xDC"
23281                           "\x17\x17\x65\xAD",
23282                 .ilen   = 36,
23283         }, {
23284                 .key    = "\x6C\x65\x67\x61\x6C\x69\x7A\x65"
23285                           "\x6D\x61\x72\x69\x6A\x75\x61\x6E"
23286                           "\x61\x61\x6E\x64\x64\x6F\x69\x74"
23287                           "\x62\x65\x66\x6F\x72\x65\x69\x61"
23288                           "\x74\x75\x72",
23289                 .klen   = 35,
23290                 .iv     = "\x33\x30\x21\x69\x67\x65\x74\x6D",
23291                 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
23292                           "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
23293                           "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
23294                           "\x02\x00\x07\x00\x61\x62\x63\x64"
23295                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23296                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23297                           "\x01\x02\x02\x01",
23298                 .rlen   = 52,
23299                 .assoc  = "\x79\x6B\x69\x63\xFF\xFF\xFF\xFF"
23300                           "\xFF\xFF\xFF\xFF\x33\x30\x21\x69"
23301                           "\x67\x65\x74\x6D",
23302                 .alen   = 20,
23303                 .input  = "\x96\xFD\x86\xF8\xD1\x98\xFF\x10"
23304                           "\xAB\x8C\xDA\x8A\x5A\x08\x38\x1A"
23305                           "\x48\x59\x80\x18\x1A\x18\x1A\x04"
23306                           "\xC9\x0D\xE3\xE7\x0E\xA4\x0B\x75"
23307                           "\x92\x9C\x52\x5C\x0B\xFB\xF8\xAF"
23308                           "\x16\xC3\x35\xA8\xE7\xCE\x84\x04"
23309                           "\xEB\x40\x6B\x7A\x8E\x75\xBB\x42"
23310                           "\xE0\x63\x4B\x21\x44\xA2\x2B\x2B"
23311                           "\x39\xDB\xC8\xDC",
23312                 .ilen   = 68,
23313         }, {
23314                 .key    = "\x3D\xE0\x98\x74\xB3\x88\xE6\x49"
23315                           "\x19\x88\xD0\xC3\x60\x7E\xAE\x1F"
23316                           "\x57\x69\x0E",
23317                 .klen   = 19,
23318                 .iv     = "\x4E\x28\x00\x00\xA2\xFC\xA1\xA3",
23319                 .result = "\x45\x00\x00\x30\xDA\x3A\x00\x00"
23320                           "\x80\x01\xDF\x3B\xC0\xA8\x00\x05"
23321                           "\xC0\xA8\x00\x01\x08\x00\xC6\xCD"
23322                           "\x02\x00\x07\x00\x61\x62\x63\x64"
23323                           "\x65\x66\x67\x68\x69\x6A\x6B\x6C"
23324                           "\x6D\x6E\x6F\x70\x71\x72\x73\x74"
23325                           "\x01\x02\x02\x01",
23326                 .rlen   = 52,
23327                 .assoc  = "\x3F\x7E\xF6\x42\x10\x10\x10\x10"
23328                           "\x10\x10\x10\x10\x4E\x28\x00\x00"
23329                           "\xA2\xFC\xA1\xA3",
23330                 .alen   = 20,
23331                 .input  = "\x6A\x6B\x45\x27\x3F\x9E\x52\xF6"
23332                           "\x10\x60\x54\x25\xEB\x80\x04\x93"
23333                           "\xCA\x1B\x23\x97\xCB\x21\x2E\x01"
23334                           "\xA2\xE7\x95\x41\x30\xE4\x4B\x1B"
23335                           "\x79\x01\x58\x50\x01\x06\xE1\xE0"
23336                           "\x2C\x83\x79\xD3\xDE\x46\x97\x1A"
23337                           "\x44\xCC\x90\xBF\x00\x94\x94\x92"
23338                           "\x20\x17\x0C\x1B\x55\xDE\x7E\x68"
23339                           "\xF4\x95\x5D\x4F",
23340                 .ilen   = 68,
23341         }, {
23342                 .key    = "\x4C\x80\xCD\xEF\xBB\x5D\x10\xDA"
23343                           "\x90\x6A\xC7\x3C\x36\x13\xA6\x34"
23344                           "\x22\x43\x3C",
23345                 .klen   = 19,
23346                 .iv     = "\x48\x55\xEC\x7D\x3A\x23\x4B\xFD",
23347                 .result = "\x08\x00\xC6\xCD\x02\x00\x07\x00"
23348                           "\x61\x62\x63\x64\x65\x66\x67\x68"
23349                           "\x69\x6A\x6B\x6C\x6D\x6E\x6F\x70"
23350                           "\x71\x72\x73\x74\x01\x02\x02\x01",
23351                 .rlen   = 32,
23352                 .assoc  = "\x00\x00\x43\x21\x87\x65\x43\x21"
23353                           "\x00\x00\x00\x07\x48\x55\xEC\x7D"
23354                           "\x3A\x23\x4B\xFD",
23355                 .alen   = 20,
23356                 .input  = "\x67\xE9\x28\xB3\x1C\xA4\x6D\x02"
23357                           "\xF0\xB5\x37\xB6\x6B\x2F\xF5\x4F"
23358                           "\xF8\xA3\x4C\x53\xB8\x12\x09\xBF"
23359                           "\x58\x7D\xCF\x29\xA3\x41\x68\x6B"
23360                           "\xCE\xE8\x79\x85\x3C\xB0\x3A\x8F"
23361                           "\x16\xB0\xA1\x26\xC9\xBC\xBC\xA6",
23362                 .ilen   = 48,
23363         }
23364 };
23365
23366 /*
23367  * ChaCha20-Poly1305 AEAD test vectors from RFC7539 2.8.2./A.5.
23368  */
23369 #define RFC7539_ENC_TEST_VECTORS 2
23370 #define RFC7539_DEC_TEST_VECTORS 2
23371 static struct aead_testvec rfc7539_enc_tv_template[] = {
23372         {
23373                 .key    = "\x80\x81\x82\x83\x84\x85\x86\x87"
23374                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23375                           "\x90\x91\x92\x93\x94\x95\x96\x97"
23376                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
23377                 .klen   = 32,
23378                 .iv     = "\x07\x00\x00\x00\x40\x41\x42\x43"
23379                           "\x44\x45\x46\x47",
23380                 .assoc  = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
23381                           "\xc4\xc5\xc6\xc7",
23382                 .alen   = 12,
23383                 .input  = "\x4c\x61\x64\x69\x65\x73\x20\x61"
23384                           "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
23385                           "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
23386                           "\x74\x68\x65\x20\x63\x6c\x61\x73"
23387                           "\x73\x20\x6f\x66\x20\x27\x39\x39"
23388                           "\x3a\x20\x49\x66\x20\x49\x20\x63"
23389                           "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
23390                           "\x65\x72\x20\x79\x6f\x75\x20\x6f"
23391                           "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
23392                           "\x74\x69\x70\x20\x66\x6f\x72\x20"
23393                           "\x74\x68\x65\x20\x66\x75\x74\x75"
23394                           "\x72\x65\x2c\x20\x73\x75\x6e\x73"
23395                           "\x63\x72\x65\x65\x6e\x20\x77\x6f"
23396                           "\x75\x6c\x64\x20\x62\x65\x20\x69"
23397                           "\x74\x2e",
23398                 .ilen   = 114,
23399                 .result = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
23400                           "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
23401                           "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
23402                           "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
23403                           "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
23404                           "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
23405                           "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
23406                           "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
23407                           "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
23408                           "\x98\x03\xae\xe3\x28\x09\x1b\x58"
23409                           "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
23410                           "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
23411                           "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
23412                           "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
23413                           "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
23414                           "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
23415                           "\x06\x91",
23416                 .rlen   = 130,
23417         }, {
23418                 .key    = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23419                           "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23420                           "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23421                           "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
23422                 .klen   = 32,
23423                 .iv     = "\x00\x00\x00\x00\x01\x02\x03\x04"
23424                           "\x05\x06\x07\x08",
23425                 .assoc  = "\xf3\x33\x88\x86\x00\x00\x00\x00"
23426                           "\x00\x00\x4e\x91",
23427                 .alen   = 12,
23428                 .input  = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
23429                           "\x2d\x44\x72\x61\x66\x74\x73\x20"
23430                           "\x61\x72\x65\x20\x64\x72\x61\x66"
23431                           "\x74\x20\x64\x6f\x63\x75\x6d\x65"
23432                           "\x6e\x74\x73\x20\x76\x61\x6c\x69"
23433                           "\x64\x20\x66\x6f\x72\x20\x61\x20"
23434                           "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
23435                           "\x6f\x66\x20\x73\x69\x78\x20\x6d"
23436                           "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
23437                           "\x64\x20\x6d\x61\x79\x20\x62\x65"
23438                           "\x20\x75\x70\x64\x61\x74\x65\x64"
23439                           "\x2c\x20\x72\x65\x70\x6c\x61\x63"
23440                           "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
23441                           "\x62\x73\x6f\x6c\x65\x74\x65\x64"
23442                           "\x20\x62\x79\x20\x6f\x74\x68\x65"
23443                           "\x72\x20\x64\x6f\x63\x75\x6d\x65"
23444                           "\x6e\x74\x73\x20\x61\x74\x20\x61"
23445                           "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
23446                           "\x20\x49\x74\x20\x69\x73\x20\x69"
23447                           "\x6e\x61\x70\x70\x72\x6f\x70\x72"
23448                           "\x69\x61\x74\x65\x20\x74\x6f\x20"
23449                           "\x75\x73\x65\x20\x49\x6e\x74\x65"
23450                           "\x72\x6e\x65\x74\x2d\x44\x72\x61"
23451                           "\x66\x74\x73\x20\x61\x73\x20\x72"
23452                           "\x65\x66\x65\x72\x65\x6e\x63\x65"
23453                           "\x20\x6d\x61\x74\x65\x72\x69\x61"
23454                           "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
23455                           "\x63\x69\x74\x65\x20\x74\x68\x65"
23456                           "\x6d\x20\x6f\x74\x68\x65\x72\x20"
23457                           "\x74\x68\x61\x6e\x20\x61\x73\x20"
23458                           "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
23459                           "\x20\x69\x6e\x20\x70\x72\x6f\x67"
23460                           "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
23461                           "\x9d",
23462                 .ilen   = 265,
23463                 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23464                           "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23465                           "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23466                           "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23467                           "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23468                           "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23469                           "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23470                           "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23471                           "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23472                           "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23473                           "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23474                           "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23475                           "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23476                           "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23477                           "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23478                           "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23479                           "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23480                           "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23481                           "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23482                           "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23483                           "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23484                           "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23485                           "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23486                           "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23487                           "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23488                           "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23489                           "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23490                           "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23491                           "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23492                           "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23493                           "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23494                           "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23495                           "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23496                           "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23497                           "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23498                           "\x38",
23499                 .rlen   = 281,
23500         },
23501 };
23502
23503 static struct aead_testvec rfc7539_dec_tv_template[] = {
23504         {
23505                 .key    = "\x80\x81\x82\x83\x84\x85\x86\x87"
23506                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
23507                           "\x90\x91\x92\x93\x94\x95\x96\x97"
23508                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f",
23509                 .klen   = 32,
23510                 .iv     = "\x07\x00\x00\x00\x40\x41\x42\x43"
23511                           "\x44\x45\x46\x47",
23512                 .assoc  = "\x50\x51\x52\x53\xc0\xc1\xc2\xc3"
23513                           "\xc4\xc5\xc6\xc7",
23514                 .alen   = 12,
23515                 .input  = "\xd3\x1a\x8d\x34\x64\x8e\x60\xdb"
23516                           "\x7b\x86\xaf\xbc\x53\xef\x7e\xc2"
23517                           "\xa4\xad\xed\x51\x29\x6e\x08\xfe"
23518                           "\xa9\xe2\xb5\xa7\x36\xee\x62\xd6"
23519                           "\x3d\xbe\xa4\x5e\x8c\xa9\x67\x12"
23520                           "\x82\xfa\xfb\x69\xda\x92\x72\x8b"
23521                           "\x1a\x71\xde\x0a\x9e\x06\x0b\x29"
23522                           "\x05\xd6\xa5\xb6\x7e\xcd\x3b\x36"
23523                           "\x92\xdd\xbd\x7f\x2d\x77\x8b\x8c"
23524                           "\x98\x03\xae\xe3\x28\x09\x1b\x58"
23525                           "\xfa\xb3\x24\xe4\xfa\xd6\x75\x94"
23526                           "\x55\x85\x80\x8b\x48\x31\xd7\xbc"
23527                           "\x3f\xf4\xde\xf0\x8e\x4b\x7a\x9d"
23528                           "\xe5\x76\xd2\x65\x86\xce\xc6\x4b"
23529                           "\x61\x16\x1a\xe1\x0b\x59\x4f\x09"
23530                           "\xe2\x6a\x7e\x90\x2e\xcb\xd0\x60"
23531                           "\x06\x91",
23532                 .ilen   = 130,
23533                 .result = "\x4c\x61\x64\x69\x65\x73\x20\x61"
23534                           "\x6e\x64\x20\x47\x65\x6e\x74\x6c"
23535                           "\x65\x6d\x65\x6e\x20\x6f\x66\x20"
23536                           "\x74\x68\x65\x20\x63\x6c\x61\x73"
23537                           "\x73\x20\x6f\x66\x20\x27\x39\x39"
23538                           "\x3a\x20\x49\x66\x20\x49\x20\x63"
23539                           "\x6f\x75\x6c\x64\x20\x6f\x66\x66"
23540                           "\x65\x72\x20\x79\x6f\x75\x20\x6f"
23541                           "\x6e\x6c\x79\x20\x6f\x6e\x65\x20"
23542                           "\x74\x69\x70\x20\x66\x6f\x72\x20"
23543                           "\x74\x68\x65\x20\x66\x75\x74\x75"
23544                           "\x72\x65\x2c\x20\x73\x75\x6e\x73"
23545                           "\x63\x72\x65\x65\x6e\x20\x77\x6f"
23546                           "\x75\x6c\x64\x20\x62\x65\x20\x69"
23547                           "\x74\x2e",
23548                 .rlen   = 114,
23549         }, {
23550                 .key    = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23551                           "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23552                           "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23553                           "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
23554                 .klen   = 32,
23555                 .iv     = "\x00\x00\x00\x00\x01\x02\x03\x04"
23556                           "\x05\x06\x07\x08",
23557                 .assoc  = "\xf3\x33\x88\x86\x00\x00\x00\x00"
23558                           "\x00\x00\x4e\x91",
23559                 .alen   = 12,
23560                 .input  = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23561                           "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23562                           "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23563                           "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23564                           "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23565                           "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23566                           "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23567                           "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23568                           "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23569                           "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23570                           "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23571                           "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23572                           "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23573                           "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23574                           "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23575                           "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23576                           "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23577                           "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23578                           "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23579                           "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23580                           "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23581                           "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23582                           "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23583                           "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23584                           "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23585                           "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23586                           "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23587                           "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23588                           "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23589                           "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23590                           "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23591                           "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23592                           "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23593                           "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23594                           "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23595                           "\x38",
23596                 .ilen   = 281,
23597                 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
23598                           "\x2d\x44\x72\x61\x66\x74\x73\x20"
23599                           "\x61\x72\x65\x20\x64\x72\x61\x66"
23600                           "\x74\x20\x64\x6f\x63\x75\x6d\x65"
23601                           "\x6e\x74\x73\x20\x76\x61\x6c\x69"
23602                           "\x64\x20\x66\x6f\x72\x20\x61\x20"
23603                           "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
23604                           "\x6f\x66\x20\x73\x69\x78\x20\x6d"
23605                           "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
23606                           "\x64\x20\x6d\x61\x79\x20\x62\x65"
23607                           "\x20\x75\x70\x64\x61\x74\x65\x64"
23608                           "\x2c\x20\x72\x65\x70\x6c\x61\x63"
23609                           "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
23610                           "\x62\x73\x6f\x6c\x65\x74\x65\x64"
23611                           "\x20\x62\x79\x20\x6f\x74\x68\x65"
23612                           "\x72\x20\x64\x6f\x63\x75\x6d\x65"
23613                           "\x6e\x74\x73\x20\x61\x74\x20\x61"
23614                           "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
23615                           "\x20\x49\x74\x20\x69\x73\x20\x69"
23616                           "\x6e\x61\x70\x70\x72\x6f\x70\x72"
23617                           "\x69\x61\x74\x65\x20\x74\x6f\x20"
23618                           "\x75\x73\x65\x20\x49\x6e\x74\x65"
23619                           "\x72\x6e\x65\x74\x2d\x44\x72\x61"
23620                           "\x66\x74\x73\x20\x61\x73\x20\x72"
23621                           "\x65\x66\x65\x72\x65\x6e\x63\x65"
23622                           "\x20\x6d\x61\x74\x65\x72\x69\x61"
23623                           "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
23624                           "\x63\x69\x74\x65\x20\x74\x68\x65"
23625                           "\x6d\x20\x6f\x74\x68\x65\x72\x20"
23626                           "\x74\x68\x61\x6e\x20\x61\x73\x20"
23627                           "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
23628                           "\x20\x69\x6e\x20\x70\x72\x6f\x67"
23629                           "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
23630                           "\x9d",
23631                 .rlen   = 265,
23632         },
23633 };
23634
23635 /*
23636  * draft-irtf-cfrg-chacha20-poly1305
23637  */
23638 #define RFC7539ESP_DEC_TEST_VECTORS 1
23639 #define RFC7539ESP_ENC_TEST_VECTORS 1
23640 static struct aead_testvec rfc7539esp_enc_tv_template[] = {
23641         {
23642                 .key    = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23643                           "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23644                           "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23645                           "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
23646                           "\x00\x00\x00\x00",
23647                 .klen   = 36,
23648                 .iv     = "\x01\x02\x03\x04\x05\x06\x07\x08",
23649                 .assoc  = "\xf3\x33\x88\x86\x00\x00\x00\x00"
23650                           "\x00\x00\x4e\x91\x01\x02\x03\x04"
23651                           "\x05\x06\x07\x08",
23652                 .alen   = 20,
23653                 .input  = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
23654                           "\x2d\x44\x72\x61\x66\x74\x73\x20"
23655                           "\x61\x72\x65\x20\x64\x72\x61\x66"
23656                           "\x74\x20\x64\x6f\x63\x75\x6d\x65"
23657                           "\x6e\x74\x73\x20\x76\x61\x6c\x69"
23658                           "\x64\x20\x66\x6f\x72\x20\x61\x20"
23659                           "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
23660                           "\x6f\x66\x20\x73\x69\x78\x20\x6d"
23661                           "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
23662                           "\x64\x20\x6d\x61\x79\x20\x62\x65"
23663                           "\x20\x75\x70\x64\x61\x74\x65\x64"
23664                           "\x2c\x20\x72\x65\x70\x6c\x61\x63"
23665                           "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
23666                           "\x62\x73\x6f\x6c\x65\x74\x65\x64"
23667                           "\x20\x62\x79\x20\x6f\x74\x68\x65"
23668                           "\x72\x20\x64\x6f\x63\x75\x6d\x65"
23669                           "\x6e\x74\x73\x20\x61\x74\x20\x61"
23670                           "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
23671                           "\x20\x49\x74\x20\x69\x73\x20\x69"
23672                           "\x6e\x61\x70\x70\x72\x6f\x70\x72"
23673                           "\x69\x61\x74\x65\x20\x74\x6f\x20"
23674                           "\x75\x73\x65\x20\x49\x6e\x74\x65"
23675                           "\x72\x6e\x65\x74\x2d\x44\x72\x61"
23676                           "\x66\x74\x73\x20\x61\x73\x20\x72"
23677                           "\x65\x66\x65\x72\x65\x6e\x63\x65"
23678                           "\x20\x6d\x61\x74\x65\x72\x69\x61"
23679                           "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
23680                           "\x63\x69\x74\x65\x20\x74\x68\x65"
23681                           "\x6d\x20\x6f\x74\x68\x65\x72\x20"
23682                           "\x74\x68\x61\x6e\x20\x61\x73\x20"
23683                           "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
23684                           "\x20\x69\x6e\x20\x70\x72\x6f\x67"
23685                           "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
23686                           "\x9d",
23687                 .ilen   = 265,
23688                 .result = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23689                           "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23690                           "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23691                           "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23692                           "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23693                           "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23694                           "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23695                           "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23696                           "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23697                           "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23698                           "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23699                           "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23700                           "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23701                           "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23702                           "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23703                           "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23704                           "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23705                           "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23706                           "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23707                           "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23708                           "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23709                           "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23710                           "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23711                           "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23712                           "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23713                           "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23714                           "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23715                           "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23716                           "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23717                           "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23718                           "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23719                           "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23720                           "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23721                           "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23722                           "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23723                           "\x38",
23724                 .rlen   = 281,
23725         },
23726 };
23727
23728 static struct aead_testvec rfc7539esp_dec_tv_template[] = {
23729         {
23730                 .key    = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
23731                           "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
23732                           "\x47\x39\x17\xc1\x40\x2b\x80\x09"
23733                           "\x9d\xca\x5c\xbc\x20\x70\x75\xc0"
23734                           "\x00\x00\x00\x00",
23735                 .klen   = 36,
23736                 .iv     = "\x01\x02\x03\x04\x05\x06\x07\x08",
23737                 .assoc  = "\xf3\x33\x88\x86\x00\x00\x00\x00"
23738                           "\x00\x00\x4e\x91\x01\x02\x03\x04"
23739                           "\x05\x06\x07\x08",
23740                 .alen   = 20,
23741                 .input  = "\x64\xa0\x86\x15\x75\x86\x1a\xf4"
23742                           "\x60\xf0\x62\xc7\x9b\xe6\x43\xbd"
23743                           "\x5e\x80\x5c\xfd\x34\x5c\xf3\x89"
23744                           "\xf1\x08\x67\x0a\xc7\x6c\x8c\xb2"
23745                           "\x4c\x6c\xfc\x18\x75\x5d\x43\xee"
23746                           "\xa0\x9e\xe9\x4e\x38\x2d\x26\xb0"
23747                           "\xbd\xb7\xb7\x3c\x32\x1b\x01\x00"
23748                           "\xd4\xf0\x3b\x7f\x35\x58\x94\xcf"
23749                           "\x33\x2f\x83\x0e\x71\x0b\x97\xce"
23750                           "\x98\xc8\xa8\x4a\xbd\x0b\x94\x81"
23751                           "\x14\xad\x17\x6e\x00\x8d\x33\xbd"
23752                           "\x60\xf9\x82\xb1\xff\x37\xc8\x55"
23753                           "\x97\x97\xa0\x6e\xf4\xf0\xef\x61"
23754                           "\xc1\x86\x32\x4e\x2b\x35\x06\x38"
23755                           "\x36\x06\x90\x7b\x6a\x7c\x02\xb0"
23756                           "\xf9\xf6\x15\x7b\x53\xc8\x67\xe4"
23757                           "\xb9\x16\x6c\x76\x7b\x80\x4d\x46"
23758                           "\xa5\x9b\x52\x16\xcd\xe7\xa4\xe9"
23759                           "\x90\x40\xc5\xa4\x04\x33\x22\x5e"
23760                           "\xe2\x82\xa1\xb0\xa0\x6c\x52\x3e"
23761                           "\xaf\x45\x34\xd7\xf8\x3f\xa1\x15"
23762                           "\x5b\x00\x47\x71\x8c\xbc\x54\x6a"
23763                           "\x0d\x07\x2b\x04\xb3\x56\x4e\xea"
23764                           "\x1b\x42\x22\x73\xf5\x48\x27\x1a"
23765                           "\x0b\xb2\x31\x60\x53\xfa\x76\x99"
23766                           "\x19\x55\xeb\xd6\x31\x59\x43\x4e"
23767                           "\xce\xbb\x4e\x46\x6d\xae\x5a\x10"
23768                           "\x73\xa6\x72\x76\x27\x09\x7a\x10"
23769                           "\x49\xe6\x17\xd9\x1d\x36\x10\x94"
23770                           "\xfa\x68\xf0\xff\x77\x98\x71\x30"
23771                           "\x30\x5b\xea\xba\x2e\xda\x04\xdf"
23772                           "\x99\x7b\x71\x4d\x6c\x6f\x2c\x29"
23773                           "\xa6\xad\x5c\xb4\x02\x2b\x02\x70"
23774                           "\x9b\xee\xad\x9d\x67\x89\x0c\xbb"
23775                           "\x22\x39\x23\x36\xfe\xa1\x85\x1f"
23776                           "\x38",
23777                 .ilen   = 281,
23778                 .result = "\x49\x6e\x74\x65\x72\x6e\x65\x74"
23779                           "\x2d\x44\x72\x61\x66\x74\x73\x20"
23780                           "\x61\x72\x65\x20\x64\x72\x61\x66"
23781                           "\x74\x20\x64\x6f\x63\x75\x6d\x65"
23782                           "\x6e\x74\x73\x20\x76\x61\x6c\x69"
23783                           "\x64\x20\x66\x6f\x72\x20\x61\x20"
23784                           "\x6d\x61\x78\x69\x6d\x75\x6d\x20"
23785                           "\x6f\x66\x20\x73\x69\x78\x20\x6d"
23786                           "\x6f\x6e\x74\x68\x73\x20\x61\x6e"
23787                           "\x64\x20\x6d\x61\x79\x20\x62\x65"
23788                           "\x20\x75\x70\x64\x61\x74\x65\x64"
23789                           "\x2c\x20\x72\x65\x70\x6c\x61\x63"
23790                           "\x65\x64\x2c\x20\x6f\x72\x20\x6f"
23791                           "\x62\x73\x6f\x6c\x65\x74\x65\x64"
23792                           "\x20\x62\x79\x20\x6f\x74\x68\x65"
23793                           "\x72\x20\x64\x6f\x63\x75\x6d\x65"
23794                           "\x6e\x74\x73\x20\x61\x74\x20\x61"
23795                           "\x6e\x79\x20\x74\x69\x6d\x65\x2e"
23796                           "\x20\x49\x74\x20\x69\x73\x20\x69"
23797                           "\x6e\x61\x70\x70\x72\x6f\x70\x72"
23798                           "\x69\x61\x74\x65\x20\x74\x6f\x20"
23799                           "\x75\x73\x65\x20\x49\x6e\x74\x65"
23800                           "\x72\x6e\x65\x74\x2d\x44\x72\x61"
23801                           "\x66\x74\x73\x20\x61\x73\x20\x72"
23802                           "\x65\x66\x65\x72\x65\x6e\x63\x65"
23803                           "\x20\x6d\x61\x74\x65\x72\x69\x61"
23804                           "\x6c\x20\x6f\x72\x20\x74\x6f\x20"
23805                           "\x63\x69\x74\x65\x20\x74\x68\x65"
23806                           "\x6d\x20\x6f\x74\x68\x65\x72\x20"
23807                           "\x74\x68\x61\x6e\x20\x61\x73\x20"
23808                           "\x2f\xe2\x80\x9c\x77\x6f\x72\x6b"
23809                           "\x20\x69\x6e\x20\x70\x72\x6f\x67"
23810                           "\x72\x65\x73\x73\x2e\x2f\xe2\x80"
23811                           "\x9d",
23812                 .rlen   = 265,
23813         },
23814 };
23815
23816 /*
23817  * ANSI X9.31 Continuous Pseudo-Random Number Generator (AES mode)
23818  * test vectors, taken from Appendix B.2.9 and B.2.10:
23819  *     http://csrc.nist.gov/groups/STM/cavp/documents/rng/RNGVS.pdf
23820  * Only AES-128 is supported at this time.
23821  */
23822 #define ANSI_CPRNG_AES_TEST_VECTORS     6
23823
23824 static struct cprng_testvec ansi_cprng_aes_tv_template[] = {
23825         {
23826                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
23827                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
23828                 .klen   = 16,
23829                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
23830                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xf9",
23831                 .dtlen  = 16,
23832                 .v      = "\x80\x00\x00\x00\x00\x00\x00\x00"
23833                           "\x00\x00\x00\x00\x00\x00\x00\x00",
23834                 .vlen   = 16,
23835                 .result = "\x59\x53\x1e\xd1\x3b\xb0\xc0\x55"
23836                           "\x84\x79\x66\x85\xc1\x2f\x76\x41",
23837                 .rlen   = 16,
23838                 .loops  = 1,
23839         }, {
23840                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
23841                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
23842                 .klen   = 16,
23843                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
23844                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfa",
23845                 .dtlen  = 16,
23846                 .v      = "\xc0\x00\x00\x00\x00\x00\x00\x00"
23847                           "\x00\x00\x00\x00\x00\x00\x00\x00",
23848                 .vlen   = 16,
23849                 .result = "\x7c\x22\x2c\xf4\xca\x8f\xa2\x4c"
23850                           "\x1c\x9c\xb6\x41\xa9\xf3\x22\x0d",
23851                 .rlen   = 16,
23852                 .loops  = 1,
23853         }, {
23854                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
23855                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
23856                 .klen   = 16,
23857                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
23858                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfb",
23859                 .dtlen  = 16,
23860                 .v      = "\xe0\x00\x00\x00\x00\x00\x00\x00"
23861                           "\x00\x00\x00\x00\x00\x00\x00\x00",
23862                 .vlen   = 16,
23863                 .result = "\x8a\xaa\x00\x39\x66\x67\x5b\xe5"
23864                           "\x29\x14\x28\x81\xa9\x4d\x4e\xc7",
23865                 .rlen   = 16,
23866                 .loops  = 1,
23867         }, {
23868                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
23869                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
23870                 .klen   = 16,
23871                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
23872                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfc",
23873                 .dtlen  = 16,
23874                 .v      = "\xf0\x00\x00\x00\x00\x00\x00\x00"
23875                           "\x00\x00\x00\x00\x00\x00\x00\x00",
23876                 .vlen   = 16,
23877                 .result = "\x88\xdd\xa4\x56\x30\x24\x23\xe5"
23878                           "\xf6\x9d\xa5\x7e\x7b\x95\xc7\x3a",
23879                 .rlen   = 16,
23880                 .loops  = 1,
23881         }, {
23882                 .key    = "\xf3\xb1\x66\x6d\x13\x60\x72\x42"
23883                           "\xed\x06\x1c\xab\xb8\xd4\x62\x02",
23884                 .klen   = 16,
23885                 .dt     = "\xe6\xb3\xbe\x78\x2a\x23\xfa\x62"
23886                           "\xd7\x1d\x4a\xfb\xb0\xe9\x22\xfd",
23887                 .dtlen  = 16,
23888                 .v      = "\xf8\x00\x00\x00\x00\x00\x00\x00"
23889                           "\x00\x00\x00\x00\x00\x00\x00\x00",
23890                 .vlen   = 16,
23891                 .result = "\x05\x25\x92\x46\x61\x79\xd2\xcb"
23892                           "\x78\xc4\x0b\x14\x0a\x5a\x9a\xc8",
23893                 .rlen   = 16,
23894                 .loops  = 1,
23895         }, {    /* Monte Carlo Test */
23896                 .key    = "\x9f\x5b\x51\x20\x0b\xf3\x34\xb5"
23897                           "\xd8\x2b\xe8\xc3\x72\x55\xc8\x48",
23898                 .klen   = 16,
23899                 .dt     = "\x63\x76\xbb\xe5\x29\x02\xba\x3b"
23900                           "\x67\xc9\x25\xfa\x70\x1f\x11\xac",
23901                 .dtlen  = 16,
23902                 .v      = "\x57\x2c\x8e\x76\x87\x26\x47\x97"
23903                           "\x7e\x74\xfb\xdd\xc4\x95\x01\xd1",
23904                 .vlen   = 16,
23905                 .result = "\x48\xe9\xbd\x0d\x06\xee\x18\xfb"
23906                           "\xe4\x57\x90\xd5\xc3\xfc\x9b\x73",
23907                 .rlen   = 16,
23908                 .loops  = 10000,
23909         },
23910 };
23911
23912 /*
23913  * SP800-90A DRBG Test vectors from
23914  * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
23915  *
23916  * Test vectors for DRBG with prediction resistance. All types of DRBGs
23917  * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
23918  * w/o personalization string, w/ and w/o additional input string).
23919  */
23920 static struct drbg_testvec drbg_pr_sha256_tv_template[] = {
23921         {
23922                 .entropy = (unsigned char *)
23923                         "\x72\x88\x4c\xcd\x6c\x85\x57\x70\xf7\x0b\x8b\x86"
23924                         "\xc1\xeb\xd2\x4e\x36\x14\xab\x18\xc4\x9c\xc9\xcf"
23925                         "\x1a\xe8\xf7\x7b\x02\x49\x73\xd7\xf1\x42\x7d\xc6"
23926                         "\x3f\x29\x2d\xec\xd3\x66\x51\x3f\x1d\x8d\x5b\x4e",
23927                 .entropylen = 48,
23928                 .entpra = (unsigned char *)
23929                         "\x38\x9c\x91\xfa\xc2\xa3\x46\x89\x56\x08\x3f\x62"
23930                         "\x73\xd5\x22\xa9\x29\x63\x3a\x1d\xe5\x5d\x5e\x4f"
23931                         "\x67\xb0\x67\x7a\x5e\x9e\x0c\x62",
23932                 .entprb = (unsigned char *)
23933                         "\xb2\x8f\x36\xb2\xf6\x8d\x39\x13\xfa\x6c\x66\xcf"
23934                         "\x62\x8a\x7e\x8c\x12\x33\x71\x9c\x69\xe4\xa5\xf0"
23935                         "\x8c\xee\xeb\x9c\xf5\x31\x98\x31",
23936                 .entprlen = 32,
23937                 .expected = (unsigned char *)
23938                         "\x52\x7b\xa3\xad\x71\x77\xa4\x49\x42\x04\x61\xc7"
23939                         "\xf0\xaf\xa5\xfd\xd3\xb3\x0d\x6a\x61\xba\x35\x49"
23940                         "\xbb\xaa\xaf\xe4\x25\x7d\xb5\x48\xaf\x5c\x18\x3d"
23941                         "\x33\x8d\x9d\x45\xdf\x98\xd5\x94\xa8\xda\x92\xfe"
23942                         "\xc4\x3c\x94\x2a\xcf\x7f\x7b\xf2\xeb\x28\xa9\xf1"
23943                         "\xe0\x86\x30\xa8\xfe\xf2\x48\x90\x91\x0c\x75\xb5"
23944                         "\x3c\x00\xf0\x4d\x09\x4f\x40\xa7\xa2\x8c\x52\xdf"
23945                         "\x52\xef\x17\xbf\x3d\xd1\xa2\x31\xb4\xb8\xdc\xe6"
23946                         "\x5b\x0d\x1f\x78\x36\xb4\xe6\x4b\xa7\x11\x25\xd5"
23947                         "\x94\xc6\x97\x36\xab\xf0\xe5\x31\x28\x6a\xbb\xce"
23948                         "\x30\x81\xa6\x8f\x27\x14\xf8\x1c",
23949                 .expectedlen = 128,
23950                 .addtla = NULL,
23951                 .addtlb = NULL,
23952                 .addtllen = 0,
23953                 .pers = NULL,
23954                 .perslen = 0,
23955         }, {
23956                 .entropy = (unsigned char *)
23957                         "\x5d\xf2\x14\xbc\xf6\xb5\x4e\x0b\xf0\x0d\x6f\x2d"
23958                         "\xe2\x01\x66\x7b\xd0\xa4\x73\xa4\x21\xdd\xb0\xc0"
23959                         "\x51\x79\x09\xf4\xea\xa9\x08\xfa\xa6\x67\xe0\xe1"
23960                         "\xd1\x88\xa8\xad\xee\x69\x74\xb3\x55\x06\x9b\xf6",
23961                 .entropylen = 48,
23962                 .entpra = (unsigned char *)
23963                         "\xef\x48\x06\xa2\xc2\x45\xf1\x44\xfa\x34\x2c\xeb"
23964                         "\x8d\x78\x3c\x09\x8f\x34\x72\x20\xf2\xe7\xfd\x13"
23965                         "\x76\x0a\xf6\xdc\x3c\xf5\xc0\x15",
23966                 .entprb = (unsigned char *)
23967                         "\x4b\xbe\xe5\x24\xed\x6a\x2d\x0c\xdb\x73\x5e\x09"
23968                         "\xf9\xad\x67\x7c\x51\x47\x8b\x6b\x30\x2a\xc6\xde"
23969                         "\x76\xaa\x55\x04\x8b\x0a\x72\x95",
23970                 .entprlen = 32,
23971                 .expected = (unsigned char *)
23972                         "\x3b\x14\x71\x99\xa1\xda\xa0\x42\xe6\xc8\x85\x32"
23973                         "\x70\x20\x32\x53\x9a\xbe\xd1\x1e\x15\xef\xfb\x4c"
23974                         "\x25\x6e\x19\x3a\xf0\xb9\xcb\xde\xf0\x3b\xc6\x18"
23975                         "\x4d\x85\x5a\x9b\xf1\xe3\xc2\x23\x03\x93\x08\xdb"
23976                         "\xa7\x07\x4b\x33\x78\x40\x4d\xeb\x24\xf5\x6e\x81"
23977                         "\x4a\x1b\x6e\xa3\x94\x52\x43\xb0\xaf\x2e\x21\xf4"
23978                         "\x42\x46\x8e\x90\xed\x34\x21\x75\xea\xda\x67\xb6"
23979                         "\xe4\xf6\xff\xc6\x31\x6c\x9a\x5a\xdb\xb3\x97\x13"
23980                         "\x09\xd3\x20\x98\x33\x2d\x6d\xd7\xb5\x6a\xa8\xa9"
23981                         "\x9a\x5b\xd6\x87\x52\xa1\x89\x2b\x4b\x9c\x64\x60"
23982                         "\x50\x47\xa3\x63\x81\x16\xaf\x19",
23983                 .expectedlen = 128,
23984                 .addtla = (unsigned char *)
23985                         "\xbe\x13\xdb\x2a\xe9\xa8\xfe\x09\x97\xe1\xce\x5d"
23986                         "\xe8\xbb\xc0\x7c\x4f\xcb\x62\x19\x3f\x0f\xd2\xad"
23987                         "\xa9\xd0\x1d\x59\x02\xc4\xff\x70",
23988                 .addtlb = (unsigned char *)
23989                         "\x6f\x96\x13\xe2\xa7\xf5\x6c\xfe\xdf\x66\xe3\x31"
23990                         "\x63\x76\xbf\x20\x27\x06\x49\xf1\xf3\x01\x77\x41"
23991                         "\x9f\xeb\xe4\x38\xfe\x67\x00\xcd",
23992                 .addtllen = 32,
23993                 .pers = NULL,
23994                 .perslen = 0,
23995         }, {
23996                 .entropy = (unsigned char *)
23997                         "\xc6\x1c\xaf\x83\xa2\x56\x38\xf9\xb0\xbc\xd9\x85"
23998                         "\xf5\x2e\xc4\x46\x9c\xe1\xb9\x40\x98\x70\x10\x72"
23999                         "\xd7\x7d\x15\x85\xa1\x83\x5a\x97\xdf\xc8\xa8\xe8"
24000                         "\x03\x4c\xcb\x70\x35\x8b\x90\x94\x46\x8a\x6e\xa1",
24001                 .entropylen = 48,
24002                 .entpra = (unsigned char *)
24003                         "\xc9\x05\xa4\xcf\x28\x80\x4b\x93\x0f\x8b\xc6\xf9"
24004                         "\x09\x41\x58\x74\xe9\xec\x28\xc7\x53\x0a\x73\x60"
24005                         "\xba\x0a\xde\x57\x5b\x4b\x9f\x29",
24006                 .entprb = (unsigned char *)
24007                         "\x4f\x31\xd2\xeb\xac\xfa\xa8\xe2\x01\x7d\xf3\xbd"
24008                         "\x42\xbd\x20\xa0\x30\x65\x74\xd5\x5d\xd2\xad\xa4"
24009                         "\xa9\xeb\x1f\x4d\xf6\xfd\xb8\x26",
24010                 .entprlen = 32,
24011                 .expected = (unsigned char *)
24012                         "\xf6\x13\x05\xcb\x83\x60\x16\x42\x49\x1d\xc6\x25"
24013                         "\x3b\x8c\x31\xa3\xbe\x8b\xbd\x1c\xe2\xec\x1d\xde"
24014                         "\xbb\xbf\xa1\xac\xa8\x9f\x50\xce\x69\xce\xef\xd5"
24015                         "\xd6\xf2\xef\x6a\xf7\x81\x38\xdf\xbc\xa7\x5a\xb9"
24016                         "\xb2\x42\x65\xab\xe4\x86\x8d\x2d\x9d\x59\x99\x2c"
24017                         "\x5a\x0d\x71\x55\x98\xa4\x45\xc2\x8d\xdb\x05\x5e"
24018                         "\x50\x21\xf7\xcd\xe8\x98\x43\xce\x57\x74\x63\x4c"
24019                         "\xf3\xb1\xa5\x14\x1e\x9e\x01\xeb\x54\xd9\x56\xae"
24020                         "\xbd\xb6\x6f\x1a\x47\x6b\x3b\x44\xe4\xa2\xe9\x3c"
24021                         "\x6c\x83\x12\x30\xb8\x78\x7f\x8e\x54\x82\xd4\xfe"
24022                         "\x90\x35\x0d\x4c\x4d\x85\xe7\x13",
24023                 .expectedlen = 128,
24024                 .addtla = NULL,
24025                 .addtlb = NULL,
24026                 .addtllen = 0,
24027                 .pers = (unsigned char *)
24028                         "\xa5\xbf\xac\x4f\x71\xa1\xbb\x67\x94\xc6\x50\xc7"
24029                         "\x2a\x45\x9e\x10\xa8\xed\xf7\x52\x4f\xfe\x21\x90"
24030                         "\xa4\x1b\xe1\xe2\x53\xcc\x61\x47",
24031                 .perslen = 32,
24032         }, {
24033                 .entropy = (unsigned char *)
24034                         "\xb6\xc1\x8d\xdf\x99\x54\xbe\x95\x10\x48\xd9\xf6"
24035                         "\xd7\x48\xa8\x73\x2d\x74\xde\x1e\xde\x57\x7e\xf4"
24036                         "\x7b\x7b\x64\xef\x88\x7a\xa8\x10\x4b\xe1\xc1\x87"
24037                         "\xbb\x0b\xe1\x39\x39\x50\xaf\x68\x9c\xa2\xbf\x5e",
24038                 .entropylen = 48,
24039                 .entpra = (unsigned char *)
24040                         "\xdc\x81\x0a\x01\x58\xa7\x2e\xce\xee\x48\x8c\x7c"
24041                         "\x77\x9e\x3c\xf1\x17\x24\x7a\xbb\xab\x9f\xca\x12"
24042                         "\x19\xaf\x97\x2d\x5f\xf9\xff\xfc",
24043                 .entprb = (unsigned char *)
24044                         "\xaf\xfc\x4f\x98\x8b\x93\x95\xc1\xb5\x8b\x7f\x73"
24045                         "\x6d\xa6\xbe\x6d\x33\xeb\x2c\x82\xb1\xaf\xc1\xb6"
24046                         "\xb6\x05\xe2\x44\xaa\xfd\xe7\xdb",
24047                 .entprlen = 32,
24048                 .expected = (unsigned char *)
24049                         "\x51\x79\xde\x1c\x0f\x58\xf3\xf4\xc9\x57\x2e\x31"
24050                         "\xa7\x09\xa1\x53\x64\x63\xa2\xc5\x1d\x84\x88\x65"
24051                         "\x01\x1b\xc6\x16\x3c\x49\x5b\x42\x8e\x53\xf5\x18"
24052                         "\xad\x94\x12\x0d\x4f\x55\xcc\x45\x5c\x98\x0f\x42"
24053                         "\x28\x2f\x47\x11\xf9\xc4\x01\x97\x6b\xa0\x94\x50"
24054                         "\xa9\xd1\x5e\x06\x54\x3f\xdf\xbb\xc4\x98\xee\x8b"
24055                         "\xba\xa9\xfa\x49\xee\x1d\xdc\xfb\x50\xf6\x51\x9f"
24056                         "\x6c\x4a\x9a\x6f\x63\xa2\x7d\xad\xaf\x3a\x24\xa0"
24057                         "\xd9\x9f\x07\xeb\x15\xee\x26\xe0\xd5\x63\x39\xda"
24058                         "\x3c\x59\xd6\x33\x6c\x02\xe8\x05\x71\x46\x68\x44"
24059                         "\x63\x4a\x68\x72\xe9\xf5\x55\xfe",
24060                 .expectedlen = 128,
24061                 .addtla = (unsigned char *)
24062                         "\x15\x20\x2f\xf6\x98\x28\x63\xa2\xc4\x4e\xbb\x6c"
24063                         "\xb2\x25\x92\x61\x79\xc9\x22\xc4\x61\x54\x96\xff"
24064                         "\x4a\x85\xca\x80\xfe\x0d\x1c\xd0",
24065                 .addtlb = (unsigned char *)
24066                         "\xde\x29\x8e\x03\x42\x61\xa3\x28\x5e\xc8\x80\xc2"
24067                         "\x6d\xbf\xad\x13\xe1\x8d\x2a\xc7\xe8\xc7\x18\x89"
24068                         "\x42\x58\x9e\xd6\xcc\xad\x7b\x1e",
24069                 .addtllen = 32,
24070                 .pers = (unsigned char *)
24071                         "\x84\xc3\x73\x9e\xce\xb3\xbc\x89\xf7\x62\xb3\xe1"
24072                         "\xd7\x48\x45\x8a\xa9\xcc\xe9\xed\xd5\x81\x84\x52"
24073                         "\x82\x4c\xdc\x19\xb8\xf8\x92\x5c",
24074                 .perslen = 32,
24075         },
24076 };
24077
24078 static struct drbg_testvec drbg_pr_hmac_sha256_tv_template[] = {
24079         {
24080                 .entropy = (unsigned char *)
24081                         "\x99\x69\xe5\x4b\x47\x03\xff\x31\x78\x5b\x87\x9a"
24082                         "\x7e\x5c\x0e\xae\x0d\x3e\x30\x95\x59\xe9\xfe\x96"
24083                         "\xb0\x67\x6d\x49\xd5\x91\xea\x4d\x07\xd2\x0d\x46"
24084                         "\xd0\x64\x75\x7d\x30\x23\xca\xc2\x37\x61\x27\xab",
24085                 .entropylen = 48,
24086                 .entpra = (unsigned char *)
24087                         "\xc6\x0f\x29\x99\x10\x0f\x73\x8c\x10\xf7\x47\x92"
24088                         "\x67\x6a\x3f\xc4\xa2\x62\xd1\x37\x21\x79\x80\x46"
24089                         "\xe2\x9a\x29\x51\x81\x56\x9f\x54",
24090                 .entprb = (unsigned char *)
24091                         "\xc1\x1d\x45\x24\xc9\x07\x1b\xd3\x09\x60\x15\xfc"
24092                         "\xf7\xbc\x24\xa6\x07\xf2\x2f\xa0\x65\xc9\x37\x65"
24093                         "\x8a\x2a\x77\xa8\x69\x90\x89\xf4",
24094                 .entprlen = 32,
24095                 .expected = (unsigned char *)
24096                         "\xab\xc0\x15\x85\x60\x94\x80\x3a\x93\x8d\xff\xd2"
24097                         "\x0d\xa9\x48\x43\x87\x0e\xf9\x35\xb8\x2c\xfe\xc1"
24098                         "\x77\x06\xb8\xf5\x51\xb8\x38\x50\x44\x23\x5d\xd4"
24099                         "\x4b\x59\x9f\x94\xb3\x9b\xe7\x8d\xd4\x76\xe0\xcf"
24100                         "\x11\x30\x9c\x99\x5a\x73\x34\xe0\xa7\x8b\x37\xbc"
24101                         "\x95\x86\x23\x50\x86\xfa\x3b\x63\x7b\xa9\x1c\xf8"
24102                         "\xfb\x65\xef\xa2\x2a\x58\x9c\x13\x75\x31\xaa\x7b"
24103                         "\x2d\x4e\x26\x07\xaa\xc2\x72\x92\xb0\x1c\x69\x8e"
24104                         "\x6e\x01\xae\x67\x9e\xb8\x7c\x01\xa8\x9c\x74\x22"
24105                         "\xd4\x37\x2d\x6d\x75\x4a\xba\xbb\x4b\xf8\x96\xfc"
24106                         "\xb1\xcd\x09\xd6\x92\xd0\x28\x3f",
24107                 .expectedlen = 128,
24108                 .addtla = NULL,
24109                 .addtlb = NULL,
24110                 .addtllen = 0,
24111                 .pers = NULL,
24112                 .perslen = 0,
24113         }, {
24114                 .entropy = (unsigned char *)
24115                         "\xb9\x1f\xe9\xef\xdd\x9b\x7d\x20\xb6\xec\xe0\x2f"
24116                         "\xdb\x76\x24\xce\x41\xc8\x3a\x4a\x12\x7f\x3e\x2f"
24117                         "\xae\x05\x99\xea\xb5\x06\x71\x0d\x0c\x4c\xb4\x05"
24118                         "\x26\xc6\xbd\xf5\x7f\x2a\x3d\xf2\xb5\x49\x7b\xda",
24119                 .entropylen = 48,
24120                 .entpra = (unsigned char *)
24121                         "\xef\x67\x50\x9c\xa7\x7d\xdf\xb7\x2d\x81\x01\xa4"
24122                         "\x62\x81\x6a\x69\x5b\xb3\x37\x45\xa7\x34\x8e\x26"
24123                         "\x46\xd9\x26\xa2\x19\xd4\x94\x43",
24124                 .entprb = (unsigned char *)
24125                         "\x97\x75\x53\x53\xba\xb4\xa6\xb2\x91\x60\x71\x79"
24126                         "\xd1\x6b\x4a\x24\x9a\x34\x66\xcc\x33\xab\x07\x98"
24127                         "\x51\x78\x72\xb2\x79\xfd\x2c\xff",
24128                 .entprlen = 32,
24129                 .expected = (unsigned char *)
24130                         "\x9c\xdc\x63\x8a\x19\x23\x22\x66\x0c\xc5\xb9\xd7"
24131                         "\xfb\x2a\xb0\x31\xe3\x8a\x36\xa8\x5a\xa8\x14\xda"
24132                         "\x1e\xa9\xcc\xfe\xb8\x26\x44\x83\x9f\xf6\xff\xaa"
24133                         "\xc8\x98\xb8\x30\x35\x3b\x3d\x36\xd2\x49\xd4\x40"
24134                         "\x62\x0a\x65\x10\x76\x55\xef\xc0\x95\x9c\xa7\xda"
24135                         "\x3f\xcf\xb7\x7b\xc6\xe1\x28\x52\xfc\x0c\xe2\x37"
24136                         "\x0d\x83\xa7\x51\x4b\x31\x47\x3c\xe1\x3c\xae\x70"
24137                         "\x01\xc8\xa3\xd3\xc2\xac\x77\x9c\xd1\x68\x77\x9b"
24138                         "\x58\x27\x3b\xa5\x0f\xc2\x7a\x8b\x04\x65\x62\xd5"
24139                         "\xe8\xd6\xfe\x2a\xaf\xd3\xd3\xfe\xbd\x18\xfb\xcd"
24140                         "\xcd\x66\xb5\x01\x69\x66\xa0\x3c",
24141                 .expectedlen = 128,
24142                 .addtla = (unsigned char *)
24143                         "\x17\xc1\x56\xcb\xcc\x50\xd6\x03\x7d\x45\x76\xa3"
24144                         "\x75\x76\xc1\x4a\x66\x1b\x2e\xdf\xb0\x2e\x7d\x56"
24145                         "\x6d\x99\x3b\xc6\x58\xda\x03\xf6",
24146                 .addtlb = (unsigned char *)
24147                         "\x7c\x7b\x4a\x4b\x32\x5e\x6f\x67\x34\xf5\x21\x4c"
24148                         "\xf9\x96\xf9\xbf\x1c\x8c\x81\xd3\x9b\x60\x6a\x44"
24149                         "\xc6\x03\xa2\xfb\x13\x20\x19\xb7",
24150                 .addtllen = 32,
24151                 .pers = NULL,
24152                 .perslen = 0,
24153         }, {
24154                 .entropy = (unsigned char *)
24155                         "\x13\x54\x96\xfc\x1b\x7d\x28\xf3\x18\xc9\xa7\x89"
24156                         "\xb6\xb3\xc8\x72\xac\x00\xd4\x59\x36\x25\x05\xaf"
24157                         "\xa5\xdb\x96\xcb\x3c\x58\x46\x87\xa5\xaa\xbf\x20"
24158                         "\x3b\xfe\x23\x0e\xd1\xc7\x41\x0f\x3f\xc9\xb3\x67",
24159                 .entropylen = 48,
24160                 .entpra = (unsigned char *)
24161                         "\xe2\xbd\xb7\x48\x08\x06\xf3\xe1\x93\x3c\xac\x79"
24162                         "\xa7\x2b\x11\xda\xe3\x2e\xe1\x91\xa5\x02\x19\x57"
24163                         "\x20\x28\xad\xf2\x60\xd7\xcd\x45",
24164                 .entprb = (unsigned char *)
24165                         "\x8b\xd4\x69\xfc\xff\x59\x95\x95\xc6\x51\xde\x71"
24166                         "\x68\x5f\xfc\xf9\x4a\xab\xec\x5a\xcb\xbe\xd3\x66"
24167                         "\x1f\xfa\x74\xd3\xac\xa6\x74\x60",
24168                 .entprlen = 32,
24169                 .expected = (unsigned char *)
24170                         "\x1f\x9e\xaf\xe4\xd2\x46\xb7\x47\x41\x4c\x65\x99"
24171                         "\x01\xe9\x3b\xbb\x83\x0c\x0a\xb0\xc1\x3a\xe2\xb3"
24172                         "\x31\x4e\xeb\x93\x73\xee\x0b\x26\xc2\x63\xa5\x75"
24173                         "\x45\x99\xd4\x5c\x9f\xa1\xd4\x45\x87\x6b\x20\x61"
24174                         "\x40\xea\x78\xa5\x32\xdf\x9e\x66\x17\xaf\xb1\x88"
24175                         "\x9e\x2e\x23\xdd\xc1\xda\x13\x97\x88\xa5\xb6\x5e"
24176                         "\x90\x14\x4e\xef\x13\xab\x5c\xd9\x2c\x97\x9e\x7c"
24177                         "\xd7\xf8\xce\xea\x81\xf5\xcd\x71\x15\x49\x44\xce"
24178                         "\x83\xb6\x05\xfb\x7d\x30\xb5\x57\x2c\x31\x4f\xfc"
24179                         "\xfe\x80\xb6\xc0\x13\x0c\x5b\x9b\x2e\x8f\x3d\xfc"
24180                         "\xc2\xa3\x0c\x11\x1b\x80\x5f\xf3",
24181                 .expectedlen = 128,
24182                 .addtla = NULL,
24183                 .addtlb = NULL,
24184                 .addtllen = 0,
24185                 .pers = (unsigned char *)
24186                         "\x64\xb6\xfc\x60\xbc\x61\x76\x23\x6d\x3f\x4a\x0f"
24187                         "\xe1\xb4\xd5\x20\x9e\x70\xdd\x03\x53\x6d\xbf\xce"
24188                         "\xcd\x56\x80\xbc\xb8\x15\xc8\xaa",
24189                 .perslen = 32,
24190         }, {
24191                 .entropy = (unsigned char *)
24192                         "\xc7\xcc\xbc\x67\x7e\x21\x66\x1e\x27\x2b\x63\xdd"
24193                         "\x3a\x78\xdc\xdf\x66\x6d\x3f\x24\xae\xcf\x37\x01"
24194                         "\xa9\x0d\x89\x8a\xa7\xdc\x81\x58\xae\xb2\x10\x15"
24195                         "\x7e\x18\x44\x6d\x13\xea\xdf\x37\x85\xfe\x81\xfb",
24196                 .entropylen = 48,
24197                 .entpra = (unsigned char *)
24198                         "\x7b\xa1\x91\x5b\x3c\x04\xc4\x1b\x1d\x19\x2f\x1a"
24199                         "\x18\x81\x60\x3c\x6c\x62\x91\xb7\xe9\xf5\xcb\x96"
24200                         "\xbb\x81\x6a\xcc\xb5\xae\x55\xb6",
24201                 .entprb = (unsigned char *)
24202                         "\x99\x2c\xc7\x78\x7e\x3b\x88\x12\xef\xbe\xd3\xd2"
24203                         "\x7d\x2a\xa5\x86\xda\x8d\x58\x73\x4a\x0a\xb2\x2e"
24204                         "\xbb\x4c\x7e\xe3\x9a\xb6\x81\xc1",
24205                 .entprlen = 32,
24206                 .expected = (unsigned char *)
24207                         "\x95\x6f\x95\xfc\x3b\xb7\xfe\x3e\xd0\x4e\x1a\x14"
24208                         "\x6c\x34\x7f\x7b\x1d\x0d\x63\x5e\x48\x9c\x69\xe6"
24209                         "\x46\x07\xd2\x87\xf3\x86\x52\x3d\x98\x27\x5e\xd7"
24210                         "\x54\xe7\x75\x50\x4f\xfb\x4d\xfd\xac\x2f\x4b\x77"
24211                         "\xcf\x9e\x8e\xcc\x16\xa2\x24\xcd\x53\xde\x3e\xc5"
24212                         "\x55\x5d\xd5\x26\x3f\x89\xdf\xca\x8b\x4e\x1e\xb6"
24213                         "\x88\x78\x63\x5c\xa2\x63\x98\x4e\x6f\x25\x59\xb1"
24214                         "\x5f\x2b\x23\xb0\x4b\xa5\x18\x5d\xc2\x15\x74\x40"
24215                         "\x59\x4c\xb4\x1e\xcf\x9a\x36\xfd\x43\xe2\x03\xb8"
24216                         "\x59\x91\x30\x89\x2a\xc8\x5a\x43\x23\x7c\x73\x72"
24217                         "\xda\x3f\xad\x2b\xba\x00\x6b\xd1",
24218                 .expectedlen = 128,
24219                 .addtla = (unsigned char *)
24220                         "\x18\xe8\x17\xff\xef\x39\xc7\x41\x5c\x73\x03\x03"
24221                         "\xf6\x3d\xe8\x5f\xc8\xab\xe4\xab\x0f\xad\xe8\xd6"
24222                         "\x86\x88\x55\x28\xc1\x69\xdd\x76",
24223                 .addtlb = (unsigned char *)
24224                         "\xac\x07\xfc\xbe\x87\x0e\xd3\xea\x1f\x7e\xb8\xe7"
24225                         "\x9d\xec\xe8\xe7\xbc\xf3\x18\x25\x77\x35\x4a\xaa"
24226                         "\x00\x99\x2a\xdd\x0a\x00\x50\x82",
24227                 .addtllen = 32,
24228                 .pers = (unsigned char *)
24229                         "\xbc\x55\xab\x3c\xf6\x52\xb0\x11\x3d\x7b\x90\xb8"
24230                         "\x24\xc9\x26\x4e\x5a\x1e\x77\x0d\x3d\x58\x4a\xda"
24231                         "\xd1\x81\xe9\xf8\xeb\x30\x8f\x6f",
24232                 .perslen = 32,
24233         },
24234 };
24235
24236 static struct drbg_testvec drbg_pr_ctr_aes128_tv_template[] = {
24237         {
24238                 .entropy = (unsigned char *)
24239                         "\xd1\x44\xc6\x61\x81\x6d\xca\x9d\x15\x28\x8a\x42"
24240                         "\x94\xd7\x28\x9c\x43\x77\x19\x29\x1a\x6d\xc3\xa2",
24241                 .entropylen = 24,
24242                 .entpra = (unsigned char *)
24243                         "\x96\xd8\x9e\x45\x32\xc9\xd2\x08\x7a\x6d\x97\x15"
24244                         "\xb4\xec\x80\xb1",
24245                 .entprb = (unsigned char *)
24246                         "\x8b\xb6\x72\xb5\x24\x0b\x98\x65\x95\x95\xe9\xc9"
24247                         "\x28\x07\xeb\xc2",
24248                 .entprlen = 16,
24249                 .expected = (unsigned char *)
24250                         "\x70\x19\xd0\x4c\x45\x78\xd6\x68\xa9\x9a\xaa\xfe"
24251                         "\xc1\xdf\x27\x9a\x1c\x0d\x0d\xf7\x24\x75\x46\xcc"
24252                         "\x77\x6b\xdf\x89\xc6\x94\xdc\x74\x50\x10\x70\x18"
24253                         "\x9b\xdc\x96\xb4\x89\x23\x40\x1a\xce\x09\x87\xce"
24254                         "\xd2\xf3\xd5\xe4\x51\x67\x74\x11\x5a\xcc\x8b\x3b"
24255                         "\x8a\xf1\x23\xa8",
24256                 .expectedlen = 64,
24257                 .addtla = NULL,
24258                 .addtlb = NULL,
24259                 .addtllen = 0,
24260                 .pers = NULL,
24261                 .perslen = 0,
24262         }, {
24263                 .entropy = (unsigned char *)
24264                         "\x8e\x83\xe0\xeb\x37\xea\x3e\x53\x5e\x17\x6e\x77"
24265                         "\xbd\xb1\x53\x90\xfc\xdc\xc1\x3c\x9a\x88\x22\x94",
24266                 .entropylen = 24,
24267                 .entpra = (unsigned char *)
24268                         "\x6a\x85\xe7\x37\xc8\xf1\x04\x31\x98\x4f\xc8\x73"
24269                         "\x67\xd1\x08\xf8",
24270                 .entprb = (unsigned char *)
24271                         "\xd7\xa4\x68\xe2\x12\x74\xc3\xd9\xf1\xb7\x05\xbc"
24272                         "\xd4\xba\x04\x58",
24273                 .entprlen = 16,
24274                 .expected = (unsigned char *)
24275                         "\x78\xd6\xa6\x70\xff\xd1\x82\xf5\xa2\x88\x7f\x6d"
24276                         "\x3d\x8c\x39\xb1\xa8\xcb\x2c\x91\xab\x14\x7e\xbc"
24277                         "\x95\x45\x9f\x24\xb8\x20\xac\x21\x23\xdb\x72\xd7"
24278                         "\x12\x8d\x48\x95\xf3\x19\x0c\x43\xc6\x19\x45\xfc"
24279                         "\x8b\xac\x40\x29\x73\x00\x03\x45\x5e\x12\xff\x0c"
24280                         "\xc1\x02\x41\x82",
24281                 .expectedlen = 64,
24282                 .addtla = (unsigned char *)
24283                         "\xa2\xd9\x38\xcf\x8b\x29\x67\x5b\x65\x62\x6f\xe8"
24284                         "\xeb\xb3\x01\x76",
24285                 .addtlb = (unsigned char *)
24286                         "\x59\x63\x1e\x81\x8a\x14\xa8\xbb\xa1\xb8\x41\x25"
24287                         "\xd0\x7f\xcc\x43",
24288                 .addtllen = 16,
24289                 .pers = NULL,
24290                 .perslen = 0,
24291         }, {
24292                 .entropy = (unsigned char *)
24293                         "\x04\xd9\x49\xa6\xdc\xe8\x6e\xbb\xf1\x08\x77\x2b"
24294                         "\x9e\x08\xca\x92\x65\x16\xda\x99\xa2\x59\xf3\xe8",
24295                 .entropylen = 24,
24296                 .entpra = (unsigned char *)
24297                         "\x38\x7e\x3f\x6b\x51\x70\x7b\x20\xec\x53\xd0\x66"
24298                         "\xc3\x0f\xe3\xb0",
24299                 .entprb = (unsigned char *)
24300                         "\xe0\x86\xa6\xaa\x5f\x72\x2f\xad\xf7\xef\x06\xb8"
24301                         "\xd6\x9c\x9d\xe8",
24302                 .entprlen = 16,
24303                 .expected = (unsigned char *)
24304                         "\xc9\x0a\xaf\x85\x89\x71\x44\x66\x4f\x25\x0b\x2b"
24305                         "\xde\xd8\xfa\xff\x52\x5a\x1b\x32\x5e\x41\x7a\x10"
24306                         "\x1f\xef\x1e\x62\x23\xe9\x20\x30\xc9\x0d\xad\x69"
24307                         "\xb4\x9c\x5b\xf4\x87\x42\xd5\xae\x5e\x5e\x43\xcc"
24308                         "\xd9\xfd\x0b\x93\x4a\xe3\xd4\x06\x37\x36\x0f\x3f"
24309                         "\x72\x82\x0c\xcf",
24310                 .expectedlen = 64,
24311                 .addtla = NULL,
24312                 .addtlb = NULL,
24313                 .addtllen = 0,
24314                 .pers = (unsigned char *)
24315                         "\xbf\xa4\x9a\x8f\x7b\xd8\xb1\x7a\x9d\xfa\x45\xed"
24316                         "\x21\x52\xb3\xad",
24317                 .perslen = 16,
24318         }, {
24319                 .entropy = (unsigned char *)
24320                         "\x92\x89\x8f\x31\xfa\x1c\xff\x6d\x18\x2f\x26\x06"
24321                         "\x43\xdf\xf8\x18\xc2\xa4\xd9\x72\xc3\xb9\xb6\x97",
24322                 .entropylen = 24,
24323                 .entpra = (unsigned char *)
24324                         "\x20\x72\x8a\x06\xf8\x6f\x8d\xd4\x41\xe2\x72\xb7"
24325                         "\xc4\x2c\xe8\x10",
24326                 .entprb = (unsigned char *)
24327                         "\x3d\xb0\xf0\x94\xf3\x05\x50\x33\x17\x86\x3e\x22"
24328                         "\x08\xf7\xa5\x01",
24329                 .entprlen = 16,
24330                 .expected = (unsigned char *)
24331                         "\x5a\x35\x39\x87\x0f\x4d\x22\xa4\x09\x24\xee\x71"
24332                         "\xc9\x6f\xac\x72\x0a\xd6\xf0\x88\x82\xd0\x83\x28"
24333                         "\x73\xec\x3f\x93\xd8\xab\x45\x23\xf0\x7e\xac\x45"
24334                         "\x14\x5e\x93\x9f\xb1\xd6\x76\x43\x3d\xb6\xe8\x08"
24335                         "\x88\xf6\xda\x89\x08\x77\x42\xfe\x1a\xf4\x3f\xc4"
24336                         "\x23\xc5\x1f\x68",
24337                 .expectedlen = 64,
24338                 .addtla = (unsigned char *)
24339                         "\x1a\x40\xfa\xe3\xcc\x6c\x7c\xa0\xf8\xda\xba\x59"
24340                         "\x23\x6d\xad\x1d",
24341                 .addtlb = (unsigned char *)
24342                         "\x9f\x72\x76\x6c\xc7\x46\xe5\xed\x2e\x53\x20\x12"
24343                         "\xbc\x59\x31\x8c",
24344                 .addtllen = 16,
24345                 .pers = (unsigned char *)
24346                         "\xea\x65\xee\x60\x26\x4e\x7e\xb6\x0e\x82\x68\xc4"
24347                         "\x37\x3c\x5c\x0b",
24348                 .perslen = 16,
24349         },
24350 };
24351
24352 /*
24353  * SP800-90A DRBG Test vectors from
24354  * http://csrc.nist.gov/groups/STM/cavp/documents/drbg/drbgtestvectors.zip
24355  *
24356  * Test vectors for DRBG without prediction resistance. All types of DRBGs
24357  * (Hash, HMAC, CTR) are tested with all permutations of use cases (w/ and
24358  * w/o personalization string, w/ and w/o additional input string).
24359  */
24360 static struct drbg_testvec drbg_nopr_sha256_tv_template[] = {
24361         {
24362                 .entropy = (unsigned char *)
24363                         "\xa6\x5a\xd0\xf3\x45\xdb\x4e\x0e\xff\xe8\x75\xc3"
24364                         "\xa2\xe7\x1f\x42\xc7\x12\x9d\x62\x0f\xf5\xc1\x19"
24365                         "\xa9\xef\x55\xf0\x51\x85\xe0\xfb\x85\x81\xf9\x31"
24366                         "\x75\x17\x27\x6e\x06\xe9\x60\x7d\xdb\xcb\xcc\x2e",
24367                 .entropylen = 48,
24368                 .expected = (unsigned char *)
24369                         "\xd3\xe1\x60\xc3\x5b\x99\xf3\x40\xb2\x62\x82\x64"
24370                         "\xd1\x75\x10\x60\xe0\x04\x5d\xa3\x83\xff\x57\xa5"
24371                         "\x7d\x73\xa6\x73\xd2\xb8\xd8\x0d\xaa\xf6\xa6\xc3"
24372                         "\x5a\x91\xbb\x45\x79\xd7\x3f\xd0\xc8\xfe\xd1\x11"
24373                         "\xb0\x39\x13\x06\x82\x8a\xdf\xed\x52\x8f\x01\x81"
24374                         "\x21\xb3\xfe\xbd\xc3\x43\xe7\x97\xb8\x7d\xbb\x63"
24375                         "\xdb\x13\x33\xde\xd9\xd1\xec\xe1\x77\xcf\xa6\xb7"
24376                         "\x1f\xe8\xab\x1d\xa4\x66\x24\xed\x64\x15\xe5\x1c"
24377                         "\xcd\xe2\xc7\xca\x86\xe2\x83\x99\x0e\xea\xeb\x91"
24378                         "\x12\x04\x15\x52\x8b\x22\x95\x91\x02\x81\xb0\x2d"
24379                         "\xd4\x31\xf4\xc9\xf7\x04\x27\xdf",
24380                 .expectedlen = 128,
24381                 .addtla = NULL,
24382                 .addtlb = NULL,
24383                 .addtllen = 0,
24384                 .pers = NULL,
24385                 .perslen = 0,
24386         }, {
24387                 .entropy = (unsigned char *)
24388                         "\x73\xd3\xfb\xa3\x94\x5f\x2b\x5f\xb9\x8f\xf6\x9c"
24389                         "\x8a\x93\x17\xae\x19\xc3\x4c\xc3\xd6\xca\xa3\x2d"
24390                         "\x16\xfc\x42\xd2\x2d\xd5\x6f\x56\xcc\x1d\x30\xff"
24391                         "\x9e\x06\x3e\x09\xce\x58\xe6\x9a\x35\xb3\xa6\x56",
24392                 .entropylen = 48,
24393                 .expected = (unsigned char *)
24394                         "\x71\x7b\x93\x46\x1a\x40\xaa\x35\xa4\xaa\xc5\xe7"
24395                         "\x6d\x5b\x5b\x8a\xa0\xdf\x39\x7d\xae\x71\x58\x5b"
24396                         "\x3c\x7c\xb4\xf0\x89\xfa\x4a\x8c\xa9\x5c\x54\xc0"
24397                         "\x40\xdf\xbc\xce\x26\x81\x34\xf8\xba\x7d\x1c\xe8"
24398                         "\xad\x21\xe0\x74\xcf\x48\x84\x30\x1f\xa1\xd5\x4f"
24399                         "\x81\x42\x2f\xf4\xdb\x0b\x23\xf8\x73\x27\xb8\x1d"
24400                         "\x42\xf8\x44\x58\xd8\x5b\x29\x27\x0a\xf8\x69\x59"
24401                         "\xb5\x78\x44\xeb\x9e\xe0\x68\x6f\x42\x9a\xb0\x5b"
24402                         "\xe0\x4e\xcb\x6a\xaa\xe2\xd2\xd5\x33\x25\x3e\xe0"
24403                         "\x6c\xc7\x6a\x07\xa5\x03\x83\x9f\xe2\x8b\xd1\x1c"
24404                         "\x70\xa8\x07\x59\x97\xeb\xf6\xbe",
24405                 .expectedlen = 128,
24406                 .addtla = (unsigned char *)
24407                         "\xf4\xd5\x98\x3d\xa8\xfc\xfa\x37\xb7\x54\x67\x73"
24408                         "\xc7\xc3\xdd\x47\x34\x71\x02\x5d\xc1\xa0\xd3\x10"
24409                         "\xc1\x8b\xbd\xf5\x66\x34\x6f\xdd",
24410                 .addtlb = (unsigned char *)
24411                         "\xf7\x9e\x6a\x56\x0e\x73\xe9\xd9\x7a\xd1\x69\xe0"
24412                         "\x6f\x8c\x55\x1c\x44\xd1\xce\x6f\x28\xcc\xa4\x4d"
24413                         "\xa8\xc0\x85\xd1\x5a\x0c\x59\x40",
24414                 .addtllen = 32,
24415                 .pers = NULL,
24416                 .perslen = 0,
24417         }, {
24418                 .entropy = (unsigned char *)
24419                         "\x2a\x85\xa9\x8b\xd0\xda\x83\xd6\xad\xab\x9f\xbb"
24420                         "\x54\x31\x15\x95\x1c\x4d\x49\x9f\x6a\x15\xf6\xe4"
24421                         "\x15\x50\x88\x06\x29\x0d\xed\x8d\xb9\x6f\x96\xe1"
24422                         "\x83\x9f\xf7\x88\xda\x84\xbf\x44\x28\xd9\x1d\xaa",
24423                 .entropylen = 48,
24424                 .expected = (unsigned char *)
24425                         "\x2d\x55\xde\xc9\xed\x05\x47\x07\x3d\x04\xfc\x28"
24426                         "\x0f\x92\xf0\x4d\xd8\x00\x32\x47\x0a\x1b\x1c\x4b"
24427                         "\xef\xd9\x97\xa1\x17\x67\xda\x26\x6c\xfe\x76\x46"
24428                         "\x6f\xbc\x6d\x82\x4e\x83\x8a\x98\x66\x6c\x01\xb6"
24429                         "\xe6\x64\xe0\x08\x10\x6f\xd3\x5d\x90\xe7\x0d\x72"
24430                         "\xa6\xa7\xe3\xbb\x98\x11\x12\x56\x23\xc2\x6d\xd1"
24431                         "\xc8\xa8\x7a\x39\xf3\x34\xe3\xb8\xf8\x66\x00\x77"
24432                         "\x7d\xcf\x3c\x3e\xfa\xc9\x0f\xaf\xe0\x24\xfa\xe9"
24433                         "\x84\xf9\x6a\x01\xf6\x35\xdb\x5c\xab\x2a\xef\x4e"
24434                         "\xac\xab\x55\xb8\x9b\xef\x98\x68\xaf\x51\xd8\x16"
24435                         "\xa5\x5e\xae\xf9\x1e\xd2\xdb\xe6",
24436                 .expectedlen = 128,
24437                 .addtla = NULL,
24438                 .addtlb = NULL,
24439                 .addtllen = 0,
24440                 .pers = (unsigned char *)
24441                         "\xa8\x80\xec\x98\x30\x98\x15\xd2\xc6\xc4\x68\xf1"
24442                         "\x3a\x1c\xbf\xce\x6a\x40\x14\xeb\x36\x99\x53\xda"
24443                         "\x57\x6b\xce\xa4\x1c\x66\x3d\xbc",
24444                 .perslen = 32,
24445         }, {
24446                 .entropy = (unsigned char *)
24447                         "\x69\xed\x82\xa9\xc5\x7b\xbf\xe5\x1d\x2f\xcb\x7a"
24448                         "\xd3\x50\x7d\x96\xb4\xb9\x2b\x50\x77\x51\x27\x74"
24449                         "\x33\x74\xba\xf1\x30\xdf\x8e\xdf\x87\x1d\x87\xbc"
24450                         "\x96\xb2\xc3\xa7\xed\x60\x5e\x61\x4e\x51\x29\x1a",
24451                 .entropylen = 48,
24452                 .expected = (unsigned char *)
24453                         "\xa5\x71\x24\x31\x11\xfe\x13\xe1\xa8\x24\x12\xfb"
24454                         "\x37\xa1\x27\xa5\xab\x77\xa1\x9f\xae\x8f\xaf\x13"
24455                         "\x93\xf7\x53\x85\x91\xb6\x1b\xab\xd4\x6b\xea\xb6"
24456                         "\xef\xda\x4c\x90\x6e\xef\x5f\xde\xe1\xc7\x10\x36"
24457                         "\xd5\x67\xbd\x14\xb6\x89\x21\x0c\xc9\x92\x65\x64"
24458                         "\xd0\xf3\x23\xe0\x7f\xd1\xe8\x75\xc2\x85\x06\xea"
24459                         "\xca\xc0\xcb\x79\x2d\x29\x82\xfc\xaa\x9a\xc6\x95"
24460                         "\x7e\xdc\x88\x65\xba\xec\x0e\x16\x87\xec\xa3\x9e"
24461                         "\xd8\x8c\x80\xab\x3a\x64\xe0\xcb\x0e\x45\x98\xdd"
24462                         "\x7c\x6c\x6c\x26\x11\x13\xc8\xce\xa9\x47\xa6\x06"
24463                         "\x57\xa2\x66\xbb\x2d\x7f\xf3\xc1",
24464                 .expectedlen = 128,
24465                 .addtla = (unsigned char *)
24466                         "\x74\xd3\x6d\xda\xe8\xd6\x86\x5f\x63\x01\xfd\xf2"
24467                         "\x7d\x06\x29\x6d\x94\xd1\x66\xf0\xd2\x72\x67\x4e"
24468                         "\x77\xc5\x3d\x9e\x03\xe3\xa5\x78",
24469                 .addtlb = (unsigned char *)
24470                         "\xf6\xb6\x3d\xf0\x7c\x26\x04\xc5\x8b\xcd\x3e\x6a"
24471                         "\x9f\x9c\x3a\x2e\xdb\x47\x87\xe5\x8e\x00\x5e\x2b"
24472                         "\x74\x7f\xa6\xf6\x80\xcd\x9b\x21",
24473                 .addtllen = 32,
24474                 .pers = (unsigned char *)
24475                         "\x74\xa6\xe0\x08\xf9\x27\xee\x1d\x6e\x3c\x28\x20"
24476                         "\x87\xdd\xd7\x54\x31\x47\x78\x4b\xe5\x6d\xa3\x73"
24477                         "\xa9\x65\xb1\x10\xc1\xdc\x77\x7c",
24478                 .perslen = 32,
24479         },
24480 };
24481
24482 static struct drbg_testvec drbg_nopr_hmac_sha256_tv_template[] = {
24483         {
24484                 .entropy = (unsigned char *)
24485                         "\xca\x85\x19\x11\x34\x93\x84\xbf\xfe\x89\xde\x1c"
24486                         "\xbd\xc4\x6e\x68\x31\xe4\x4d\x34\xa4\xfb\x93\x5e"
24487                         "\xe2\x85\xdd\x14\xb7\x1a\x74\x88\x65\x9b\xa9\x6c"
24488                         "\x60\x1d\xc6\x9f\xc9\x02\x94\x08\x05\xec\x0c\xa8",
24489                 .entropylen = 48,
24490                 .expected = (unsigned char *)
24491                         "\xe5\x28\xe9\xab\xf2\xde\xce\x54\xd4\x7c\x7e\x75"
24492                         "\xe5\xfe\x30\x21\x49\xf8\x17\xea\x9f\xb4\xbe\xe6"
24493                         "\xf4\x19\x96\x97\xd0\x4d\x5b\x89\xd5\x4f\xbb\x97"
24494                         "\x8a\x15\xb5\xc4\x43\xc9\xec\x21\x03\x6d\x24\x60"
24495                         "\xb6\xf7\x3e\xba\xd0\xdc\x2a\xba\x6e\x62\x4a\xbf"
24496                         "\x07\x74\x5b\xc1\x07\x69\x4b\xb7\x54\x7b\xb0\x99"
24497                         "\x5f\x70\xde\x25\xd6\xb2\x9e\x2d\x30\x11\xbb\x19"
24498                         "\xd2\x76\x76\xc0\x71\x62\xc8\xb5\xcc\xde\x06\x68"
24499                         "\x96\x1d\xf8\x68\x03\x48\x2c\xb3\x7e\xd6\xd5\xc0"
24500                         "\xbb\x8d\x50\xcf\x1f\x50\xd4\x76\xaa\x04\x58\xbd"
24501                         "\xab\xa8\x06\xf4\x8b\xe9\xdc\xb8",
24502                 .expectedlen = 128,
24503                 .addtla = NULL,
24504                 .addtlb = NULL,
24505                 .addtllen = 0,
24506                 .pers = NULL,
24507                 .perslen = 0,
24508         }, {
24509                 .entropy = (unsigned char *)
24510                         "\xf9\x7a\x3c\xfd\x91\xfa\xa0\x46\xb9\xe6\x1b\x94"
24511                         "\x93\xd4\x36\xc4\x93\x1f\x60\x4b\x22\xf1\x08\x15"
24512                         "\x21\xb3\x41\x91\x51\xe8\xff\x06\x11\xf3\xa7\xd4"
24513                         "\x35\x95\x35\x7d\x58\x12\x0b\xd1\xe2\xdd\x8a\xed",
24514                 .entropylen = 48,
24515                 .expected = (unsigned char *)
24516                         "\xc6\x87\x1c\xff\x08\x24\xfe\x55\xea\x76\x89\xa5"
24517                         "\x22\x29\x88\x67\x30\x45\x0e\x5d\x36\x2d\xa5\xbf"
24518                         "\x59\x0d\xcf\x9a\xcd\x67\xfe\xd4\xcb\x32\x10\x7d"
24519                         "\xf5\xd0\x39\x69\xa6\x6b\x1f\x64\x94\xfd\xf5\xd6"
24520                         "\x3d\x5b\x4d\x0d\x34\xea\x73\x99\xa0\x7d\x01\x16"
24521                         "\x12\x6d\x0d\x51\x8c\x7c\x55\xba\x46\xe1\x2f\x62"
24522                         "\xef\xc8\xfe\x28\xa5\x1c\x9d\x42\x8e\x6d\x37\x1d"
24523                         "\x73\x97\xab\x31\x9f\xc7\x3d\xed\x47\x22\xe5\xb4"
24524                         "\xf3\x00\x04\x03\x2a\x61\x28\xdf\x5e\x74\x97\xec"
24525                         "\xf8\x2c\xa7\xb0\xa5\x0e\x86\x7e\xf6\x72\x8a\x4f"
24526                         "\x50\x9a\x8c\x85\x90\x87\x03\x9c",
24527                 .expectedlen = 128,
24528                 .addtla = (unsigned char *)
24529                         "\x51\x72\x89\xaf\xe4\x44\xa0\xfe\x5e\xd1\xa4\x1d"
24530                         "\xbb\xb5\xeb\x17\x15\x00\x79\xbd\xd3\x1e\x29\xcf"
24531                         "\x2f\xf3\x00\x34\xd8\x26\x8e\x3b",
24532                 .addtlb = (unsigned char *)
24533                         "\x88\x02\x8d\x29\xef\x80\xb4\xe6\xf0\xfe\x12\xf9"
24534                         "\x1d\x74\x49\xfe\x75\x06\x26\x82\xe8\x9c\x57\x14"
24535                         "\x40\xc0\xc9\xb5\x2c\x42\xa6\xe0",
24536                 .addtllen = 32,
24537                 .pers = NULL,
24538                 .perslen = 0,
24539         }, {
24540                 .entropy = (unsigned char *)
24541                         "\x8d\xf0\x13\xb4\xd1\x03\x52\x30\x73\x91\x7d\xdf"
24542                         "\x6a\x86\x97\x93\x05\x9e\x99\x43\xfc\x86\x54\x54"
24543                         "\x9e\x7a\xb2\x2f\x7c\x29\xf1\x22\xda\x26\x25\xaf"
24544                         "\x2d\xdd\x4a\xbc\xce\x3c\xf4\xfa\x46\x59\xd8\x4e",
24545                 .entropylen = 48,
24546                 .expected = (unsigned char *)
24547                         "\xb9\x1c\xba\x4c\xc8\x4f\xa2\x5d\xf8\x61\x0b\x81"
24548                         "\xb6\x41\x40\x27\x68\xa2\x09\x72\x34\x93\x2e\x37"
24549                         "\xd5\x90\xb1\x15\x4c\xbd\x23\xf9\x74\x52\xe3\x10"
24550                         "\xe2\x91\xc4\x51\x46\x14\x7f\x0d\xa2\xd8\x17\x61"
24551                         "\xfe\x90\xfb\xa6\x4f\x94\x41\x9c\x0f\x66\x2b\x28"
24552                         "\xc1\xed\x94\xda\x48\x7b\xb7\xe7\x3e\xec\x79\x8f"
24553                         "\xbc\xf9\x81\xb7\x91\xd1\xbe\x4f\x17\x7a\x89\x07"
24554                         "\xaa\x3c\x40\x16\x43\xa5\xb6\x2b\x87\xb8\x9d\x66"
24555                         "\xb3\xa6\x0e\x40\xd4\xa8\xe4\xe9\xd8\x2a\xf6\xd2"
24556                         "\x70\x0e\x6f\x53\x5c\xdb\x51\xf7\x5c\x32\x17\x29"
24557                         "\x10\x37\x41\x03\x0c\xcc\x3a\x56",
24558                 .expectedlen = 128,
24559                 .addtla = NULL,
24560                 .addtlb = NULL,
24561                 .addtllen = 0,
24562                 .pers = (unsigned char *)
24563                         "\xb5\x71\xe6\x6d\x7c\x33\x8b\xc0\x7b\x76\xad\x37"
24564                         "\x57\xbb\x2f\x94\x52\xbf\x7e\x07\x43\x7a\xe8\x58"
24565                         "\x1c\xe7\xbc\x7c\x3a\xc6\x51\xa9",
24566                 .perslen = 32,
24567         }, {
24568                 .entropy = (unsigned char *)
24569                         "\xc2\xa5\x66\xa9\xa1\x81\x7b\x15\xc5\xc3\xb7\x78"
24570                         "\x17\x7a\xc8\x7c\x24\xe7\x97\xbe\x0a\x84\x5f\x11"
24571                         "\xc2\xfe\x39\x9d\xd3\x77\x32\xf2\xcb\x18\x94\xeb"
24572                         "\x2b\x97\xb3\xc5\x6e\x62\x83\x29\x51\x6f\x86\xec",
24573                 .entropylen = 48,
24574                 .expected = (unsigned char *)
24575                         "\xb3\xa3\x69\x8d\x77\x76\x99\xa0\xdd\x9f\xa3\xf0"
24576                         "\xa9\xfa\x57\x83\x2d\x3c\xef\xac\x5d\xf2\x44\x37"
24577                         "\xc6\xd7\x3a\x0f\xe4\x10\x40\xf1\x72\x90\x38\xae"
24578                         "\xf1\xe9\x26\x35\x2e\xa5\x9d\xe1\x20\xbf\xb7\xb0"
24579                         "\x73\x18\x3a\x34\x10\x6e\xfe\xd6\x27\x8f\xf8\xad"
24580                         "\x84\x4b\xa0\x44\x81\x15\xdf\xdd\xf3\x31\x9a\x82"
24581                         "\xde\x6b\xb1\x1d\x80\xbd\x87\x1a\x9a\xcd\x35\xc7"
24582                         "\x36\x45\xe1\x27\x0f\xb9\xfe\x4f\xa8\x8e\xc0\xe4"
24583                         "\x65\x40\x9e\xa0\xcb\xa8\x09\xfe\x2f\x45\xe0\x49"
24584                         "\x43\xa2\xe3\x96\xbb\xb7\xdd\x2f\x4e\x07\x95\x30"
24585                         "\x35\x24\xcc\x9c\xc5\xea\x54\xa1",
24586                 .expectedlen = 128,
24587                 .addtla = (unsigned char *)
24588                         "\x41\x3d\xd8\x3f\xe5\x68\x35\xab\xd4\x78\xcb\x96"
24589                         "\x93\xd6\x76\x35\x90\x1c\x40\x23\x9a\x26\x64\x62"
24590                         "\xd3\x13\x3b\x83\xe4\x9c\x82\x0b",
24591                 .addtlb = (unsigned char *)
24592                         "\xd5\xc4\xa7\x1f\x9d\x6d\x95\xa1\xbe\xdf\x0b\xd2"
24593                         "\x24\x7c\x27\x7d\x1f\x84\xa4\xe5\x7a\x4a\x88\x25"
24594                         "\xb8\x2a\x2d\x09\x7d\xe6\x3e\xf1",
24595                 .addtllen = 32,
24596                 .pers = (unsigned char *)
24597                         "\x13\xce\x4d\x8d\xd2\xdb\x97\x96\xf9\x41\x56\xc8"
24598                         "\xe8\xf0\x76\x9b\x0a\xa1\xc8\x2c\x13\x23\xb6\x15"
24599                         "\x36\x60\x3b\xca\x37\xc9\xee\x29",
24600                 .perslen = 32,
24601         },
24602 };
24603
24604 static struct drbg_testvec drbg_nopr_ctr_aes192_tv_template[] = {
24605         {
24606                 .entropy = (unsigned char *)
24607                         "\xc3\x5c\x2f\xa2\xa8\x9d\x52\xa1\x1f\xa3\x2a\xa9"
24608                         "\x6c\x95\xb8\xf1\xc9\xa8\xf9\xcb\x24\x5a\x8b\x40"
24609                         "\xf3\xa6\xe5\xa7\xfb\xd9\xd3\xc6\x8e\x27\x7b\xa9"
24610                         "\xac\x9b\xbb\x00",
24611                 .entropylen = 40,
24612                 .expected = (unsigned char *)
24613                         "\x8c\x2e\x72\xab\xfd\x9b\xb8\x28\x4d\xb7\x9e\x17"
24614                         "\xa4\x3a\x31\x46\xcd\x76\x94\xe3\x52\x49\xfc\x33"
24615                         "\x83\x91\x4a\x71\x17\xf4\x13\x68\xe6\xd4\xf1\x48"
24616                         "\xff\x49\xbf\x29\x07\x6b\x50\x15\xc5\x9f\x45\x79"
24617                         "\x45\x66\x2e\x3d\x35\x03\x84\x3f\x4a\xa5\xa3\xdf"
24618                         "\x9a\x9d\xf1\x0d",
24619                 .expectedlen = 64,
24620                 .addtla = NULL,
24621                 .addtlb = NULL,
24622                 .addtllen = 0,
24623                 .pers = NULL,
24624                 .perslen = 0,
24625         },
24626 };
24627
24628 static struct drbg_testvec drbg_nopr_ctr_aes256_tv_template[] = {
24629         {
24630                 .entropy = (unsigned char *)
24631                         "\x36\x40\x19\x40\xfa\x8b\x1f\xba\x91\xa1\x66\x1f"
24632                         "\x21\x1d\x78\xa0\xb9\x38\x9a\x74\xe5\xbc\xcf\xec"
24633                         "\xe8\xd7\x66\xaf\x1a\x6d\x3b\x14\x49\x6f\x25\xb0"
24634                         "\xf1\x30\x1b\x4f\x50\x1b\xe3\x03\x80\xa1\x37\xeb",
24635                 .entropylen = 48,
24636                 .expected = (unsigned char *)
24637                         "\x58\x62\xeb\x38\xbd\x55\x8d\xd9\x78\xa6\x96\xe6"
24638                         "\xdf\x16\x47\x82\xdd\xd8\x87\xe7\xe9\xa6\xc9\xf3"
24639                         "\xf1\xfb\xaf\xb7\x89\x41\xb5\x35\xa6\x49\x12\xdf"
24640                         "\xd2\x24\xc6\xdc\x74\x54\xe5\x25\x0b\x3d\x97\x16"
24641                         "\x5e\x16\x26\x0c\x2f\xaf\x1c\xc7\x73\x5c\xb7\x5f"
24642                         "\xb4\xf0\x7e\x1d",
24643                 .expectedlen = 64,
24644                 .addtla = NULL,
24645                 .addtlb = NULL,
24646                 .addtllen = 0,
24647                 .pers = NULL,
24648                 .perslen = 0,
24649         },
24650 };
24651
24652 static struct drbg_testvec drbg_nopr_ctr_aes128_tv_template[] = {
24653         {
24654                 .entropy = (unsigned char *)
24655                         "\x87\xe1\xc5\x32\x99\x7f\x57\xa3\x5c\x28\x6d\xe8"
24656                         "\x64\xbf\xf2\x64\xa3\x9e\x98\xdb\x6c\x10\x78\x7f",
24657                 .entropylen = 24,
24658                 .expected = (unsigned char *)
24659                         "\x2c\x14\x7e\x24\x11\x9a\xd8\xd4\xb2\xed\x61\xc1"
24660                         "\x53\xd0\x50\xc9\x24\xff\x59\x75\x15\xf1\x17\x3a"
24661                         "\x3d\xf4\x4b\x2c\x84\x28\xef\x89\x0e\xb9\xde\xf3"
24662                         "\xe4\x78\x04\xb2\xfd\x9b\x35\x7f\xe1\x3f\x8a\x3e"
24663                         "\x10\xc8\x67\x0a\xf9\xdf\x2d\x6c\x96\xfb\xb2\xb8"
24664                         "\xcb\x2d\xd6\xb0",
24665                 .expectedlen = 64,
24666                 .addtla = NULL,
24667                 .addtlb = NULL,
24668                 .addtllen = 0,
24669                 .pers = NULL,
24670                 .perslen = 0,
24671         }, {
24672                 .entropy = (unsigned char *)
24673                         "\x71\xbd\xce\x35\x42\x7d\x20\xbf\x58\xcf\x17\x74"
24674                         "\xce\x72\xd8\x33\x34\x50\x2d\x8f\x5b\x14\xc4\xdd",
24675                 .entropylen = 24,
24676                 .expected = (unsigned char *)
24677                         "\x97\x33\xe8\x20\x12\xe2\x7b\xa1\x46\x8f\xf2\x34"
24678                         "\xb3\xc9\xb6\x6b\x20\xb2\x4f\xee\x27\xd8\x0b\x21"
24679                         "\x8c\xff\x63\x73\x69\x29\xfb\xf3\x85\xcd\x88\x8e"
24680                         "\x43\x2c\x71\x8b\xa2\x55\xd2\x0f\x1d\x7f\xe3\xe1"
24681                         "\x2a\xa3\xe9\x2c\x25\x89\xc7\x14\x52\x99\x56\xcc"
24682                         "\xc3\xdf\xb3\x81",
24683                 .expectedlen = 64,
24684                 .addtla = (unsigned char *)
24685                         "\x66\xef\x42\xd6\x9a\x8c\x3d\x6d\x4a\x9e\x95\xa6"
24686                         "\x91\x4d\x81\x56",
24687                 .addtlb = (unsigned char *)
24688                         "\xe3\x18\x83\xd9\x4b\x5e\xc4\xcc\xaa\x61\x2f\xbb"
24689                         "\x4a\x55\xd1\xc6",
24690                 .addtllen = 16,
24691                 .pers = NULL,
24692                 .perslen = 0,
24693         }, {
24694                 .entropy = (unsigned char *)
24695                         "\xca\x4b\x1e\xfa\x75\xbd\x69\x36\x38\x73\xb8\xf9"
24696                         "\xdb\x4d\x35\x0e\x47\xbf\x6c\x37\x72\xfd\xf7\xa9",
24697                 .entropylen = 24,
24698                 .expected = (unsigned char *)
24699                         "\x59\xc3\x19\x79\x1b\xb1\xf3\x0e\xe9\x34\xae\x6e"
24700                         "\x8b\x1f\xad\x1f\x74\xca\x25\x45\x68\xb8\x7f\x75"
24701                         "\x12\xf8\xf2\xab\x4c\x23\x01\x03\x05\xe1\x70\xee"
24702                         "\x75\xd8\xcb\xeb\x23\x4c\x7a\x23\x6e\x12\x27\xdb"
24703                         "\x6f\x7a\xac\x3c\x44\xb7\x87\x4b\x65\x56\x74\x45"
24704                         "\x34\x30\x0c\x3d",
24705                 .expectedlen = 64,
24706                 .addtla = NULL,
24707                 .addtlb = NULL,
24708                 .addtllen = 0,
24709                 .pers = (unsigned char *)
24710                         "\xeb\xaa\x60\x2c\x4d\xbe\x33\xff\x1b\xef\xbf\x0a"
24711                         "\x0b\xc6\x97\x54",
24712                 .perslen = 16,
24713         }, {
24714                 .entropy = (unsigned char *)
24715                         "\xc0\x70\x1f\x92\x50\x75\x8f\xcd\xf2\xbe\x73\x98"
24716                         "\x80\xdb\x66\xeb\x14\x68\xb4\xa5\x87\x9c\x2d\xa6",
24717                 .entropylen = 24,
24718                 .expected = (unsigned char *)
24719                         "\x97\xc0\xc0\xe5\xa0\xcc\xf2\x4f\x33\x63\x48\x8a"
24720                         "\xdb\x13\x0a\x35\x89\xbf\x80\x65\x62\xee\x13\x95"
24721                         "\x7c\x33\xd3\x7d\xf4\x07\x77\x7a\x2b\x65\x0b\x5f"
24722                         "\x45\x5c\x13\xf1\x90\x77\x7f\xc5\x04\x3f\xcc\x1a"
24723                         "\x38\xf8\xcd\x1b\xbb\xd5\x57\xd1\x4a\x4c\x2e\x8a"
24724                         "\x2b\x49\x1e\x5c",
24725                 .expectedlen = 64,
24726                 .addtla = (unsigned char *)
24727                         "\xf9\x01\xf8\x16\x7a\x1d\xff\xde\x8e\x3c\x83\xe2"
24728                         "\x44\x85\xe7\xfe",
24729                 .addtlb = (unsigned char *)
24730                         "\x17\x1c\x09\x38\xc2\x38\x9f\x97\x87\x60\x55\xb4"
24731                         "\x82\x16\x62\x7f",
24732                 .addtllen = 16,
24733                 .pers = (unsigned char *)
24734                         "\x80\x08\xae\xe8\xe9\x69\x40\xc5\x08\x73\xc7\x9f"
24735                         "\x8e\xcf\xe0\x02",
24736                 .perslen = 16,
24737         },
24738 };
24739
24740 /* Cast5 test vectors from RFC 2144 */
24741 #define CAST5_ENC_TEST_VECTORS          4
24742 #define CAST5_DEC_TEST_VECTORS          4
24743 #define CAST5_CBC_ENC_TEST_VECTORS      1
24744 #define CAST5_CBC_DEC_TEST_VECTORS      1
24745 #define CAST5_CTR_ENC_TEST_VECTORS      2
24746 #define CAST5_CTR_DEC_TEST_VECTORS      2
24747
24748 static struct cipher_testvec cast5_enc_tv_template[] = {
24749         {
24750                 .key    = "\x01\x23\x45\x67\x12\x34\x56\x78"
24751                           "\x23\x45\x67\x89\x34\x56\x78\x9a",
24752                 .klen   = 16,
24753                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24754                 .ilen   = 8,
24755                 .result = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
24756                 .rlen   = 8,
24757         }, {
24758                 .key    = "\x01\x23\x45\x67\x12\x34\x56\x78"
24759                           "\x23\x45",
24760                 .klen   = 10,
24761                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24762                 .ilen   = 8,
24763                 .result = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
24764                 .rlen   = 8,
24765         }, {
24766                 .key    = "\x01\x23\x45\x67\x12",
24767                 .klen   = 5,
24768                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24769                 .ilen   = 8,
24770                 .result = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
24771                 .rlen   = 8,
24772         }, { /* Generated from TF test vectors */
24773                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24774                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24775                 .klen   = 16,
24776                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24777                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
24778                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
24779                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
24780                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
24781                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
24782                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
24783                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
24784                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
24785                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
24786                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
24787                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
24788                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
24789                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
24790                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
24791                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
24792                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
24793                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
24794                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
24795                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
24796                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
24797                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
24798                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
24799                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
24800                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
24801                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
24802                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
24803                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
24804                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
24805                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
24806                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
24807                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
24808                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
24809                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
24810                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
24811                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
24812                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
24813                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
24814                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
24815                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
24816                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
24817                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
24818                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
24819                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
24820                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
24821                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
24822                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
24823                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
24824                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
24825                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
24826                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
24827                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
24828                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
24829                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
24830                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
24831                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
24832                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
24833                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
24834                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
24835                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
24836                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
24837                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
24838                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
24839                 .ilen   = 496,
24840                 .result = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
24841                           "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
24842                           "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
24843                           "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
24844                           "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
24845                           "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
24846                           "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
24847                           "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
24848                           "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
24849                           "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
24850                           "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
24851                           "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
24852                           "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
24853                           "\xED\x34\x35\x78\x6B\x91\xC9\x32"
24854                           "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
24855                           "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
24856                           "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
24857                           "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
24858                           "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
24859                           "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
24860                           "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
24861                           "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
24862                           "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
24863                           "\x78\x75\x37\x55\xC1\xF5\x90\x40"
24864                           "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
24865                           "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
24866                           "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
24867                           "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
24868                           "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
24869                           "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
24870                           "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
24871                           "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
24872                           "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
24873                           "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
24874                           "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
24875                           "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
24876                           "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
24877                           "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
24878                           "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
24879                           "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
24880                           "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
24881                           "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
24882                           "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
24883                           "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
24884                           "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
24885                           "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
24886                           "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
24887                           "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
24888                           "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
24889                           "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
24890                           "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
24891                           "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
24892                           "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
24893                           "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
24894                           "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
24895                           "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
24896                           "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
24897                           "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
24898                           "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
24899                           "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
24900                           "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
24901                           "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
24902                 .rlen   = 496,
24903                 .also_non_np = 1,
24904                 .np     = 3,
24905                 .tap    = { 496 - 20, 4, 16 },
24906         },
24907 };
24908
24909 static struct cipher_testvec cast5_dec_tv_template[] = {
24910         {
24911                 .key    = "\x01\x23\x45\x67\x12\x34\x56\x78"
24912                           "\x23\x45\x67\x89\x34\x56\x78\x9a",
24913                 .klen   = 16,
24914                 .input  = "\x23\x8b\x4f\xe5\x84\x7e\x44\xb2",
24915                 .ilen   = 8,
24916                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24917                 .rlen   = 8,
24918         }, {
24919                 .key    = "\x01\x23\x45\x67\x12\x34\x56\x78"
24920                           "\x23\x45",
24921                 .klen   = 10,
24922                 .input  = "\xeb\x6a\x71\x1a\x2c\x02\x27\x1b",
24923                 .ilen   = 8,
24924                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24925                 .rlen   = 8,
24926         }, {
24927                 .key    = "\x01\x23\x45\x67\x12",
24928                 .klen   = 5,
24929                 .input  = "\x7a\xc8\x16\xd1\x6e\x9b\x30\x2e",
24930                 .ilen   = 8,
24931                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
24932                 .rlen   = 8,
24933         }, { /* Generated from TF test vectors */
24934                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
24935                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
24936                 .klen   = 16,
24937                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
24938                 .input  = "\x8D\xFC\x81\x9C\xCB\xAA\x5A\x1C"
24939                           "\x7E\x95\xCF\x40\xAB\x4D\x6F\xEA"
24940                           "\xD3\xD9\xB0\x9A\xB7\xC7\xE0\x2E"
24941                           "\xD1\x39\x34\x92\x8F\xFA\x14\xF1"
24942                           "\xD5\xD2\x7B\x59\x1F\x35\x28\xC2"
24943                           "\x20\xD9\x42\x06\xC9\x0B\x10\x04"
24944                           "\xF8\x79\xCD\x32\x86\x75\x4C\xB6"
24945                           "\x7B\x1C\x52\xB1\x91\x64\x22\x4B"
24946                           "\x13\xC7\xAE\x98\x0E\xB5\xCF\x6F"
24947                           "\x3F\xF4\x43\x96\x73\x0D\xA2\x05"
24948                           "\xDB\xFD\x28\x90\x2C\x56\xB9\x37"
24949                           "\x5B\x69\x0C\xAD\x84\x67\xFF\x15"
24950                           "\x4A\xD4\xA7\xD3\xDD\x99\x47\x3A"
24951                           "\xED\x34\x35\x78\x6B\x91\xC9\x32"
24952                           "\xE1\xBF\xBC\xB4\x04\x85\x6A\x39"
24953                           "\xC0\xBA\x51\xD0\x0F\x4E\xD1\xE2"
24954                           "\x1C\xFD\x0E\x05\x07\xF4\x10\xED"
24955                           "\xA2\x17\xFF\xF5\x64\xC6\x1A\x22"
24956                           "\xAD\x78\xE7\xD7\x11\xE9\x99\xB9"
24957                           "\xAA\xEC\x6F\xF8\x3B\xBF\xCE\x77"
24958                           "\x93\xE8\xAD\x1D\x50\x6C\xAE\xBC"
24959                           "\xBA\x5C\x80\xD1\x91\x65\x51\x1B"
24960                           "\xE8\x0A\xCD\x99\x96\x71\x3D\xB6"
24961                           "\x78\x75\x37\x55\xC1\xF5\x90\x40"
24962                           "\x34\xF4\x7E\xC8\xCC\x3A\x5F\x6E"
24963                           "\x36\xA1\xA1\xC2\x3A\x72\x42\x8E"
24964                           "\x0E\x37\x88\xE8\xCE\x83\xCB\xAD"
24965                           "\xE0\x69\x77\x50\xC7\x0C\x99\xCA"
24966                           "\x19\x5B\x30\x25\x9A\xEF\x9B\x0C"
24967                           "\xEF\x8F\x74\x4C\xCF\x49\x4E\xB9"
24968                           "\xC5\xAE\x9E\x2E\x78\x9A\xB9\x48"
24969                           "\xD5\x81\xE4\x37\x1D\xBF\x27\xD9"
24970                           "\xC5\xD6\x65\x43\x45\x8C\xBB\xB6"
24971                           "\x55\xF4\x06\xBB\x49\x53\x8B\x1B"
24972                           "\x07\xA9\x96\x69\x5B\xCB\x0F\xBC"
24973                           "\x93\x85\x90\x0F\x0A\x68\x40\x2A"
24974                           "\x95\xED\x2D\x88\xBF\x71\xD0\xBB"
24975                           "\xEC\xB0\x77\x6C\x79\xFC\x3C\x05"
24976                           "\x49\x3F\xB8\x24\xEF\x8E\x09\xA2"
24977                           "\x1D\xEF\x92\x02\x96\xD4\x7F\xC8"
24978                           "\x03\xB2\xCA\xDB\x17\x5C\x52\xCF"
24979                           "\xDD\x70\x37\x63\xAA\xA5\x83\x20"
24980                           "\x52\x02\xF6\xB9\xE7\x6E\x0A\xB6"
24981                           "\x79\x03\xA0\xDA\xA3\x79\x21\xBD"
24982                           "\xE3\x37\x3A\xC0\xF7\x2C\x32\xBE"
24983                           "\x8B\xE8\xA6\x00\xC7\x32\xD5\x06"
24984                           "\xBB\xE3\xAB\x06\x21\x82\xB8\x32"
24985                           "\x31\x34\x2A\xA7\x1F\x64\x99\xBF"
24986                           "\xFA\xDA\x3D\x75\xF7\x48\xD5\x48"
24987                           "\x4B\x52\x7E\xF6\x7C\xAB\x67\x59"
24988                           "\xC5\xDC\xA8\xC6\x63\x85\x4A\xDF"
24989                           "\xF0\x40\x5F\xCF\xE3\x58\x52\x67"
24990                           "\x7A\x24\x32\xC5\xEC\x9E\xA9\x6F"
24991                           "\x58\x56\xDD\x94\x1F\x71\x8D\xF4"
24992                           "\x6E\xFF\x2C\xA7\xA5\xD8\xBA\xAF"
24993                           "\x1D\x8B\xA2\x46\xB5\xC4\x9F\x57"
24994                           "\x8D\xD8\xB3\x3C\x02\x0D\xBB\x84"
24995                           "\xC7\xBD\xB4\x9A\x6E\xBB\xB1\x37"
24996                           "\x95\x79\xC4\xA7\xEA\x1D\xDC\x33"
24997                           "\x5D\x0B\x3F\x03\x8F\x30\xF9\xAE"
24998                           "\x4F\xFE\x24\x9C\x9A\x02\xE5\x57"
24999                           "\xF5\xBC\x25\xD6\x02\x56\x57\x1C",
25000                 .ilen   = 496,
25001                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25002                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25003                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25004                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25005                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25006                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25007                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25008                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25009                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25010                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25011                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25012                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25013                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25014                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25015                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25016                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25017                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25018                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25019                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25020                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25021                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25022                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25023                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25024                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25025                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25026                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25027                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25028                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25029                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25030                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25031                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25032                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25033                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25034                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25035                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25036                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25037                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25038                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25039                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25040                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25041                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25042                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25043                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25044                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25045                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25046                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25047                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25048                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25049                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25050                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25051                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25052                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25053                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25054                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25055                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25056                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25057                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25058                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25059                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25060                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25061                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25062                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25063                 .rlen   = 496,
25064                 .also_non_np = 1,
25065                 .np     = 3,
25066                 .tap    = { 496 - 20, 4, 16 },
25067         },
25068 };
25069
25070 static struct cipher_testvec cast5_cbc_enc_tv_template[] = {
25071         { /* Generated from TF test vectors */
25072                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25073                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25074                 .klen   = 16,
25075                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25076                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25077                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25078                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25079                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25080                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25081                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25082                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25083                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25084                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25085                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25086                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25087                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25088                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25089                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25090                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25091                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25092                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25093                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25094                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25095                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25096                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25097                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25098                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25099                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25100                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25101                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25102                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25103                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25104                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25105                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25106                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25107                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25108                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25109                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25110                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25111                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25112                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25113                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25114                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25115                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25116                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25117                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25118                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25119                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25120                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25121                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25122                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25123                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25124                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25125                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25126                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25127                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25128                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25129                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25130                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25131                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25132                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25133                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25134                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25135                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25136                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25137                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25138                 .ilen   = 496,
25139                 .result = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
25140                           "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
25141                           "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
25142                           "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
25143                           "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
25144                           "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
25145                           "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
25146                           "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
25147                           "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
25148                           "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
25149                           "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
25150                           "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
25151                           "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
25152                           "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
25153                           "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
25154                           "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
25155                           "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
25156                           "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
25157                           "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
25158                           "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
25159                           "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
25160                           "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
25161                           "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
25162                           "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
25163                           "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
25164                           "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
25165                           "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
25166                           "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
25167                           "\x90\x12\x37\x49\x27\x98\x69\x18"
25168                           "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
25169                           "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
25170                           "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
25171                           "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
25172                           "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
25173                           "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
25174                           "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
25175                           "\x03\x55\x0E\x02\x41\x4A\x45\x06"
25176                           "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
25177                           "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
25178                           "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
25179                           "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
25180                           "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
25181                           "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
25182                           "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
25183                           "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
25184                           "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
25185                           "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
25186                           "\x11\xB4\x18\x17\x1A\x65\x92\x56"
25187                           "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
25188                           "\x1A\x01\x22\x45\x17\x62\x52\x6C"
25189                           "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
25190                           "\x32\x66\x6F\x23\x7F\x94\x36\x88"
25191                           "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
25192                           "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
25193                           "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
25194                           "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
25195                           "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
25196                           "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
25197                           "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
25198                           "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
25199                           "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
25200                           "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
25201                 .rlen   = 496,
25202                 .also_non_np = 1,
25203                 .np     = 3,
25204                 .tap    = { 496 - 20, 4, 16 },
25205         },
25206 };
25207
25208 static struct cipher_testvec cast5_cbc_dec_tv_template[] = {
25209         { /* Generated from TF test vectors */
25210                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25211                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25212                 .klen   = 16,
25213                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25214                 .input  = "\x05\x28\xCE\x61\x90\x80\xE1\x78"
25215                           "\xB9\x2A\x97\x7C\xB0\x83\xD8\x1A"
25216                           "\xDE\x58\x7F\xD7\xFD\x72\xB8\xFB"
25217                           "\xDA\xF0\x6E\x77\x14\x47\x82\xBA"
25218                           "\x29\x0E\x25\x6E\xB4\x39\xD9\x7F"
25219                           "\x05\xA7\xA7\x3A\xC1\x5D\x9E\x39"
25220                           "\xA7\xFB\x0D\x05\x00\xF3\x58\x67"
25221                           "\x60\xEC\x73\x77\x46\x85\x9B\x6A"
25222                           "\x08\x3E\xBE\x59\xFB\xE4\x96\x34"
25223                           "\xB4\x05\x49\x1A\x97\x43\xAD\xA0"
25224                           "\xA9\x1E\x6E\x74\xF1\x94\xEC\xA8"
25225                           "\xB5\x8A\x20\xEA\x89\x6B\x19\xAA"
25226                           "\xA7\xF1\x33\x67\x90\x23\x0D\xEE"
25227                           "\x81\xD5\x78\x4F\xD3\x63\xEA\x46"
25228                           "\xB5\xB2\x6E\xBB\xCA\x76\x06\x10"
25229                           "\x96\x2A\x0A\xBA\xF9\x41\x5A\x1D"
25230                           "\x36\x7C\x56\x14\x54\x83\xFA\xA1"
25231                           "\x27\xDD\xBA\x8A\x90\x29\xD6\xA6"
25232                           "\xFA\x48\x3E\x1E\x23\x6E\x98\xA8"
25233                           "\xA7\xD9\x67\x92\x5C\x13\xB4\x71"
25234                           "\xA8\xAA\x89\x4A\xA4\xB3\x49\x7C"
25235                           "\x7D\x7F\xCE\x6F\x29\x2E\x7E\x37"
25236                           "\xC8\x52\x60\xD9\xE7\xCA\x60\x98"
25237                           "\xED\xCD\xE8\x60\x83\xAD\x34\x4D"
25238                           "\x96\x4A\x99\x2B\xB7\x14\x75\x66"
25239                           "\x6C\x2C\x1A\xBA\x4B\xBB\x49\x56"
25240                           "\xE1\x86\xA2\x0E\xD0\xF0\x07\xD3"
25241                           "\x18\x38\x09\x9C\x0E\x8B\x86\x07"
25242                           "\x90\x12\x37\x49\x27\x98\x69\x18"
25243                           "\xB0\xCC\xFB\xD3\xBD\x04\xA0\x85"
25244                           "\x4B\x22\x97\x07\xB6\x97\xE9\x95"
25245                           "\x0F\x88\x36\xA9\x44\x00\xC6\xE9"
25246                           "\x27\x53\x5C\x5B\x1F\xD3\xE2\xEE"
25247                           "\xD0\xCD\x63\x30\xA9\xC0\xDD\x49"
25248                           "\xFE\x16\xA4\x07\x0D\xE2\x5D\x97"
25249                           "\xDE\x89\xBA\x2E\xF3\xA9\x5E\xBE"
25250                           "\x03\x55\x0E\x02\x41\x4A\x45\x06"
25251                           "\xBE\xEA\x32\xF2\xDC\x91\x5C\x20"
25252                           "\x94\x02\x30\xD2\xFC\x29\xFA\x8E"
25253                           "\x34\xA0\x31\xB8\x34\xBA\xAE\x54"
25254                           "\xB5\x88\x1F\xDC\x43\xDC\x22\x9F"
25255                           "\xDC\xCE\xD3\xFA\xA4\xA8\xBC\x8A"
25256                           "\xC7\x5A\x43\x21\xA5\xB1\xDB\xC3"
25257                           "\x84\x3B\xB4\x9B\xB5\xA7\xF1\x0A"
25258                           "\xB6\x37\x21\x19\x55\xC2\xBD\x99"
25259                           "\x49\x24\xBB\x7C\xB3\x8E\xEF\xD2"
25260                           "\x3A\xCF\xA0\x31\x28\x0E\x25\xA2"
25261                           "\x11\xB4\x18\x17\x1A\x65\x92\x56"
25262                           "\xE8\xE0\x52\x9C\x61\x18\x2A\xB1"
25263                           "\x1A\x01\x22\x45\x17\x62\x52\x6C"
25264                           "\x91\x44\xCF\x98\xC7\xC0\x79\x26"
25265                           "\x32\x66\x6F\x23\x7F\x94\x36\x88"
25266                           "\x3C\xC9\xD0\xB7\x45\x30\x31\x86"
25267                           "\x3D\xC6\xA3\x98\x62\x84\x1A\x8B"
25268                           "\x16\x88\xC7\xA3\xE9\x4F\xE0\x86"
25269                           "\xA4\x93\xA8\x34\x5A\xCA\xDF\xCA"
25270                           "\x46\x38\xD2\xF4\xE0\x2D\x1E\xC9"
25271                           "\x7C\xEF\x53\xB7\x60\x72\x41\xBF"
25272                           "\x29\x00\x87\x02\xAF\x44\x4C\xB7"
25273                           "\x8C\xF5\x3F\x19\xF4\x80\x45\xA7"
25274                           "\x15\x5F\xDB\xE9\xB1\x83\xD2\xE6"
25275                           "\x1D\x18\x66\x44\x5B\x8F\x14\xEB",
25276                 .ilen   = 496,
25277                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25278                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25279                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25280                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25281                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25282                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25283                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25284                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25285                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25286                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25287                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25288                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25289                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25290                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25291                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25292                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25293                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25294                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25295                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25296                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25297                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25298                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25299                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25300                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25301                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25302                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25303                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25304                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25305                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25306                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25307                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25308                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25309                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25310                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25311                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25312                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25313                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25314                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25315                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25316                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25317                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25318                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25319                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25320                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25321                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25322                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25323                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25324                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25325                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25326                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25327                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25328                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25329                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25330                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25331                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25332                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25333                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25334                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25335                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25336                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25337                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25338                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25339                 .rlen   = 496,
25340                 .also_non_np = 1,
25341                 .np     = 3,
25342                 .tap    = { 496 - 20, 4, 16 },
25343         },
25344 };
25345
25346 static struct cipher_testvec cast5_ctr_enc_tv_template[] = {
25347         { /* Generated from TF test vectors */
25348                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25349                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25350                 .klen   = 16,
25351                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25352                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25353                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25354                           "\x3A",
25355                 .ilen   = 17,
25356                 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25357                           "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
25358                           "\x0C",
25359                 .rlen   = 17,
25360         }, { /* Generated from TF test vectors */
25361                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25362                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25363                 .klen   = 16,
25364                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25365                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25366                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25367                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25368                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25369                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25370                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25371                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25372                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25373                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25374                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25375                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25376                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25377                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25378                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25379                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25380                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25381                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25382                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25383                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25384                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25385                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25386                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25387                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25388                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25389                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25390                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25391                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25392                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25393                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25394                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25395                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25396                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25397                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25398                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25399                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25400                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25401                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25402                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25403                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25404                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25405                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25406                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25407                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25408                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25409                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25410                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25411                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25412                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25413                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25414                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25415                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25416                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25417                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25418                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25419                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25420                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25421                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25422                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25423                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25424                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25425                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25426                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25427                 .ilen   = 496,
25428                 .result = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25429                           "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
25430                           "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
25431                           "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
25432                           "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
25433                           "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
25434                           "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
25435                           "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
25436                           "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
25437                           "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
25438                           "\x88\x18\x52\x56\x48\x58\xD1\x6B"
25439                           "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
25440                           "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
25441                           "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
25442                           "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
25443                           "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
25444                           "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
25445                           "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
25446                           "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
25447                           "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
25448                           "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
25449                           "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
25450                           "\x44\x67\x90\x20\xAC\x41\xDF\x43"
25451                           "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
25452                           "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
25453                           "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
25454                           "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
25455                           "\xAE\x59\x0F\x07\x88\x79\x53\x26"
25456                           "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
25457                           "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
25458                           "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
25459                           "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
25460                           "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
25461                           "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
25462                           "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
25463                           "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
25464                           "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
25465                           "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
25466                           "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
25467                           "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
25468                           "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
25469                           "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
25470                           "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
25471                           "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
25472                           "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
25473                           "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
25474                           "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
25475                           "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
25476                           "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
25477                           "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
25478                           "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
25479                           "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
25480                           "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
25481                           "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
25482                           "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
25483                           "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
25484                           "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
25485                           "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
25486                           "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
25487                           "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
25488                           "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
25489                           "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
25490                 .rlen   = 496,
25491                 .also_non_np = 1,
25492                 .np     = 3,
25493                 .tap    = { 496 - 20, 4, 16 },
25494         },
25495 };
25496
25497 static struct cipher_testvec cast5_ctr_dec_tv_template[] = {
25498         { /* Generated from TF test vectors */
25499                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25500                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25501                 .klen   = 16,
25502                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25503                 .input  = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25504                           "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
25505                           "\x0C",
25506                 .ilen   = 17,
25507                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25508                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25509                           "\x3A",
25510                 .rlen   = 17,
25511         }, { /* Generated from TF test vectors */
25512                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
25513                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A",
25514                 .klen   = 16,
25515                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F",
25516                 .input  = "\xFF\xC4\x2E\x82\x3D\xF8\xA8\x39"
25517                           "\x7C\x52\xC4\xD3\xBB\x62\xC6\xA8"
25518                           "\x0C\x63\xA5\x55\xE3\xF8\x1C\x7F"
25519                           "\xDC\x59\xF9\xA0\x52\xAD\x83\xDF"
25520                           "\xD5\x3B\x53\x4A\xAA\x1F\x49\x44"
25521                           "\xE8\x20\xCC\xF8\x97\xE6\xE0\x3C"
25522                           "\x5A\xD2\x83\xEC\xEE\x25\x3F\xCF"
25523                           "\x0D\xC2\x79\x80\x99\x6E\xFF\x7B"
25524                           "\x64\xB0\x7B\x86\x29\x1D\x9F\x17"
25525                           "\x10\xA5\xA5\xEB\x16\x55\x9E\xE3"
25526                           "\x88\x18\x52\x56\x48\x58\xD1\x6B"
25527                           "\xE8\x74\x6E\x48\xB0\x2E\x69\x63"
25528                           "\x32\xAA\xAC\x26\x55\x45\x94\xDE"
25529                           "\x30\x26\x26\xE6\x08\x82\x2F\x5F"
25530                           "\xA7\x15\x94\x07\x75\x2D\xC6\x3A"
25531                           "\x1B\xA0\x39\xFB\xBA\xB9\x06\x56"
25532                           "\xF6\x9F\xF1\x2F\x9B\xF3\x89\x8B"
25533                           "\x08\xC8\x9D\x5E\x6B\x95\x09\xC7"
25534                           "\x98\xB7\x62\xA4\x1D\x25\xFA\xC5"
25535                           "\x62\xC8\x5D\x6B\xB4\x85\x88\x7F"
25536                           "\x3B\x29\xF9\xB4\x32\x62\x69\xBF"
25537                           "\x32\xB8\xEB\xFD\x0E\x26\xAA\xA3"
25538                           "\x44\x67\x90\x20\xAC\x41\xDF\x43"
25539                           "\xC6\xC7\x19\x9F\x2C\x28\x74\xEB"
25540                           "\x3E\x7F\x7A\x80\x5B\xE4\x08\x60"
25541                           "\xC7\xC9\x71\x34\x44\xCE\x05\xFD"
25542                           "\xA8\x91\xA8\x44\x5E\xD3\x89\x2C"
25543                           "\xAE\x59\x0F\x07\x88\x79\x53\x26"
25544                           "\xAF\xAC\xCB\x1D\x6F\x08\x25\x62"
25545                           "\xD0\x82\x65\x66\xE4\x2A\x29\x1C"
25546                           "\x9C\x64\x5F\x49\x9D\xF8\x62\xF9"
25547                           "\xED\xC4\x13\x52\x75\xDC\xE4\xF9"
25548                           "\x68\x0F\x8A\xCD\xA6\x8D\x75\xAA"
25549                           "\x49\xA1\x86\x86\x37\x5C\x6B\x3D"
25550                           "\x56\xE5\x6F\xBE\x27\xC0\x10\xF8"
25551                           "\x3C\x4D\x17\x35\x14\xDC\x1C\xA0"
25552                           "\x6E\xAE\xD1\x10\xDD\x83\x06\xC2"
25553                           "\x23\xD3\xC7\x27\x15\x04\x2C\x27"
25554                           "\xDD\x1F\x2E\x97\x09\x9C\x33\x7D"
25555                           "\xAC\x50\x1B\x2E\xC9\x52\x0C\x14"
25556                           "\x4B\x78\xC4\xDE\x07\x6A\x12\x02"
25557                           "\x6E\xD7\x4B\x91\xB9\x88\x4D\x02"
25558                           "\xC3\xB5\x04\xBC\xE0\x67\xCA\x18"
25559                           "\x22\xA1\xAE\x9A\x21\xEF\xB2\x06"
25560                           "\x35\xCD\xEC\x37\x70\x2D\xFC\x1E"
25561                           "\xA8\x31\xE7\xFC\xE5\x8E\x88\x66"
25562                           "\x16\xB5\xC8\x45\x21\x37\xBD\x24"
25563                           "\xA9\xD5\x36\x12\x9F\x6E\x67\x80"
25564                           "\x87\x54\xD5\xAF\x97\xE1\x15\xA7"
25565                           "\x11\xF0\x63\x7B\xE1\x44\x14\x1C"
25566                           "\x06\x32\x05\x8C\x6C\xDB\x9B\x36"
25567                           "\x6A\x6B\xAD\x3A\x27\x55\x20\x4C"
25568                           "\x76\x36\x43\xE8\x16\x60\xB5\xF3"
25569                           "\xDF\x5A\xC6\xA5\x69\x78\x59\x51"
25570                           "\x54\x68\x65\x06\x84\xDE\x3D\xAE"
25571                           "\x38\x91\xBD\xCC\xA2\x8A\xEC\xE6"
25572                           "\x9E\x83\xAE\x1E\x8E\x34\x5D\xDE"
25573                           "\x91\xCE\x8F\xED\x40\xF7\xC8\x8B"
25574                           "\x9A\x13\x4C\xAD\x89\x97\x9E\xD1"
25575                           "\x91\x01\xD7\x21\x23\x28\x1E\xCC"
25576                           "\x8C\x98\xDB\xDE\xFC\x72\x94\xAA"
25577                           "\xC0\x0D\x96\xAA\x23\xF8\xFE\x13",
25578                 .ilen   = 496,
25579                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
25580                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
25581                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
25582                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
25583                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
25584                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
25585                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
25586                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
25587                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
25588                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
25589                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
25590                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
25591                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
25592                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
25593                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
25594                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
25595                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
25596                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
25597                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
25598                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
25599                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
25600                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
25601                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
25602                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
25603                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
25604                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
25605                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
25606                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
25607                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
25608                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
25609                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
25610                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
25611                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
25612                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
25613                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
25614                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
25615                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
25616                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
25617                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
25618                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
25619                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
25620                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
25621                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
25622                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
25623                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
25624                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
25625                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
25626                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
25627                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
25628                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
25629                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
25630                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
25631                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
25632                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
25633                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
25634                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
25635                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
25636                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
25637                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
25638                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
25639                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
25640                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
25641                 .rlen   = 496,
25642                 .also_non_np = 1,
25643                 .np     = 3,
25644                 .tap    = { 496 - 20, 4, 16 },
25645         },
25646 };
25647
25648 /*
25649  * ARC4 test vectors from OpenSSL
25650  */
25651 #define ARC4_ENC_TEST_VECTORS   7
25652 #define ARC4_DEC_TEST_VECTORS   7
25653
25654 static struct cipher_testvec arc4_enc_tv_template[] = {
25655         {
25656                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25657                 .klen   = 8,
25658                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25659                 .ilen   = 8,
25660                 .result = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
25661                 .rlen   = 8,
25662         }, {
25663                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25664                 .klen   = 8,
25665                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
25666                 .ilen   = 8,
25667                 .result = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
25668                 .rlen   = 8,
25669         }, {
25670                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
25671                 .klen   = 8,
25672                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
25673                 .ilen   = 8,
25674                 .result = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
25675                 .rlen   = 8,
25676         }, {
25677                 .key    = "\xef\x01\x23\x45",
25678                 .klen   = 4,
25679                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
25680                           "\x00\x00\x00\x00\x00\x00\x00\x00"
25681                           "\x00\x00\x00\x00",
25682                 .ilen   = 20,
25683                 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
25684                           "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
25685                           "\x36\xb6\x78\x58",
25686                 .rlen   = 20,
25687         }, {
25688                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25689                 .klen   = 8,
25690                 .input  = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25691                           "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25692                           "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25693                           "\x12\x34\x56\x78",
25694                 .ilen   = 28,
25695                 .result = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
25696                           "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
25697                           "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
25698                           "\x40\x01\x1e\xcf",
25699                 .rlen   = 28,
25700         }, {
25701                 .key    = "\xef\x01\x23\x45",
25702                 .klen   = 4,
25703                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
25704                           "\x00\x00",
25705                 .ilen   = 10,
25706                 .result = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
25707                           "\xbd\x61",
25708                 .rlen   = 10,
25709         }, {
25710                 .key    = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
25711                         "\x00\x00\x00\x00\x00\x00\x00\x00",
25712                 .klen   = 16,
25713                 .input  = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
25714                 .ilen   = 8,
25715                 .result = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
25716                 .rlen   = 8,
25717         },
25718 };
25719
25720 static struct cipher_testvec arc4_dec_tv_template[] = {
25721         {
25722                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25723                 .klen   = 8,
25724                 .input  = "\x75\xb7\x87\x80\x99\xe0\xc5\x96",
25725                 .ilen   = 8,
25726                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25727                 .rlen   = 8,
25728         }, {
25729                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25730                 .klen   = 8,
25731                 .input  = "\x74\x94\xc2\xe7\x10\x4b\x08\x79",
25732                 .ilen   = 8,
25733                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
25734                 .rlen   = 8,
25735         }, {
25736                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
25737                 .klen   = 8,
25738                 .input  = "\xde\x18\x89\x41\xa3\x37\x5d\x3a",
25739                 .ilen   = 8,
25740                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
25741                 .rlen   = 8,
25742         }, {
25743                 .key    = "\xef\x01\x23\x45",
25744                 .klen   = 4,
25745                 .input  = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
25746                           "\xbd\x61\x5a\x11\x62\xe1\xc7\xba"
25747                           "\x36\xb6\x78\x58",
25748                 .ilen   = 20,
25749                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
25750                           "\x00\x00\x00\x00\x00\x00\x00\x00"
25751                           "\x00\x00\x00\x00",
25752                 .rlen   = 20,
25753         }, {
25754                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef",
25755                 .klen   = 8,
25756                 .input  = "\x66\xa0\x94\x9f\x8a\xf7\xd6\x89"
25757                           "\x1f\x7f\x83\x2b\xa8\x33\xc0\x0c"
25758                           "\x89\x2e\xbe\x30\x14\x3c\xe2\x87"
25759                           "\x40\x01\x1e\xcf",
25760                 .ilen   = 28,
25761                 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25762                           "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25763                           "\x12\x34\x56\x78\x9A\xBC\xDE\xF0"
25764                           "\x12\x34\x56\x78",
25765                 .rlen   = 28,
25766         }, {
25767                 .key    = "\xef\x01\x23\x45",
25768                 .klen   = 4,
25769                 .input  = "\xd6\xa1\x41\xa7\xec\x3c\x38\xdf"
25770                           "\xbd\x61",
25771                 .ilen   = 10,
25772                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
25773                           "\x00\x00",
25774                 .rlen   = 10,
25775         }, {
25776                 .key    = "\x01\x23\x45\x67\x89\xAB\xCD\xEF"
25777                         "\x00\x00\x00\x00\x00\x00\x00\x00",
25778                 .klen   = 16,
25779                 .input  = "\x69\x72\x36\x59\x1B\x52\x42\xB1",
25780                 .ilen   = 8,
25781                 .result = "\x01\x23\x45\x67\x89\xAB\xCD\xEF",
25782                 .rlen   = 8,
25783         },
25784 };
25785
25786 /*
25787  * TEA test vectors
25788  */
25789 #define TEA_ENC_TEST_VECTORS    4
25790 #define TEA_DEC_TEST_VECTORS    4
25791
25792 static struct cipher_testvec tea_enc_tv_template[] = {
25793         {
25794                 .key    = zeroed_string,
25795                 .klen   = 16,
25796                 .input  = zeroed_string,
25797                 .ilen   = 8,
25798                 .result = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
25799                 .rlen   = 8,
25800         }, {
25801                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
25802                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
25803                 .klen   = 16,
25804                 .input  = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
25805                 .ilen   = 8,
25806                 .result = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
25807                 .rlen   = 8,
25808         }, {
25809                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
25810                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
25811                 .klen   = 16,
25812                 .input  = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
25813                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
25814                 .ilen   = 16,
25815                 .result = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
25816                           "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
25817                 .rlen   = 16,
25818         }, {
25819                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
25820                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
25821                 .klen   = 16,
25822                 .input  = "\x54\x65\x61\x20\x69\x73\x20\x67"
25823                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
25824                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
25825                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
25826                 .ilen   = 32,
25827                 .result = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
25828                           "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
25829                           "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
25830                           "\x07\x89\x73\xc2\x45\x92\xc6\x90",
25831                 .rlen   = 32,
25832         }
25833 };
25834
25835 static struct cipher_testvec tea_dec_tv_template[] = {
25836         {
25837                 .key    = zeroed_string,
25838                 .klen   = 16,
25839                 .input  = "\x0a\x3a\xea\x41\x40\xa9\xba\x94",
25840                 .ilen   = 8,
25841                 .result = zeroed_string,
25842                 .rlen   = 8,
25843         }, {
25844                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
25845                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
25846                 .klen   = 16,
25847                 .input  = "\x77\x5d\x2a\x6a\xf6\xce\x92\x09",
25848                 .ilen   = 8,
25849                 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
25850                 .rlen   = 8,
25851         }, {
25852                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
25853                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
25854                 .klen   = 16,
25855                 .input  = "\xbe\x7a\xbb\x81\x95\x2d\x1f\x1e"
25856                           "\xdd\x89\xa1\x25\x04\x21\xdf\x95",
25857                 .ilen   = 16,
25858                 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
25859                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
25860                 .rlen   = 16,
25861         }, {
25862                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
25863                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
25864                 .klen   = 16,
25865                 .input  = "\xe0\x4d\x5d\x3c\xb7\x8c\x36\x47"
25866                           "\x94\x18\x95\x91\xa9\xfc\x49\xf8"
25867                           "\x44\xd1\x2d\xc2\x99\xb8\x08\x2a"
25868                           "\x07\x89\x73\xc2\x45\x92\xc6\x90",
25869                 .ilen   = 32,
25870                 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
25871                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
25872                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
25873                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
25874                 .rlen   = 32,
25875         }
25876 };
25877
25878 /*
25879  * XTEA test vectors
25880  */
25881 #define XTEA_ENC_TEST_VECTORS   4
25882 #define XTEA_DEC_TEST_VECTORS   4
25883
25884 static struct cipher_testvec xtea_enc_tv_template[] = {
25885         {
25886                 .key    = zeroed_string,
25887                 .klen   = 16,
25888                 .input  = zeroed_string,
25889                 .ilen   = 8,
25890                 .result = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
25891                 .rlen   = 8,
25892         }, {
25893                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
25894                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
25895                 .klen   = 16,
25896                 .input  = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
25897                 .ilen   = 8,
25898                 .result = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
25899                 .rlen   = 8,
25900         }, {
25901                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
25902                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
25903                 .klen   = 16,
25904                 .input  = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
25905                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
25906                 .ilen   = 16,
25907                 .result = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
25908                           "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
25909                 .rlen   = 16,
25910         }, {
25911                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
25912                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
25913                 .klen   = 16,
25914                 .input  = "\x54\x65\x61\x20\x69\x73\x20\x67"
25915                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
25916                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
25917                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
25918                 .ilen   = 32,
25919                 .result = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
25920                           "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
25921                           "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
25922                           "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
25923                 .rlen   = 32,
25924         }
25925 };
25926
25927 static struct cipher_testvec xtea_dec_tv_template[] = {
25928         {
25929                 .key    = zeroed_string,
25930                 .klen   = 16,
25931                 .input  = "\xd8\xd4\xe9\xde\xd9\x1e\x13\xf7",
25932                 .ilen   = 8,
25933                 .result = zeroed_string,
25934                 .rlen   = 8,
25935         }, {
25936                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
25937                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
25938                 .klen   = 16,
25939                 .input  = "\x94\xeb\xc8\x96\x84\x6a\x49\xa8",
25940                 .ilen   = 8,
25941                 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
25942                 .rlen   = 8,
25943         }, {
25944                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
25945                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
25946                 .klen   = 16,
25947                 .input  = "\x3e\xce\xae\x22\x60\x56\xa8\x9d"
25948                           "\x77\x4d\xd4\xb4\x87\x24\xe3\x9a",
25949                 .ilen   = 16,
25950                 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
25951                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
25952                 .rlen   = 16,
25953         }, {
25954                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
25955                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
25956                 .klen   = 16,
25957                 .input  = "\x99\x81\x9f\x5d\x6f\x4b\x31\x3a"
25958                           "\x86\xff\x6f\xd0\xe3\x87\x70\x07"
25959                           "\x4d\xb8\xcf\xf3\x99\x50\xb3\xd4"
25960                           "\x73\xa2\xfa\xc9\x16\x59\x5d\x81",
25961                 .ilen   = 32,
25962                 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
25963                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
25964                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
25965                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
25966                 .rlen   = 32,
25967         }
25968 };
25969
25970 /*
25971  * KHAZAD test vectors.
25972  */
25973 #define KHAZAD_ENC_TEST_VECTORS 5
25974 #define KHAZAD_DEC_TEST_VECTORS 5
25975
25976 static struct cipher_testvec khazad_enc_tv_template[] = {
25977         {
25978                 .key    = "\x80\x00\x00\x00\x00\x00\x00\x00"
25979                           "\x00\x00\x00\x00\x00\x00\x00\x00",
25980                 .klen   = 16,
25981                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
25982                 .ilen   = 8,
25983                 .result = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
25984                 .rlen   = 8,
25985         }, {
25986                 .key    = "\x38\x38\x38\x38\x38\x38\x38\x38"
25987                           "\x38\x38\x38\x38\x38\x38\x38\x38",
25988                 .klen   = 16,
25989                 .input  = "\x38\x38\x38\x38\x38\x38\x38\x38",
25990                 .ilen   = 8,
25991                 .result = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
25992                 .rlen   = 8,
25993         }, {
25994                 .key    = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
25995                         "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
25996                 .klen   = 16,
25997                 .input  = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
25998                 .ilen   = 8,
25999                 .result = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
26000                 .rlen   = 8,
26001         }, {
26002                 .key    = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26003                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26004                 .klen   = 16,
26005                 .input  = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26006                 .ilen   = 8,
26007                 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26008                 .rlen   = 8,
26009         }, {
26010                 .key    = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26011                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26012                 .klen   = 16,
26013                 .input  = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26014                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26015                 .ilen   = 16,
26016                 .result = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
26017                         "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26018                 .rlen   = 16,
26019         },
26020 };
26021
26022 static struct cipher_testvec khazad_dec_tv_template[] = {
26023         {
26024                 .key    = "\x80\x00\x00\x00\x00\x00\x00\x00"
26025                           "\x00\x00\x00\x00\x00\x00\x00\x00",
26026                 .klen   = 16,
26027                 .input  = "\x49\xa4\xce\x32\xac\x19\x0e\x3f",
26028                 .ilen   = 8,
26029                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
26030                 .rlen   = 8,
26031         }, {
26032                 .key    = "\x38\x38\x38\x38\x38\x38\x38\x38"
26033                           "\x38\x38\x38\x38\x38\x38\x38\x38",
26034                 .klen   = 16,
26035                 .input  = "\x7e\x82\x12\xa1\xd9\x5b\xe4\xf9",
26036                 .ilen   = 8,
26037                 .result = "\x38\x38\x38\x38\x38\x38\x38\x38",
26038                 .rlen   = 8,
26039         }, {
26040                 .key    = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2"
26041                         "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26042                 .klen   = 16,
26043                 .input  = "\xaa\xbe\xc1\x95\xc5\x94\x1a\x9c",
26044                 .ilen   = 8,
26045                 .result = "\xa2\xa2\xa2\xa2\xa2\xa2\xa2\xa2",
26046                 .rlen   = 8,
26047         }, {
26048                 .key    = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26049                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26050                 .klen   = 16,
26051                 .input  = "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26052                 .ilen   = 8,
26053                 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26054                 .rlen   = 8,
26055         }, {
26056                 .key    = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26057                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26058                 .klen   = 16,
26059                 .input  = "\x04\x74\xf5\x70\x50\x16\xd3\xb8"
26060                         "\x04\x74\xf5\x70\x50\x16\xd3\xb8",
26061                 .ilen   = 16,
26062                 .result = "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f"
26063                         "\x2f\x2f\x2f\x2f\x2f\x2f\x2f\x2f",
26064                 .rlen   = 16,
26065         },
26066 };
26067
26068 /*
26069  * Anubis test vectors.
26070  */
26071
26072 #define ANUBIS_ENC_TEST_VECTORS                 5
26073 #define ANUBIS_DEC_TEST_VECTORS                 5
26074 #define ANUBIS_CBC_ENC_TEST_VECTORS             2
26075 #define ANUBIS_CBC_DEC_TEST_VECTORS             2
26076
26077 static struct cipher_testvec anubis_enc_tv_template[] = {
26078         {
26079                 .key    = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26080                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26081                 .klen   = 16,
26082                 .input  = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26083                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26084                 .ilen   = 16,
26085                 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26086                           "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
26087                 .rlen   = 16,
26088         }, {
26089
26090                 .key    = "\x03\x03\x03\x03\x03\x03\x03\x03"
26091                           "\x03\x03\x03\x03\x03\x03\x03\x03"
26092                           "\x03\x03\x03\x03",
26093                 .klen   = 20,
26094                 .input  = "\x03\x03\x03\x03\x03\x03\x03\x03"
26095                           "\x03\x03\x03\x03\x03\x03\x03\x03",
26096                 .ilen   = 16,
26097                 .result = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
26098                           "\x87\x41\x6f\x82\x0a\x98\x64\xae",
26099                 .rlen   = 16,
26100         }, {
26101                 .key    = "\x24\x24\x24\x24\x24\x24\x24\x24"
26102                           "\x24\x24\x24\x24\x24\x24\x24\x24"
26103                           "\x24\x24\x24\x24\x24\x24\x24\x24"
26104                           "\x24\x24\x24\x24",
26105                 .klen   = 28,
26106                 .input  = "\x24\x24\x24\x24\x24\x24\x24\x24"
26107                           "\x24\x24\x24\x24\x24\x24\x24\x24",
26108                 .ilen   = 16,
26109                 .result = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
26110                           "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
26111                 .rlen   = 16,
26112         }, {
26113                 .key    = "\x25\x25\x25\x25\x25\x25\x25\x25"
26114                           "\x25\x25\x25\x25\x25\x25\x25\x25"
26115                           "\x25\x25\x25\x25\x25\x25\x25\x25"
26116                           "\x25\x25\x25\x25\x25\x25\x25\x25",
26117                 .klen   = 32,
26118                 .input  = "\x25\x25\x25\x25\x25\x25\x25\x25"
26119                           "\x25\x25\x25\x25\x25\x25\x25\x25",
26120                 .ilen   = 16,
26121                 .result = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
26122                         "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
26123                 .rlen   = 16,
26124         }, {
26125                 .key    = "\x35\x35\x35\x35\x35\x35\x35\x35"
26126                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26127                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26128                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26129                           "\x35\x35\x35\x35\x35\x35\x35\x35",
26130                 .klen   = 40,
26131                 .input  = "\x35\x35\x35\x35\x35\x35\x35\x35"
26132                           "\x35\x35\x35\x35\x35\x35\x35\x35",
26133                 .ilen   = 16,
26134                 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26135                           "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
26136                 .rlen   = 16,
26137         },
26138 };
26139
26140 static struct cipher_testvec anubis_dec_tv_template[] = {
26141         {
26142                 .key    = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26143                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26144                 .klen   = 16,
26145                 .input  = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26146                           "\x08\xb7\x52\x8e\x6e\x6e\x86\x90",
26147                 .ilen   = 16,
26148                 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26149                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26150                 .rlen   = 16,
26151         }, {
26152
26153                 .key    = "\x03\x03\x03\x03\x03\x03\x03\x03"
26154                           "\x03\x03\x03\x03\x03\x03\x03\x03"
26155                           "\x03\x03\x03\x03",
26156                 .klen   = 20,
26157                 .input  = "\xdb\xf1\x42\xf4\xd1\x8a\xc7\x49"
26158                           "\x87\x41\x6f\x82\x0a\x98\x64\xae",
26159                 .ilen   = 16,
26160                 .result = "\x03\x03\x03\x03\x03\x03\x03\x03"
26161                           "\x03\x03\x03\x03\x03\x03\x03\x03",
26162                 .rlen   = 16,
26163         }, {
26164                 .key    = "\x24\x24\x24\x24\x24\x24\x24\x24"
26165                           "\x24\x24\x24\x24\x24\x24\x24\x24"
26166                           "\x24\x24\x24\x24\x24\x24\x24\x24"
26167                           "\x24\x24\x24\x24",
26168                 .klen   = 28,
26169                 .input  = "\xfd\x1b\x4a\xe3\xbf\xf0\xad\x3d"
26170                           "\x06\xd3\x61\x27\xfd\x13\x9e\xde",
26171                 .ilen   = 16,
26172                 .result = "\x24\x24\x24\x24\x24\x24\x24\x24"
26173                           "\x24\x24\x24\x24\x24\x24\x24\x24",
26174                 .rlen   = 16,
26175         }, {
26176                 .key    = "\x25\x25\x25\x25\x25\x25\x25\x25"
26177                           "\x25\x25\x25\x25\x25\x25\x25\x25"
26178                           "\x25\x25\x25\x25\x25\x25\x25\x25"
26179                           "\x25\x25\x25\x25\x25\x25\x25\x25",
26180                 .klen   = 32,
26181                 .input  = "\x1a\x91\xfb\x2b\xb7\x78\x6b\xc4"
26182                         "\x17\xd9\xff\x40\x3b\x0e\xe5\xfe",
26183                 .ilen   = 16,
26184                 .result = "\x25\x25\x25\x25\x25\x25\x25\x25"
26185                           "\x25\x25\x25\x25\x25\x25\x25\x25",
26186                 .rlen   = 16,
26187         }, {
26188                 .key    = "\x35\x35\x35\x35\x35\x35\x35\x35"
26189                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26190                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26191                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26192                           "\x35\x35\x35\x35\x35\x35\x35\x35",
26193                 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26194                          "\x9e\xc6\x84\x0f\x17\x21\x07\xee",
26195                 .klen   = 40,
26196                 .ilen   = 16,
26197                 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
26198                           "\x35\x35\x35\x35\x35\x35\x35\x35",
26199                 .rlen   = 16,
26200         },
26201 };
26202
26203 static struct cipher_testvec anubis_cbc_enc_tv_template[] = {
26204         {
26205                 .key    = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26206                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26207                 .klen   = 16,
26208                 .input  = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26209                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26210                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26211                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26212                 .ilen   = 32,
26213                 .result = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26214                           "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
26215                           "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
26216                           "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
26217                 .rlen   = 32,
26218         }, {
26219                 .key    = "\x35\x35\x35\x35\x35\x35\x35\x35"
26220                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26221                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26222                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26223                           "\x35\x35\x35\x35\x35\x35\x35\x35",
26224                 .klen   = 40,
26225                 .input  = "\x35\x35\x35\x35\x35\x35\x35\x35"
26226                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26227                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26228                           "\x35\x35\x35\x35\x35\x35\x35\x35",
26229                 .ilen   = 32,
26230                 .result = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26231                           "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
26232                           "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
26233                           "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
26234                 .rlen   = 32,
26235         },
26236 };
26237
26238 static struct cipher_testvec anubis_cbc_dec_tv_template[] = {
26239         {
26240                 .key    = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26241                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26242                 .klen   = 16,
26243                 .input  = "\x6d\xc5\xda\xa2\x26\x7d\x62\x6f"
26244                           "\x08\xb7\x52\x8e\x6e\x6e\x86\x90"
26245                           "\x86\xd8\xb5\x6f\x98\x5e\x8a\x66"
26246                           "\x4f\x1f\x78\xa1\xbb\x37\xf1\xbe",
26247                 .ilen   = 32,
26248                 .result = "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26249                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26250                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe"
26251                           "\xfe\xfe\xfe\xfe\xfe\xfe\xfe\xfe",
26252                 .rlen   = 32,
26253         }, {
26254                 .key    = "\x35\x35\x35\x35\x35\x35\x35\x35"
26255                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26256                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26257                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26258                           "\x35\x35\x35\x35\x35\x35\x35\x35",
26259                 .klen   = 40,
26260                 .input = "\xa5\x2c\x85\x6f\x9c\xba\xa0\x97"
26261                           "\x9e\xc6\x84\x0f\x17\x21\x07\xee"
26262                           "\xa2\xbc\x06\x98\xc6\x4b\xda\x75"
26263                           "\x2e\xaa\xbe\x58\xce\x01\x5b\xc7",
26264                 .ilen   = 32,
26265                 .result = "\x35\x35\x35\x35\x35\x35\x35\x35"
26266                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26267                           "\x35\x35\x35\x35\x35\x35\x35\x35"
26268                           "\x35\x35\x35\x35\x35\x35\x35\x35",
26269                 .rlen   = 32,
26270         },
26271 };
26272
26273 /*
26274  * XETA test vectors
26275  */
26276 #define XETA_ENC_TEST_VECTORS   4
26277 #define XETA_DEC_TEST_VECTORS   4
26278
26279 static struct cipher_testvec xeta_enc_tv_template[] = {
26280         {
26281                 .key    = zeroed_string,
26282                 .klen   = 16,
26283                 .input  = zeroed_string,
26284                 .ilen   = 8,
26285                 .result = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
26286                 .rlen   = 8,
26287         }, {
26288                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26289                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26290                 .klen   = 16,
26291                 .input  = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26292                 .ilen   = 8,
26293                 .result = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
26294                 .rlen   = 8,
26295         }, {
26296                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
26297                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26298                 .klen   = 16,
26299                 .input  = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26300                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
26301                 .ilen   = 16,
26302                 .result = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
26303                           "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
26304                 .rlen   = 16,
26305         }, {
26306                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26307                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26308                 .klen   = 16,
26309                 .input  = "\x54\x65\x61\x20\x69\x73\x20\x67"
26310                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26311                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
26312                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26313                 .ilen   = 32,
26314                 .result = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
26315                           "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
26316                           "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
26317                           "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
26318                 .rlen   = 32,
26319         }
26320 };
26321
26322 static struct cipher_testvec xeta_dec_tv_template[] = {
26323         {
26324                 .key    = zeroed_string,
26325                 .klen   = 16,
26326                 .input  = "\xaa\x22\x96\xe5\x6c\x61\xf3\x45",
26327                 .ilen   = 8,
26328                 .result = zeroed_string,
26329                 .rlen   = 8,
26330         }, {
26331                 .key    = "\x2b\x02\x05\x68\x06\x14\x49\x76"
26332                           "\x77\x5d\x0e\x26\x6c\x28\x78\x43",
26333                 .klen   = 16,
26334                 .input  = "\x82\x3e\xeb\x35\xdc\xdd\xd9\xc3",
26335                 .ilen   = 8,
26336                 .result = "\x74\x65\x73\x74\x20\x6d\x65\x2e",
26337                 .rlen   = 8,
26338         }, {
26339                 .key    = "\x09\x65\x43\x11\x66\x44\x39\x25"
26340                           "\x51\x3a\x16\x10\x0a\x08\x12\x6e",
26341                 .klen   = 16,
26342                 .input  = "\xe2\x04\xdb\xf2\x89\x85\x9e\xea"
26343                           "\x61\x35\xaa\xed\xb5\xcb\x71\x2c",
26344                 .ilen   = 16,
26345                 .result = "\x6c\x6f\x6e\x67\x65\x72\x5f\x74"
26346                           "\x65\x73\x74\x5f\x76\x65\x63\x74",
26347                 .rlen   = 16,
26348         }, {
26349                 .key    = "\x4d\x76\x32\x17\x05\x3f\x75\x2c"
26350                           "\x5d\x04\x16\x36\x15\x72\x63\x2f",
26351                 .klen   = 16,
26352                 .input  = "\x0b\x03\xcd\x8a\xbe\x95\xfd\xb1"
26353                           "\xc1\x44\x91\x0b\xa5\xc9\x1b\xb4"
26354                           "\xa9\xda\x1e\x9e\xb1\x3e\x2a\x8f"
26355                           "\xea\xa5\x6a\x85\xd1\xf4\xa8\xa5",
26356                 .ilen   = 32,
26357                 .result = "\x54\x65\x61\x20\x69\x73\x20\x67"
26358                           "\x6f\x6f\x64\x20\x66\x6f\x72\x20"
26359                           "\x79\x6f\x75\x21\x21\x21\x20\x72"
26360                           "\x65\x61\x6c\x6c\x79\x21\x21\x21",
26361                 .rlen   = 32,
26362         }
26363 };
26364
26365 /*
26366  * FCrypt test vectors
26367  */
26368 #define FCRYPT_ENC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_enc_tv_template)
26369 #define FCRYPT_DEC_TEST_VECTORS ARRAY_SIZE(fcrypt_pcbc_dec_tv_template)
26370
26371 static struct cipher_testvec fcrypt_pcbc_enc_tv_template[] = {
26372         { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
26373                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
26374                 .klen   = 8,
26375                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
26376                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00",
26377                 .ilen   = 8,
26378                 .result = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
26379                 .rlen   = 8,
26380         }, {
26381                 .key    = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
26382                 .klen   = 8,
26383                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
26384                 .input  = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
26385                 .ilen   = 8,
26386                 .result = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
26387                 .rlen   = 8,
26388         }, { /* From Arla */
26389                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26390                 .klen   = 8,
26391                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26392                 .input  = "The quick brown fox jumps over the lazy dogs.\0\0",
26393                 .ilen   = 48,
26394                 .result = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
26395                           "\xee\xac\x98\x62\x44\x51\xe4\x84"
26396                           "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
26397                           "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
26398                           "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
26399                           "\xf8\x91\x3c\xac\x44\x22\x92\xef",
26400                 .rlen   = 48,
26401         }, {
26402                 .key    = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26403                 .klen   = 8,
26404                 .iv     = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26405                 .input  = "The quick brown fox jumps over the lazy dogs.\0\0",
26406                 .ilen   = 48,
26407                 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26408                           "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26409                           "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26410                           "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26411                           "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26412                           "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26413                 .rlen   = 48,
26414         }, { /* split-page version */
26415                 .key    = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26416                 .klen   = 8,
26417                 .iv     = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26418                 .input  = "The quick brown fox jumps over the lazy dogs.\0\0",
26419                 .ilen   = 48,
26420                 .result = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26421                           "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26422                           "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26423                           "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26424                           "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26425                           "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26426                 .rlen   = 48,
26427                 .np     = 2,
26428                 .tap    = { 20, 28 },
26429         }
26430 };
26431
26432 static struct cipher_testvec fcrypt_pcbc_dec_tv_template[] = {
26433         { /* http://www.openafs.org/pipermail/openafs-devel/2000-December/005320.html */
26434                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00",
26435                 .klen   = 8,
26436                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
26437                 .input  = "\x0E\x09\x00\xC7\x3E\xF7\xED\x41",
26438                 .ilen   = 8,
26439                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00",
26440                 .rlen   = 8,
26441         }, {
26442                 .key    = "\x11\x44\x77\xAA\xDD\x00\x33\x66",
26443                 .klen   = 8,
26444                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
26445                 .input  = "\xD8\xED\x78\x74\x77\xEC\x06\x80",
26446                 .ilen   = 8,
26447                 .result = "\x12\x34\x56\x78\x9A\xBC\xDE\xF0",
26448                 .rlen   = 8,
26449         }, { /* From Arla */
26450                 .key    = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26451                 .klen   = 8,
26452                 .iv     = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26453                 .input  = "\x00\xf0\x0e\x11\x75\xe6\x23\x82"
26454                           "\xee\xac\x98\x62\x44\x51\xe4\x84"
26455                           "\xc3\x59\xd8\xaa\x64\x60\xae\xf7"
26456                           "\xd2\xd9\x13\x79\x72\xa3\x45\x03"
26457                           "\x23\xb5\x62\xd7\x0c\xf5\x27\xd1"
26458                           "\xf8\x91\x3c\xac\x44\x22\x92\xef",
26459                 .ilen   = 48,
26460                 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
26461                 .rlen   = 48,
26462         }, {
26463                 .key    = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26464                 .klen   = 8,
26465                 .iv     = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26466                 .input  = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26467                           "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26468                           "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26469                           "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26470                           "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26471                           "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26472                 .ilen   = 48,
26473                 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
26474                 .rlen   = 48,
26475         }, { /* split-page version */
26476                 .key    = "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26477                 .klen   = 8,
26478                 .iv     = "\xf0\xe1\xd2\xc3\xb4\xa5\x96\x87",
26479                 .input  = "\xca\x90\xf5\x9d\xcb\xd4\xd2\x3c"
26480                           "\x01\x88\x7f\x3e\x31\x6e\x62\x9d"
26481                           "\xd8\xe0\x57\xa3\x06\x3a\x42\x58"
26482                           "\x2a\x28\xfe\x72\x52\x2f\xdd\xe0"
26483                           "\x19\x89\x09\x1c\x2a\x8e\x8c\x94"
26484                           "\xfc\xc7\x68\xe4\x88\xaa\xde\x0f",
26485                 .ilen   = 48,
26486                 .result = "The quick brown fox jumps over the lazy dogs.\0\0",
26487                 .rlen   = 48,
26488                 .np     = 2,
26489                 .tap    = { 20, 28 },
26490         }
26491 };
26492
26493 /*
26494  * CAMELLIA test vectors.
26495  */
26496 #define CAMELLIA_ENC_TEST_VECTORS 4
26497 #define CAMELLIA_DEC_TEST_VECTORS 4
26498 #define CAMELLIA_CBC_ENC_TEST_VECTORS 3
26499 #define CAMELLIA_CBC_DEC_TEST_VECTORS 3
26500 #define CAMELLIA_CTR_ENC_TEST_VECTORS 2
26501 #define CAMELLIA_CTR_DEC_TEST_VECTORS 2
26502 #define CAMELLIA_LRW_ENC_TEST_VECTORS 8
26503 #define CAMELLIA_LRW_DEC_TEST_VECTORS 8
26504 #define CAMELLIA_XTS_ENC_TEST_VECTORS 5
26505 #define CAMELLIA_XTS_DEC_TEST_VECTORS 5
26506
26507 static struct cipher_testvec camellia_enc_tv_template[] = {
26508         {
26509                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26510                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26511                 .klen   = 16,
26512                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26513                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26514                 .ilen   = 16,
26515                 .result = "\x67\x67\x31\x38\x54\x96\x69\x73"
26516                           "\x08\x57\x06\x56\x48\xea\xbe\x43",
26517                 .rlen   = 16,
26518         }, {
26519                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26520                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
26521                           "\x00\x11\x22\x33\x44\x55\x66\x77",
26522                 .klen   = 24,
26523                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26524                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26525                 .ilen   = 16,
26526                 .result = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
26527                           "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
26528                 .rlen   = 16,
26529         }, {
26530                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26531                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
26532                           "\x00\x11\x22\x33\x44\x55\x66\x77"
26533                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
26534                 .klen   = 32,
26535                 .input  = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26536                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26537                 .ilen   = 16,
26538                 .result = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
26539                           "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
26540                 .rlen   = 16,
26541         }, { /* Generated with Crypto++ */
26542                 .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
26543                           "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
26544                           "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
26545                           "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
26546                 .klen   = 32,
26547                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26548                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26549                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26550                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26551                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26552                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26553                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26554                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26555                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26556                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26557                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26558                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26559                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26560                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26561                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26562                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26563                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26564                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26565                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26566                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26567                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26568                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26569                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26570                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26571                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26572                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
26573                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
26574                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
26575                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
26576                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
26577                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
26578                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
26579                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
26580                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
26581                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
26582                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
26583                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
26584                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
26585                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
26586                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
26587                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
26588                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
26589                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
26590                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
26591                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
26592                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
26593                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
26594                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
26595                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
26596                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
26597                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
26598                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
26599                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
26600                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
26601                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
26602                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
26603                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
26604                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
26605                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
26606                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
26607                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
26608                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
26609                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
26610                           "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
26611                           "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
26612                           "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
26613                           "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
26614                           "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
26615                           "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
26616                           "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
26617                           "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
26618                           "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
26619                           "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
26620                           "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
26621                           "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
26622                           "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
26623                           "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
26624                           "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
26625                           "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
26626                           "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
26627                           "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
26628                           "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
26629                           "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
26630                           "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
26631                           "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
26632                           "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
26633                           "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
26634                           "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
26635                           "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
26636                           "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
26637                           "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
26638                           "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
26639                           "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
26640                           "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
26641                           "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
26642                           "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
26643                           "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
26644                           "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
26645                           "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
26646                           "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
26647                           "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
26648                           "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
26649                           "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
26650                           "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
26651                           "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
26652                           "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
26653                           "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
26654                           "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
26655                           "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
26656                           "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
26657                           "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
26658                           "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
26659                           "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
26660                           "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
26661                           "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
26662                           "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
26663                           "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
26664                           "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
26665                           "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
26666                           "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
26667                           "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
26668                           "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
26669                           "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
26670                           "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
26671                           "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
26672                           "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
26673                 .ilen   = 1008,
26674                 .result = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
26675                           "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
26676                           "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
26677                           "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
26678                           "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
26679                           "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
26680                           "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
26681                           "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
26682                           "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
26683                           "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
26684                           "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
26685                           "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
26686                           "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
26687                           "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
26688                           "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
26689                           "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
26690                           "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
26691                           "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
26692                           "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
26693                           "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
26694                           "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
26695                           "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
26696                           "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
26697                           "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
26698                           "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
26699                           "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
26700                           "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
26701                           "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
26702                           "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
26703                           "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
26704                           "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
26705                           "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
26706                           "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
26707                           "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
26708                           "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
26709                           "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
26710                           "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
26711                           "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
26712                           "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
26713                           "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
26714                           "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
26715                           "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
26716                           "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
26717                           "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
26718                           "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
26719                           "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
26720                           "\x83\x06\xAB\x82\x99\x01\x16\x1A"
26721                           "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
26722                           "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
26723                           "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
26724                           "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
26725                           "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
26726                           "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
26727                           "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
26728                           "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
26729                           "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
26730                           "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
26731                           "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
26732                           "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
26733                           "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
26734                           "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
26735                           "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
26736                           "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
26737                           "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
26738                           "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
26739                           "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
26740                           "\xED\x28\x39\xE9\x63\xED\x41\x70"
26741                           "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
26742                           "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
26743                           "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
26744                           "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
26745                           "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
26746                           "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
26747                           "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
26748                           "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
26749                           "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
26750                           "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
26751                           "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
26752                           "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
26753                           "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
26754                           "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
26755                           "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
26756                           "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
26757                           "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
26758                           "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
26759                           "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
26760                           "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
26761                           "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
26762                           "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
26763                           "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
26764                           "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
26765                           "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
26766                           "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
26767                           "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
26768                           "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
26769                           "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
26770                           "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
26771                           "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
26772                           "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
26773                           "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
26774                           "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
26775                           "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
26776                           "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
26777                           "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
26778                           "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
26779                           "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
26780                           "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
26781                           "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
26782                           "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
26783                           "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
26784                           "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
26785                           "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
26786                           "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
26787                           "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
26788                           "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
26789                           "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
26790                           "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
26791                           "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
26792                           "\x31\x93\x51\x1C\x63\x97\x70\xB0"
26793                           "\x99\x78\x83\x13\xFD\xCF\x53\x81"
26794                           "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
26795                           "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
26796                           "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
26797                           "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
26798                           "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
26799                           "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
26800                 .rlen   = 1008,
26801                 .also_non_np = 1,
26802                 .np     = 3,
26803                 .tap    = { 1008 - 20, 4, 16 },
26804         },
26805 };
26806
26807 static struct cipher_testvec camellia_dec_tv_template[] = {
26808         {
26809                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26810                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26811                 .klen   = 16,
26812                 .input  = "\x67\x67\x31\x38\x54\x96\x69\x73"
26813                           "\x08\x57\x06\x56\x48\xea\xbe\x43",
26814                 .ilen   = 16,
26815                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26816                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26817                 .rlen   = 16,
26818         }, {
26819                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26820                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
26821                           "\x00\x11\x22\x33\x44\x55\x66\x77",
26822                 .klen   = 24,
26823                 .input  = "\xb4\x99\x34\x01\xb3\xe9\x96\xf8"
26824                           "\x4e\xe5\xce\xe7\xd7\x9b\x09\xb9",
26825                 .ilen   = 16,
26826                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26827                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26828                 .rlen   = 16,
26829         }, {
26830                 .key    = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26831                           "\xfe\xdc\xba\x98\x76\x54\x32\x10"
26832                           "\x00\x11\x22\x33\x44\x55\x66\x77"
26833                           "\x88\x99\xaa\xbb\xcc\xdd\xee\xff",
26834                 .klen   = 32,
26835                 .input  = "\x9a\xcc\x23\x7d\xff\x16\xd7\x6c"
26836                           "\x20\xef\x7c\x91\x9e\x3a\x75\x09",
26837                 .ilen   = 16,
26838                 .result = "\x01\x23\x45\x67\x89\xab\xcd\xef"
26839                           "\xfe\xdc\xba\x98\x76\x54\x32\x10",
26840                 .rlen   = 16,
26841         }, { /* Generated with Crypto++ */
26842                 .key    = "\x3F\x85\x62\x3F\x1C\xF9\xD6\x1C"
26843                           "\xF9\xD6\xB3\x90\x6D\x4A\x90\x6D"
26844                           "\x4A\x27\x04\xE1\x27\x04\xE1\xBE"
26845                           "\x9B\x78\xBE\x9B\x78\x55\x32\x0F",
26846                 .klen   = 32,
26847                 .input  = "\xED\xCD\xDB\xB8\x68\xCE\xBD\xEA"
26848                           "\x9D\x9D\xCD\x9F\x4F\xFC\x4D\xB7"
26849                           "\xA5\xFF\x6F\x43\x0F\xBA\x32\x04"
26850                           "\xB3\xC2\xB9\x03\xAA\x91\x56\x29"
26851                           "\x0D\xD0\xFD\xC4\x65\xA5\x69\xB9"
26852                           "\xF1\xF6\xB1\xA5\xB2\x75\x4F\x8A"
26853                           "\x8D\x7D\x1B\x9B\xC7\x68\x72\xF8"
26854                           "\x01\x9B\x17\x0A\x29\xE7\x61\x28"
26855                           "\x7F\xA7\x50\xCA\x20\x2C\x96\x3B"
26856                           "\x6E\x5C\x5D\x3F\xB5\x7F\xF3\x2B"
26857                           "\x04\xEF\x9D\xD4\xCE\x41\x28\x8E"
26858                           "\x83\x54\xAE\x7C\x82\x46\x10\xC9"
26859                           "\xC4\x8A\x1E\x1F\x4C\xA9\xFC\xEC"
26860                           "\x3C\x8C\x30\xFC\x59\xD2\x54\xC4"
26861                           "\x6F\x50\xC6\xCA\x8C\x14\x5B\x9C"
26862                           "\x18\x56\x5B\xF8\x33\x0E\x4A\xDB"
26863                           "\xEC\xB5\x6E\x5B\x31\xC4\x0E\x98"
26864                           "\x9F\x32\xBA\xA2\x18\xCF\x55\x43"
26865                           "\xFE\x80\x8F\x60\xCF\x05\x30\x9B"
26866                           "\x70\x50\x1E\x9C\x08\x87\xE6\x20"
26867                           "\xD2\xF3\x27\xF8\x2A\x8D\x12\xB2"
26868                           "\xBC\x5F\xFE\x52\x52\xF6\x7F\xB6"
26869                           "\xB8\x30\x86\x3B\x0F\x94\x1E\x79"
26870                           "\x13\x94\x35\xA2\xB1\x35\x5B\x05"
26871                           "\x2A\x98\x6B\x96\x4C\xB1\x20\xBE"
26872                           "\xB6\x14\xC2\x06\xBF\xFD\x5F\x2A"
26873                           "\xF5\x33\xC8\x19\x45\x14\x44\x5D"
26874                           "\xFE\x94\x7B\xBB\x63\x13\x57\xC3"
26875                           "\x2A\x8F\x6C\x11\x2A\x07\xA7\x6A"
26876                           "\xBF\x20\xD3\x99\xC6\x00\x0B\xBF"
26877                           "\x83\x46\x25\x3A\xB0\xF6\xC5\xC8"
26878                           "\x00\xCA\xE5\x28\x4A\x7C\x95\x9C"
26879                           "\x7B\x43\xAB\xF9\xE4\xF8\x74\xAB"
26880                           "\xA7\xB8\x9C\x0F\x53\x7B\xB6\x74"
26881                           "\x60\x64\x0D\x1C\x80\xD1\x20\x9E"
26882                           "\xDC\x14\x27\x9B\xFC\xBD\x5C\x96"
26883                           "\xD2\x51\xDC\x96\xEE\xE5\xEA\x2B"
26884                           "\x02\x7C\xAA\x3C\xDC\x9D\x7B\x01"
26885                           "\x20\xC3\xE1\x0B\xDD\xAB\xF3\x1E"
26886                           "\x19\xA8\x84\x29\x5F\xCC\xC3\x5B"
26887                           "\xE4\x33\x59\xDC\x12\xEB\x2B\x4D"
26888                           "\x5B\x55\x23\xB7\x40\x31\xDE\xEE"
26889                           "\x18\xC9\x3C\x4D\xBC\xED\xE0\x42"
26890                           "\xAD\xDE\xA0\xA3\xC3\xFE\x44\xD3"
26891                           "\xE1\x9A\xDA\xAB\x32\xFC\x1A\xBF"
26892                           "\x63\xA9\xF0\x6A\x08\x46\xBD\x48"
26893                           "\x83\x06\xAB\x82\x99\x01\x16\x1A"
26894                           "\x03\x36\xC5\x59\x6B\xB8\x8C\x9F"
26895                           "\xC6\x51\x3D\xE5\x7F\xBF\xAB\xBC"
26896                           "\xC9\xA1\x88\x34\x5F\xA9\x7C\x3B"
26897                           "\x9F\x1B\x98\x2B\x4F\xFB\x9B\xF0"
26898                           "\xCD\xB6\x45\xB2\x29\x2E\x34\x23"
26899                           "\xA9\x97\xC0\x22\x8C\x42\x9B\x5F"
26900                           "\x40\xC8\xD7\x3D\x82\x9A\x6F\xAA"
26901                           "\x74\x83\x29\x05\xE8\xC4\x4D\x01"
26902                           "\xB5\xE5\x84\x3F\x7F\xD3\xE0\x99"
26903                           "\xDA\xE7\x6F\x30\xFD\xAA\x92\x30"
26904                           "\xA5\x46\x8B\xA2\xE6\x58\x62\x7C"
26905                           "\x2C\x35\x1B\x38\x85\x7D\xE8\xF3"
26906                           "\x87\x4F\xDA\xD8\x5F\xFC\xB6\x44"
26907                           "\xD0\xE3\x9B\x8B\xBF\xD6\xB8\xC4"
26908                           "\x73\xAE\x1D\x8B\x5B\x74\x8B\xCB"
26909                           "\xA4\xAD\xCF\x5D\xD4\x58\xC9\xCD"
26910                           "\xF7\x90\x68\xCF\xC9\x11\x52\x3E"
26911                           "\xE8\xA1\xA3\x78\x8B\xD0\xAC\x0A"
26912                           "\xD4\xC9\xA3\xA5\x55\x30\xC8\x3E"
26913                           "\xED\x28\x39\xE9\x63\xED\x41\x70"
26914                           "\x51\xE3\xC4\xA0\xFC\xD5\x43\xCB"
26915                           "\x4D\x65\xC8\xFD\x3A\x91\x8F\x60"
26916                           "\x8A\xA6\x6D\x9D\x3E\x01\x23\x4B"
26917                           "\x50\x47\xC9\xDC\x9B\xDE\x37\xC5"
26918                           "\xBF\x67\xB1\x6B\x78\x38\xD5\x7E"
26919                           "\xB6\xFF\x67\x83\x3B\x6E\xBE\x23"
26920                           "\x45\xFA\x1D\x69\x44\xFD\xC6\xB9"
26921                           "\xD0\x4A\x92\xD1\xBE\xF6\x4A\xB7"
26922                           "\xCA\xA8\xA2\x9E\x13\x87\x57\x92"
26923                           "\x64\x7C\x85\x0B\xB3\x29\x37\xD8"
26924                           "\xE6\xAA\xAF\xC4\x03\x67\xA3\xBF"
26925                           "\x2E\x45\x83\xB6\xD8\x54\x00\x89"
26926                           "\xF6\xBC\x3A\x7A\x88\x58\x51\xED"
26927                           "\xF4\x4E\x01\xA5\xC3\x2E\xD9\x42"
26928                           "\xBD\x6E\x0D\x0B\x21\xB0\x1A\xCC"
26929                           "\xA4\xD3\x3F\xDC\x9B\x81\xD8\xF1"
26930                           "\xEA\x7A\x6A\xB7\x07\xC9\x6D\x91"
26931                           "\x6D\x3A\xF5\x5F\xA6\xFF\x87\x1E"
26932                           "\x3F\xDD\xC0\x72\xEA\xAC\x08\x15"
26933                           "\x21\xE6\xC6\xB6\x0D\xD8\x51\x86"
26934                           "\x2A\x03\x73\xF7\x29\xD4\xC4\xE4"
26935                           "\x7F\x95\x10\xF7\xAB\x3F\x92\x23"
26936                           "\xD3\xCE\x9C\x2E\x46\x3B\x63\x43"
26937                           "\xBB\xC2\x82\x7A\x83\xD5\x55\xE2"
26938                           "\xE7\x9B\x2F\x92\xAF\xFD\x81\x56"
26939                           "\x79\xFD\x3E\xF9\x46\xE0\x25\xD4"
26940                           "\x38\xDE\xBC\x2C\xC4\x7A\x2A\x8F"
26941                           "\x94\x4F\xD0\xAD\x9B\x37\x18\xD4"
26942                           "\x0E\x4D\x0F\x02\x3A\xDC\x5A\xA2"
26943                           "\x39\x25\x55\x20\x5A\xA6\x02\x9F"
26944                           "\xE6\x77\x21\x77\xE5\x4B\x7B\x0B"
26945                           "\x30\xF8\x5F\x33\x0F\x49\xCD\xFF"
26946                           "\xF2\xE4\x35\xF9\xF0\x63\xC3\x7E"
26947                           "\xF1\xA6\x73\xB4\xDF\xE7\xBB\x78"
26948                           "\xFF\x21\xA9\xF3\xF3\xCF\x5D\xBA"
26949                           "\xED\x87\x98\xAC\xFE\x48\x97\x6D"
26950                           "\xA6\x7F\x69\x31\xB1\xC4\xFF\x14"
26951                           "\xC6\x76\xD4\x10\xDD\xF6\x49\x2C"
26952                           "\x9C\xC8\x6D\x76\xC0\x8F\x5F\x55"
26953                           "\x2F\x3C\x8A\x30\xAA\xC3\x16\x55"
26954                           "\xC6\xFC\x8D\x8B\xB9\xE5\x80\x6C"
26955                           "\xC8\x7E\xBD\x65\x58\x36\xD5\xBC"
26956                           "\xF0\x33\x52\x29\x70\xF9\x5C\xE9"
26957                           "\xAC\x1F\xB5\x73\x56\x66\x54\xAF"
26958                           "\x1B\x8F\x7D\xED\xAB\x03\xCE\xE3"
26959                           "\xAE\x47\xB6\x69\x86\xE9\x01\x31"
26960                           "\x83\x18\x3D\xF4\x74\x7B\xF9\x42"
26961                           "\x4C\xFD\x75\x4A\x6D\xF0\x03\xA6"
26962                           "\x2B\x20\x63\xDA\x49\x65\x5E\x8B"
26963                           "\xC0\x19\xE3\x8D\xD9\xF3\xB0\x34"
26964                           "\xD3\x52\xFC\x68\x00\x43\x1B\x37"
26965                           "\x31\x93\x51\x1C\x63\x97\x70\xB0"
26966                           "\x99\x78\x83\x13\xFD\xCF\x53\x81"
26967                           "\x36\x46\xB5\x42\x52\x2F\x32\xEB"
26968                           "\x4A\x3D\xF1\x8F\x1C\x54\x2E\xFC"
26969                           "\x41\x75\x5A\x8C\x8E\x6F\xE7\x1A"
26970                           "\xAE\xEF\x3E\x82\x12\x0B\x74\x72"
26971                           "\xF8\xB2\xAA\x7A\xD6\xFF\xFA\x55"
26972                           "\x33\x1A\xBB\xD3\xA2\x7E\x97\x66",
26973                 .ilen   = 1008,
26974                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
26975                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
26976                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
26977                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
26978                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
26979                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
26980                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
26981                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
26982                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
26983                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
26984                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
26985                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
26986                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
26987                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
26988                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
26989                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
26990                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
26991                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
26992                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
26993                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
26994                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
26995                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
26996                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
26997                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
26998                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
26999                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27000                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27001                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27002                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27003                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27004                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27005                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27006                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27007                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27008                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27009                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27010                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27011                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27012                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27013                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27014                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27015                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27016                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27017                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27018                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27019                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27020                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27021                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27022                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27023                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27024                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27025                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27026                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27027                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27028                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27029                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27030                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27031                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27032                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27033                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27034                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27035                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27036                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27037                           "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27038                           "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27039                           "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27040                           "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27041                           "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27042                           "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27043                           "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27044                           "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27045                           "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27046                           "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27047                           "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27048                           "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27049                           "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27050                           "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27051                           "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27052                           "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27053                           "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27054                           "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27055                           "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27056                           "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27057                           "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27058                           "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27059                           "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27060                           "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27061                           "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27062                           "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27063                           "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27064                           "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27065                           "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27066                           "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27067                           "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27068                           "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27069                           "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27070                           "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27071                           "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27072                           "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27073                           "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27074                           "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27075                           "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27076                           "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27077                           "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27078                           "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27079                           "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27080                           "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27081                           "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27082                           "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27083                           "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27084                           "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27085                           "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27086                           "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27087                           "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27088                           "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27089                           "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27090                           "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27091                           "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27092                           "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27093                           "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27094                           "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27095                           "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27096                           "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27097                           "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27098                           "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27099                           "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27100                 .rlen   = 1008,
27101                 .also_non_np = 1,
27102                 .np     = 3,
27103                 .tap    = { 1008 - 20, 4, 16 },
27104         },
27105 };
27106
27107 static struct cipher_testvec camellia_cbc_enc_tv_template[] = {
27108         {
27109                 .key    = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
27110                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
27111                 .klen   = 16,
27112                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
27113                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
27114                 .input  = "Single block msg",
27115                 .ilen   = 16,
27116                 .result = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
27117                           "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
27118                 .rlen   = 16,
27119         }, {
27120                 .key    = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
27121                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
27122                 .klen   = 16,
27123                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
27124                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
27125                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
27126                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27127                           "\x10\x11\x12\x13\x14\x15\x16\x17"
27128                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
27129                 .ilen   = 32,
27130                 .result = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
27131                           "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
27132                           "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
27133                           "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
27134                 .rlen   = 32,
27135         }, { /* Generated with Crypto++ */
27136                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27137                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27138                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27139                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27140                 .klen   = 32,
27141                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27142                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27143                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27144                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27145                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27146                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27147                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
27148                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27149                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27150                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27151                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27152                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27153                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27154                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27155                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27156                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27157                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27158                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27159                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27160                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27161                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27162                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27163                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27164                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27165                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27166                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27167                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27168                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27169                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27170                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27171                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27172                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27173                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27174                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27175                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27176                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27177                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27178                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27179                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27180                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27181                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27182                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27183                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27184                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27185                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27186                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27187                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27188                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27189                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27190                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27191                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27192                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27193                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27194                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27195                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27196                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27197                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27198                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27199                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27200                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27201                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27202                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27203                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27204                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27205                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27206                           "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27207                           "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27208                           "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27209                           "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27210                           "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27211                           "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27212                           "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27213                           "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27214                           "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27215                           "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27216                           "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27217                           "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27218                           "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27219                           "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27220                           "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27221                           "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27222                           "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27223                           "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27224                           "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27225                           "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27226                           "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27227                           "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27228                           "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27229                           "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27230                           "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27231                           "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27232                           "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27233                           "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27234                           "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27235                           "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27236                           "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27237                           "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27238                           "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27239                           "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27240                           "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27241                           "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27242                           "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27243                           "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27244                           "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27245                           "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27246                           "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27247                           "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27248                           "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27249                           "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27250                           "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27251                           "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27252                           "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27253                           "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27254                           "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27255                           "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27256                           "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27257                           "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27258                           "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27259                           "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27260                           "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27261                           "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27262                           "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27263                           "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27264                           "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27265                           "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27266                           "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27267                           "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27268                           "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27269                 .ilen   = 1008,
27270                 .result = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
27271                           "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
27272                           "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
27273                           "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
27274                           "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
27275                           "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
27276                           "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
27277                           "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
27278                           "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
27279                           "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
27280                           "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
27281                           "\x37\x49\x88\xA4\xEF\x91\x21\x47"
27282                           "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
27283                           "\x28\x90\x77\x46\xD8\xD2\x35\x16"
27284                           "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
27285                           "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
27286                           "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
27287                           "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
27288                           "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
27289                           "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
27290                           "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
27291                           "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
27292                           "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
27293                           "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
27294                           "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
27295                           "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
27296                           "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
27297                           "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
27298                           "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
27299                           "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
27300                           "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
27301                           "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
27302                           "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
27303                           "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
27304                           "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
27305                           "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
27306                           "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
27307                           "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
27308                           "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
27309                           "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
27310                           "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
27311                           "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
27312                           "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
27313                           "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
27314                           "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
27315                           "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
27316                           "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
27317                           "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
27318                           "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
27319                           "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
27320                           "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
27321                           "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
27322                           "\x38\xB8\x48\x36\x66\x4E\x20\x43"
27323                           "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
27324                           "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
27325                           "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
27326                           "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
27327                           "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
27328                           "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
27329                           "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
27330                           "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
27331                           "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
27332                           "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
27333                           "\x21\x41\x56\x72\x13\xE1\x86\x07"
27334                           "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
27335                           "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
27336                           "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
27337                           "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
27338                           "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
27339                           "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
27340                           "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
27341                           "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
27342                           "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
27343                           "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
27344                           "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
27345                           "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
27346                           "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
27347                           "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
27348                           "\xBE\x31\x31\x96\x8B\x40\x18\x75"
27349                           "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
27350                           "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
27351                           "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
27352                           "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
27353                           "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
27354                           "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
27355                           "\x09\xB0\x43\x96\x4A\x64\x80\x40"
27356                           "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
27357                           "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
27358                           "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
27359                           "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
27360                           "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
27361                           "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
27362                           "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
27363                           "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
27364                           "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
27365                           "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
27366                           "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
27367                           "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
27368                           "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
27369                           "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
27370                           "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
27371                           "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
27372                           "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
27373                           "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
27374                           "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
27375                           "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
27376                           "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
27377                           "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
27378                           "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
27379                           "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
27380                           "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
27381                           "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
27382                           "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
27383                           "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
27384                           "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
27385                           "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
27386                           "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
27387                           "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
27388                           "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
27389                           "\x80\xE7\x29\xDC\x23\x55\x98\x54"
27390                           "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
27391                           "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
27392                           "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
27393                           "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
27394                           "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
27395                           "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
27396                 .rlen   = 1008,
27397                 .also_non_np = 1,
27398                 .np     = 3,
27399                 .tap    = { 1008 - 20, 4, 16 },
27400         },
27401 };
27402
27403 static struct cipher_testvec camellia_cbc_dec_tv_template[] = {
27404         {
27405                 .key    = "\x06\xa9\x21\x40\x36\xb8\xa1\x5b"
27406                           "\x51\x2e\x03\xd5\x34\x12\x00\x06",
27407                 .klen   = 16,
27408                 .iv     = "\x3d\xaf\xba\x42\x9d\x9e\xb4\x30"
27409                           "\xb4\x22\xda\x80\x2c\x9f\xac\x41",
27410                 .input  = "\xea\x32\x12\x76\x3b\x50\x10\xe7"
27411                           "\x18\xf6\xfd\x5d\xf6\x8f\x13\x51",
27412                 .ilen   = 16,
27413                 .result = "Single block msg",
27414                 .rlen   = 16,
27415         }, {
27416                 .key    = "\xc2\x86\x69\x6d\x88\x7c\x9a\xa0"
27417                           "\x61\x1b\xbb\x3e\x20\x25\xa4\x5a",
27418                 .klen   = 16,
27419                 .iv     = "\x56\x2e\x17\x99\x6d\x09\x3d\x28"
27420                           "\xdd\xb3\xba\x69\x5a\x2e\x6f\x58",
27421                 .input = "\xa5\xdf\x6e\x50\xda\x70\x6c\x01"
27422                           "\x4a\xab\xf3\xf2\xd6\xfc\x6c\xfd"
27423                           "\x19\xb4\x3e\x57\x1c\x02\x5e\xa0"
27424                           "\x15\x78\xe0\x5e\xf2\xcb\x87\x16",
27425                 .ilen   = 32,
27426                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
27427                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
27428                           "\x10\x11\x12\x13\x14\x15\x16\x17"
27429                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
27430                 .rlen   = 32,
27431         }, { /* Generated with Crypto++ */
27432                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27433                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27434                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27435                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27436                 .klen   = 32,
27437                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27438                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27439                 .input  = "\xCD\x3E\x2A\x3B\x3E\x94\xC5\x77"
27440                           "\xBA\xBB\x5B\xB1\xDE\x7B\xA4\x40"
27441                           "\x88\x39\xE3\xFD\x94\x4B\x25\x58"
27442                           "\xE1\x4B\xC4\x18\x7A\xFD\x17\x2B"
27443                           "\xB9\xF9\xC2\x27\x6A\xB6\x31\x27"
27444                           "\xA6\xAD\xEF\xE5\x5D\xE4\x02\x01"
27445                           "\x56\x2E\x10\xC2\x2C\xFF\xC6\x83"
27446                           "\xB5\xDC\x4F\x63\xAD\x0E\x63\x5E"
27447                           "\x56\xC8\x18\x3D\x79\x86\x97\xEF"
27448                           "\x57\x0E\x63\xA1\xC1\x41\x48\xB8"
27449                           "\x98\xB7\x51\x6D\x18\xF6\x19\x82"
27450                           "\x37\x49\x88\xA4\xEF\x91\x21\x47"
27451                           "\x03\x28\xEA\x42\xF4\xFB\x7A\x58"
27452                           "\x28\x90\x77\x46\xD8\xD2\x35\x16"
27453                           "\x44\xA9\x9E\x49\x52\x2A\xE4\x16"
27454                           "\x5D\xF7\x65\xEB\x0F\xC9\x29\xE6"
27455                           "\xCF\x76\x91\x89\x8A\x94\x39\xFA"
27456                           "\x6B\x5F\x63\x53\x74\x43\x91\xF5"
27457                           "\x3F\xBC\x88\x53\xB2\x1A\x02\x3F"
27458                           "\x9D\x32\x84\xEB\x56\x28\xD6\x06"
27459                           "\xD5\xB2\x20\xA9\xFC\xC3\x76\x62"
27460                           "\x32\xCC\x86\xC8\x36\x67\x5E\x7E"
27461                           "\xA4\xAA\x15\x63\x6B\xA9\x86\xAF"
27462                           "\x1A\x52\x82\x36\x5F\xF4\x3F\x7A"
27463                           "\x9B\x78\x62\x3B\x02\x28\x60\xB3"
27464                           "\xBA\x82\xB1\xDD\xC9\x60\x8F\x47"
27465                           "\xF1\x6B\xFE\xE5\x39\x34\xA0\x28"
27466                           "\xA4\xB3\xC9\x7E\xED\x28\x8D\x70"
27467                           "\xB2\x1D\xFD\xC6\x00\xCF\x1A\x94"
27468                           "\x28\xF8\xC1\x34\xB7\x58\xA5\x6C"
27469                           "\x1A\x9D\xE4\xE4\xF6\xB9\xB4\xB0"
27470                           "\x5D\x51\x54\x9A\x53\xA0\xF9\x32"
27471                           "\xBD\x31\x54\x14\x7B\x33\xEE\x17"
27472                           "\xD3\xC7\x1F\x48\xBF\x0B\x22\xA2"
27473                           "\x7D\x0C\xDF\xD0\x2E\x98\xFA\xD2"
27474                           "\xFA\xCF\x24\x1D\x99\x9B\xD0\x7E"
27475                           "\xF4\x4F\x88\xFF\x45\x99\x4A\xF4"
27476                           "\xF2\x0A\x5B\x3B\x21\xAB\x92\xAE"
27477                           "\x40\x78\x91\x95\xC4\x2F\xA3\xE8"
27478                           "\x18\xC7\x07\xA6\xC8\xC0\x66\x33"
27479                           "\x35\xC0\xB4\xA0\xF8\xEE\x1E\xF3"
27480                           "\x40\xF5\x40\x54\xF1\x84\x8C\xEA"
27481                           "\x27\x38\x1F\xF8\x77\xC7\xDF\xD8"
27482                           "\x1D\xE2\xD9\x59\x40\x4F\x59\xD4"
27483                           "\xF8\x17\x99\x8D\x58\x2D\x72\x44"
27484                           "\x9D\x1D\x91\x64\xD6\x3F\x0A\x82"
27485                           "\xC7\x57\x3D\xEF\xD3\x41\xFA\xA7"
27486                           "\x68\xA3\xB8\xA5\x93\x74\x2E\x85"
27487                           "\x4C\x9D\x69\x59\xCE\x15\xAE\xBF"
27488                           "\x9C\x8F\x14\x64\x5D\x7F\xCF\x0B"
27489                           "\xCE\x43\x5D\x28\xC0\x2F\xFB\x18"
27490                           "\x79\x9A\xFC\x43\x16\x7C\x6B\x7B"
27491                           "\x38\xB8\x48\x36\x66\x4E\x20\x43"
27492                           "\xBA\x76\x13\x9A\xC3\xF2\xEB\x52"
27493                           "\xD7\xDC\xB2\x67\x63\x14\x25\xCD"
27494                           "\xB1\x13\x4B\xDE\x8C\x59\x21\x84"
27495                           "\x81\x8D\x97\x23\x45\x33\x7C\xF3"
27496                           "\xC5\xBC\x79\x95\xAA\x84\x68\x31"
27497                           "\x2D\x1A\x68\xFE\xEC\x92\x94\xDA"
27498                           "\x94\x2A\x6F\xD6\xFE\xE5\x76\x97"
27499                           "\xF4\x6E\xEE\xCB\x2B\x95\x4E\x36"
27500                           "\x5F\x74\x8C\x86\x5B\x71\xD0\x20"
27501                           "\x78\x1A\x7F\x18\x8C\xD9\xCD\xF5"
27502                           "\x21\x41\x56\x72\x13\xE1\x86\x07"
27503                           "\x07\x26\xF3\x4F\x7B\xEA\xB5\x18"
27504                           "\xFE\x94\x2D\x9F\xE0\x72\x18\x65"
27505                           "\xB2\xA5\x63\x48\xB4\x13\x22\xF7"
27506                           "\x25\xF1\x80\xA8\x7F\x54\x86\x7B"
27507                           "\x39\xAE\x95\x0C\x09\x32\x22\x2D"
27508                           "\x4D\x73\x39\x0C\x09\x2C\x7C\x10"
27509                           "\xD0\x4B\x53\xF6\x90\xC5\x99\x2F"
27510                           "\x15\xE1\x7F\xC6\xC5\x7A\x52\x14"
27511                           "\x65\xEE\x93\x54\xD0\x66\x15\x3C"
27512                           "\x4C\x68\xFD\x64\x0F\xF9\x10\x39"
27513                           "\x46\x7A\xDD\x97\x20\xEE\xC7\xD2"
27514                           "\x98\x4A\xB6\xE6\xF5\xA8\x1F\x4F"
27515                           "\xDB\xAB\x6D\xD5\x9B\x34\x16\x97"
27516                           "\x2F\x64\xE5\x37\xEF\x0E\xA1\xE9"
27517                           "\xBE\x31\x31\x96\x8B\x40\x18\x75"
27518                           "\x11\x75\x14\x32\xA5\x2D\x1B\x6B"
27519                           "\xDB\x59\xEB\xFA\x3D\x8E\x7C\xC4"
27520                           "\xDE\x68\xC8\x9F\xC9\x99\xE3\xC6"
27521                           "\x71\xB0\x12\x57\x89\x0D\xC0\x2B"
27522                           "\x9F\x12\x6A\x04\x67\xF1\x95\x31"
27523                           "\x59\xFD\x84\x95\x2C\x9C\x5B\xEC"
27524                           "\x09\xB0\x43\x96\x4A\x64\x80\x40"
27525                           "\xB9\x72\x19\xDD\x70\x42\xFA\xB1"
27526                           "\x4A\x2C\x0C\x0A\x60\x6E\xE3\x7C"
27527                           "\x37\x5A\xBE\xA4\x62\xCF\x29\xAB"
27528                           "\x7F\x4D\xA6\xB3\xE2\xB6\x64\xC6"
27529                           "\x33\x0B\xF3\xD5\x01\x38\x74\xA4"
27530                           "\x67\x1E\x75\x68\xC3\xAD\x76\xE9"
27531                           "\xE9\xBC\xF0\xEB\xD8\xFD\x31\x8A"
27532                           "\x5F\xC9\x18\x94\x4B\x86\x66\xFC"
27533                           "\xBD\x0B\x3D\xB3\x9F\xFA\x1F\xD9"
27534                           "\x78\xC4\xE3\x24\x1C\x67\xA2\xF8"
27535                           "\x43\xBC\x76\x75\xBF\x6C\x05\xB3"
27536                           "\x32\xE8\x7C\x80\xDB\xC7\xB6\x61"
27537                           "\x1A\x3E\x2B\xA7\x25\xED\x8F\xA0"
27538                           "\x00\x4B\xF8\x90\xCA\xD8\xFB\x12"
27539                           "\xAC\x1F\x18\xE9\xD2\x5E\xA2\x8E"
27540                           "\xE4\x84\x6B\x9D\xEB\x1E\x6B\xA3"
27541                           "\x7B\xDC\xCE\x15\x97\x27\xB2\x65"
27542                           "\xBC\x0E\x47\xAB\x55\x13\x53\xAB"
27543                           "\x0E\x34\x55\x02\x5F\x27\xC5\x89"
27544                           "\xDF\xC5\x70\xC4\xDD\x76\x82\xEE"
27545                           "\x68\xA6\x09\xB0\xE5\x5E\xF1\x0C"
27546                           "\xE3\xF3\x09\x9B\xFE\x65\x4B\xB8"
27547                           "\x30\xEC\xD5\x7C\x6A\xEC\x1D\xD2"
27548                           "\x93\xB7\xA1\x1A\x02\xD4\xC0\xD6"
27549                           "\x8D\x4D\x83\x9A\xED\x29\x4E\x14"
27550                           "\x86\xD5\x3C\x1A\xD5\xB9\x0A\x6A"
27551                           "\x72\x22\xD5\x92\x38\xF1\xA1\x86"
27552                           "\xB2\x41\x51\xCA\x4E\xAB\x8F\xD3"
27553                           "\x80\x56\xC3\xD7\x65\xE1\xB3\x86"
27554                           "\xCB\xCE\x98\xA1\xD4\x59\x1C\x06"
27555                           "\x01\xED\xF8\x29\x91\x19\x5C\x9A"
27556                           "\xEE\x28\x1B\x48\xD7\x32\xEF\x9F"
27557                           "\x6C\x2B\x66\x4E\x78\xD5\x8B\x72"
27558                           "\x80\xE7\x29\xDC\x23\x55\x98\x54"
27559                           "\xB1\xFF\x3E\x95\x56\xA8\x78\x78"
27560                           "\xEF\xC4\xA5\x11\x2D\x2B\xD8\x93"
27561                           "\x30\x6E\x7E\x51\xBB\x42\x5F\x03"
27562                           "\x43\x94\x23\x7E\xEE\xF0\xA5\x79"
27563                           "\x55\x01\xD4\x58\xB2\xF2\x85\x49"
27564                           "\x70\xC5\xB9\x0B\x3B\x7A\x6E\x6C",
27565                 .ilen   = 1008,
27566                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27567                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27568                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27569                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27570                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
27571                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27572                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27573                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27574                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27575                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27576                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27577                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27578                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27579                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27580                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27581                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27582                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27583                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27584                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27585                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27586                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27587                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27588                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27589                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27590                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27591                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27592                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27593                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27594                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27595                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27596                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27597                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27598                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27599                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27600                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27601                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27602                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27603                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27604                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27605                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27606                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27607                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27608                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27609                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27610                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27611                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27612                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27613                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27614                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27615                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27616                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27617                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27618                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27619                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27620                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27621                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27622                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27623                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27624                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27625                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27626                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27627                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27628                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27629                           "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27630                           "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27631                           "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27632                           "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27633                           "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27634                           "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27635                           "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27636                           "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27637                           "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27638                           "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27639                           "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27640                           "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27641                           "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27642                           "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27643                           "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27644                           "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27645                           "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27646                           "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27647                           "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27648                           "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27649                           "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27650                           "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27651                           "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27652                           "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27653                           "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27654                           "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27655                           "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27656                           "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27657                           "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27658                           "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27659                           "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27660                           "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27661                           "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27662                           "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27663                           "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27664                           "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27665                           "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27666                           "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27667                           "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27668                           "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27669                           "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27670                           "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27671                           "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27672                           "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27673                           "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27674                           "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27675                           "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27676                           "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27677                           "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27678                           "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27679                           "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27680                           "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27681                           "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27682                           "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27683                           "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27684                           "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27685                           "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27686                           "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27687                           "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27688                           "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27689                           "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27690                           "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27691                           "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
27692                 .rlen   = 1008,
27693                 .also_non_np = 1,
27694                 .np     = 3,
27695                 .tap    = { 1008 - 20, 4, 16 },
27696         },
27697 };
27698
27699 static struct cipher_testvec camellia_ctr_enc_tv_template[] = {
27700         { /* Generated with Crypto++ */
27701                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27702                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27703                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27704                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27705                 .klen   = 32,
27706                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27707                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27708                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27709                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27710                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27711                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27712                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
27713                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27714                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27715                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27716                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27717                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27718                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27719                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27720                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27721                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27722                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27723                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27724                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27725                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27726                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27727                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27728                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27729                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27730                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27731                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27732                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27733                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27734                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27735                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27736                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27737                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27738                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27739                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27740                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27741                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27742                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27743                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27744                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27745                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27746                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27747                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27748                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27749                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27750                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27751                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27752                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27753                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27754                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27755                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27756                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27757                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27758                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27759                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27760                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27761                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27762                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27763                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27764                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27765                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27766                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27767                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27768                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27769                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
27770                 .ilen   = 496,
27771                 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
27772                           "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
27773                           "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
27774                           "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
27775                           "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
27776                           "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
27777                           "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
27778                           "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
27779                           "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
27780                           "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
27781                           "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
27782                           "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
27783                           "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
27784                           "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
27785                           "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
27786                           "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
27787                           "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
27788                           "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
27789                           "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
27790                           "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
27791                           "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
27792                           "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
27793                           "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
27794                           "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
27795                           "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
27796                           "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
27797                           "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
27798                           "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
27799                           "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
27800                           "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
27801                           "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
27802                           "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
27803                           "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
27804                           "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
27805                           "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
27806                           "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
27807                           "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
27808                           "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
27809                           "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
27810                           "\x79\xA2\x99\x28\x93\x1B\x00\x57"
27811                           "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
27812                           "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
27813                           "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
27814                           "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
27815                           "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
27816                           "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
27817                           "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
27818                           "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
27819                           "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
27820                           "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
27821                           "\x76\x44\x45\xF3\x24\x11\x57\x98"
27822                           "\x9A\x86\xB4\x12\x80\x28\x86\x20"
27823                           "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
27824                           "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
27825                           "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
27826                           "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
27827                           "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
27828                           "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
27829                           "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
27830                           "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
27831                           "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
27832                           "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
27833                 .rlen   = 496,
27834         }, { /* Generated with Crypto++ */
27835                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
27836                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
27837                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
27838                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
27839                 .klen   = 32,
27840                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
27841                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
27842                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
27843                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
27844                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
27845                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
27846                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
27847                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
27848                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
27849                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
27850                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
27851                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
27852                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
27853                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
27854                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
27855                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
27856                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
27857                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
27858                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
27859                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
27860                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
27861                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
27862                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
27863                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
27864                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
27865                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
27866                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
27867                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
27868                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
27869                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
27870                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
27871                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
27872                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
27873                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
27874                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
27875                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
27876                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
27877                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
27878                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
27879                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
27880                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
27881                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
27882                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
27883                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
27884                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
27885                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
27886                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
27887                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
27888                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
27889                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
27890                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
27891                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
27892                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
27893                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
27894                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
27895                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
27896                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
27897                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
27898                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
27899                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
27900                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
27901                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
27902                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
27903                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
27904                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
27905                           "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
27906                           "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
27907                           "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
27908                           "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
27909                           "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
27910                           "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
27911                           "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
27912                           "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
27913                           "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
27914                           "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
27915                           "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
27916                           "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
27917                           "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
27918                           "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
27919                           "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
27920                           "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
27921                           "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
27922                           "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
27923                           "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
27924                           "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
27925                           "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
27926                           "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
27927                           "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
27928                           "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
27929                           "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
27930                           "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
27931                           "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
27932                           "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
27933                           "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
27934                           "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
27935                           "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
27936                           "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
27937                           "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
27938                           "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
27939                           "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
27940                           "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
27941                           "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
27942                           "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
27943                           "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
27944                           "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
27945                           "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
27946                           "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
27947                           "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
27948                           "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
27949                           "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
27950                           "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
27951                           "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
27952                           "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
27953                           "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
27954                           "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
27955                           "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
27956                           "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
27957                           "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
27958                           "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
27959                           "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
27960                           "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
27961                           "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
27962                           "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
27963                           "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
27964                           "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
27965                           "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
27966                           "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
27967                           "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
27968                           "\xE4\x7B\x12",
27969                 .ilen   = 1011,
27970                 .result = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
27971                           "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
27972                           "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
27973                           "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
27974                           "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
27975                           "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
27976                           "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
27977                           "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
27978                           "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
27979                           "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
27980                           "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
27981                           "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
27982                           "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
27983                           "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
27984                           "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
27985                           "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
27986                           "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
27987                           "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
27988                           "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
27989                           "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
27990                           "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
27991                           "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
27992                           "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
27993                           "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
27994                           "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
27995                           "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
27996                           "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
27997                           "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
27998                           "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
27999                           "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
28000                           "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
28001                           "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
28002                           "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
28003                           "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
28004                           "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
28005                           "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
28006                           "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
28007                           "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
28008                           "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
28009                           "\x79\xA2\x99\x28\x93\x1B\x00\x57"
28010                           "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
28011                           "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
28012                           "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
28013                           "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
28014                           "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
28015                           "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
28016                           "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
28017                           "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28018                           "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28019                           "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28020                           "\x76\x44\x45\xF3\x24\x11\x57\x98"
28021                           "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28022                           "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28023                           "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28024                           "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28025                           "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28026                           "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28027                           "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28028                           "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28029                           "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28030                           "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28031                           "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
28032                           "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
28033                           "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
28034                           "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
28035                           "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
28036                           "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
28037                           "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
28038                           "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
28039                           "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
28040                           "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
28041                           "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
28042                           "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
28043                           "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
28044                           "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
28045                           "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
28046                           "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
28047                           "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
28048                           "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
28049                           "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
28050                           "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
28051                           "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
28052                           "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
28053                           "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
28054                           "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
28055                           "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
28056                           "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
28057                           "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
28058                           "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
28059                           "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
28060                           "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
28061                           "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
28062                           "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
28063                           "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
28064                           "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
28065                           "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
28066                           "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
28067                           "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
28068                           "\x00\x70\x12\x56\x56\x50\xAD\x14"
28069                           "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
28070                           "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
28071                           "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
28072                           "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
28073                           "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
28074                           "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
28075                           "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
28076                           "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
28077                           "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
28078                           "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
28079                           "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
28080                           "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
28081                           "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
28082                           "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
28083                           "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
28084                           "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
28085                           "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
28086                           "\x40\x48\x19\x73\x7C\x78\x64\x0B"
28087                           "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
28088                           "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
28089                           "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
28090                           "\x74\x28\x9D\x05\x30\x20\x62\x41"
28091                           "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
28092                           "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
28093                           "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
28094                           "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
28095                           "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
28096                           "\xF1\x6B\xD9",
28097                 .rlen   = 1011,
28098                 .also_non_np = 1,
28099                 .np     = 2,
28100                 .tap    = { 1011 - 16, 16 },
28101         }, { /* Generated with Crypto++ */
28102                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28103                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28104                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28105                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28106                 .klen   = 32,
28107                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
28108                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
28109                 .input  = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28110                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28111                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28112                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28113                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
28114                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28115                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28116                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28117                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28118                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28119                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28120                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28121                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28122                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28123                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28124                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28125                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28126                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28127                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28128                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28129                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28130                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28131                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28132                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28133                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28134                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28135                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28136                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28137                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28138                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28139                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28140                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28141                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28142                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28143                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28144                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28145                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28146                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28147                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28148                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28149                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28150                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28151                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28152                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28153                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28154                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28155                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28156                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28157                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28158                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28159                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28160                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28161                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28162                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28163                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28164                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28165                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28166                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28167                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28168                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28169                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
28170                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
28171                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
28172                           "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
28173                           "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
28174                           "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
28175                           "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
28176                           "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
28177                           "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
28178                           "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
28179                           "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
28180                           "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
28181                           "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
28182                           "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
28183                           "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
28184                           "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
28185                           "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
28186                           "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
28187                           "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
28188                           "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
28189                           "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
28190                           "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
28191                           "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
28192                           "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
28193                           "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
28194                           "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
28195                           "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
28196                           "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
28197                           "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
28198                           "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
28199                           "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
28200                           "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
28201                           "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
28202                           "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
28203                           "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
28204                           "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
28205                           "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
28206                           "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
28207                           "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
28208                           "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
28209                           "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
28210                           "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
28211                           "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
28212                           "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
28213                           "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
28214                           "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
28215                           "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
28216                           "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
28217                           "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
28218                           "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
28219                           "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
28220                           "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
28221                           "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
28222                           "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
28223                           "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
28224                           "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
28225                           "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
28226                           "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
28227                           "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
28228                           "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
28229                           "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
28230                           "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
28231                           "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
28232                           "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
28233                           "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
28234                           "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
28235                 .ilen   = 1008,
28236                 .result = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
28237                           "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
28238                           "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
28239                           "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
28240                           "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
28241                           "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
28242                           "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
28243                           "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
28244                           "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
28245                           "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
28246                           "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
28247                           "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
28248                           "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
28249                           "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
28250                           "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
28251                           "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
28252                           "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
28253                           "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
28254                           "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
28255                           "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
28256                           "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
28257                           "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
28258                           "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
28259                           "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
28260                           "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
28261                           "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
28262                           "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
28263                           "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
28264                           "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
28265                           "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
28266                           "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
28267                           "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
28268                           "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
28269                           "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
28270                           "\x93\x78\x86\x05\x69\x46\xD0\xC5"
28271                           "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
28272                           "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
28273                           "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
28274                           "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
28275                           "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
28276                           "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
28277                           "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
28278                           "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
28279                           "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
28280                           "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
28281                           "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
28282                           "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
28283                           "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
28284                           "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
28285                           "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
28286                           "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
28287                           "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
28288                           "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
28289                           "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
28290                           "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
28291                           "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
28292                           "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
28293                           "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
28294                           "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
28295                           "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
28296                           "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
28297                           "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
28298                           "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
28299                           "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
28300                           "\x3F\x23\x69\x63\x56\x96\x45\xD6"
28301                           "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
28302                           "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
28303                           "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
28304                           "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
28305                           "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
28306                           "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
28307                           "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
28308                           "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
28309                           "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
28310                           "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
28311                           "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
28312                           "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
28313                           "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
28314                           "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
28315                           "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
28316                           "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
28317                           "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
28318                           "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
28319                           "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
28320                           "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
28321                           "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
28322                           "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
28323                           "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
28324                           "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
28325                           "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
28326                           "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
28327                           "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
28328                           "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
28329                           "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
28330                           "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
28331                           "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
28332                           "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
28333                           "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
28334                           "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
28335                           "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
28336                           "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
28337                           "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
28338                           "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
28339                           "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
28340                           "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
28341                           "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
28342                           "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
28343                           "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
28344                           "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
28345                           "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
28346                           "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
28347                           "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
28348                           "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
28349                           "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
28350                           "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
28351                           "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
28352                           "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
28353                           "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
28354                           "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
28355                           "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
28356                           "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
28357                           "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
28358                           "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
28359                           "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
28360                           "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
28361                           "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
28362                 .rlen   = 1008,
28363         },
28364 };
28365
28366 static struct cipher_testvec camellia_ctr_dec_tv_template[] = {
28367         { /* Generated with Crypto++ */
28368                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28369                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28370                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28371                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28372                 .klen   = 32,
28373                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
28374                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
28375                 .input  = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
28376                           "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
28377                           "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
28378                           "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
28379                           "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
28380                           "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
28381                           "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
28382                           "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
28383                           "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
28384                           "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
28385                           "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
28386                           "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
28387                           "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
28388                           "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
28389                           "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
28390                           "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
28391                           "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
28392                           "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
28393                           "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
28394                           "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
28395                           "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
28396                           "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
28397                           "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
28398                           "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
28399                           "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
28400                           "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
28401                           "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
28402                           "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
28403                           "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
28404                           "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
28405                           "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
28406                           "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
28407                           "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
28408                           "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
28409                           "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
28410                           "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
28411                           "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
28412                           "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
28413                           "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
28414                           "\x79\xA2\x99\x28\x93\x1B\x00\x57"
28415                           "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
28416                           "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
28417                           "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
28418                           "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
28419                           "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
28420                           "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
28421                           "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
28422                           "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28423                           "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28424                           "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28425                           "\x76\x44\x45\xF3\x24\x11\x57\x98"
28426                           "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28427                           "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28428                           "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28429                           "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28430                           "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28431                           "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28432                           "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28433                           "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28434                           "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28435                           "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28436                           "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D",
28437                 .ilen   = 496,
28438                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28439                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28440                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28441                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28442                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
28443                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28444                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28445                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28446                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28447                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28448                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28449                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28450                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28451                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28452                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28453                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28454                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28455                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28456                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28457                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28458                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28459                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28460                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28461                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28462                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28463                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28464                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28465                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28466                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28467                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28468                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28469                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28470                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28471                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28472                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28473                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28474                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28475                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28476                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28477                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28478                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28479                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28480                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28481                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28482                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28483                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28484                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28485                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28486                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28487                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28488                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28489                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28490                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28491                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28492                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28493                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28494                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28495                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28496                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28497                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28498                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
28499                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7",
28500                 .rlen   = 496,
28501         }, { /* Generated with Crypto++ */
28502                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28503                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28504                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28505                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28506                 .klen   = 32,
28507                 .iv     = "\xE2\x24\x89\xEE\x53\xB8\x1D\x5F"
28508                           "\xC4\x29\x8E\xF3\x35\x9A\xFF\x64",
28509                 .input  = "\xF3\x06\x3A\x84\xCD\xBA\x8E\x11"
28510                           "\xB7\x74\x6F\x5C\x97\xFB\x36\xFE"
28511                           "\xDE\x71\x58\xD4\x15\xD1\xC1\xA4"
28512                           "\xC9\x28\x74\xA6\x6B\xC7\x95\xA6"
28513                           "\x6C\x77\xF7\x2F\xDF\xC7\xBB\x85"
28514                           "\x60\xFC\xE8\x94\xE8\xB5\x09\x2C"
28515                           "\x1E\x43\xEF\x6C\xE9\x98\xC5\xA0"
28516                           "\x7B\x13\xE5\x7F\xF8\x49\x9A\x8C"
28517                           "\xE6\x7B\x08\xC3\x32\x66\x55\x4E"
28518                           "\xA5\x44\x1D\x2C\x18\xC7\x29\x1F"
28519                           "\x61\x28\x4A\xE3\xCD\xE5\x47\xB2"
28520                           "\x82\x2F\x66\x83\x91\x51\xAE\xD7"
28521                           "\x1C\x91\x3C\x57\xE3\x1D\x5A\xC9"
28522                           "\xFD\xC5\x58\x58\xEF\xCC\x33\xC9"
28523                           "\x0F\xEA\x26\x32\xD1\x15\x19\x2D"
28524                           "\x25\xB4\x7F\xB0\xDF\xFB\x88\x60"
28525                           "\x4E\x4D\x06\x7D\xCC\x1F\xED\x3B"
28526                           "\x68\x84\xD5\xB3\x1B\xE7\xB9\xA1"
28527                           "\x68\x8B\x2C\x1A\x44\xDA\x63\xD3"
28528                           "\x29\xE9\x59\x32\x1F\x30\x1C\x43"
28529                           "\xEA\x3A\xA3\x6B\x54\x3C\xAA\x11"
28530                           "\xAD\x38\x20\xC9\xB9\x8A\x64\x66"
28531                           "\x5A\x07\x49\xDF\xA1\x9C\xF9\x76"
28532                           "\x36\x65\xB6\x81\x8F\x76\x09\xE5"
28533                           "\xEB\xD1\x29\xA4\xE4\xF4\x4C\xCD"
28534                           "\xAF\xFC\xB9\x16\xD9\xC3\x73\x6A"
28535                           "\x33\x12\xF8\x7E\xBC\xCC\x7D\x80"
28536                           "\xBF\x3C\x25\x06\x13\x84\xFA\x35"
28537                           "\xF7\x40\xFA\xA1\x44\x13\x70\xD8"
28538                           "\x01\xF9\x85\x15\x63\xEC\x7D\xB9"
28539                           "\x02\xD8\xBA\x41\x6C\x92\x68\x66"
28540                           "\x95\xDD\xD6\x42\xE7\xBB\xE1\xFD"
28541                           "\x28\x3E\x94\xB6\xBD\xA7\xBF\x47"
28542                           "\x58\x8D\xFF\x19\x30\x75\x0D\x48"
28543                           "\x94\xE9\xA6\xCD\xB3\x8E\x1E\xCD"
28544                           "\x59\xBC\x1A\xAC\x3C\x4F\xA9\xEB"
28545                           "\xF4\xA7\xE4\x75\x4A\x18\x40\xC9"
28546                           "\x1E\xEC\x06\x9C\x28\x4B\xF7\x2B"
28547                           "\xE2\xEF\xD6\x42\x2E\xBB\xFC\x0A"
28548                           "\x79\xA2\x99\x28\x93\x1B\x00\x57"
28549                           "\x35\x1E\x1A\x93\x90\xA4\x68\x95"
28550                           "\x5E\x57\x40\xD5\xA9\xAA\x19\x48"
28551                           "\xEC\xFF\x76\x77\xDC\x78\x89\x76"
28552                           "\xE5\x3B\x00\xEC\x58\x4D\xD1\xE3"
28553                           "\xC8\x6C\x2C\x45\x5E\x5F\xD9\x4E"
28554                           "\x71\xA5\x36\x6D\x03\xF1\xC7\xD5"
28555                           "\xF3\x63\xC0\xD8\xCB\x2B\xF1\xA8"
28556                           "\xB9\x2B\xE6\x0B\xB9\x65\x78\xA0"
28557                           "\xC4\x46\xE6\x9B\x8B\x43\x2D\xAB"
28558                           "\x70\xA6\xE0\x59\x1E\xAC\x9D\xE0"
28559                           "\x76\x44\x45\xF3\x24\x11\x57\x98"
28560                           "\x9A\x86\xB4\x12\x80\x28\x86\x20"
28561                           "\x23\x9D\x2D\xE9\x38\x32\xB1\xE1"
28562                           "\xCF\x0A\x23\x73\x7D\xC5\x80\x3D"
28563                           "\x9F\x6D\xA0\xD0\xEE\x93\x8A\x79"
28564                           "\x3A\xDD\x1D\xBB\x9E\x26\x5D\x01"
28565                           "\x44\xD0\xD4\x4E\xC3\xF1\xE4\x38"
28566                           "\x09\x62\x0A\x1A\x4E\xD2\x63\x0F"
28567                           "\x6E\x3E\xD2\xA4\x3A\xF4\xF3\xFF"
28568                           "\x7E\x42\xEC\xB6\x6F\x4D\x6B\x48"
28569                           "\xE6\xA6\x50\x80\x78\x9E\xF1\xB0"
28570                           "\x4D\xB2\x0D\x3D\xFC\x40\x25\x4D"
28571                           "\x93\x11\x1C\xE9\xD2\x9F\x6E\x90"
28572                           "\xE5\x41\x4A\xE2\x3C\x45\x29\x35"
28573                           "\xEC\xD6\x47\x50\xCB\x7B\xA2\x32"
28574                           "\xF7\x8B\x62\xF1\xE3\x9A\xFE\xC7"
28575                           "\x1D\x8C\x02\x72\x68\x09\xE9\xB6"
28576                           "\x4A\x80\xE6\xB1\x56\xDF\x90\xD4"
28577                           "\x93\x74\xA4\xCE\x20\x23\xBF\x48"
28578                           "\xA5\xDE\x1B\xFA\x40\x69\x31\x98"
28579                           "\x62\x6E\xA5\xC7\xBF\x0C\x62\xE5"
28580                           "\x6D\xE1\x93\xF1\x83\x10\x1C\xCA"
28581                           "\xF6\x5C\x19\xF8\x90\x78\xCB\xE4"
28582                           "\x0B\x3A\xB5\xF8\x43\x86\xD3\x3F"
28583                           "\xBA\x83\x34\x3C\x42\xCC\x7D\x28"
28584                           "\x29\x63\x4F\xD8\x02\x17\xC5\x07"
28585                           "\x2C\xA4\xAC\x79\xCB\xC3\xA9\x09"
28586                           "\x81\x45\x18\xED\xE4\xCB\x42\x3B"
28587                           "\x87\x2D\x23\xDC\xC5\xBA\x45\xBD"
28588                           "\x92\xE5\x02\x97\x96\xCE\xAD\xEC"
28589                           "\xBA\xD8\x76\xF8\xCA\xC1\x31\xEC"
28590                           "\x1E\x4F\x3F\x83\xF8\x33\xE8\x6E"
28591                           "\xCC\xF8\x5F\xDD\x65\x50\x99\x69"
28592                           "\xAF\x48\xCE\xA5\xBA\xB6\x14\x9F"
28593                           "\x05\x93\xB2\xE6\x59\xC8\x28\xFE"
28594                           "\x8F\x37\xF9\x64\xB9\xA5\x56\x8F"
28595                           "\xF1\x1B\x90\xEF\xAE\xEB\xFC\x09"
28596                           "\x11\x7A\xF2\x19\x0A\x0A\x9A\x3C"
28597                           "\xE2\x5E\x29\xFA\x31\x9B\xC1\x74"
28598                           "\x1E\x10\x3E\x07\xA9\x31\x6D\xF8"
28599                           "\x81\xF5\xD5\x8A\x04\x23\x51\xAC"
28600                           "\xA2\xE2\x63\xFD\x27\x1F\x79\x5B"
28601                           "\x1F\xE8\xDA\x11\x49\x4D\x1C\xBA"
28602                           "\x54\xCC\x0F\xBA\x92\x69\xE5\xCB"
28603                           "\x41\x1A\x67\xA6\x40\x82\x70\x8C"
28604                           "\x19\x79\x08\xA4\x51\x20\x7D\xC9"
28605                           "\x12\x27\xAE\x20\x0D\x2C\xA1\x6D"
28606                           "\xF4\x55\xD4\xE7\xE6\xD4\x28\x08"
28607                           "\x00\x70\x12\x56\x56\x50\xAD\x14"
28608                           "\x5C\x3E\xA2\xD1\x36\x3F\x36\x48"
28609                           "\xED\xB1\x57\x3E\x5D\x15\xF6\x1E"
28610                           "\x53\xE9\xA4\x3E\xED\x7D\xCF\x7D"
28611                           "\x29\xAF\xF3\x1E\x51\xA8\x9F\x85"
28612                           "\x8B\xF0\xBB\xCE\xCC\x39\xC3\x64"
28613                           "\x4B\xF2\xAD\x70\x19\xD4\x44\x8F"
28614                           "\x91\x76\xE8\x15\x66\x34\x9F\xF6"
28615                           "\x0F\x15\xA4\xA8\x24\xF8\x58\xB1"
28616                           "\x38\x46\x47\xC7\x9B\xCA\xE9\x42"
28617                           "\x44\xAA\xE6\xB5\x9C\x91\xA4\xD3"
28618                           "\x16\xA0\xED\x42\xBE\xB5\x06\x19"
28619                           "\xBE\x67\xE8\xBC\x22\x32\xA4\x1E"
28620                           "\x93\xEB\xBE\xE9\xE1\x93\xE5\x31"
28621                           "\x3A\xA2\x75\xDF\xE3\x6B\xE7\xCC"
28622                           "\xB4\x70\x20\xE0\x6D\x82\x7C\xC8"
28623                           "\x94\x5C\x5E\x37\x18\xAD\xED\x8B"
28624                           "\x44\x86\xCA\x5E\x07\xB7\x70\x8D"
28625                           "\x40\x48\x19\x73\x7C\x78\x64\x0B"
28626                           "\xDB\x01\xCA\xAE\x63\x19\xE9\xD1"
28627                           "\x6B\x2C\x84\x10\x45\x42\x2E\xC3"
28628                           "\xDF\x7F\xAA\xE8\x87\x1B\x63\x46"
28629                           "\x74\x28\x9D\x05\x30\x20\x62\x41"
28630                           "\xC0\x9F\x2C\x36\x2B\x78\xD7\x26"
28631                           "\xDF\x58\x51\xED\xFA\xDC\x87\x79"
28632                           "\xBF\x8C\xBF\xC4\x0F\xE5\x05\xDA"
28633                           "\x45\xE3\x35\x0D\x69\x91\x54\x1C"
28634                           "\xE7\x2C\x49\x08\x8B\x72\xFA\x5C"
28635                           "\xF1\x6B\xD9",
28636                 .ilen   = 1011,
28637                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28638                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28639                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28640                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28641                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
28642                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28643                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28644                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28645                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28646                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28647                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28648                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28649                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28650                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28651                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28652                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28653                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28654                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28655                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28656                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28657                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28658                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28659                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28660                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28661                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28662                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28663                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28664                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28665                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28666                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28667                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28668                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28669                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28670                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28671                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28672                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28673                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28674                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28675                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28676                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28677                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28678                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28679                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28680                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28681                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28682                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28683                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28684                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28685                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28686                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28687                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28688                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28689                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28690                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28691                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28692                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28693                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28694                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28695                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28696                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28697                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
28698                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
28699                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
28700                           "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
28701                           "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
28702                           "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
28703                           "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
28704                           "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
28705                           "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
28706                           "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
28707                           "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
28708                           "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
28709                           "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
28710                           "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
28711                           "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
28712                           "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
28713                           "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
28714                           "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
28715                           "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
28716                           "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
28717                           "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
28718                           "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
28719                           "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
28720                           "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
28721                           "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
28722                           "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
28723                           "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
28724                           "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
28725                           "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
28726                           "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
28727                           "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
28728                           "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
28729                           "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
28730                           "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
28731                           "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
28732                           "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
28733                           "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
28734                           "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
28735                           "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
28736                           "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
28737                           "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
28738                           "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
28739                           "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
28740                           "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
28741                           "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
28742                           "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
28743                           "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
28744                           "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
28745                           "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
28746                           "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
28747                           "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
28748                           "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
28749                           "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
28750                           "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
28751                           "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
28752                           "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
28753                           "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
28754                           "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
28755                           "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
28756                           "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
28757                           "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
28758                           "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
28759                           "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
28760                           "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
28761                           "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
28762                           "\x72\x09\xA0\x14\xAB\x42\xD9\x4D"
28763                           "\xE4\x7B\x12",
28764                 .rlen   = 1011,
28765                 .also_non_np = 1,
28766                 .np     = 2,
28767                 .tap    = { 1011 - 16, 16 },
28768         }, { /* Generated with Crypto++ */
28769                 .key    = "\x85\x62\x3F\x1C\xF9\xD6\x1C\xF9"
28770                           "\xD6\xB3\x90\x6D\x4A\x90\x6D\x4A"
28771                           "\x27\x04\xE1\x27\x04\xE1\xBE\x9B"
28772                           "\x78\xBE\x9B\x78\x55\x32\x0F\x55",
28773                 .klen   = 32,
28774                 .iv     = "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFF"
28775                           "\xFF\xFF\xFF\xFF\xFF\xFF\xFF\xFD",
28776                 .input  = "\x85\x79\x6C\x8B\x2B\x6D\x14\xF9"
28777                           "\xA6\x83\xB6\x80\x5B\x3A\xF3\x7E"
28778                           "\x30\x29\xEB\x1F\xDC\x19\x5F\xEB"
28779                           "\xF7\xC4\x27\x04\x51\x87\xD7\x6F"
28780                           "\xB8\x4E\x07\xFB\xAC\x3B\x08\xB4"
28781                           "\x4D\xCB\xE8\xE1\x71\x7D\x4F\x48"
28782                           "\xCD\x81\x64\xA5\xC4\x07\x1A\x9A"
28783                           "\x4B\x62\x90\x0E\xC8\xB3\x2B\x6B"
28784                           "\x8F\x9C\x6E\x72\x4B\xBA\xEF\x07"
28785                           "\x2C\x56\x07\x5E\x37\x30\x60\xA9"
28786                           "\xE3\xEF\xD6\x69\xE1\xA1\x77\x64"
28787                           "\x93\x75\x7A\xB7\x7A\x3B\xE9\x43"
28788                           "\x23\x35\x95\x91\x80\x8A\xC7\xCF"
28789                           "\xC3\xD5\xBF\xE7\xFE\x4C\x06\x6B"
28790                           "\x05\x19\x48\xE2\x62\xBA\x4F\xF2"
28791                           "\xFB\xEE\xE4\xCB\x79\x9D\xA3\x10"
28792                           "\x1D\x29\x8C\x1D\x7A\x88\x5A\xDD"
28793                           "\x4E\xB6\x18\xAA\xCD\xE6\x33\x96"
28794                           "\xD9\x0F\x90\x5A\x78\x76\x4D\x77"
28795                           "\x3C\x20\x89\x3B\xA3\xF9\x07\xFD"
28796                           "\xE4\xE8\x20\x2D\x15\x0A\x63\x49"
28797                           "\xF5\x4F\x89\xD8\xDE\xA1\x28\x78"
28798                           "\x28\x07\x09\x1B\x03\x94\x1D\x4B"
28799                           "\x82\x28\x1E\x1D\x95\xBA\xAC\x85"
28800                           "\x71\x6E\x3C\x18\x4B\x77\x74\x79"
28801                           "\xBF\x67\x0A\x53\x3C\x94\xD9\x60"
28802                           "\xE9\x6D\x40\x34\xA0\x2A\x53\x5D"
28803                           "\x27\xD5\x47\xF9\xC3\x4B\x27\x29"
28804                           "\xE4\x76\x9C\x3F\xA7\x1C\x87\xFC"
28805                           "\x6E\x0F\xCF\x9B\x60\xF0\xF0\x8B"
28806                           "\x70\x1C\x84\x81\x72\x4D\xB4\x98"
28807                           "\x23\x62\xE7\x6A\x2B\xFC\xA5\xB2"
28808                           "\xFF\xF5\x71\x07\xCD\x90\x23\x13"
28809                           "\x19\xD7\x79\x36\x6C\x9D\x55\x8B"
28810                           "\x93\x78\x86\x05\x69\x46\xD0\xC5"
28811                           "\x39\x09\xEB\x79\xEF\xFA\x9F\xAE"
28812                           "\xF3\xD5\x44\xC3\xFD\x86\xD2\x7C"
28813                           "\x83\x4B\xD8\x75\x9C\x18\x04\x7B"
28814                           "\x73\xAD\x72\xA4\xF6\xAB\xCF\x4B"
28815                           "\xCC\x01\x45\x90\xA6\x43\x05\x0C"
28816                           "\x6C\x4F\x62\x77\x57\x97\x9F\xEE"
28817                           "\x75\xA7\x3C\x38\xD1\x0F\x3D\x0E"
28818                           "\x2C\x43\x98\xFB\x13\x65\x73\xE4"
28819                           "\x3C\x1E\xD6\x90\x08\xF7\xE0\x99"
28820                           "\x3B\xF1\x9D\x6C\x48\xA9\x0E\x32"
28821                           "\x17\xC2\xCC\x20\xA1\x19\x26\xAA"
28822                           "\xE0\x75\x2F\xFB\x54\x66\x0A\xDF"
28823                           "\xB5\xF2\x1F\xC1\x34\x3C\x30\x56"
28824                           "\xE8\xDC\xF7\x92\x6B\xBF\x17\x24"
28825                           "\xEC\x94\xB5\x3B\xD6\xCE\xA2\x54"
28826                           "\x10\x7F\x50\xDE\x69\x77\xD5\x37"
28827                           "\xFE\x9C\x10\x83\xC5\xEB\xC9\x53"
28828                           "\xB7\xF3\xC4\x20\xAF\x0A\x7E\x57"
28829                           "\x3A\xE6\x75\xFE\x89\x00\x6E\x48"
28830                           "\xFB\x99\x17\x2C\xF6\x64\x40\x95"
28831                           "\x5E\xDC\x7A\xA6\x70\xC7\xF4\xDD"
28832                           "\x52\x05\x24\x34\xF9\x0E\xC8\x64"
28833                           "\x6D\xE2\xD8\x80\x53\x31\x4C\xFE"
28834                           "\xB4\x3A\x5F\x19\xCF\x42\x1B\x22"
28835                           "\x0B\x2D\x7B\xF1\xC5\x43\xF7\x5E"
28836                           "\x12\xA8\x01\x64\x16\x0B\x26\x5A"
28837                           "\x0C\x95\x0F\x40\xC5\x5A\x06\x7C"
28838                           "\xCF\xF5\xD5\xB7\x7A\x34\x23\xB6"
28839                           "\xAA\x9E\xA8\x98\xA2\xF8\x3D\xD3"
28840                           "\x3F\x23\x69\x63\x56\x96\x45\xD6"
28841                           "\x74\x23\x1D\x5C\x63\xCC\xD8\x78"
28842                           "\x16\xE2\x9C\xD2\x80\x02\xF2\x28"
28843                           "\x69\x2F\xC4\xA8\x15\x15\x24\x3B"
28844                           "\xCB\xF0\x14\xE4\x62\xC8\xF3\xD1"
28845                           "\x03\x58\x1B\x33\x77\x74\x1F\xB4"
28846                           "\x07\x86\xF2\x21\xB7\x41\xAE\xBF"
28847                           "\x25\xC2\xFF\x51\xEF\xEA\xCE\xC4"
28848                           "\x5F\xD9\xB8\x18\x6A\xF0\x0F\x0D"
28849                           "\xF8\x04\xBB\x6D\x62\x33\x87\x26"
28850                           "\x4F\x2F\x14\x6E\xDC\xDB\x66\x09"
28851                           "\x2A\xEF\x7D\x84\x10\xAC\x82\x5E"
28852                           "\xD2\xE4\xAD\x74\x7A\x6D\xCC\x3A"
28853                           "\x7B\x62\xD8\xD6\x07\x2D\xF7\xDF"
28854                           "\x9B\xB3\x82\xCF\x9C\x1D\x76\x5C"
28855                           "\xAC\x7B\xD4\x9B\x45\xA1\x64\x11"
28856                           "\x66\xF1\xA7\x0B\xF9\xDD\x00\xDD"
28857                           "\xA4\x45\x3D\x3E\x03\xC9\x2E\xCB"
28858                           "\xC3\x14\x84\x72\xFD\x41\xDC\xBD"
28859                           "\x75\xBE\xA8\xE5\x16\x48\x64\x39"
28860                           "\xCA\xF3\xE6\xDC\x25\x24\xF1\x6D"
28861                           "\xB2\x8D\xC5\x38\x54\xD3\x5D\x6D"
28862                           "\x0B\x29\x10\x15\x0E\x13\x3B\xAC"
28863                           "\x7E\xCC\x9E\x3E\x18\x48\xA6\x02"
28864                           "\xEF\x03\xB2\x2E\xE3\xD2\x70\x21"
28865                           "\xB4\x19\x26\xBE\x3A\x3D\x05\xE0"
28866                           "\xF8\x09\xAF\xE4\x31\x26\x92\x2F"
28867                           "\x8F\x55\xAC\xED\x0B\xB2\xA5\x34"
28868                           "\xBE\x50\xB1\x02\x22\x96\xE3\x40"
28869                           "\x7B\x70\x50\x6E\x3B\xD5\xE5\xA0"
28870                           "\x8E\xA2\xAD\x14\x60\x5C\x7A\x2B"
28871                           "\x3D\x1B\x7F\xC1\xC0\x2C\x56\x36"
28872                           "\xD2\x0A\x32\x06\x97\x34\xB9\xF4"
28873                           "\x6F\x9F\x7E\x80\xD0\x9D\xF7\x6A"
28874                           "\x21\xC1\xA2\x6A\xB1\x96\x5B\x4D"
28875                           "\x7A\x15\x6C\xC4\x4E\xB8\xE0\x9E"
28876                           "\x6C\x50\xF3\x9C\xC9\xB5\x23\xB7"
28877                           "\xF1\xD4\x29\x4A\x23\xC4\xAD\x1E"
28878                           "\x2C\x07\xD2\x43\x5F\x57\x93\xCA"
28879                           "\x85\xF9\x9F\xAD\x4C\xF1\xE4\xB1"
28880                           "\x1A\x8E\x28\xA4\xB6\x52\x77\x7E"
28881                           "\x68\xC6\x47\xB9\x76\xCC\x65\x5F"
28882                           "\x0B\xF9\x67\x93\xD8\x0E\x9A\x37"
28883                           "\x5F\x41\xED\x64\x6C\xAD\x5F\xED"
28884                           "\x3F\x8D\xFB\x8E\x1E\xA0\xE4\x1F"
28885                           "\xC2\xC7\xED\x18\x43\xE1\x20\x86"
28886                           "\x5D\xBC\x30\x70\x22\xA1\xDC\x53"
28887                           "\x10\x3A\x8D\x47\x82\xCD\x7F\x59"
28888                           "\x03\x2D\x6D\xF5\xE7\x79\xD4\x07"
28889                           "\x68\x2A\xA5\x42\x19\x4D\xAF\xF5"
28890                           "\xED\x47\x83\xBC\x5F\x62\x84\xDA"
28891                           "\xDA\x41\xFF\xB0\x1D\x64\xA3\xC8"
28892                           "\xBD\x4E\xE0\xB8\x7F\xEE\x55\x0A"
28893                           "\x4E\x61\xB2\x51\xF6\x9C\x95\xF6"
28894                           "\x92\xBB\xF6\xC5\xF0\x09\x86\xDE"
28895                           "\x37\x9E\x29\xF9\x2A\x18\x73\x0D"
28896                           "\xDC\x7E\x6B\x7B\x1B\x43\x8C\xEA"
28897                           "\x13\xC8\x1A\x47\x0A\x2D\x6D\x56"
28898                           "\xCD\xD2\xE7\x53\x1A\xAB\x1C\x3C"
28899                           "\xC5\x9B\x03\x70\x29\x2A\x49\x09"
28900                           "\x67\xA1\xEA\xD6\x3A\x5B\xBF\x71"
28901                           "\x1D\x48\x64\x6C\xFB\xC0\x9E\x36",
28902                 .ilen   = 1008,
28903                 .result = "\x56\xED\x84\x1B\x8F\x26\xBD\x31"
28904                           "\xC8\x5F\xF6\x6A\x01\x98\x0C\xA3"
28905                           "\x3A\xD1\x45\xDC\x73\x0A\x7E\x15"
28906                           "\xAC\x20\xB7\x4E\xE5\x59\xF0\x87"
28907                           "\x1E\x92\x29\xC0\x34\xCB\x62\xF9"
28908                           "\x6D\x04\x9B\x0F\xA6\x3D\xD4\x48"
28909                           "\xDF\x76\x0D\x81\x18\xAF\x23\xBA"
28910                           "\x51\xE8\x5C\xF3\x8A\x21\x95\x2C"
28911                           "\xC3\x37\xCE\x65\xFC\x70\x07\x9E"
28912                           "\x12\xA9\x40\xD7\x4B\xE2\x79\x10"
28913                           "\x84\x1B\xB2\x26\xBD\x54\xEB\x5F"
28914                           "\xF6\x8D\x01\x98\x2F\xC6\x3A\xD1"
28915                           "\x68\xFF\x73\x0A\xA1\x15\xAC\x43"
28916                           "\xDA\x4E\xE5\x7C\x13\x87\x1E\xB5"
28917                           "\x29\xC0\x57\xEE\x62\xF9\x90\x04"
28918                           "\x9B\x32\xC9\x3D\xD4\x6B\x02\x76"
28919                           "\x0D\xA4\x18\xAF\x46\xDD\x51\xE8"
28920                           "\x7F\x16\x8A\x21\xB8\x2C\xC3\x5A"
28921                           "\xF1\x65\xFC\x93\x07\x9E\x35\xCC"
28922                           "\x40\xD7\x6E\x05\x79\x10\xA7\x1B"
28923                           "\xB2\x49\xE0\x54\xEB\x82\x19\x8D"
28924                           "\x24\xBB\x2F\xC6\x5D\xF4\x68\xFF"
28925                           "\x96\x0A\xA1\x38\xCF\x43\xDA\x71"
28926                           "\x08\x7C\x13\xAA\x1E\xB5\x4C\xE3"
28927                           "\x57\xEE\x85\x1C\x90\x27\xBE\x32"
28928                           "\xC9\x60\xF7\x6B\x02\x99\x0D\xA4"
28929                           "\x3B\xD2\x46\xDD\x74\x0B\x7F\x16"
28930                           "\xAD\x21\xB8\x4F\xE6\x5A\xF1\x88"
28931                           "\x1F\x93\x2A\xC1\x35\xCC\x63\xFA"
28932                           "\x6E\x05\x9C\x10\xA7\x3E\xD5\x49"
28933                           "\xE0\x77\x0E\x82\x19\xB0\x24\xBB"
28934                           "\x52\xE9\x5D\xF4\x8B\x22\x96\x2D"
28935                           "\xC4\x38\xCF\x66\xFD\x71\x08\x9F"
28936                           "\x13\xAA\x41\xD8\x4C\xE3\x7A\x11"
28937                           "\x85\x1C\xB3\x27\xBE\x55\xEC\x60"
28938                           "\xF7\x8E\x02\x99\x30\xC7\x3B\xD2"
28939                           "\x69\x00\x74\x0B\xA2\x16\xAD\x44"
28940                           "\xDB\x4F\xE6\x7D\x14\x88\x1F\xB6"
28941                           "\x2A\xC1\x58\xEF\x63\xFA\x91\x05"
28942                           "\x9C\x33\xCA\x3E\xD5\x6C\x03\x77"
28943                           "\x0E\xA5\x19\xB0\x47\xDE\x52\xE9"
28944                           "\x80\x17\x8B\x22\xB9\x2D\xC4\x5B"
28945                           "\xF2\x66\xFD\x94\x08\x9F\x36\xCD"
28946                           "\x41\xD8\x6F\x06\x7A\x11\xA8\x1C"
28947                           "\xB3\x4A\xE1\x55\xEC\x83\x1A\x8E"
28948                           "\x25\xBC\x30\xC7\x5E\xF5\x69\x00"
28949                           "\x97\x0B\xA2\x39\xD0\x44\xDB\x72"
28950                           "\x09\x7D\x14\xAB\x1F\xB6\x4D\xE4"
28951                           "\x58\xEF\x86\x1D\x91\x28\xBF\x33"
28952                           "\xCA\x61\xF8\x6C\x03\x9A\x0E\xA5"
28953                           "\x3C\xD3\x47\xDE\x75\x0C\x80\x17"
28954                           "\xAE\x22\xB9\x50\xE7\x5B\xF2\x89"
28955                           "\x20\x94\x2B\xC2\x36\xCD\x64\xFB"
28956                           "\x6F\x06\x9D\x11\xA8\x3F\xD6\x4A"
28957                           "\xE1\x78\x0F\x83\x1A\xB1\x25\xBC"
28958                           "\x53\xEA\x5E\xF5\x8C\x00\x97\x2E"
28959                           "\xC5\x39\xD0\x67\xFE\x72\x09\xA0"
28960                           "\x14\xAB\x42\xD9\x4D\xE4\x7B\x12"
28961                           "\x86\x1D\xB4\x28\xBF\x56\xED\x61"
28962                           "\xF8\x8F\x03\x9A\x31\xC8\x3C\xD3"
28963                           "\x6A\x01\x75\x0C\xA3\x17\xAE\x45"
28964                           "\xDC\x50\xE7\x7E\x15\x89\x20\xB7"
28965                           "\x2B\xC2\x59\xF0\x64\xFB\x92\x06"
28966                           "\x9D\x34\xCB\x3F\xD6\x6D\x04\x78"
28967                           "\x0F\xA6\x1A\xB1\x48\xDF\x53\xEA"
28968                           "\x81\x18\x8C\x23\xBA\x2E\xC5\x5C"
28969                           "\xF3\x67\xFE\x95\x09\xA0\x37\xCE"
28970                           "\x42\xD9\x70\x07\x7B\x12\xA9\x1D"
28971                           "\xB4\x4B\xE2\x56\xED\x84\x1B\x8F"
28972                           "\x26\xBD\x31\xC8\x5F\xF6\x6A\x01"
28973                           "\x98\x0C\xA3\x3A\xD1\x45\xDC\x73"
28974                           "\x0A\x7E\x15\xAC\x20\xB7\x4E\xE5"
28975                           "\x59\xF0\x87\x1E\x92\x29\xC0\x34"
28976                           "\xCB\x62\xF9\x6D\x04\x9B\x0F\xA6"
28977                           "\x3D\xD4\x48\xDF\x76\x0D\x81\x18"
28978                           "\xAF\x23\xBA\x51\xE8\x5C\xF3\x8A"
28979                           "\x21\x95\x2C\xC3\x37\xCE\x65\xFC"
28980                           "\x70\x07\x9E\x12\xA9\x40\xD7\x4B"
28981                           "\xE2\x79\x10\x84\x1B\xB2\x26\xBD"
28982                           "\x54\xEB\x5F\xF6\x8D\x01\x98\x2F"
28983                           "\xC6\x3A\xD1\x68\xFF\x73\x0A\xA1"
28984                           "\x15\xAC\x43\xDA\x4E\xE5\x7C\x13"
28985                           "\x87\x1E\xB5\x29\xC0\x57\xEE\x62"
28986                           "\xF9\x90\x04\x9B\x32\xC9\x3D\xD4"
28987                           "\x6B\x02\x76\x0D\xA4\x18\xAF\x46"
28988                           "\xDD\x51\xE8\x7F\x16\x8A\x21\xB8"
28989                           "\x2C\xC3\x5A\xF1\x65\xFC\x93\x07"
28990                           "\x9E\x35\xCC\x40\xD7\x6E\x05\x79"
28991                           "\x10\xA7\x1B\xB2\x49\xE0\x54\xEB"
28992                           "\x82\x19\x8D\x24\xBB\x2F\xC6\x5D"
28993                           "\xF4\x68\xFF\x96\x0A\xA1\x38\xCF"
28994                           "\x43\xDA\x71\x08\x7C\x13\xAA\x1E"
28995                           "\xB5\x4C\xE3\x57\xEE\x85\x1C\x90"
28996                           "\x27\xBE\x32\xC9\x60\xF7\x6B\x02"
28997                           "\x99\x0D\xA4\x3B\xD2\x46\xDD\x74"
28998                           "\x0B\x7F\x16\xAD\x21\xB8\x4F\xE6"
28999                           "\x5A\xF1\x88\x1F\x93\x2A\xC1\x35"
29000                           "\xCC\x63\xFA\x6E\x05\x9C\x10\xA7"
29001                           "\x3E\xD5\x49\xE0\x77\x0E\x82\x19"
29002                           "\xB0\x24\xBB\x52\xE9\x5D\xF4\x8B"
29003                           "\x22\x96\x2D\xC4\x38\xCF\x66\xFD"
29004                           "\x71\x08\x9F\x13\xAA\x41\xD8\x4C"
29005                           "\xE3\x7A\x11\x85\x1C\xB3\x27\xBE"
29006                           "\x55\xEC\x60\xF7\x8E\x02\x99\x30"
29007                           "\xC7\x3B\xD2\x69\x00\x74\x0B\xA2"
29008                           "\x16\xAD\x44\xDB\x4F\xE6\x7D\x14"
29009                           "\x88\x1F\xB6\x2A\xC1\x58\xEF\x63"
29010                           "\xFA\x91\x05\x9C\x33\xCA\x3E\xD5"
29011                           "\x6C\x03\x77\x0E\xA5\x19\xB0\x47"
29012                           "\xDE\x52\xE9\x80\x17\x8B\x22\xB9"
29013                           "\x2D\xC4\x5B\xF2\x66\xFD\x94\x08"
29014                           "\x9F\x36\xCD\x41\xD8\x6F\x06\x7A"
29015                           "\x11\xA8\x1C\xB3\x4A\xE1\x55\xEC"
29016                           "\x83\x1A\x8E\x25\xBC\x30\xC7\x5E"
29017                           "\xF5\x69\x00\x97\x0B\xA2\x39\xD0"
29018                           "\x44\xDB\x72\x09\x7D\x14\xAB\x1F"
29019                           "\xB6\x4D\xE4\x58\xEF\x86\x1D\x91"
29020                           "\x28\xBF\x33\xCA\x61\xF8\x6C\x03"
29021                           "\x9A\x0E\xA5\x3C\xD3\x47\xDE\x75"
29022                           "\x0C\x80\x17\xAE\x22\xB9\x50\xE7"
29023                           "\x5B\xF2\x89\x20\x94\x2B\xC2\x36"
29024                           "\xCD\x64\xFB\x6F\x06\x9D\x11\xA8"
29025                           "\x3F\xD6\x4A\xE1\x78\x0F\x83\x1A"
29026                           "\xB1\x25\xBC\x53\xEA\x5E\xF5\x8C"
29027                           "\x00\x97\x2E\xC5\x39\xD0\x67\xFE"
29028                           "\x72\x09\xA0\x14\xAB\x42\xD9\x4D",
29029                 .rlen   = 1008,
29030         },
29031 };
29032
29033 static struct cipher_testvec camellia_lrw_enc_tv_template[] = {
29034         /* Generated from AES-LRW test vectors */
29035         {
29036                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
29037                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
29038                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
29039                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
29040                 .klen   = 32,
29041                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29042                           "\x00\x00\x00\x00\x00\x00\x00\x01",
29043                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
29044                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29045                 .ilen   = 16,
29046                 .result = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
29047                           "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
29048                 .rlen   = 16,
29049         }, {
29050                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
29051                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
29052                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
29053                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
29054                 .klen   = 32,
29055                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29056                           "\x00\x00\x00\x00\x00\x00\x00\x02",
29057                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
29058                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29059                 .ilen   = 16,
29060                 .result = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
29061                           "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
29062                 .rlen   = 16,
29063         }, {
29064                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
29065                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
29066                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
29067                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
29068                 .klen   = 32,
29069                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29070                           "\x00\x00\x00\x02\x00\x00\x00\x00",
29071                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
29072                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29073                 .ilen   = 16,
29074                 .result = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
29075                           "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
29076                 .rlen   = 16,
29077         }, {
29078                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
29079                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
29080                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
29081                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
29082                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
29083                 .klen   = 40,
29084                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29085                           "\x00\x00\x00\x00\x00\x00\x00\x01",
29086                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
29087                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29088                 .ilen   = 16,
29089                 .result = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
29090                           "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
29091                 .rlen   = 16,
29092         }, {
29093                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
29094                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
29095                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
29096                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
29097                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
29098                 .klen   = 40,
29099                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29100                           "\x00\x00\x00\x02\x00\x00\x00\x00",
29101                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
29102                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29103                 .ilen   = 16,
29104                 .result = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
29105                           "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
29106                 .rlen   = 16,
29107         }, {
29108                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29109                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29110                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29111                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29112                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29113                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29114                 .klen   = 48,
29115                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29116                           "\x00\x00\x00\x00\x00\x00\x00\x01",
29117                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
29118                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29119                 .ilen   = 16,
29120                 .result = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
29121                           "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
29122                 .rlen   = 16,
29123         }, {
29124                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
29125                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
29126                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
29127                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
29128                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
29129                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
29130                 .klen   = 48,
29131                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29132                           "\x00\x00\x00\x02\x00\x00\x00\x00",
29133                 .input  = "\x30\x31\x32\x33\x34\x35\x36\x37"
29134                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29135                 .ilen   = 16,
29136                 .result = "\x04\xab\x28\x37\x31\x7a\x26\xab"
29137                           "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
29138                 .rlen   = 16,
29139         }, {
29140                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29141                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29142                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29143                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29144                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29145                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29146                 .klen   = 48,
29147                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29148                           "\x00\x00\x00\x00\x00\x00\x00\x01",
29149                 .input  = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
29150                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
29151                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
29152                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
29153                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
29154                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
29155                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
29156                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
29157                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
29158                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
29159                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
29160                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
29161                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
29162                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
29163                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
29164                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
29165                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
29166                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
29167                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
29168                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
29169                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
29170                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
29171                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
29172                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
29173                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
29174                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
29175                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
29176                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
29177                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
29178                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
29179                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
29180                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
29181                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
29182                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
29183                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
29184                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
29185                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
29186                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
29187                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
29188                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
29189                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
29190                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
29191                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
29192                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
29193                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
29194                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
29195                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
29196                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
29197                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
29198                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
29199                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
29200                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
29201                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
29202                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
29203                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
29204                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
29205                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
29206                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
29207                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
29208                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
29209                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
29210                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
29211                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
29212                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
29213                 .ilen   = 512,
29214                 .result = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
29215                           "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
29216                           "\x67\x76\xac\x2c\xd2\x63\x18\x93"
29217                           "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
29218                           "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
29219                           "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
29220                           "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
29221                           "\x62\xdd\x78\x81\xea\x1d\xef\x04"
29222                           "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
29223                           "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
29224                           "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
29225                           "\x40\x41\x69\xaa\x71\xc0\x37\xec"
29226                           "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
29227                           "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
29228                           "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
29229                           "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
29230                           "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
29231                           "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
29232                           "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
29233                           "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
29234                           "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
29235                           "\x42\x08\x40\x82\x06\x1c\x2d\x55"
29236                           "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
29237                           "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
29238                           "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
29239                           "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
29240                           "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
29241                           "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
29242                           "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
29243                           "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
29244                           "\xed\x14\xa9\x57\x19\x63\x40\x04"
29245                           "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
29246                           "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
29247                           "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
29248                           "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
29249                           "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
29250                           "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
29251                           "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
29252                           "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
29253                           "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
29254                           "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
29255                           "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
29256                           "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
29257                           "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
29258                           "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
29259                           "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
29260                           "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
29261                           "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
29262                           "\x35\xa5\x83\x04\x84\x01\x99\x56"
29263                           "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
29264                           "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
29265                           "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
29266                           "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
29267                           "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
29268                           "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
29269                           "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
29270                           "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
29271                           "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
29272                           "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
29273                           "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
29274                           "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
29275                           "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
29276                           "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
29277                           "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
29278                 .rlen   = 512,
29279                 .also_non_np = 1,
29280                 .np     = 3,
29281                 .tap    = { 512 - 20, 4, 16 },
29282         },
29283 };
29284
29285 static struct cipher_testvec camellia_lrw_dec_tv_template[] = {
29286         /* Generated from AES-LRW test vectors */
29287         /* same as enc vectors with input and result reversed */
29288         {
29289                 .key    = "\x45\x62\xac\x25\xf8\x28\x17\x6d"
29290                           "\x4c\x26\x84\x14\xb5\x68\x01\x85"
29291                           "\x25\x8e\x2a\x05\xe7\x3e\x9d\x03"
29292                           "\xee\x5a\x83\x0c\xcc\x09\x4c\x87",
29293                 .klen   = 32,
29294                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29295                           "\x00\x00\x00\x00\x00\x00\x00\x01",
29296                 .input  = "\x92\x68\x19\xd7\xb7\x5b\x0a\x31"
29297                           "\x97\xcc\x72\xbe\x99\x17\xeb\x3e",
29298                 .ilen   = 16,
29299                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29300                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29301                 .rlen   = 16,
29302         }, {
29303                 .key    = "\x59\x70\x47\x14\xf5\x57\x47\x8c"
29304                           "\xd7\x79\xe8\x0f\x54\x88\x79\x44"
29305                           "\x0d\x48\xf0\xb7\xb1\x5a\x53\xea"
29306                           "\x1c\xaa\x6b\x29\xc2\xca\xfb\xaf",
29307                 .klen   = 32,
29308                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29309                           "\x00\x00\x00\x00\x00\x00\x00\x02",
29310                 .input  = "\x73\x09\xb7\x50\xb6\x77\x30\x50"
29311                           "\x5c\x8a\x9c\x26\x77\x9d\xfc\x4a",
29312                 .ilen   = 16,
29313                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29314                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29315                 .rlen   = 16,
29316         }, {
29317                 .key    = "\xd8\x2a\x91\x34\xb2\x6a\x56\x50"
29318                           "\x30\xfe\x69\xe2\x37\x7f\x98\x47"
29319                           "\xcd\xf9\x0b\x16\x0c\x64\x8f\xb6"
29320                           "\xb0\x0d\x0d\x1b\xae\x85\x87\x1f",
29321                 .klen   = 32,
29322                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29323                           "\x00\x00\x00\x02\x00\x00\x00\x00",
29324                 .input  = "\x90\xae\x83\xe0\x22\xb9\x60\x91"
29325                           "\xfa\xa9\xb7\x98\xe3\xed\x87\x01",
29326                 .ilen   = 16,
29327                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29328                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29329                 .rlen   = 16,
29330         }, {
29331                 .key    = "\x0f\x6a\xef\xf8\xd3\xd2\xbb\x15"
29332                           "\x25\x83\xf7\x3c\x1f\x01\x28\x74"
29333                           "\xca\xc6\xbc\x35\x4d\x4a\x65\x54"
29334                           "\x90\xae\x61\xcf\x7b\xae\xbd\xcc"
29335                           "\xad\xe4\x94\xc5\x4a\x29\xae\x70",
29336                 .klen   = 40,
29337                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29338                           "\x00\x00\x00\x00\x00\x00\x00\x01",
29339                 .input  = "\x99\xe9\x6e\xd4\xc9\x21\xa5\xf0"
29340                           "\xd8\x83\xef\xd9\x07\x16\x5f\x35",
29341                 .ilen   = 16,
29342                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29343                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29344                 .rlen   = 16,
29345         }, {
29346                 .key    = "\x8a\xd4\xee\x10\x2f\xbd\x81\xff"
29347                           "\xf8\x86\xce\xac\x93\xc5\xad\xc6"
29348                           "\xa0\x19\x07\xc0\x9d\xf7\xbb\xdd"
29349                           "\x52\x13\xb2\xb7\xf0\xff\x11\xd8"
29350                           "\xd6\x08\xd0\xcd\x2e\xb1\x17\x6f",
29351                 .klen   = 40,
29352                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29353                           "\x00\x00\x00\x02\x00\x00\x00\x00",
29354                 .input  = "\x42\x88\xf4\xcb\x21\x11\x6d\x8e"
29355                           "\xde\x1a\xf2\x29\xf1\x4a\xe0\x15",
29356                 .ilen   = 16,
29357                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29358                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29359                 .rlen   = 16,
29360         }, {
29361                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29362                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29363                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29364                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29365                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29366                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29367                 .klen   = 48,
29368                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29369                           "\x00\x00\x00\x00\x00\x00\x00\x01",
29370                 .input  = "\x40\xaa\x34\x86\x4a\x8f\x78\xb9"
29371                           "\xdb\xdb\x0f\x3d\x48\x70\xbe\x8d",
29372                 .ilen   = 16,
29373                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29374                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29375                 .rlen   = 16,
29376         }, {
29377                 .key    = "\xfb\x76\x15\xb2\x3d\x80\x89\x1d"
29378                           "\xd4\x70\x98\x0b\xc7\x95\x84\xc8"
29379                           "\xb2\xfb\x64\xce\x60\x97\x87\x8d"
29380                           "\x17\xfc\xe4\x5a\x49\xe8\x30\xb7"
29381                           "\x6e\x78\x17\xe7\x2d\x5e\x12\xd4"
29382                           "\x60\x64\x04\x7a\xf1\x2f\x9e\x0c",
29383                 .klen   = 48,
29384                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29385                           "\x00\x00\x00\x02\x00\x00\x00\x00",
29386                 .input  = "\x04\xab\x28\x37\x31\x7a\x26\xab"
29387                           "\xa1\x70\x1b\x9c\xe7\xdd\x83\xff",
29388                 .ilen   = 16,
29389                 .result = "\x30\x31\x32\x33\x34\x35\x36\x37"
29390                           "\x38\x39\x41\x42\x43\x44\x45\x46",
29391                 .rlen   = 16,
29392         }, {
29393                 .key    = "\xf8\xd4\x76\xff\xd6\x46\xee\x6c"
29394                           "\x23\x84\xcb\x1c\x77\xd6\x19\x5d"
29395                           "\xfe\xf1\xa9\xf3\x7b\xbc\x8d\x21"
29396                           "\xa7\x9c\x21\xf8\xcb\x90\x02\x89"
29397                           "\xa8\x45\x34\x8e\xc8\xc5\xb5\xf1"
29398                           "\x26\xf5\x0e\x76\xfe\xfd\x1b\x1e",
29399                 .klen   = 48,
29400                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29401                           "\x00\x00\x00\x00\x00\x00\x00\x01",
29402                 .input  = "\x90\x69\x8e\xf2\x14\x86\x59\xf9"
29403                           "\xec\xe7\xfa\x3f\x48\x9d\x7f\x96"
29404                           "\x67\x76\xac\x2c\xd2\x63\x18\x93"
29405                           "\x13\xf8\xf1\xf6\x71\x77\xb3\xee"
29406                           "\x93\xb2\xcc\xf3\x26\xc1\x16\x4f"
29407                           "\xd4\xe8\x43\xc1\x68\xa3\x3e\x06"
29408                           "\x38\x51\xff\xa8\xb9\xa4\xeb\xb1"
29409                           "\x62\xdd\x78\x81\xea\x1d\xef\x04"
29410                           "\x1d\x07\xc1\x67\xc8\xd6\x77\xa1"
29411                           "\x84\x95\xf4\x9a\xd9\xbc\x2d\xe2"
29412                           "\xf6\x80\xfc\x91\x2a\xbc\x42\xa0"
29413                           "\x40\x41\x69\xaa\x71\xc0\x37\xec"
29414                           "\x39\xf3\xf2\xec\x82\xc3\x88\x79"
29415                           "\xbc\xc3\xaa\xb7\xcf\x6a\x72\x80"
29416                           "\x4c\xf4\x84\x8f\x13\x9e\x94\x5c"
29417                           "\xe5\xb2\x91\xbb\x92\x51\x4d\xf1"
29418                           "\xd6\x0d\x71\x6b\x7a\xc2\x2f\x12"
29419                           "\x6f\x75\xc7\x80\x99\x50\x84\xcf"
29420                           "\xa8\xeb\xd6\xe1\x1c\x59\x81\x7e"
29421                           "\xb9\xb3\xde\x7a\x93\x14\x12\xa2"
29422                           "\xf7\x43\xb3\x9d\x1a\x87\x65\x91"
29423                           "\x42\x08\x40\x82\x06\x1c\x2d\x55"
29424                           "\x6e\x48\xd5\x74\x07\x6e\x9d\x80"
29425                           "\xeb\xb4\x97\xa1\x36\xdf\xfa\x74"
29426                           "\x79\x7f\x5a\x75\xe7\x71\xc8\x8c"
29427                           "\x7e\xf8\x3a\x77\xcd\x32\x05\xf9"
29428                           "\x3d\xd4\xe9\xa2\xbb\xc4\x8b\x83"
29429                           "\x42\x5c\x82\xfa\xe9\x4b\x96\x3b"
29430                           "\x7f\x89\x8b\xf9\xf1\x87\xda\xf0"
29431                           "\x87\xef\x13\x5d\xf0\xe2\xc5\xc1"
29432                           "\xed\x14\xa9\x57\x19\x63\x40\x04"
29433                           "\x24\xeb\x6e\x19\xd1\x3d\x70\x78"
29434                           "\xeb\xda\x55\x70\x2c\x4f\x41\x5b"
29435                           "\x56\x9f\x1a\xd3\xac\xf1\xc0\xc3"
29436                           "\x21\xec\xd7\xd2\x55\x32\x7c\x2e"
29437                           "\x3c\x48\x8e\xb4\x85\x35\x47\xfe"
29438                           "\xe2\x88\x79\x98\x6a\xc9\x8d\xff"
29439                           "\xe9\x89\x6e\xb8\xe2\x97\x00\xbd"
29440                           "\xa4\x8f\xba\xd0\x8c\xcb\x79\x99"
29441                           "\xb3\xb2\xb2\x7a\xc3\xb7\xef\x75"
29442                           "\x23\x52\x76\xc3\x50\x6e\x66\xf8"
29443                           "\xa2\xe2\xce\xba\x40\x21\x3f\xc9"
29444                           "\x0a\x32\x7f\xf7\x08\x8c\x66\xcf"
29445                           "\xd3\xdf\x57\x59\x83\xb8\xe1\x85"
29446                           "\xd6\x8f\xfb\x48\x1f\x3a\xc4\x2f"
29447                           "\xb4\x2d\x58\xab\xd8\x7f\x5e\x3a"
29448                           "\xbc\x62\x3e\xe2\x6a\x52\x0d\x76"
29449                           "\x2f\x1c\x1a\x30\xed\x95\x2a\x44"
29450                           "\x35\xa5\x83\x04\x84\x01\x99\x56"
29451                           "\xb7\xe3\x10\x96\xfa\xdc\x19\xdd"
29452                           "\xe2\x7f\xcb\xa0\x49\x1b\xff\x4c"
29453                           "\x73\xf6\xbb\x94\x00\xe8\xa9\x3d"
29454                           "\xe2\x20\xe9\x3f\xfa\x07\x5d\x77"
29455                           "\x06\xd5\x4f\x4d\x02\xb8\x40\x1b"
29456                           "\x30\xed\x1a\x50\x19\xef\xc4\x2c"
29457                           "\x02\xd9\xc5\xd3\x11\x33\x37\xe5"
29458                           "\x2b\xa3\x95\xa6\xee\xd8\x74\x1d"
29459                           "\x68\xa0\xeb\xbf\xdd\x5e\x99\x96"
29460                           "\x91\xc3\x94\x24\xa5\x12\xa2\x37"
29461                           "\xb3\xac\xcf\x2a\xfd\x55\x34\xfe"
29462                           "\x79\x92\x3e\xe6\x1b\x49\x57\x5d"
29463                           "\x93\x6c\x01\xf7\xcc\x4e\x20\xd1"
29464                           "\xb2\x1a\xd8\x4c\xbd\x1d\x10\xe9"
29465                           "\x5a\xa8\x92\x7f\xba\xe6\x0c\x95",
29466                 .ilen   = 512,
29467                 .result = "\x05\x11\xb7\x18\xab\xc6\x2d\xac"
29468                           "\x70\x5d\xf6\x22\x94\xcd\xe5\x6c"
29469                           "\x17\x6b\xf6\x1c\xf0\xf3\x6e\xf8"
29470                           "\x50\x38\x1f\x71\x49\xb6\x57\xd6"
29471                           "\x8f\xcb\x8d\x6b\xe3\xa6\x29\x90"
29472                           "\xfe\x2a\x62\x82\xae\x6d\x8b\xf6"
29473                           "\xad\x1e\x9e\x20\x5f\x38\xbe\x04"
29474                           "\xda\x10\x8e\xed\xa2\xa4\x87\xab"
29475                           "\xda\x6b\xb4\x0c\x75\xba\xd3\x7c"
29476                           "\xc9\xac\x42\x31\x95\x7c\xc9\x04"
29477                           "\xeb\xd5\x6e\x32\x69\x8a\xdb\xa6"
29478                           "\x15\xd7\x3f\x4f\x2f\x66\x69\x03"
29479                           "\x9c\x1f\x54\x0f\xde\x1f\xf3\x65"
29480                           "\x4c\x96\x12\xed\x7c\x92\x03\x01"
29481                           "\x6f\xbc\x35\x93\xac\xf1\x27\xf1"
29482                           "\xb4\x96\x82\x5a\x5f\xb0\xa0\x50"
29483                           "\x89\xa4\x8e\x66\x44\x85\xcc\xfd"
29484                           "\x33\x14\x70\xe3\x96\xb2\xc3\xd3"
29485                           "\xbb\x54\x5a\x1a\xf9\x74\xa2\xc5"
29486                           "\x2d\x64\x75\xdd\xb4\x54\xe6\x74"
29487                           "\x8c\xd3\x9d\x9e\x86\xab\x51\x53"
29488                           "\xb7\x93\x3e\x6f\xd0\x4e\x2c\x40"
29489                           "\xf6\xa8\x2e\x3e\x9d\xf4\x66\xa5"
29490                           "\x76\x12\x73\x44\x1a\x56\xd7\x72"
29491                           "\x88\xcd\x21\x8c\x4c\x0f\xfe\xda"
29492                           "\x95\xe0\x3a\xa6\xa5\x84\x46\xcd"
29493                           "\xd5\x3e\x9d\x3a\xe2\x67\xe6\x60"
29494                           "\x1a\xe2\x70\x85\x58\xc2\x1b\x09"
29495                           "\xe1\xd7\x2c\xca\xad\xa8\x8f\xf9"
29496                           "\xac\xb3\x0e\xdb\xca\x2e\xe2\xb8"
29497                           "\x51\x71\xd9\x3c\x6c\xf1\x56\xf8"
29498                           "\xea\x9c\xf1\xfb\x0c\xe6\xb7\x10"
29499                           "\x1c\xf8\xa9\x7c\xe8\x53\x35\xc1"
29500                           "\x90\x3e\x76\x4a\x74\xa4\x21\x2c"
29501                           "\xf6\x2c\x4e\x0f\x94\x3a\x88\x2e"
29502                           "\x41\x09\x6a\x33\x7d\xf6\xdd\x3f"
29503                           "\x8d\x23\x31\x74\x84\xeb\x88\x6e"
29504                           "\xcc\xb9\xbc\x22\x83\x19\x07\x22"
29505                           "\xa5\x2d\xdf\xa5\xf3\x80\x85\x78"
29506                           "\x84\x39\x6a\x6d\x6a\x99\x4f\xa5"
29507                           "\x15\xfe\x46\xb0\xe4\x6c\xa5\x41"
29508                           "\x3c\xce\x8f\x42\x60\x71\xa7\x75"
29509                           "\x08\x40\x65\x8a\x82\xbf\xf5\x43"
29510                           "\x71\x96\xa9\x4d\x44\x8a\x20\xbe"
29511                           "\xfa\x4d\xbb\xc0\x7d\x31\x96\x65"
29512                           "\xe7\x75\xe5\x3e\xfd\x92\x3b\xc9"
29513                           "\x55\xbb\x16\x7e\xf7\xc2\x8c\xa4"
29514                           "\x40\x1d\xe5\xef\x0e\xdf\xe4\x9a"
29515                           "\x62\x73\x65\xfd\x46\x63\x25\x3d"
29516                           "\x2b\xaf\xe5\x64\xfe\xa5\x5c\xcf"
29517                           "\x24\xf3\xb4\xac\x64\xba\xdf\x4b"
29518                           "\xc6\x96\x7d\x81\x2d\x8d\x97\xf7"
29519                           "\xc5\x68\x77\x84\x32\x2b\xcc\x85"
29520                           "\x74\x96\xf0\x12\x77\x61\xb9\xeb"
29521                           "\x71\xaa\x82\xcb\x1c\xdb\x89\xc8"
29522                           "\xc6\xb5\xe3\x5c\x7d\x39\x07\x24"
29523                           "\xda\x39\x87\x45\xc0\x2b\xbb\x01"
29524                           "\xac\xbc\x2a\x5c\x7f\xfc\xe8\xce"
29525                           "\x6d\x9c\x6f\xed\xd3\xc1\xa1\xd6"
29526                           "\xc5\x55\xa9\x66\x2f\xe1\xc8\x32"
29527                           "\xa6\x5d\xa4\x3a\x98\x73\xe8\x45"
29528                           "\xa4\xc7\xa8\xb4\xf6\x13\x03\xf6"
29529                           "\xe9\x2e\xc4\x29\x0f\x84\xdb\xc4"
29530                           "\x21\xc4\xc2\x75\x67\x89\x37\x0a",
29531                 .rlen   = 512,
29532                 .also_non_np = 1,
29533                 .np     = 3,
29534                 .tap    = { 512 - 20, 4, 16 },
29535         },
29536 };
29537
29538 static struct cipher_testvec camellia_xts_enc_tv_template[] = {
29539         /* Generated from AES-XTS test vectors */
29540         {
29541                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
29542                           "\x00\x00\x00\x00\x00\x00\x00\x00"
29543                           "\x00\x00\x00\x00\x00\x00\x00\x00"
29544                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29545                 .klen   = 32,
29546                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29547                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29548                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
29549                           "\x00\x00\x00\x00\x00\x00\x00\x00"
29550                           "\x00\x00\x00\x00\x00\x00\x00\x00"
29551                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29552                 .ilen   = 32,
29553                 .result = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
29554                           "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
29555                           "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
29556                           "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
29557                 .rlen   = 32,
29558         }, {
29559                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
29560                           "\x11\x11\x11\x11\x11\x11\x11\x11"
29561                           "\x22\x22\x22\x22\x22\x22\x22\x22"
29562                           "\x22\x22\x22\x22\x22\x22\x22\x22",
29563                 .klen   = 32,
29564                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
29565                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29566                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
29567                           "\x44\x44\x44\x44\x44\x44\x44\x44"
29568                           "\x44\x44\x44\x44\x44\x44\x44\x44"
29569                           "\x44\x44\x44\x44\x44\x44\x44\x44",
29570                 .ilen   = 32,
29571                 .result = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
29572                           "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
29573                           "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
29574                           "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
29575                 .rlen   = 32,
29576         }, {
29577                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
29578                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
29579                           "\x22\x22\x22\x22\x22\x22\x22\x22"
29580                           "\x22\x22\x22\x22\x22\x22\x22\x22",
29581                 .klen   = 32,
29582                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
29583                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29584                 .input  = "\x44\x44\x44\x44\x44\x44\x44\x44"
29585                           "\x44\x44\x44\x44\x44\x44\x44\x44"
29586                           "\x44\x44\x44\x44\x44\x44\x44\x44"
29587                           "\x44\x44\x44\x44\x44\x44\x44\x44",
29588                 .ilen   = 32,
29589                 .result = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
29590                           "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
29591                           "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
29592                           "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
29593                 .rlen   = 32,
29594         }, {
29595                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
29596                           "\x23\x53\x60\x28\x74\x71\x35\x26"
29597                           "\x31\x41\x59\x26\x53\x58\x97\x93"
29598                           "\x23\x84\x62\x64\x33\x83\x27\x95",
29599                 .klen   = 32,
29600                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29601                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29602                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
29603                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29604                           "\x10\x11\x12\x13\x14\x15\x16\x17"
29605                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29606                           "\x20\x21\x22\x23\x24\x25\x26\x27"
29607                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29608                           "\x30\x31\x32\x33\x34\x35\x36\x37"
29609                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29610                           "\x40\x41\x42\x43\x44\x45\x46\x47"
29611                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29612                           "\x50\x51\x52\x53\x54\x55\x56\x57"
29613                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29614                           "\x60\x61\x62\x63\x64\x65\x66\x67"
29615                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29616                           "\x70\x71\x72\x73\x74\x75\x76\x77"
29617                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29618                           "\x80\x81\x82\x83\x84\x85\x86\x87"
29619                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29620                           "\x90\x91\x92\x93\x94\x95\x96\x97"
29621                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29622                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29623                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29624                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29625                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29626                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29627                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29628                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29629                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29630                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29631                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29632                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29633                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
29634                           "\x00\x01\x02\x03\x04\x05\x06\x07"
29635                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29636                           "\x10\x11\x12\x13\x14\x15\x16\x17"
29637                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29638                           "\x20\x21\x22\x23\x24\x25\x26\x27"
29639                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29640                           "\x30\x31\x32\x33\x34\x35\x36\x37"
29641                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29642                           "\x40\x41\x42\x43\x44\x45\x46\x47"
29643                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29644                           "\x50\x51\x52\x53\x54\x55\x56\x57"
29645                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29646                           "\x60\x61\x62\x63\x64\x65\x66\x67"
29647                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29648                           "\x70\x71\x72\x73\x74\x75\x76\x77"
29649                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29650                           "\x80\x81\x82\x83\x84\x85\x86\x87"
29651                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29652                           "\x90\x91\x92\x93\x94\x95\x96\x97"
29653                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29654                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29655                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29656                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29657                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29658                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29659                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29660                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29661                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29662                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29663                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29664                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29665                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
29666                 .ilen   = 512,
29667                 .result = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
29668                           "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
29669                           "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
29670                           "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
29671                           "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
29672                           "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
29673                           "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
29674                           "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
29675                           "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
29676                           "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
29677                           "\x08\xda\x76\x00\x65\xcf\x7b\x31"
29678                           "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
29679                           "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
29680                           "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
29681                           "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
29682                           "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
29683                           "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
29684                           "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
29685                           "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
29686                           "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
29687                           "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
29688                           "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
29689                           "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
29690                           "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
29691                           "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
29692                           "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
29693                           "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
29694                           "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
29695                           "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
29696                           "\x16\x31\xb2\x47\x91\x67\xaa\x28"
29697                           "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
29698                           "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
29699                           "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
29700                           "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
29701                           "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
29702                           "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
29703                           "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
29704                           "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
29705                           "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
29706                           "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
29707                           "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
29708                           "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
29709                           "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
29710                           "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
29711                           "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
29712                           "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
29713                           "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
29714                           "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
29715                           "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
29716                           "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
29717                           "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
29718                           "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
29719                           "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
29720                           "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
29721                           "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
29722                           "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
29723                           "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
29724                           "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
29725                           "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
29726                           "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
29727                           "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
29728                           "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
29729                           "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
29730                           "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
29731                 .rlen   = 512,
29732         }, {
29733                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
29734                           "\x23\x53\x60\x28\x74\x71\x35\x26"
29735                           "\x62\x49\x77\x57\x24\x70\x93\x69"
29736                           "\x99\x59\x57\x49\x66\x96\x76\x27"
29737                           "\x31\x41\x59\x26\x53\x58\x97\x93"
29738                           "\x23\x84\x62\x64\x33\x83\x27\x95"
29739                           "\x02\x88\x41\x97\x16\x93\x99\x37"
29740                           "\x51\x05\x82\x09\x74\x94\x45\x92",
29741                 .klen   = 64,
29742                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
29743                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29744                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
29745                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29746                           "\x10\x11\x12\x13\x14\x15\x16\x17"
29747                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29748                           "\x20\x21\x22\x23\x24\x25\x26\x27"
29749                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29750                           "\x30\x31\x32\x33\x34\x35\x36\x37"
29751                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29752                           "\x40\x41\x42\x43\x44\x45\x46\x47"
29753                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29754                           "\x50\x51\x52\x53\x54\x55\x56\x57"
29755                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29756                           "\x60\x61\x62\x63\x64\x65\x66\x67"
29757                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29758                           "\x70\x71\x72\x73\x74\x75\x76\x77"
29759                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29760                           "\x80\x81\x82\x83\x84\x85\x86\x87"
29761                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29762                           "\x90\x91\x92\x93\x94\x95\x96\x97"
29763                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29764                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29765                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29766                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29767                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29768                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29769                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29770                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29771                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29772                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29773                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29774                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29775                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
29776                           "\x00\x01\x02\x03\x04\x05\x06\x07"
29777                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
29778                           "\x10\x11\x12\x13\x14\x15\x16\x17"
29779                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
29780                           "\x20\x21\x22\x23\x24\x25\x26\x27"
29781                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
29782                           "\x30\x31\x32\x33\x34\x35\x36\x37"
29783                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
29784                           "\x40\x41\x42\x43\x44\x45\x46\x47"
29785                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
29786                           "\x50\x51\x52\x53\x54\x55\x56\x57"
29787                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
29788                           "\x60\x61\x62\x63\x64\x65\x66\x67"
29789                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
29790                           "\x70\x71\x72\x73\x74\x75\x76\x77"
29791                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
29792                           "\x80\x81\x82\x83\x84\x85\x86\x87"
29793                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
29794                           "\x90\x91\x92\x93\x94\x95\x96\x97"
29795                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
29796                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
29797                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
29798                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
29799                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
29800                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
29801                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
29802                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
29803                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
29804                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
29805                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
29806                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
29807                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
29808                 .ilen   = 512,
29809                 .result = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
29810                           "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
29811                           "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
29812                           "\xf1\x74\xac\x96\x05\x7b\x32\xca"
29813                           "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
29814                           "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
29815                           "\x97\x07\x82\xf0\x07\x12\x38\x0a"
29816                           "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
29817                           "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
29818                           "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
29819                           "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
29820                           "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
29821                           "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
29822                           "\x41\x82\x0c\x45\x39\x35\xa8\x75"
29823                           "\x03\x29\x01\x84\x8c\xab\x48\xbe"
29824                           "\x11\x56\x22\x67\xb7\x67\x1a\x09"
29825                           "\xa1\x72\x25\x41\x3c\x39\x65\x80"
29826                           "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
29827                           "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
29828                           "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
29829                           "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
29830                           "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
29831                           "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
29832                           "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
29833                           "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
29834                           "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
29835                           "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
29836                           "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
29837                           "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
29838                           "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
29839                           "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
29840                           "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
29841                           "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
29842                           "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
29843                           "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
29844                           "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
29845                           "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
29846                           "\xef\x38\x52\x18\x0e\x29\x7e\xef"
29847                           "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
29848                           "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
29849                           "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
29850                           "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
29851                           "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
29852                           "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
29853                           "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
29854                           "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
29855                           "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
29856                           "\x21\x17\xf8\x59\x15\x24\x64\x22"
29857                           "\x57\x48\x80\xd5\x3d\x92\x30\x07"
29858                           "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
29859                           "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
29860                           "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
29861                           "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
29862                           "\x6b\x84\xf3\x00\xba\x52\x05\x02"
29863                           "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
29864                           "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
29865                           "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
29866                           "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
29867                           "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
29868                           "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
29869                           "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
29870                           "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
29871                           "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
29872                           "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
29873                 .rlen   = 512,
29874                 .also_non_np = 1,
29875                 .np     = 3,
29876                 .tap    = { 512 - 20, 4, 16 },
29877         },
29878 };
29879
29880 static struct cipher_testvec camellia_xts_dec_tv_template[] = {
29881         /* Generated from AES-XTS test vectors */
29882         /* same as enc vectors with input and result reversed */
29883         {
29884                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
29885                           "\x00\x00\x00\x00\x00\x00\x00\x00"
29886                           "\x00\x00\x00\x00\x00\x00\x00\x00"
29887                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29888                 .klen   = 32,
29889                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29890                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29891                 .input  = "\x06\xcb\xa5\xf1\x04\x63\xb2\x41"
29892                           "\xdc\xca\xfa\x09\xba\x74\xb9\x05"
29893                           "\x78\xba\xa4\xf8\x67\x4d\x7e\xad"
29894                           "\x20\x18\xf5\x0c\x41\x16\x2a\x61",
29895                 .ilen   = 32,
29896                 .result = "\x00\x00\x00\x00\x00\x00\x00\x00"
29897                           "\x00\x00\x00\x00\x00\x00\x00\x00"
29898                           "\x00\x00\x00\x00\x00\x00\x00\x00"
29899                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29900                 .rlen   = 32,
29901         }, {
29902                 .key    = "\x11\x11\x11\x11\x11\x11\x11\x11"
29903                           "\x11\x11\x11\x11\x11\x11\x11\x11"
29904                           "\x22\x22\x22\x22\x22\x22\x22\x22"
29905                           "\x22\x22\x22\x22\x22\x22\x22\x22",
29906                 .klen   = 32,
29907                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
29908                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29909                 .input  = "\xc2\xb9\xdc\x44\x1d\xdf\xf2\x86"
29910                           "\x8d\x35\x42\x0a\xa5\x5e\x3d\x4f"
29911                           "\xb5\x37\x06\xff\xbd\xd4\x91\x70"
29912                           "\x80\x1f\xb2\x39\x10\x89\x44\xf5",
29913                 .ilen   = 32,
29914                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
29915                           "\x44\x44\x44\x44\x44\x44\x44\x44"
29916                           "\x44\x44\x44\x44\x44\x44\x44\x44"
29917                           "\x44\x44\x44\x44\x44\x44\x44\x44",
29918                 .rlen   = 32,
29919         }, {
29920                 .key    = "\xff\xfe\xfd\xfc\xfb\xfa\xf9\xf8"
29921                           "\xf7\xf6\xf5\xf4\xf3\xf2\xf1\xf0"
29922                           "\x22\x22\x22\x22\x22\x22\x22\x22"
29923                           "\x22\x22\x22\x22\x22\x22\x22\x22",
29924                 .klen   = 32,
29925                 .iv     = "\x33\x33\x33\x33\x33\x00\x00\x00"
29926                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29927                 .input  = "\x52\x1f\x9d\xf5\x5a\x58\x5a\x7e"
29928                           "\x9f\xd0\x8e\x02\x9c\x9a\x6a\xa7"
29929                           "\xb4\x3b\xce\xe7\x17\xaa\x89\x6a"
29930                           "\x35\x3c\x6b\xb5\x61\x1c\x79\x38",
29931                 .ilen   = 32,
29932                 .result = "\x44\x44\x44\x44\x44\x44\x44\x44"
29933                           "\x44\x44\x44\x44\x44\x44\x44\x44"
29934                           "\x44\x44\x44\x44\x44\x44\x44\x44"
29935                           "\x44\x44\x44\x44\x44\x44\x44\x44",
29936                 .rlen   = 32,
29937         }, {
29938                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
29939                           "\x23\x53\x60\x28\x74\x71\x35\x26"
29940                           "\x31\x41\x59\x26\x53\x58\x97\x93"
29941                           "\x23\x84\x62\x64\x33\x83\x27\x95",
29942                 .klen   = 32,
29943                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
29944                           "\x00\x00\x00\x00\x00\x00\x00\x00",
29945                 .input  = "\xc7\xf9\x0a\xaa\xcb\xb5\x8f\x33"
29946                           "\x60\xc3\xe9\x47\x90\xb7\x50\x57"
29947                           "\xa3\xad\x81\x2f\xf5\x22\x96\x02"
29948                           "\xaa\x7f\xea\xac\x29\x78\xca\x2a"
29949                           "\x7c\xcd\x31\x1a\x3c\x40\x0a\x73"
29950                           "\x09\x66\xad\x72\x0e\x4d\x5d\x77"
29951                           "\xbc\xb8\x76\x80\x37\x59\xa9\x01"
29952                           "\x9e\xfb\xdb\x6c\x93\xef\xb6\x8d"
29953                           "\x1e\xc1\x94\xa8\xd4\xb5\xb0\x01"
29954                           "\xd5\x01\x97\x28\xcd\x7a\x1f\xe8"
29955                           "\x08\xda\x76\x00\x65\xcf\x7b\x31"
29956                           "\xc6\xfa\xf2\x3b\x00\xa7\x6a\x9e"
29957                           "\x6c\x43\x80\x87\xe0\xbb\x4e\xe5"
29958                           "\xdc\x8a\xdf\xc3\x1d\x1b\x41\x04"
29959                           "\xfb\x54\xdd\x29\x27\xc2\x65\x17"
29960                           "\x36\x88\xb0\x85\x8d\x73\x7e\x4b"
29961                           "\x1d\x16\x8a\x52\xbc\xa6\xbc\xa4"
29962                           "\x8c\xd1\x04\x16\xbf\x8c\x01\x0f"
29963                           "\x7e\x6b\x59\x15\x29\xd1\x9b\xd3"
29964                           "\x6c\xee\xac\xdc\x45\x58\xca\x5b"
29965                           "\x70\x0e\x6a\x12\x86\x82\x79\x9f"
29966                           "\x16\xd4\x9d\x67\xcd\x70\x65\x26"
29967                           "\x21\x72\x1e\xa1\x94\x8a\x83\x0c"
29968                           "\x92\x42\x58\x5e\xa2\xc5\x31\xf3"
29969                           "\x7b\xd1\x31\xd4\x15\x80\x31\x61"
29970                           "\x5c\x53\x10\xdd\xea\xc8\x83\x5c"
29971                           "\x7d\xa7\x05\x66\xcc\x1e\xbb\x05"
29972                           "\x47\xae\xb4\x0f\x84\xd8\xf6\xb5"
29973                           "\xa1\xc6\x52\x00\x52\xe8\xdc\xd9"
29974                           "\x16\x31\xb2\x47\x91\x67\xaa\x28"
29975                           "\x2c\x29\x85\xa3\xf7\xf2\x24\x93"
29976                           "\x23\x80\x1f\xa8\x1b\x82\x8d\xdc"
29977                           "\x9f\x0b\xcd\xb4\x3c\x20\xbc\xec"
29978                           "\x4f\xc7\xee\xf8\xfd\xd9\xfb\x7e"
29979                           "\x3f\x0d\x23\xfa\x3f\xa7\xcc\x66"
29980                           "\x1c\xfe\xa6\x86\xf6\xf7\x85\xc7"
29981                           "\x43\xc1\xd4\xfc\xe4\x79\xc9\x1d"
29982                           "\xf8\x89\xcd\x20\x27\x84\x5d\x5c"
29983                           "\x8e\x4f\x1f\xeb\x08\x21\x4f\xa3"
29984                           "\xe0\x7e\x0b\x9c\xe7\x42\xcf\xb7"
29985                           "\x3f\x43\xcc\x86\x71\x34\x6a\xd9"
29986                           "\x5e\xec\x8f\x36\xc9\x0a\x03\xfe"
29987                           "\x18\x41\xdc\x9e\x2e\x75\x20\x3e"
29988                           "\xcc\x77\xe0\x8f\xe8\x43\x37\x4c"
29989                           "\xed\x1a\x5a\xb3\xfa\x43\xc9\x71"
29990                           "\x9f\xc5\xce\xcf\xff\xe7\x77\x1e"
29991                           "\x35\x93\xde\x6b\xc0\x6a\x7e\xa9"
29992                           "\x34\xb8\x27\x74\x08\xda\xf2\x4a"
29993                           "\x23\x5b\x9f\x55\x3a\x57\x82\x52"
29994                           "\xea\x6d\xc3\xc7\xf2\xc8\xb5\xdc"
29995                           "\xc5\xb9\xbb\xaa\xf2\x29\x9f\x49"
29996                           "\x7a\xef\xfe\xdc\x9f\xc9\x28\xe2"
29997                           "\x96\x0b\x35\x84\x05\x0d\xd6\x2a"
29998                           "\xea\x5a\xbf\x69\xde\xee\x4f\x8f"
29999                           "\x84\xb9\xcf\xa7\x57\xea\xe0\xe8"
30000                           "\x96\xef\x0f\x0e\xec\xc7\xa6\x74"
30001                           "\xb1\xfe\x7a\x6d\x11\xdd\x0e\x15"
30002                           "\x4a\x1e\x73\x7f\x55\xea\xf6\xe1"
30003                           "\x5b\xb6\x71\xda\xb0\x0c\xba\x26"
30004                           "\x5c\x48\x38\x6d\x1c\x32\xb2\x7d"
30005                           "\x05\x87\xc2\x1e\x7e\x2d\xd4\x33"
30006                           "\xcc\x06\xdb\xe7\x82\x29\x63\xd1"
30007                           "\x52\x84\x4f\xee\x27\xe8\x02\xd4"
30008                           "\x34\x3c\x69\xc2\xbd\x20\xe6\x7a",
30009                 .ilen   = 512,
30010                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
30011                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30012                           "\x10\x11\x12\x13\x14\x15\x16\x17"
30013                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30014                           "\x20\x21\x22\x23\x24\x25\x26\x27"
30015                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30016                           "\x30\x31\x32\x33\x34\x35\x36\x37"
30017                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30018                           "\x40\x41\x42\x43\x44\x45\x46\x47"
30019                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30020                           "\x50\x51\x52\x53\x54\x55\x56\x57"
30021                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30022                           "\x60\x61\x62\x63\x64\x65\x66\x67"
30023                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30024                           "\x70\x71\x72\x73\x74\x75\x76\x77"
30025                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30026                           "\x80\x81\x82\x83\x84\x85\x86\x87"
30027                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30028                           "\x90\x91\x92\x93\x94\x95\x96\x97"
30029                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30030                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30031                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30032                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30033                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30034                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30035                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30036                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30037                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30038                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30039                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30040                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30041                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30042                           "\x00\x01\x02\x03\x04\x05\x06\x07"
30043                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30044                           "\x10\x11\x12\x13\x14\x15\x16\x17"
30045                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30046                           "\x20\x21\x22\x23\x24\x25\x26\x27"
30047                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30048                           "\x30\x31\x32\x33\x34\x35\x36\x37"
30049                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30050                           "\x40\x41\x42\x43\x44\x45\x46\x47"
30051                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30052                           "\x50\x51\x52\x53\x54\x55\x56\x57"
30053                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30054                           "\x60\x61\x62\x63\x64\x65\x66\x67"
30055                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30056                           "\x70\x71\x72\x73\x74\x75\x76\x77"
30057                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30058                           "\x80\x81\x82\x83\x84\x85\x86\x87"
30059                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30060                           "\x90\x91\x92\x93\x94\x95\x96\x97"
30061                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30062                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30063                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30064                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30065                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30066                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30067                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30068                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30069                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30070                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30071                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30072                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30073                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
30074                 .rlen   = 512,
30075         }, {
30076                 .key    = "\x27\x18\x28\x18\x28\x45\x90\x45"
30077                           "\x23\x53\x60\x28\x74\x71\x35\x26"
30078                           "\x62\x49\x77\x57\x24\x70\x93\x69"
30079                           "\x99\x59\x57\x49\x66\x96\x76\x27"
30080                           "\x31\x41\x59\x26\x53\x58\x97\x93"
30081                           "\x23\x84\x62\x64\x33\x83\x27\x95"
30082                           "\x02\x88\x41\x97\x16\x93\x99\x37"
30083                           "\x51\x05\x82\x09\x74\x94\x45\x92",
30084                 .klen   = 64,
30085                 .iv     = "\xff\x00\x00\x00\x00\x00\x00\x00"
30086                           "\x00\x00\x00\x00\x00\x00\x00\x00",
30087                 .input  = "\x49\xcd\xb8\xbf\x2f\x73\x37\x28"
30088                           "\x9a\x7f\x6e\x57\x55\xb8\x07\x88"
30089                           "\x4a\x0d\x8b\x55\x60\xed\xb6\x7b"
30090                           "\xf1\x74\xac\x96\x05\x7b\x32\xca"
30091                           "\xd1\x4e\xf1\x58\x29\x16\x24\x6c"
30092                           "\xf2\xb3\xe4\x88\x84\xac\x4d\xee"
30093                           "\x97\x07\x82\xf0\x07\x12\x38\x0a"
30094                           "\x67\x62\xaf\xfd\x85\x9f\x0a\x55"
30095                           "\xa5\x20\xc5\x60\xe4\x68\x53\xa4"
30096                           "\x0e\x2e\x65\xe3\xe4\x0c\x30\x7c"
30097                           "\x1c\x01\x4f\x55\xa9\x13\xeb\x25"
30098                           "\x21\x87\xbc\xd3\xe7\x67\x4f\x38"
30099                           "\xa8\x14\x25\x71\xe9\x2e\x4c\x21"
30100                           "\x41\x82\x0c\x45\x39\x35\xa8\x75"
30101                           "\x03\x29\x01\x84\x8c\xab\x48\xbe"
30102                           "\x11\x56\x22\x67\xb7\x67\x1a\x09"
30103                           "\xa1\x72\x25\x41\x3c\x39\x65\x80"
30104                           "\x7d\x2f\xf8\x2c\x73\x04\x58\x9d"
30105                           "\xdd\x16\x8b\x63\x70\x4e\xc5\x17"
30106                           "\x21\xe0\x84\x51\x4b\x6f\x05\x52"
30107                           "\xe3\x63\x34\xfa\xa4\xaf\x33\x20"
30108                           "\xc1\xae\x32\xc4\xb8\x2b\xdb\x76"
30109                           "\xd9\x02\x31\x2f\xa3\xc6\xd0\x7b"
30110                           "\xaf\x1b\x84\xe3\x9b\xbf\xa6\xe0"
30111                           "\xb8\x8a\x13\x88\x71\xf4\x11\xa5"
30112                           "\xe9\xa9\x10\x33\xe0\xbe\x49\x89"
30113                           "\x41\x22\xf5\x9d\x80\x3e\x3b\x76"
30114                           "\x01\x16\x50\x6e\x7c\x6a\x81\xe9"
30115                           "\x13\x2c\xde\xb2\x5f\x79\xba\xb2"
30116                           "\xb1\x75\xae\xd2\x07\x98\x4b\x69"
30117                           "\xae\x7d\x5b\x90\xc2\x6c\xe6\x98"
30118                           "\xd3\x4c\xa1\xa3\x9c\xc9\x33\x6a"
30119                           "\x0d\x23\xb1\x79\x25\x13\x4b\xe5"
30120                           "\xaf\x93\x20\x5c\x7f\x06\x7a\x34"
30121                           "\x0b\x78\xe3\x67\x26\xe0\xad\x95"
30122                           "\xc5\x4e\x26\x22\xcf\x73\x77\x62"
30123                           "\x3e\x10\xd7\x90\x4b\x52\x1c\xc9"
30124                           "\xef\x38\x52\x18\x0e\x29\x7e\xef"
30125                           "\x34\xfe\x31\x95\xc5\xbc\xa8\xe2"
30126                           "\xa8\x4e\x9f\xea\xa6\xf0\xfe\x5d"
30127                           "\xc5\x39\x86\xed\x2f\x6d\xa0\xfe"
30128                           "\x96\xcd\x41\x10\x78\x4e\x0c\xc9"
30129                           "\xc3\x6d\x0f\xb7\xe8\xe0\x62\xab"
30130                           "\x8b\xf1\x21\x89\xa1\x12\xaa\xfa"
30131                           "\x9d\x70\xbe\x4c\xa8\x98\x89\x01"
30132                           "\xb9\xe2\x61\xde\x0c\x4a\x0b\xaa"
30133                           "\x89\xf5\x14\x79\x18\x8f\x3b\x0d"
30134                           "\x21\x17\xf8\x59\x15\x24\x64\x22"
30135                           "\x57\x48\x80\xd5\x3d\x92\x30\x07"
30136                           "\xd9\xa1\x4a\x23\x16\x43\x48\x0e"
30137                           "\x2b\x2d\x1b\x87\xef\x7e\xbd\xfa"
30138                           "\x49\xbc\x7e\x68\x6e\xa8\x46\x95"
30139                           "\xad\x5e\xfe\x0a\xa8\xd3\x1a\x5d"
30140                           "\x6b\x84\xf3\x00\xba\x52\x05\x02"
30141                           "\xe3\x96\x4e\xb6\x79\x3f\x43\xd3"
30142                           "\x4d\x3f\xd6\xab\x0a\xc4\x75\x2d"
30143                           "\xd1\x08\xc3\x6a\xc8\x37\x29\xa0"
30144                           "\xcc\x9a\x05\xdd\x5c\xe1\xff\x66"
30145                           "\xf2\x7a\x1d\xf2\xaf\xa9\x48\x89"
30146                           "\xf5\x21\x0f\x02\x48\x83\x74\xbf"
30147                           "\x2e\xe6\x93\x7b\xa0\xf4\xb1\x2b"
30148                           "\xb1\x02\x0a\x5c\x79\x19\x3b\x75"
30149                           "\xb7\x16\xd8\x12\x5c\xcd\x7d\x4e"
30150                           "\xd5\xc6\x99\xcc\x4e\x6c\x94\x95",
30151                 .ilen   = 512,
30152                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
30153                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30154                           "\x10\x11\x12\x13\x14\x15\x16\x17"
30155                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30156                           "\x20\x21\x22\x23\x24\x25\x26\x27"
30157                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30158                           "\x30\x31\x32\x33\x34\x35\x36\x37"
30159                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30160                           "\x40\x41\x42\x43\x44\x45\x46\x47"
30161                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30162                           "\x50\x51\x52\x53\x54\x55\x56\x57"
30163                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30164                           "\x60\x61\x62\x63\x64\x65\x66\x67"
30165                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30166                           "\x70\x71\x72\x73\x74\x75\x76\x77"
30167                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30168                           "\x80\x81\x82\x83\x84\x85\x86\x87"
30169                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30170                           "\x90\x91\x92\x93\x94\x95\x96\x97"
30171                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30172                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30173                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30174                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30175                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30176                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30177                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30178                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30179                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30180                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30181                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30182                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30183                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30184                           "\x00\x01\x02\x03\x04\x05\x06\x07"
30185                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30186                           "\x10\x11\x12\x13\x14\x15\x16\x17"
30187                           "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30188                           "\x20\x21\x22\x23\x24\x25\x26\x27"
30189                           "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30190                           "\x30\x31\x32\x33\x34\x35\x36\x37"
30191                           "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30192                           "\x40\x41\x42\x43\x44\x45\x46\x47"
30193                           "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30194                           "\x50\x51\x52\x53\x54\x55\x56\x57"
30195                           "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30196                           "\x60\x61\x62\x63\x64\x65\x66\x67"
30197                           "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30198                           "\x70\x71\x72\x73\x74\x75\x76\x77"
30199                           "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30200                           "\x80\x81\x82\x83\x84\x85\x86\x87"
30201                           "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30202                           "\x90\x91\x92\x93\x94\x95\x96\x97"
30203                           "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30204                           "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30205                           "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30206                           "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30207                           "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30208                           "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30209                           "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30210                           "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30211                           "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30212                           "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30213                           "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30214                           "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30215                           "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff",
30216                 .rlen   = 512,
30217                 .also_non_np = 1,
30218                 .np     = 3,
30219                 .tap    = { 512 - 20, 4, 16 },
30220         },
30221 };
30222
30223 /*
30224  * SEED test vectors
30225  */
30226 #define SEED_ENC_TEST_VECTORS   4
30227 #define SEED_DEC_TEST_VECTORS   4
30228
30229 static struct cipher_testvec seed_enc_tv_template[] = {
30230         {
30231                 .key    = zeroed_string,
30232                 .klen   = 16,
30233                 .input  = "\x00\x01\x02\x03\x04\x05\x06\x07"
30234                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30235                 .ilen   = 16,
30236                 .result = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
30237                           "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
30238                 .rlen   = 16,
30239         }, {
30240                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
30241                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30242                 .klen   = 16,
30243                 .input  = zeroed_string,
30244                 .ilen   = 16,
30245                 .result = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
30246                           "\x84\x48\x35\x97\xe4\x37\x0f\x43",
30247                 .rlen   = 16,
30248         }, {
30249                 .key    = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
30250                           "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
30251                 .klen   = 16,
30252                 .input  = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
30253                           "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
30254                 .ilen   = 16,
30255                 .result = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
30256                           "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
30257                 .rlen   = 16,
30258         }, {
30259                 .key    = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
30260                           "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
30261                 .klen   = 16,
30262                 .input  = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
30263                           "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
30264                 .ilen   = 16,
30265                 .result = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
30266                           "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
30267                 .rlen   = 16,
30268         }
30269 };
30270
30271 static struct cipher_testvec seed_dec_tv_template[] = {
30272         {
30273                 .key    = zeroed_string,
30274                 .klen   = 16,
30275                 .input  = "\x5e\xba\xc6\xe0\x05\x4e\x16\x68"
30276                           "\x19\xaf\xf1\xcc\x6d\x34\x6c\xdb",
30277                 .ilen   = 16,
30278                 .result = "\x00\x01\x02\x03\x04\x05\x06\x07"
30279                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30280                 .rlen   = 16,
30281         }, {
30282                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
30283                           "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f",
30284                 .klen   = 16,
30285                 .input  = "\xc1\x1f\x22\xf2\x01\x40\x50\x50"
30286                           "\x84\x48\x35\x97\xe4\x37\x0f\x43",
30287                 .ilen   = 16,
30288                 .result = zeroed_string,
30289                 .rlen   = 16,
30290         }, {
30291                 .key    = "\x47\x06\x48\x08\x51\xe6\x1b\xe8"
30292                           "\x5d\x74\xbf\xb3\xfd\x95\x61\x85",
30293                 .klen   = 16,
30294                 .input  = "\xee\x54\xd1\x3e\xbc\xae\x70\x6d"
30295                           "\x22\x6b\xc3\x14\x2c\xd4\x0d\x4a",
30296                 .ilen   = 16,
30297                 .result = "\x83\xa2\xf8\xa2\x88\x64\x1f\xb9"
30298                           "\xa4\xe9\xa5\xcc\x2f\x13\x1c\x7d",
30299                 .rlen   = 16,
30300         }, {
30301                 .key    = "\x28\xdb\xc3\xbc\x49\xff\xd8\x7d"
30302                           "\xcf\xa5\x09\xb1\x1d\x42\x2b\xe7",
30303                 .klen   = 16,
30304                 .input  = "\x9b\x9b\x7b\xfc\xd1\x81\x3c\xb9"
30305                           "\x5d\x0b\x36\x18\xf4\x0f\x51\x22",
30306                 .ilen   = 16,
30307                 .result = "\xb4\x1e\x6b\xe2\xeb\xa8\x4a\x14"
30308                           "\x8e\x2e\xed\x84\x59\x3c\x5e\xc7",
30309                 .rlen   = 16,
30310         }
30311 };
30312
30313 #define SALSA20_STREAM_ENC_TEST_VECTORS 5
30314 static struct cipher_testvec salsa20_stream_enc_tv_template[] = {
30315         /*
30316         * Testvectors from verified.test-vectors submitted to ECRYPT.
30317         * They are truncated to size 39, 64, 111, 129 to test a variety
30318         * of input length.
30319         */
30320         { /* Set 3, vector 0 */
30321                 .key    = "\x00\x01\x02\x03\x04\x05\x06\x07"
30322                         "\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F",
30323                 .klen   = 16,
30324                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
30325                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
30326                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30327                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30328                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30329                         "\x00\x00\x00\x00\x00\x00\x00",
30330                 .ilen   = 39,
30331                 .result = "\x2D\xD5\xC3\xF7\xBA\x2B\x20\xF7"
30332                          "\x68\x02\x41\x0C\x68\x86\x88\x89"
30333                          "\x5A\xD8\xC1\xBD\x4E\xA6\xC9\xB1"
30334                          "\x40\xFB\x9B\x90\xE2\x10\x49\xBF"
30335                          "\x58\x3F\x52\x79\x70\xEB\xC1",
30336                 .rlen   = 39,
30337         }, { /* Set 5, vector 0 */
30338                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
30339                         "\x00\x00\x00\x00\x00\x00\x00\x00",
30340                 .klen   = 16,
30341                 .iv     = "\x80\x00\x00\x00\x00\x00\x00\x00",
30342                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
30343                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30344                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30345                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30346                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30347                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30348                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30349                         "\x00\x00\x00\x00\x00\x00\x00\x00",
30350                 .ilen   = 64,
30351                 .result = "\xB6\x6C\x1E\x44\x46\xDD\x95\x57"
30352                          "\xE5\x78\xE2\x23\xB0\xB7\x68\x01"
30353                          "\x7B\x23\xB2\x67\xBB\x02\x34\xAE"
30354                          "\x46\x26\xBF\x44\x3F\x21\x97\x76"
30355                          "\x43\x6F\xB1\x9F\xD0\xE8\x86\x6F"
30356                          "\xCD\x0D\xE9\xA9\x53\x8F\x4A\x09"
30357                          "\xCA\x9A\xC0\x73\x2E\x30\xBC\xF9"
30358                          "\x8E\x4F\x13\xE4\xB9\xE2\x01\xD9",
30359                 .rlen   = 64,
30360         }, { /* Set 3, vector 27 */
30361                 .key    = "\x1B\x1C\x1D\x1E\x1F\x20\x21\x22"
30362                         "\x23\x24\x25\x26\x27\x28\x29\x2A"
30363                         "\x2B\x2C\x2D\x2E\x2F\x30\x31\x32"
30364                         "\x33\x34\x35\x36\x37\x38\x39\x3A",
30365                 .klen   = 32,
30366                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00",
30367                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
30368                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30369                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30370                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30371                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30372                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30373                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30374                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30375                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30376                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30377                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30378                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30379                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30380                         "\x00\x00\x00\x00\x00\x00\x00",
30381                 .ilen   = 111,
30382                 .result = "\xAE\x39\x50\x8E\xAC\x9A\xEC\xE7"
30383                          "\xBF\x97\xBB\x20\xB9\xDE\xE4\x1F"
30384                          "\x87\xD9\x47\xF8\x28\x91\x35\x98"
30385                          "\xDB\x72\xCC\x23\x29\x48\x56\x5E"
30386                          "\x83\x7E\x0B\xF3\x7D\x5D\x38\x7B"
30387                          "\x2D\x71\x02\xB4\x3B\xB5\xD8\x23"
30388                          "\xB0\x4A\xDF\x3C\xEC\xB6\xD9\x3B"
30389                          "\x9B\xA7\x52\xBE\xC5\xD4\x50\x59"
30390                          "\x15\x14\xB4\x0E\x40\xE6\x53\xD1"
30391                          "\x83\x9C\x5B\xA0\x92\x29\x6B\x5E"
30392                          "\x96\x5B\x1E\x2F\xD3\xAC\xC1\x92"
30393                          "\xB1\x41\x3F\x19\x2F\xC4\x3B\xC6"
30394                          "\x95\x46\x45\x54\xE9\x75\x03\x08"
30395                          "\x44\xAF\xE5\x8A\x81\x12\x09",
30396                 .rlen   = 111,
30397         }, { /* Set 5, vector 27 */
30398                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
30399                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30400                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30401                         "\x00\x00\x00\x00\x00\x00\x00\x00",
30402                 .klen   = 32,
30403                 .iv     = "\x00\x00\x00\x10\x00\x00\x00\x00",
30404                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
30405                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30406                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30407                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30408                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30409                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30410                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30411                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30412                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30413                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30414                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30415                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30416                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30417                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30418                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30419                         "\x00\x00\x00\x00\x00\x00\x00\x00"
30420                         "\x00",
30421                 .ilen   = 129,
30422                 .result = "\xD2\xDB\x1A\x5C\xF1\xC1\xAC\xDB"
30423                          "\xE8\x1A\x7A\x43\x40\xEF\x53\x43"
30424                          "\x5E\x7F\x4B\x1A\x50\x52\x3F\x8D"
30425                          "\x28\x3D\xCF\x85\x1D\x69\x6E\x60"
30426                          "\xF2\xDE\x74\x56\x18\x1B\x84\x10"
30427                          "\xD4\x62\xBA\x60\x50\xF0\x61\xF2"
30428                          "\x1C\x78\x7F\xC1\x24\x34\xAF\x58"
30429                          "\xBF\x2C\x59\xCA\x90\x77\xF3\xB0"
30430                          "\x5B\x4A\xDF\x89\xCE\x2C\x2F\xFC"
30431                          "\x67\xF0\xE3\x45\xE8\xB3\xB3\x75"
30432                          "\xA0\x95\x71\xA1\x29\x39\x94\xCA"
30433                          "\x45\x2F\xBD\xCB\x10\xB6\xBE\x9F"
30434                          "\x8E\xF9\xB2\x01\x0A\x5A\x0A\xB7"
30435                          "\x6B\x9D\x70\x8E\x4B\xD6\x2F\xCD"
30436                          "\x2E\x40\x48\x75\xE9\xE2\x21\x45"
30437                          "\x0B\xC9\xB6\xB5\x66\xBC\x9A\x59"
30438                          "\x5A",
30439                 .rlen   = 129,
30440         }, { /* large test vector generated using Crypto++ */
30441                 .key =  "\x00\x01\x02\x03\x04\x05\x06\x07"
30442                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30443                         "\x10\x11\x12\x13\x14\x15\x16\x17"
30444                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
30445                 .klen = 32,
30446                 .iv =   "\x00\x00\x00\x00\x00\x00\x00\x00"
30447                         "\x00\x00\x00\x00\x00\x00\x00\x00",
30448                 .input =
30449                         "\x00\x01\x02\x03\x04\x05\x06\x07"
30450                         "\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f"
30451                         "\x10\x11\x12\x13\x14\x15\x16\x17"
30452                         "\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f"
30453                         "\x20\x21\x22\x23\x24\x25\x26\x27"
30454                         "\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f"
30455                         "\x30\x31\x32\x33\x34\x35\x36\x37"
30456                         "\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f"
30457                         "\x40\x41\x42\x43\x44\x45\x46\x47"
30458                         "\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f"
30459                         "\x50\x51\x52\x53\x54\x55\x56\x57"
30460                         "\x58\x59\x5a\x5b\x5c\x5d\x5e\x5f"
30461                         "\x60\x61\x62\x63\x64\x65\x66\x67"
30462                         "\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f"
30463                         "\x70\x71\x72\x73\x74\x75\x76\x77"
30464                         "\x78\x79\x7a\x7b\x7c\x7d\x7e\x7f"
30465                         "\x80\x81\x82\x83\x84\x85\x86\x87"
30466                         "\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f"
30467                         "\x90\x91\x92\x93\x94\x95\x96\x97"
30468                         "\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
30469                         "\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7"
30470                         "\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
30471                         "\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7"
30472                         "\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf"
30473                         "\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7"
30474                         "\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf"
30475                         "\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7"
30476                         "\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf"
30477                         "\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7"
30478                         "\xe8\xe9\xea\xeb\xec\xed\xee\xef"
30479                         "\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7"
30480                         "\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"
30481                         "\x00\x03\x06\x09\x0c\x0f\x12\x15"
30482                         "\x18\x1b\x1e\x21\x24\x27\x2a\x2d"
30483                         "\x30\x33\x36\x39\x3c\x3f\x42\x45"
30484                         "\x48\x4b\x4e\x51\x54\x57\x5a\x5d"
30485                         "\x60\x63\x66\x69\x6c\x6f\x72\x75"
30486                         "\x78\x7b\x7e\x81\x84\x87\x8a\x8d"
30487                         "\x90\x93\x96\x99\x9c\x9f\xa2\xa5"
30488                         "\xa8\xab\xae\xb1\xb4\xb7\xba\xbd"
30489                         "\xc0\xc3\xc6\xc9\xcc\xcf\xd2\xd5"
30490                         "\xd8\xdb\xde\xe1\xe4\xe7\xea\xed"
30491                         "\xf0\xf3\xf6\xf9\xfc\xff\x02\x05"
30492                         "\x08\x0b\x0e\x11\x14\x17\x1a\x1d"
30493                         "\x20\x23\x26\x29\x2c\x2f\x32\x35"
30494                         "\x38\x3b\x3e\x41\x44\x47\x4a\x4d"
30495                         "\x50\x53\x56\x59\x5c\x5f\x62\x65"
30496                         "\x68\x6b\x6e\x71\x74\x77\x7a\x7d"
30497                         "\x80\x83\x86\x89\x8c\x8f\x92\x95"
30498                         "\x98\x9b\x9e\xa1\xa4\xa7\xaa\xad"
30499                         "\xb0\xb3\xb6\xb9\xbc\xbf\xc2\xc5"
30500                         "\xc8\xcb\xce\xd1\xd4\xd7\xda\xdd"
30501                         "\xe0\xe3\xe6\xe9\xec\xef\xf2\xf5"
30502                         "\xf8\xfb\xfe\x01\x04\x07\x0a\x0d"
30503                         "\x10\x13\x16\x19\x1c\x1f\x22\x25"
30504                         "\x28\x2b\x2e\x31\x34\x37\x3a\x3d"
30505                         "\x40\x43\x46\x49\x4c\x4f\x52\x55"
30506                         "\x58\x5b\x5e\x61\x64\x67\x6a\x6d"
30507                         "\x70\x73\x76\x79\x7c\x7f\x82\x85"
30508                         "\x88\x8b\x8e\x91\x94\x97\x9a\x9d"
30509                         "\xa0\xa3\xa6\xa9\xac\xaf\xb2\xb5"
30510                         "\xb8\xbb\xbe\xc1\xc4\xc7\xca\xcd"
30511                         "\xd0\xd3\xd6\xd9\xdc\xdf\xe2\xe5"
30512                         "\xe8\xeb\xee\xf1\xf4\xf7\xfa\xfd"
30513                         "\x00\x05\x0a\x0f\x14\x19\x1e\x23"
30514                         "\x28\x2d\x32\x37\x3c\x41\x46\x4b"
30515                         "\x50\x55\x5a\x5f\x64\x69\x6e\x73"
30516                         "\x78\x7d\x82\x87\x8c\x91\x96\x9b"
30517                         "\xa0\xa5\xaa\xaf\xb4\xb9\xbe\xc3"
30518                         "\xc8\xcd\xd2\xd7\xdc\xe1\xe6\xeb"
30519                         "\xf0\xf5\xfa\xff\x04\x09\x0e\x13"
30520                         "\x18\x1d\x22\x27\x2c\x31\x36\x3b"
30521                         "\x40\x45\x4a\x4f\x54\x59\x5e\x63"
30522                         "\x68\x6d\x72\x77\x7c\x81\x86\x8b"
30523                         "\x90\x95\x9a\x9f\xa4\xa9\xae\xb3"
30524                         "\xb8\xbd\xc2\xc7\xcc\xd1\xd6\xdb"
30525                         "\xe0\xe5\xea\xef\xf4\xf9\xfe\x03"
30526                         "\x08\x0d\x12\x17\x1c\x21\x26\x2b"
30527                         "\x30\x35\x3a\x3f\x44\x49\x4e\x53"
30528                         "\x58\x5d\x62\x67\x6c\x71\x76\x7b"
30529                         "\x80\x85\x8a\x8f\x94\x99\x9e\xa3"
30530                         "\xa8\xad\xb2\xb7\xbc\xc1\xc6\xcb"
30531                         "\xd0\xd5\xda\xdf\xe4\xe9\xee\xf3"
30532                         "\xf8\xfd\x02\x07\x0c\x11\x16\x1b"
30533                         "\x20\x25\x2a\x2f\x34\x39\x3e\x43"
30534                         "\x48\x4d\x52\x57\x5c\x61\x66\x6b"
30535                         "\x70\x75\x7a\x7f\x84\x89\x8e\x93"
30536                         "\x98\x9d\xa2\xa7\xac\xb1\xb6\xbb"
30537                         "\xc0\xc5\xca\xcf\xd4\xd9\xde\xe3"
30538                         "\xe8\xed\xf2\xf7\xfc\x01\x06\x0b"
30539                         "\x10\x15\x1a\x1f\x24\x29\x2e\x33"
30540                         "\x38\x3d\x42\x47\x4c\x51\x56\x5b"
30541                         "\x60\x65\x6a\x6f\x74\x79\x7e\x83"
30542                         "\x88\x8d\x92\x97\x9c\xa1\xa6\xab"
30543                         "\xb0\xb5\xba\xbf\xc4\xc9\xce\xd3"
30544                         "\xd8\xdd\xe2\xe7\xec\xf1\xf6\xfb"
30545                         "\x00\x07\x0e\x15\x1c\x23\x2a\x31"
30546                         "\x38\x3f\x46\x4d\x54\x5b\x62\x69"
30547                         "\x70\x77\x7e\x85\x8c\x93\x9a\xa1"
30548                         "\xa8\xaf\xb6\xbd\xc4\xcb\xd2\xd9"
30549                         "\xe0\xe7\xee\xf5\xfc\x03\x0a\x11"
30550                         "\x18\x1f\x26\x2d\x34\x3b\x42\x49"
30551                         "\x50\x57\x5e\x65\x6c\x73\x7a\x81"
30552                         "\x88\x8f\x96\x9d\xa4\xab\xb2\xb9"
30553                         "\xc0\xc7\xce\xd5\xdc\xe3\xea\xf1"
30554                         "\xf8\xff\x06\x0d\x14\x1b\x22\x29"
30555                         "\x30\x37\x3e\x45\x4c\x53\x5a\x61"
30556                         "\x68\x6f\x76\x7d\x84\x8b\x92\x99"
30557                         "\xa0\xa7\xae\xb5\xbc\xc3\xca\xd1"
30558                         "\xd8\xdf\xe6\xed\xf4\xfb\x02\x09"
30559                         "\x10\x17\x1e\x25\x2c\x33\x3a\x41"
30560                         "\x48\x4f\x56\x5d\x64\x6b\x72\x79"
30561                         "\x80\x87\x8e\x95\x9c\xa3\xaa\xb1"
30562                         "\xb8\xbf\xc6\xcd\xd4\xdb\xe2\xe9"
30563                         "\xf0\xf7\xfe\x05\x0c\x13\x1a\x21"
30564                         "\x28\x2f\x36\x3d\x44\x4b\x52\x59"
30565                         "\x60\x67\x6e\x75\x7c\x83\x8a\x91"
30566                         "\x98\x9f\xa6\xad\xb4\xbb\xc2\xc9"
30567                         "\xd0\xd7\xde\xe5\xec\xf3\xfa\x01"
30568                         "\x08\x0f\x16\x1d\x24\x2b\x32\x39"
30569                         "\x40\x47\x4e\x55\x5c\x63\x6a\x71"
30570                         "\x78\x7f\x86\x8d\x94\x9b\xa2\xa9"
30571                         "\xb0\xb7\xbe\xc5\xcc\xd3\xda\xe1"
30572                         "\xe8\xef\xf6\xfd\x04\x0b\x12\x19"
30573                         "\x20\x27\x2e\x35\x3c\x43\x4a\x51"
30574                         "\x58\x5f\x66\x6d\x74\x7b\x82\x89"
30575                         "\x90\x97\x9e\xa5\xac\xb3\xba\xc1"
30576                         "\xc8\xcf\xd6\xdd\xe4\xeb\xf2\xf9"
30577                         "\x00\x09\x12\x1b\x24\x2d\x36\x3f"
30578                         "\x48\x51\x5a\x63\x6c\x75\x7e\x87"
30579                         "\x90\x99\xa2\xab\xb4\xbd\xc6\xcf"
30580                         "\xd8\xe1\xea\xf3\xfc\x05\x0e\x17"
30581                         "\x20\x29\x32\x3b\x44\x4d\x56\x5f"
30582                         "\x68\x71\x7a\x83\x8c\x95\x9e\xa7"
30583                         "\xb0\xb9\xc2\xcb\xd4\xdd\xe6\xef"
30584                         "\xf8\x01\x0a\x13\x1c\x25\x2e\x37"
30585                         "\x40\x49\x52\x5b\x64\x6d\x76\x7f"
30586                         "\x88\x91\x9a\xa3\xac\xb5\xbe\xc7"
30587                         "\xd0\xd9\xe2\xeb\xf4\xfd\x06\x0f"
30588                         "\x18\x21\x2a\x33\x3c\x45\x4e\x57"
30589                         "\x60\x69\x72\x7b\x84\x8d\x96\x9f"
30590                         "\xa8\xb1\xba\xc3\xcc\xd5\xde\xe7"
30591                         "\xf0\xf9\x02\x0b\x14\x1d\x26\x2f"
30592                         "\x38\x41\x4a\x53\x5c\x65\x6e\x77"
30593                         "\x80\x89\x92\x9b\xa4\xad\xb6\xbf"
30594                         "\xc8\xd1\xda\xe3\xec\xf5\xfe\x07"
30595                         "\x10\x19\x22\x2b\x34\x3d\x46\x4f"
30596                         "\x58\x61\x6a\x73\x7c\x85\x8e\x97"
30597                         "\xa0\xa9\xb2\xbb\xc4\xcd\xd6\xdf"
30598                         "\xe8\xf1\xfa\x03\x0c\x15\x1e\x27"
30599                         "\x30\x39\x42\x4b\x54\x5d\x66\x6f"
30600                         "\x78\x81\x8a\x93\x9c\xa5\xae\xb7"
30601                         "\xc0\xc9\xd2\xdb\xe4\xed\xf6\xff"
30602                         "\x08\x11\x1a\x23\x2c\x35\x3e\x47"
30603                         "\x50\x59\x62\x6b\x74\x7d\x86\x8f"
30604                         "\x98\xa1\xaa\xb3\xbc\xc5\xce\xd7"
30605                         "\xe0\xe9\xf2\xfb\x04\x0d\x16\x1f"
30606                         "\x28\x31\x3a\x43\x4c\x55\x5e\x67"
30607                         "\x70\x79\x82\x8b\x94\x9d\xa6\xaf"
30608                         "\xb8\xc1\xca\xd3\xdc\xe5\xee\xf7"
30609                         "\x00\x0b\x16\x21\x2c\x37\x42\x4d"
30610                         "\x58\x63\x6e\x79\x84\x8f\x9a\xa5"
30611                         "\xb0\xbb\xc6\xd1\xdc\xe7\xf2\xfd"
30612                         "\x08\x13\x1e\x29\x34\x3f\x4a\x55"
30613                         "\x60\x6b\x76\x81\x8c\x97\xa2\xad"
30614                         "\xb8\xc3\xce\xd9\xe4\xef\xfa\x05"
30615                         "\x10\x1b\x26\x31\x3c\x47\x52\x5d"
30616                         "\x68\x73\x7e\x89\x94\x9f\xaa\xb5"
30617                         "\xc0\xcb\xd6\xe1\xec\xf7\x02\x0d"
30618                         "\x18\x23\x2e\x39\x44\x4f\x5a\x65"
30619                         "\x70\x7b\x86\x91\x9c\xa7\xb2\xbd"
30620                         "\xc8\xd3\xde\xe9\xf4\xff\x0a\x15"
30621                         "\x20\x2b\x36\x41\x4c\x57\x62\x6d"
30622                         "\x78\x83\x8e\x99\xa4\xaf\xba\xc5"
30623                         "\xd0\xdb\xe6\xf1\xfc\x07\x12\x1d"
30624                         "\x28\x33\x3e\x49\x54\x5f\x6a\x75"
30625                         "\x80\x8b\x96\xa1\xac\xb7\xc2\xcd"
30626                         "\xd8\xe3\xee\xf9\x04\x0f\x1a\x25"
30627                         "\x30\x3b\x46\x51\x5c\x67\x72\x7d"
30628                         "\x88\x93\x9e\xa9\xb4\xbf\xca\xd5"
30629                         "\xe0\xeb\xf6\x01\x0c\x17\x22\x2d"
30630                         "\x38\x43\x4e\x59\x64\x6f\x7a\x85"
30631                         "\x90\x9b\xa6\xb1\xbc\xc7\xd2\xdd"
30632                         "\xe8\xf3\xfe\x09\x14\x1f\x2a\x35"
30633                         "\x40\x4b\x56\x61\x6c\x77\x82\x8d"
30634                         "\x98\xa3\xae\xb9\xc4\xcf\xda\xe5"
30635                         "\xf0\xfb\x06\x11\x1c\x27\x32\x3d"
30636                         "\x48\x53\x5e\x69\x74\x7f\x8a\x95"
30637                         "\xa0\xab\xb6\xc1\xcc\xd7\xe2\xed"
30638                         "\xf8\x03\x0e\x19\x24\x2f\x3a\x45"
30639                         "\x50\x5b\x66\x71\x7c\x87\x92\x9d"
30640                         "\xa8\xb3\xbe\xc9\xd4\xdf\xea\xf5"
30641                         "\x00\x0d\x1a\x27\x34\x41\x4e\x5b"
30642                         "\x68\x75\x82\x8f\x9c\xa9\xb6\xc3"
30643                         "\xd0\xdd\xea\xf7\x04\x11\x1e\x2b"
30644                         "\x38\x45\x52\x5f\x6c\x79\x86\x93"
30645                         "\xa0\xad\xba\xc7\xd4\xe1\xee\xfb"
30646                         "\x08\x15\x22\x2f\x3c\x49\x56\x63"
30647                         "\x70\x7d\x8a\x97\xa4\xb1\xbe\xcb"
30648                         "\xd8\xe5\xf2\xff\x0c\x19\x26\x33"
30649                         "\x40\x4d\x5a\x67\x74\x81\x8e\x9b"
30650                         "\xa8\xb5\xc2\xcf\xdc\xe9\xf6\x03"
30651                         "\x10\x1d\x2a\x37\x44\x51\x5e\x6b"
30652                         "\x78\x85\x92\x9f\xac\xb9\xc6\xd3"
30653                         "\xe0\xed\xfa\x07\x14\x21\x2e\x3b"
30654                         "\x48\x55\x62\x6f\x7c\x89\x96\xa3"
30655                         "\xb0\xbd\xca\xd7\xe4\xf1\xfe\x0b"
30656                         "\x18\x25\x32\x3f\x4c\x59\x66\x73"
30657                         "\x80\x8d\x9a\xa7\xb4\xc1\xce\xdb"
30658                         "\xe8\xf5\x02\x0f\x1c\x29\x36\x43"
30659                         "\x50\x5d\x6a\x77\x84\x91\x9e\xab"
30660                         "\xb8\xc5\xd2\xdf\xec\xf9\x06\x13"
30661                         "\x20\x2d\x3a\x47\x54\x61\x6e\x7b"
30662                         "\x88\x95\xa2\xaf\xbc\xc9\xd6\xe3"
30663                         "\xf0\xfd\x0a\x17\x24\x31\x3e\x4b"
30664                         "\x58\x65\x72\x7f\x8c\x99\xa6\xb3"
30665                         "\xc0\xcd\xda\xe7\xf4\x01\x0e\x1b"
30666                         "\x28\x35\x42\x4f\x5c\x69\x76\x83"
30667                         "\x90\x9d\xaa\xb7\xc4\xd1\xde\xeb"
30668                         "\xf8\x05\x12\x1f\x2c\x39\x46\x53"
30669                         "\x60\x6d\x7a\x87\x94\xa1\xae\xbb"
30670                         "\xc8\xd5\xe2\xef\xfc\x09\x16\x23"
30671                         "\x30\x3d\x4a\x57\x64\x71\x7e\x8b"
30672                         "\x98\xa5\xb2\xbf\xcc\xd9\xe6\xf3"
30673                         "\x00\x0f\x1e\x2d\x3c\x4b\x5a\x69"
30674                         "\x78\x87\x96\xa5\xb4\xc3\xd2\xe1"
30675                         "\xf0\xff\x0e\x1d\x2c\x3b\x4a\x59"
30676                         "\x68\x77\x86\x95\xa4\xb3\xc2\xd1"
30677                         "\xe0\xef\xfe\x0d\x1c\x2b\x3a\x49"
30678                         "\x58\x67\x76\x85\x94\xa3\xb2\xc1"
30679                         "\xd0\xdf\xee\xfd\x0c\x1b\x2a\x39"
30680                         "\x48\x57\x66\x75\x84\x93\xa2\xb1"
30681                         "\xc0\xcf\xde\xed\xfc\x0b\x1a\x29"
30682                         "\x38\x47\x56\x65\x74\x83\x92\xa1"
30683                         "\xb0\xbf\xce\xdd\xec\xfb\x0a\x19"
30684                         "\x28\x37\x46\x55\x64\x73\x82\x91"
30685                         "\xa0\xaf\xbe\xcd\xdc\xeb\xfa\x09"
30686                         "\x18\x27\x36\x45\x54\x63\x72\x81"
30687                         "\x90\x9f\xae\xbd\xcc\xdb\xea\xf9"
30688                         "\x08\x17\x26\x35\x44\x53\x62\x71"
30689                         "\x80\x8f\x9e\xad\xbc\xcb\xda\xe9"
30690                         "\xf8\x07\x16\x25\x34\x43\x52\x61"
30691                         "\x70\x7f\x8e\x9d\xac\xbb\xca\xd9"
30692                         "\xe8\xf7\x06\x15\x24\x33\x42\x51"
30693                         "\x60\x6f\x7e\x8d\x9c\xab\xba\xc9"
30694                         "\xd8\xe7\xf6\x05\x14\x23\x32\x41"
30695                         "\x50\x5f\x6e\x7d\x8c\x9b\xaa\xb9"
30696                         "\xc8\xd7\xe6\xf5\x04\x13\x22\x31"
30697                         "\x40\x4f\x5e\x6d\x7c\x8b\x9a\xa9"
30698                         "\xb8\xc7\xd6\xe5\xf4\x03\x12\x21"
30699                         "\x30\x3f\x4e\x5d\x6c\x7b\x8a\x99"
30700                         "\xa8\xb7\xc6\xd5\xe4\xf3\x02\x11"
30701                         "\x20\x2f\x3e\x4d\x5c\x6b\x7a\x89"
30702                         "\x98\xa7\xb6\xc5\xd4\xe3\xf2\x01"
30703                         "\x10\x1f\x2e\x3d\x4c\x5b\x6a\x79"
30704                         "\x88\x97\xa6\xb5\xc4\xd3\xe2\xf1"
30705                         "\x00\x11\x22\x33\x44\x55\x66\x77"
30706                         "\x88\x99\xaa\xbb\xcc\xdd\xee\xff"
30707                         "\x10\x21\x32\x43\x54\x65\x76\x87"
30708                         "\x98\xa9\xba\xcb\xdc\xed\xfe\x0f"
30709                         "\x20\x31\x42\x53\x64\x75\x86\x97"
30710                         "\xa8\xb9\xca\xdb\xec\xfd\x0e\x1f"
30711                         "\x30\x41\x52\x63\x74\x85\x96\xa7"
30712                         "\xb8\xc9\xda\xeb\xfc\x0d\x1e\x2f"
30713                         "\x40\x51\x62\x73\x84\x95\xa6\xb7"
30714                         "\xc8\xd9\xea\xfb\x0c\x1d\x2e\x3f"
30715                         "\x50\x61\x72\x83\x94\xa5\xb6\xc7"
30716                         "\xd8\xe9\xfa\x0b\x1c\x2d\x3e\x4f"
30717                         "\x60\x71\x82\x93\xa4\xb5\xc6\xd7"
30718                         "\xe8\xf9\x0a\x1b\x2c\x3d\x4e\x5f"
30719                         "\x70\x81\x92\xa3\xb4\xc5\xd6\xe7"
30720                         "\xf8\x09\x1a\x2b\x3c\x4d\x5e\x6f"
30721                         "\x80\x91\xa2\xb3\xc4\xd5\xe6\xf7"
30722                         "\x08\x19\x2a\x3b\x4c\x5d\x6e\x7f"
30723                         "\x90\xa1\xb2\xc3\xd4\xe5\xf6\x07"
30724                         "\x18\x29\x3a\x4b\x5c\x6d\x7e\x8f"
30725                         "\xa0\xb1\xc2\xd3\xe4\xf5\x06\x17"
30726                         "\x28\x39\x4a\x5b\x6c\x7d\x8e\x9f"
30727                         "\xb0\xc1\xd2\xe3\xf4\x05\x16\x27"
30728                         "\x38\x49\x5a\x6b\x7c\x8d\x9e\xaf"
30729                         "\xc0\xd1\xe2\xf3\x04\x15\x26\x37"
30730                         "\x48\x59\x6a\x7b\x8c\x9d\xae\xbf"
30731                         "\xd0\xe1\xf2\x03\x14\x25\x36\x47"
30732                         "\x58\x69\x7a\x8b\x9c\xad\xbe\xcf"
30733                         "\xe0\xf1\x02\x13\x24\x35\x46\x57"
30734                         "\x68\x79\x8a\x9b\xac\xbd\xce\xdf"
30735                         "\xf0\x01\x12\x23\x34\x45\x56\x67"
30736                         "\x78\x89\x9a\xab\xbc\xcd\xde\xef"
30737                         "\x00\x13\x26\x39\x4c\x5f\x72\x85"
30738                         "\x98\xab\xbe\xd1\xe4\xf7\x0a\x1d"
30739                         "\x30\x43\x56\x69\x7c\x8f\xa2\xb5"
30740                         "\xc8\xdb\xee\x01\x14\x27\x3a\x4d"
30741                         "\x60\x73\x86\x99\xac\xbf\xd2\xe5"
30742                         "\xf8\x0b\x1e\x31\x44\x57\x6a\x7d"
30743                         "\x90\xa3\xb6\xc9\xdc\xef\x02\x15"
30744                         "\x28\x3b\x4e\x61\x74\x87\x9a\xad"
30745                         "\xc0\xd3\xe6\xf9\x0c\x1f\x32\x45"
30746                         "\x58\x6b\x7e\x91\xa4\xb7\xca\xdd"
30747                         "\xf0\x03\x16\x29\x3c\x4f\x62\x75"
30748                         "\x88\x9b\xae\xc1\xd4\xe7\xfa\x0d"
30749                         "\x20\x33\x46\x59\x6c\x7f\x92\xa5"
30750                         "\xb8\xcb\xde\xf1\x04\x17\x2a\x3d"
30751                         "\x50\x63\x76\x89\x9c\xaf\xc2\xd5"
30752                         "\xe8\xfb\x0e\x21\x34\x47\x5a\x6d"
30753                         "\x80\x93\xa6\xb9\xcc\xdf\xf2\x05"
30754                         "\x18\x2b\x3e\x51\x64\x77\x8a\x9d"
30755                         "\xb0\xc3\xd6\xe9\xfc\x0f\x22\x35"
30756                         "\x48\x5b\x6e\x81\x94\xa7\xba\xcd"
30757                         "\xe0\xf3\x06\x19\x2c\x3f\x52\x65"
30758                         "\x78\x8b\x9e\xb1\xc4\xd7\xea\xfd"
30759                         "\x10\x23\x36\x49\x5c\x6f\x82\x95"
30760                         "\xa8\xbb\xce\xe1\xf4\x07\x1a\x2d"
30761                         "\x40\x53\x66\x79\x8c\x9f\xb2\xc5"
30762                         "\xd8\xeb\xfe\x11\x24\x37\x4a\x5d"
30763                         "\x70\x83\x96\xa9\xbc\xcf\xe2\xf5"
30764                         "\x08\x1b\x2e\x41\x54\x67\x7a\x8d"
30765                         "\xa0\xb3\xc6\xd9\xec\xff\x12\x25"
30766                         "\x38\x4b\x5e\x71\x84\x97\xaa\xbd"
30767                         "\xd0\xe3\xf6\x09\x1c\x2f\x42\x55"
30768                         "\x68\x7b\x8e\xa1\xb4\xc7\xda\xed"
30769                         "\x00\x15\x2a\x3f\x54\x69\x7e\x93"
30770                         "\xa8\xbd\xd2\xe7\xfc\x11\x26\x3b"
30771                         "\x50\x65\x7a\x8f\xa4\xb9\xce\xe3"
30772                         "\xf8\x0d\x22\x37\x4c\x61\x76\x8b"
30773                         "\xa0\xb5\xca\xdf\xf4\x09\x1e\x33"
30774                         "\x48\x5d\x72\x87\x9c\xb1\xc6\xdb"
30775                         "\xf0\x05\x1a\x2f\x44\x59\x6e\x83"
30776                         "\x98\xad\xc2\xd7\xec\x01\x16\x2b"
30777                         "\x40\x55\x6a\x7f\x94\xa9\xbe\xd3"
30778                         "\xe8\xfd\x12\x27\x3c\x51\x66\x7b"
30779                         "\x90\xa5\xba\xcf\xe4\xf9\x0e\x23"
30780                         "\x38\x4d\x62\x77\x8c\xa1\xb6\xcb"
30781                         "\xe0\xf5\x0a\x1f\x34\x49\x5e\x73"
30782                         "\x88\x9d\xb2\xc7\xdc\xf1\x06\x1b"
30783                         "\x30\x45\x5a\x6f\x84\x99\xae\xc3"
30784                         "\xd8\xed\x02\x17\x2c\x41\x56\x6b"
30785                         "\x80\x95\xaa\xbf\xd4\xe9\xfe\x13"
30786                         "\x28\x3d\x52\x67\x7c\x91\xa6\xbb"
30787                         "\xd0\xe5\xfa\x0f\x24\x39\x4e\x63"
30788                         "\x78\x8d\xa2\xb7\xcc\xe1\xf6\x0b"
30789                         "\x20\x35\x4a\x5f\x74\x89\x9e\xb3"
30790                         "\xc8\xdd\xf2\x07\x1c\x31\x46\x5b"
30791                         "\x70\x85\x9a\xaf\xc4\xd9\xee\x03"
30792                         "\x18\x2d\x42\x57\x6c\x81\x96\xab"
30793                         "\xc0\xd5\xea\xff\x14\x29\x3e\x53"
30794                         "\x68\x7d\x92\xa7\xbc\xd1\xe6\xfb"
30795                         "\x10\x25\x3a\x4f\x64\x79\x8e\xa3"
30796                         "\xb8\xcd\xe2\xf7\x0c\x21\x36\x4b"
30797                         "\x60\x75\x8a\x9f\xb4\xc9\xde\xf3"
30798                         "\x08\x1d\x32\x47\x5c\x71\x86\x9b"
30799                         "\xb0\xc5\xda\xef\x04\x19\x2e\x43"
30800                         "\x58\x6d\x82\x97\xac\xc1\xd6\xeb"
30801                         "\x00\x17\x2e\x45\x5c\x73\x8a\xa1"
30802                         "\xb8\xcf\xe6\xfd\x14\x2b\x42\x59"
30803                         "\x70\x87\x9e\xb5\xcc\xe3\xfa\x11"
30804                         "\x28\x3f\x56\x6d\x84\x9b\xb2\xc9"
30805                         "\xe0\xf7\x0e\x25\x3c\x53\x6a\x81"
30806                         "\x98\xaf\xc6\xdd\xf4\x0b\x22\x39"
30807                         "\x50\x67\x7e\x95\xac\xc3\xda\xf1"
30808                         "\x08\x1f\x36\x4d\x64\x7b\x92\xa9"
30809                         "\xc0\xd7\xee\x05\x1c\x33\x4a\x61"
30810                         "\x78\x8f\xa6\xbd\xd4\xeb\x02\x19"
30811                         "\x30\x47\x5e\x75\x8c\xa3\xba\xd1"
30812                         "\xe8\xff\x16\x2d\x44\x5b\x72\x89"
30813                         "\xa0\xb7\xce\xe5\xfc\x13\x2a\x41"
30814                         "\x58\x6f\x86\x9d\xb4\xcb\xe2\xf9"
30815                         "\x10\x27\x3e\x55\x6c\x83\x9a\xb1"
30816                         "\xc8\xdf\xf6\x0d\x24\x3b\x52\x69"
30817                         "\x80\x97\xae\xc5\xdc\xf3\x0a\x21"
30818                         "\x38\x4f\x66\x7d\x94\xab\xc2\xd9"
30819                         "\xf0\x07\x1e\x35\x4c\x63\x7a\x91"
30820                         "\xa8\xbf\xd6\xed\x04\x1b\x32\x49"
30821                         "\x60\x77\x8e\xa5\xbc\xd3\xea\x01"
30822                         "\x18\x2f\x46\x5d\x74\x8b\xa2\xb9"
30823                         "\xd0\xe7\xfe\x15\x2c\x43\x5a\x71"
30824                         "\x88\x9f\xb6\xcd\xe4\xfb\x12\x29"
30825                         "\x40\x57\x6e\x85\x9c\xb3\xca\xe1"
30826                         "\xf8\x0f\x26\x3d\x54\x6b\x82\x99"
30827                         "\xb0\xc7\xde\xf5\x0c\x23\x3a\x51"
30828                         "\x68\x7f\x96\xad\xc4\xdb\xf2\x09"
30829                         "\x20\x37\x4e\x65\x7c\x93\xaa\xc1"
30830                         "\xd8\xef\x06\x1d\x34\x4b\x62\x79"
30831                         "\x90\xa7\xbe\xd5\xec\x03\x1a\x31"
30832                         "\x48\x5f\x76\x8d\xa4\xbb\xd2\xe9"
30833                         "\x00\x19\x32\x4b\x64\x7d\x96\xaf"
30834                         "\xc8\xe1\xfa\x13\x2c\x45\x5e\x77"
30835                         "\x90\xa9\xc2\xdb\xf4\x0d\x26\x3f"
30836                         "\x58\x71\x8a\xa3\xbc\xd5\xee\x07"
30837                         "\x20\x39\x52\x6b\x84\x9d\xb6\xcf"
30838                         "\xe8\x01\x1a\x33\x4c\x65\x7e\x97"
30839                         "\xb0\xc9\xe2\xfb\x14\x2d\x46\x5f"
30840                         "\x78\x91\xaa\xc3\xdc\xf5\x0e\x27"
30841                         "\x40\x59\x72\x8b\xa4\xbd\xd6\xef"
30842                         "\x08\x21\x3a\x53\x6c\x85\x9e\xb7"
30843                         "\xd0\xe9\x02\x1b\x34\x4d\x66\x7f"
30844                         "\x98\xb1\xca\xe3\xfc\x15\x2e\x47"
30845                         "\x60\x79\x92\xab\xc4\xdd\xf6\x0f"
30846                         "\x28\x41\x5a\x73\x8c\xa5\xbe\xd7"
30847                         "\xf0\x09\x22\x3b\x54\x6d\x86\x9f"
30848                         "\xb8\xd1\xea\x03\x1c\x35\x4e\x67"
30849                         "\x80\x99\xb2\xcb\xe4\xfd\x16\x2f"
30850                         "\x48\x61\x7a\x93\xac\xc5\xde\xf7"
30851                         "\x10\x29\x42\x5b\x74\x8d\xa6\xbf"
30852                         "\xd8\xf1\x0a\x23\x3c\x55\x6e\x87"
30853                         "\xa0\xb9\xd2\xeb\x04\x1d\x36\x4f"
30854                         "\x68\x81\x9a\xb3\xcc\xe5\xfe\x17"
30855                         "\x30\x49\x62\x7b\x94\xad\xc6\xdf"
30856                         "\xf8\x11\x2a\x43\x5c\x75\x8e\xa7"
30857                         "\xc0\xd9\xf2\x0b\x24\x3d\x56\x6f"
30858                         "\x88\xa1\xba\xd3\xec\x05\x1e\x37"
30859                         "\x50\x69\x82\x9b\xb4\xcd\xe6\xff"
30860                         "\x18\x31\x4a\x63\x7c\x95\xae\xc7"
30861                         "\xe0\xf9\x12\x2b\x44\x5d\x76\x8f"
30862                         "\xa8\xc1\xda\xf3\x0c\x25\x3e\x57"
30863                         "\x70\x89\xa2\xbb\xd4\xed\x06\x1f"
30864                         "\x38\x51\x6a\x83\x9c\xb5\xce\xe7"
30865                         "\x00\x1b\x36\x51\x6c\x87\xa2\xbd"
30866                         "\xd8\xf3\x0e\x29\x44\x5f\x7a\x95"
30867                         "\xb0\xcb\xe6\x01\x1c\x37\x52\x6d"
30868                         "\x88\xa3\xbe\xd9\xf4\x0f\x2a\x45"
30869                         "\x60\x7b\x96\xb1\xcc\xe7\x02\x1d"
30870                         "\x38\x53\x6e\x89\xa4\xbf\xda\xf5"
30871                         "\x10\x2b\x46\x61\x7c\x97\xb2\xcd"
30872                         "\xe8\x03\x1e\x39\x54\x6f\x8a\xa5"
30873                         "\xc0\xdb\xf6\x11\x2c\x47\x62\x7d"
30874                         "\x98\xb3\xce\xe9\x04\x1f\x3a\x55"
30875                         "\x70\x8b\xa6\xc1\xdc\xf7\x12\x2d"
30876                         "\x48\x63\x7e\x99\xb4\xcf\xea\x05"
30877                         "\x20\x3b\x56\x71\x8c\xa7\xc2\xdd"
30878                         "\xf8\x13\x2e\x49\x64\x7f\x9a\xb5"
30879                         "\xd0\xeb\x06\x21\x3c\x57\x72\x8d"
30880                         "\xa8\xc3\xde\xf9\x14\x2f\x4a\x65"
30881                         "\x80\x9b\xb6\xd1\xec\x07\x22\x3d"
30882                         "\x58\x73\x8e\xa9\xc4\xdf\xfa\x15"
30883                         "\x30\x4b\x66\x81\x9c\xb7\xd2\xed"
30884                         "\x08\x23\x3e\x59\x74\x8f\xaa\xc5"
30885                         "\xe0\xfb\x16\x31\x4c\x67\x82\x9d"
30886                         "\xb8\xd3\xee\x09\x24\x3f\x5a\x75"
30887                         "\x90\xab\xc6\xe1\xfc\x17\x32\x4d"
30888                         "\x68\x83\x9e\xb9\xd4\xef\x0a\x25"
30889                         "\x40\x5b\x76\x91\xac\xc7\xe2\xfd"
30890                         "\x18\x33\x4e\x69\x84\x9f\xba\xd5"
30891                         "\xf0\x0b\x26\x41\x5c\x77\x92\xad"
30892                         "\xc8\xe3\xfe\x19\x34\x4f\x6a\x85"
30893                         "\xa0\xbb\xd6\xf1\x0c\x27\x42\x5d"
30894                         "\x78\x93\xae\xc9\xe4\xff\x1a\x35"
30895                         "\x50\x6b\x86\xa1\xbc\xd7\xf2\x0d"
30896                         "\x28\x43\x5e\x79\x94\xaf\xca\xe5"
30897                         "\x00\x1d\x3a\x57\x74\x91\xae\xcb"
30898                         "\xe8\x05\x22\x3f\x5c\x79\x96\xb3"
30899                         "\xd0\xed\x0a\x27\x44\x61\x7e\x9b"
30900                         "\xb8\xd5\xf2\x0f\x2c\x49\x66\x83"
30901                         "\xa0\xbd\xda\xf7\x14\x31\x4e\x6b"
30902                         "\x88\xa5\xc2\xdf\xfc\x19\x36\x53"
30903                         "\x70\x8d\xaa\xc7\xe4\x01\x1e\x3b"
30904                         "\x58\x75\x92\xaf\xcc\xe9\x06\x23"
30905                         "\x40\x5d\x7a\x97\xb4\xd1\xee\x0b"
30906                         "\x28\x45\x62\x7f\x9c\xb9\xd6\xf3"
30907                         "\x10\x2d\x4a\x67\x84\xa1\xbe\xdb"
30908                         "\xf8\x15\x32\x4f\x6c\x89\xa6\xc3"
30909                         "\xe0\xfd\x1a\x37\x54\x71\x8e\xab"
30910                         "\xc8\xe5\x02\x1f\x3c\x59\x76\x93"
30911                         "\xb0\xcd\xea\x07\x24\x41\x5e\x7b"
30912                         "\x98\xb5\xd2\xef\x0c\x29\x46\x63"
30913                         "\x80\x9d\xba\xd7\xf4\x11\x2e\x4b"
30914                         "\x68\x85\xa2\xbf\xdc\xf9\x16\x33"
30915                         "\x50\x6d\x8a\xa7\xc4\xe1\xfe\x1b"
30916                         "\x38\x55\x72\x8f\xac\xc9\xe6\x03"
30917                         "\x20\x3d\x5a\x77\x94\xb1\xce\xeb"
30918                         "\x08\x25\x42\x5f\x7c\x99\xb6\xd3"
30919                         "\xf0\x0d\x2a\x47\x64\x81\x9e\xbb"
30920                         "\xd8\xf5\x12\x2f\x4c\x69\x86\xa3"
30921                         "\xc0\xdd\xfa\x17\x34\x51\x6e\x8b"
30922                         "\xa8\xc5\xe2\xff\x1c\x39\x56\x73"
30923                         "\x90\xad\xca\xe7\x04\x21\x3e\x5b"
30924                         "\x78\x95\xb2\xcf\xec\x09\x26\x43"
30925                         "\x60\x7d\x9a\xb7\xd4\xf1\x0e\x2b"
30926                         "\x48\x65\x82\x9f\xbc\xd9\xf6\x13"
30927                         "\x30\x4d\x6a\x87\xa4\xc1\xde\xfb"
30928                         "\x18\x35\x52\x6f\x8c\xa9\xc6\xe3"
30929                         "\x00\x1f\x3e\x5d\x7c\x9b\xba\xd9"
30930                         "\xf8\x17\x36\x55\x74\x93\xb2\xd1"
30931                         "\xf0\x0f\x2e\x4d\x6c\x8b\xaa\xc9"
30932                         "\xe8\x07\x26\x45\x64\x83\xa2\xc1"
30933                         "\xe0\xff\x1e\x3d\x5c\x7b\x9a\xb9"
30934                         "\xd8\xf7\x16\x35\x54\x73\x92\xb1"
30935                         "\xd0\xef\x0e\x2d\x4c\x6b\x8a\xa9"
30936                         "\xc8\xe7\x06\x25\x44\x63\x82\xa1"
30937                         "\xc0\xdf\xfe\x1d\x3c\x5b\x7a\x99"
30938                         "\xb8\xd7\xf6\x15\x34\x53\x72\x91"
30939                         "\xb0\xcf\xee\x0d\x2c\x4b\x6a\x89"
30940                         "\xa8\xc7\xe6\x05\x24\x43\x62\x81"
30941                         "\xa0\xbf\xde\xfd\x1c\x3b\x5a\x79"
30942                         "\x98\xb7\xd6\xf5\x14\x33\x52\x71"
30943                         "\x90\xaf\xce\xed\x0c\x2b\x4a\x69"
30944                         "\x88\xa7\xc6\xe5\x04\x23\x42\x61"
30945                         "\x80\x9f\xbe\xdd\xfc\x1b\x3a\x59"
30946                         "\x78\x97\xb6\xd5\xf4\x13\x32\x51"
30947                         "\x70\x8f\xae\xcd\xec\x0b\x2a\x49"
30948                         "\x68\x87\xa6\xc5\xe4\x03\x22\x41"
30949                         "\x60\x7f\x9e\xbd\xdc\xfb\x1a\x39"
30950                         "\x58\x77\x96\xb5\xd4\xf3\x12\x31"
30951                         "\x50\x6f\x8e\xad\xcc\xeb\x0a\x29"
30952                         "\x48\x67\x86\xa5\xc4\xe3\x02\x21"
30953                         "\x40\x5f\x7e\x9d\xbc\xdb\xfa\x19"
30954                         "\x38\x57\x76\x95\xb4\xd3\xf2\x11"
30955                         "\x30\x4f\x6e\x8d\xac\xcb\xea\x09"
30956                         "\x28\x47\x66\x85\xa4\xc3\xe2\x01"
30957                         "\x20\x3f\x5e\x7d\x9c\xbb\xda\xf9"
30958                         "\x18\x37\x56\x75\x94\xb3\xd2\xf1"
30959                         "\x10\x2f\x4e\x6d\x8c\xab\xca\xe9"
30960                         "\x08\x27\x46\x65\x84\xa3\xc2\xe1"
30961                         "\x00\x21\x42\x63",
30962                 .ilen = 4100,
30963                 .result =
30964                         "\xb5\x81\xf5\x64\x18\x73\xe3\xf0"
30965                         "\x4c\x13\xf2\x77\x18\x60\x65\x5e"
30966                         "\x29\x01\xce\x98\x55\x53\xf9\x0c"
30967                         "\x2a\x08\xd5\x09\xb3\x57\x55\x56"
30968                         "\xc5\xe9\x56\x90\xcb\x6a\xa3\xc0"
30969                         "\xff\xc4\x79\xb4\xd2\x97\x5d\xc4"
30970                         "\x43\xd1\xfe\x94\x7b\x88\x06\x5a"
30971                         "\xb2\x9e\x2c\xfc\x44\x03\xb7\x90"
30972                         "\xa0\xc1\xba\x6a\x33\xb8\xc7\xb2"
30973                         "\x9d\xe1\x12\x4f\xc0\x64\xd4\x01"
30974                         "\xfe\x8c\x7a\x66\xf7\xe6\x5a\x91"
30975                         "\xbb\xde\x56\x86\xab\x65\x21\x30"
30976                         "\x00\x84\x65\x24\xa5\x7d\x85\xb4"
30977                         "\xe3\x17\xed\x3a\xb7\x6f\xb4\x0b"
30978                         "\x0b\xaf\x15\xae\x5a\x8f\xf2\x0c"
30979                         "\x2f\x27\xf4\x09\xd8\xd2\x96\xb7"
30980                         "\x71\xf2\xc5\x99\x4d\x7e\x7f\x75"
30981                         "\x77\x89\x30\x8b\x59\xdb\xa2\xb2"
30982                         "\xa0\xf3\x19\x39\x2b\xc5\x7e\x3f"
30983                         "\x4f\xd9\xd3\x56\x28\x97\x44\xdc"
30984                         "\xc0\x8b\x77\x24\xd9\x52\xe7\xc5"
30985                         "\xaf\xf6\x7d\x59\xb2\x44\x05\x1d"
30986                         "\xb1\xb0\x11\xa5\x0f\xec\x33\xe1"
30987                         "\x6d\x1b\x4e\x1f\xff\x57\x91\xb4"
30988                         "\x5b\x9a\x96\xc5\x53\xbc\xae\x20"
30989                         "\x3c\xbb\x14\xe2\xe8\x22\x33\xc1"
30990                         "\x5e\x76\x9e\x46\x99\xf6\x2a\x15"
30991                         "\xc6\x97\x02\xa0\x66\x43\xd1\xa6"
30992                         "\x31\xa6\x9f\xfb\xf4\xd3\x69\xe5"
30993                         "\xcd\x76\x95\xb8\x7a\x82\x7f\x21"
30994                         "\x45\xff\x3f\xce\x55\xf6\x95\x10"
30995                         "\x08\x77\x10\x43\xc6\xf3\x09\xe5"
30996                         "\x68\xe7\x3c\xad\x00\x52\x45\x0d"
30997                         "\xfe\x2d\xc6\xc2\x94\x8c\x12\x1d"
30998                         "\xe6\x25\xae\x98\x12\x8e\x19\x9c"
30999                         "\x81\x68\xb1\x11\xf6\x69\xda\xe3"
31000                         "\x62\x08\x18\x7a\x25\x49\x28\xac"
31001                         "\xba\x71\x12\x0b\xe4\xa2\xe5\xc7"
31002                         "\x5d\x8e\xec\x49\x40\x21\xbf\x5a"
31003                         "\x98\xf3\x02\x68\x55\x03\x7f\x8a"
31004                         "\xe5\x94\x0c\x32\x5c\x07\x82\x63"
31005                         "\xaf\x6f\x91\x40\x84\x8e\x52\x25"
31006                         "\xd0\xb0\x29\x53\x05\xe2\x50\x7a"
31007                         "\x34\xeb\xc9\x46\x20\xa8\x3d\xde"
31008                         "\x7f\x16\x5f\x36\xc5\x2e\xdc\xd1"
31009                         "\x15\x47\xc7\x50\x40\x6d\x91\xc5"
31010                         "\xe7\x93\x95\x1a\xd3\x57\xbc\x52"
31011                         "\x33\xee\x14\x19\x22\x52\x89\xa7"
31012                         "\x4a\x25\x56\x77\x4b\xca\xcf\x0a"
31013                         "\xe1\xf5\x35\x85\x30\x7e\x59\x4a"
31014                         "\xbd\x14\x5b\xdf\xe3\x46\xcb\xac"
31015                         "\x1f\x6c\x96\x0e\xf4\x81\xd1\x99"
31016                         "\xca\x88\x63\x3d\x02\x58\x6b\xa9"
31017                         "\xe5\x9f\xb3\x00\xb2\x54\xc6\x74"
31018                         "\x1c\xbf\x46\xab\x97\xcc\xf8\x54"
31019                         "\x04\x07\x08\x52\xe6\xc0\xda\x93"
31020                         "\x74\x7d\x93\x99\x5d\x78\x68\xa6"
31021                         "\x2e\x6b\xd3\x6a\x69\xcc\x12\x6b"
31022                         "\xd4\xc7\xa5\xc6\xe7\xf6\x03\x04"
31023                         "\x5d\xcd\x61\x5e\x17\x40\xdc\xd1"
31024                         "\x5c\xf5\x08\xdf\x5c\x90\x85\xa4"
31025                         "\xaf\xf6\x78\xbb\x0d\xf1\xf4\xa4"
31026                         "\x54\x26\x72\x9e\x61\xfa\x86\xcf"
31027                         "\xe8\x9e\xa1\xe0\xc7\x48\x23\xae"
31028                         "\x5a\x90\xae\x75\x0a\x74\x18\x89"
31029                         "\x05\xb1\x92\xb2\x7f\xd0\x1b\xa6"
31030                         "\x62\x07\x25\x01\xc7\xc2\x4f\xf9"
31031                         "\xe8\xfe\x63\x95\x80\x07\xb4\x26"
31032                         "\xcc\xd1\x26\xb6\xc4\x3f\x9e\xcb"
31033                         "\x8e\x3b\x2e\x44\x16\xd3\x10\x9a"
31034                         "\x95\x08\xeb\xc8\xcb\xeb\xbf\x6f"
31035                         "\x0b\xcd\x1f\xc8\xca\x86\xaa\xec"
31036                         "\x33\xe6\x69\xf4\x45\x25\x86\x3a"
31037                         "\x22\x94\x4f\x00\x23\x6a\x44\xc2"
31038                         "\x49\x97\x33\xab\x36\x14\x0a\x70"
31039                         "\x24\xc3\xbe\x04\x3b\x79\xa0\xf9"
31040                         "\xb8\xe7\x76\x29\x22\x83\xd7\xf2"
31041                         "\x94\xf4\x41\x49\xba\x5f\x7b\x07"
31042                         "\xb5\xfb\xdb\x03\x1a\x9f\xb6\x4c"
31043                         "\xc2\x2e\x37\x40\x49\xc3\x38\x16"
31044                         "\xe2\x4f\x77\x82\xb0\x68\x4c\x71"
31045                         "\x1d\x57\x61\x9c\xd9\x4e\x54\x99"
31046                         "\x47\x13\x28\x73\x3c\xbb\x00\x90"
31047                         "\xf3\x4d\xc9\x0e\xfd\xe7\xb1\x71"
31048                         "\xd3\x15\x79\xbf\xcc\x26\x2f\xbd"
31049                         "\xad\x6c\x50\x69\x6c\x3e\x6d\x80"
31050                         "\x9a\xea\x78\xaf\x19\xb2\x0d\x4d"
31051                         "\xad\x04\x07\xae\x22\x90\x4a\x93"
31052                         "\x32\x0e\x36\x9b\x1b\x46\xba\x3b"
31053                         "\xb4\xac\xc6\xd1\xa2\x31\x53\x3b"
31054                         "\x2a\x3d\x45\xfe\x03\x61\x10\x85"
31055                         "\x17\x69\xa6\x78\xcc\x6c\x87\x49"
31056                         "\x53\xf9\x80\x10\xde\x80\xa2\x41"
31057                         "\x6a\xc3\x32\x02\xad\x6d\x3c\x56"
31058                         "\x00\x71\x51\x06\xa7\xbd\xfb\xef"
31059                         "\x3c\xb5\x9f\xfc\x48\x7d\x53\x7c"
31060                         "\x66\xb0\x49\x23\xc4\x47\x10\x0e"
31061                         "\xe5\x6c\x74\x13\xe6\xc5\x3f\xaa"
31062                         "\xde\xff\x07\x44\xdd\x56\x1b\xad"
31063                         "\x09\x77\xfb\x5b\x12\xb8\x0d\x38"
31064                         "\x17\x37\x35\x7b\x9b\xbc\xfe\xd4"
31065                         "\x7e\x8b\xda\x7e\x5b\x04\xa7\x22"
31066                         "\xa7\x31\xa1\x20\x86\xc7\x1b\x99"
31067                         "\xdb\xd1\x89\xf4\x94\xa3\x53\x69"
31068                         "\x8d\xe7\xe8\x74\x11\x8d\x74\xd6"
31069                         "\x07\x37\x91\x9f\xfd\x67\x50\x3a"
31070                         "\xc9\xe1\xf4\x36\xd5\xa0\x47\xd1"
31071                         "\xf9\xe5\x39\xa3\x31\xac\x07\x36"
31072                         "\x23\xf8\x66\x18\x14\x28\x34\x0f"
31073                         "\xb8\xd0\xe7\x29\xb3\x04\x4b\x55"
31074                         "\x01\x41\xb2\x75\x8d\xcb\x96\x85"
31075                         "\x3a\xfb\xab\x2b\x9e\xfa\x58\x20"
31076                         "\x44\x1f\xc0\x14\x22\x75\x61\xe8"
31077                         "\xaa\x19\xcf\xf1\x82\x56\xf4\xd7"
31078                         "\x78\x7b\x3d\x5f\xb3\x9e\x0b\x8a"
31079                         "\x57\x50\xdb\x17\x41\x65\x4d\xa3"
31080                         "\x02\xc9\x9c\x9c\x53\xfb\x39\x39"
31081                         "\x9b\x1d\x72\x24\xda\xb7\x39\xbe"
31082                         "\x13\x3b\xfa\x29\xda\x9e\x54\x64"
31083                         "\x6e\xba\xd8\xa1\xcb\xb3\x36\xfa"
31084                         "\xcb\x47\x85\xe9\x61\x38\xbc\xbe"
31085                         "\xc5\x00\x38\x2a\x54\xf7\xc4\xb9"
31086                         "\xb3\xd3\x7b\xa0\xa0\xf8\x72\x7f"
31087                         "\x8c\x8e\x82\x0e\xc6\x1c\x75\x9d"
31088                         "\xca\x8e\x61\x87\xde\xad\x80\xd2"
31089                         "\xf5\xf9\x80\xef\x15\x75\xaf\xf5"
31090                         "\x80\xfb\xff\x6d\x1e\x25\xb7\x40"
31091                         "\x61\x6a\x39\x5a\x6a\xb5\x31\xab"
31092                         "\x97\x8a\x19\x89\x44\x40\xc0\xa6"
31093                         "\xb4\x4e\x30\x32\x7b\x13\xe7\x67"
31094                         "\xa9\x8b\x57\x04\xc2\x01\xa6\xf4"
31095                         "\x28\x99\xad\x2c\x76\xa3\x78\xc2"
31096                         "\x4a\xe6\xca\x5c\x50\x6a\xc1\xb0"
31097                         "\x62\x4b\x10\x8e\x7c\x17\x43\xb3"
31098                         "\x17\x66\x1c\x3e\x8d\x69\xf0\x5a"
31099                         "\x71\xf5\x97\xdc\xd1\x45\xdd\x28"
31100                         "\xf3\x5d\xdf\x53\x7b\x11\xe5\xbc"
31101                         "\x4c\xdb\x1b\x51\x6b\xe9\xfb\x3d"
31102                         "\xc1\xc3\x2c\xb9\x71\xf5\xb6\xb2"
31103                         "\x13\x36\x79\x80\x53\xe8\xd3\xa6"
31104                         "\x0a\xaf\xfd\x56\x97\xf7\x40\x8e"
31105                         "\x45\xce\xf8\xb0\x9e\x5c\x33\x82"
31106                         "\xb0\x44\x56\xfc\x05\x09\xe9\x2a"
31107                         "\xac\x26\x80\x14\x1d\xc8\x3a\x35"
31108                         "\x4c\x82\x97\xfd\x76\xb7\xa9\x0a"
31109                         "\x35\x58\x79\x8e\x0f\x66\xea\xaf"
31110                         "\x51\x6c\x09\xa9\x6e\x9b\xcb\x9a"
31111                         "\x31\x47\xa0\x2f\x7c\x71\xb4\x4a"
31112                         "\x11\xaa\x8c\x66\xc5\x64\xe6\x3a"
31113                         "\x54\xda\x24\x6a\xc4\x41\x65\x46"
31114                         "\x82\xa0\x0a\x0f\x5f\xfb\x25\xd0"
31115                         "\x2c\x91\xa7\xee\xc4\x81\x07\x86"
31116                         "\x75\x5e\x33\x69\x97\xe4\x2c\xa8"
31117                         "\x9d\x9f\x0b\x6a\xbe\xad\x98\xda"
31118                         "\x6d\x94\x41\xda\x2c\x1e\x89\xc4"
31119                         "\xc2\xaf\x1e\x00\x05\x0b\x83\x60"
31120                         "\xbd\x43\xea\x15\x23\x7f\xb9\xac"
31121                         "\xee\x4f\x2c\xaf\x2a\xf3\xdf\xd0"
31122                         "\xf3\x19\x31\xbb\x4a\x74\x84\x17"
31123                         "\x52\x32\x2c\x7d\x61\xe4\xcb\xeb"
31124                         "\x80\x38\x15\x52\xcb\x6f\xea\xe5"
31125                         "\x73\x9c\xd9\x24\x69\xc6\x95\x32"
31126                         "\x21\xc8\x11\xe4\xdc\x36\xd7\x93"
31127                         "\x38\x66\xfb\xb2\x7f\x3a\xb9\xaf"
31128                         "\x31\xdd\x93\x75\x78\x8a\x2c\x94"
31129                         "\x87\x1a\x58\xec\x9e\x7d\x4d\xba"
31130                         "\xe1\xe5\x4d\xfc\xbc\xa4\x2a\x14"
31131                         "\xef\xcc\xa7\xec\xab\x43\x09\x18"
31132                         "\xd3\xab\x68\xd1\x07\x99\x44\x47"
31133                         "\xd6\x83\x85\x3b\x30\xea\xa9\x6b"
31134                         "\x63\xea\xc4\x07\xfb\x43\x2f\xa4"
31135                         "\xaa\xb0\xab\x03\x89\xce\x3f\x8c"
31136                         "\x02\x7c\x86\x54\xbc\x88\xaf\x75"
31137                         "\xd2\xdc\x63\x17\xd3\x26\xf6\x96"
31138                         "\xa9\x3c\xf1\x61\x8c\x11\x18\xcc"
31139                         "\xd6\xea\x5b\xe2\xcd\xf0\xf1\xb2"
31140                         "\xe5\x35\x90\x1f\x85\x4c\x76\x5b"
31141                         "\x66\xce\x44\xa4\x32\x9f\xe6\x7b"
31142                         "\x71\x6e\x9f\x58\x15\x67\x72\x87"
31143                         "\x64\x8e\x3a\x44\x45\xd4\x76\xfa"
31144                         "\xc2\xf6\xef\x85\x05\x18\x7a\x9b"
31145                         "\xba\x41\x54\xac\xf0\xfc\x59\x12"
31146                         "\x3f\xdf\xa0\xe5\x8a\x65\xfd\x3a"
31147                         "\x62\x8d\x83\x2c\x03\xbe\x05\x76"
31148                         "\x2e\x53\x49\x97\x94\x33\xae\x40"
31149                         "\x81\x15\xdb\x6e\xad\xaa\xf5\x4b"
31150                         "\xe3\x98\x70\xdf\xe0\x7c\xcd\xdb"
31151                         "\x02\xd4\x7d\x2f\xc1\xe6\xb4\xf3"
31152                         "\xd7\x0d\x7a\xd9\x23\x9e\x87\x2d"
31153                         "\xce\x87\xad\xcc\x72\x05\x00\x29"
31154                         "\xdc\x73\x7f\x64\xc1\x15\x0e\xc2"
31155                         "\xdf\xa7\x5f\xeb\x41\xa1\xcd\xef"
31156                         "\x5c\x50\x79\x2a\x56\x56\x71\x8c"
31157                         "\xac\xc0\x79\x50\x69\xca\x59\x32"
31158                         "\x65\xf2\x54\xe4\x52\x38\x76\xd1"
31159                         "\x5e\xde\x26\x9e\xfb\x75\x2e\x11"
31160                         "\xb5\x10\xf4\x17\x73\xf5\x89\xc7"
31161                         "\x4f\x43\x5c\x8e\x7c\xb9\x05\x52"
31162                         "\x24\x40\x99\xfe\x9b\x85\x0b\x6c"
31163                         "\x22\x3e\x8b\xae\x86\xa1\xd2\x79"
31164                         "\x05\x68\x6b\xab\xe3\x41\x49\xed"
31165                         "\x15\xa1\x8d\x40\x2d\x61\xdf\x1a"
31166                         "\x59\xc9\x26\x8b\xef\x30\x4c\x88"
31167                         "\x4b\x10\xf8\x8d\xa6\x92\x9f\x4b"
31168                         "\xf3\xc4\x53\x0b\x89\x5d\x28\x92"
31169                         "\xcf\x78\xb2\xc0\x5d\xed\x7e\xfc"
31170                         "\xc0\x12\x23\x5f\x5a\x78\x86\x43"
31171                         "\x6e\x27\xf7\x5a\xa7\x6a\xed\x19"
31172                         "\x04\xf0\xb3\x12\xd1\xbd\x0e\x89"
31173                         "\x6e\xbc\x96\xa8\xd8\x49\x39\x9f"
31174                         "\x7e\x67\xf0\x2e\x3e\x01\xa9\xba"
31175                         "\xec\x8b\x62\x8e\xcb\x4a\x70\x43"
31176                         "\xc7\xc2\xc4\xca\x82\x03\x73\xe9"
31177                         "\x11\xdf\xcf\x54\xea\xc9\xb0\x95"
31178                         "\x51\xc0\x13\x3d\x92\x05\xfa\xf4"
31179                         "\xa9\x34\xc8\xce\x6c\x3d\x54\xcc"
31180                         "\xc4\xaf\xf1\xdc\x11\x44\x26\xa2"
31181                         "\xaf\xf1\x85\x75\x7d\x03\x61\x68"
31182                         "\x4e\x78\xc6\x92\x7d\x86\x7d\x77"
31183                         "\xdc\x71\x72\xdb\xc6\xae\xa1\xcb"
31184                         "\x70\x9a\x0b\x19\xbe\x4a\x6c\x2a"
31185                         "\xe2\xba\x6c\x64\x9a\x13\x28\xdf"
31186                         "\x85\x75\xe6\x43\xf6\x87\x08\x68"
31187                         "\x6e\xba\x6e\x79\x9f\x04\xbc\x23"
31188                         "\x50\xf6\x33\x5c\x1f\x24\x25\xbe"
31189                         "\x33\x47\x80\x45\x56\xa3\xa7\xd7"
31190                         "\x7a\xb1\x34\x0b\x90\x3c\x9c\xad"
31191                         "\x44\x5f\x9e\x0e\x9d\xd4\xbd\x93"
31192                         "\x5e\xfa\x3c\xe0\xb0\xd9\xed\xf3"
31193                         "\xd6\x2e\xff\x24\xd8\x71\x6c\xed"
31194                         "\xaf\x55\xeb\x22\xac\x93\x68\x32"
31195                         "\x05\x5b\x47\xdd\xc6\x4a\xcb\xc7"
31196                         "\x10\xe1\x3c\x92\x1a\xf3\x23\x78"
31197                         "\x2b\xa1\xd2\x80\xf4\x12\xb1\x20"
31198                         "\x8f\xff\x26\x35\xdd\xfb\xc7\x4e"
31199                         "\x78\xf1\x2d\x50\x12\x77\xa8\x60"
31200                         "\x7c\x0f\xf5\x16\x2f\x63\x70\x2a"
31201                         "\xc0\x96\x80\x4e\x0a\xb4\x93\x35"
31202                         "\x5d\x1d\x3f\x56\xf7\x2f\xbb\x90"
31203                         "\x11\x16\x8f\xa2\xec\x47\xbe\xac"
31204                         "\x56\x01\x26\x56\xb1\x8c\xb2\x10"
31205                         "\xf9\x1a\xca\xf5\xd1\xb7\x39\x20"
31206                         "\x63\xf1\x69\x20\x4f\x13\x12\x1f"
31207                         "\x5b\x65\xfc\x98\xf7\xc4\x7a\xbe"
31208                         "\xf7\x26\x4d\x2b\x84\x7b\x42\xad"
31209                         "\xd8\x7a\x0a\xb4\xd8\x74\xbf\xc1"
31210                         "\xf0\x6e\xb4\x29\xa3\xbb\xca\x46"
31211                         "\x67\x70\x6a\x2d\xce\x0e\xa2\x8a"
31212                         "\xa9\x87\xbf\x05\xc4\xc1\x04\xa3"
31213                         "\xab\xd4\x45\x43\x8c\xb6\x02\xb0"
31214                         "\x41\xc8\xfc\x44\x3d\x59\xaa\x2e"
31215                         "\x44\x21\x2a\x8d\x88\x9d\x57\xf4"
31216                         "\xa0\x02\x77\xb8\xa6\xa0\xe6\x75"
31217                         "\x5c\x82\x65\x3e\x03\x5c\x29\x8f"
31218                         "\x38\x55\xab\x33\x26\xef\x9f\x43"
31219                         "\x52\xfd\x68\xaf\x36\xb4\xbb\x9a"
31220                         "\x58\x09\x09\x1b\xc3\x65\x46\x46"
31221                         "\x1d\xa7\x94\x18\x23\x50\x2c\xca"
31222                         "\x2c\x55\x19\x97\x01\x9d\x93\x3b"
31223                         "\x63\x86\xf2\x03\x67\x45\xd2\x72"
31224                         "\x28\x52\x6c\xf4\xe3\x1c\xb5\x11"
31225                         "\x13\xf1\xeb\x21\xc7\xd9\x56\x82"
31226                         "\x2b\x82\x39\xbd\x69\x54\xed\x62"
31227                         "\xc3\xe2\xde\x73\xd4\x6a\x12\xae"
31228                         "\x13\x21\x7f\x4b\x5b\xfc\xbf\xe8"
31229                         "\x2b\xbe\x56\xba\x68\x8b\x9a\xb1"
31230                         "\x6e\xfa\xbf\x7e\x5a\x4b\xf1\xac"
31231                         "\x98\x65\x85\xd1\x93\x53\xd3\x7b"
31232                         "\x09\xdd\x4b\x10\x6d\x84\xb0\x13"
31233                         "\x65\xbd\xcf\x52\x09\xc4\x85\xe2"
31234                         "\x84\x74\x15\x65\xb7\xf7\x51\xaf"
31235                         "\x55\xad\xa4\xd1\x22\x54\x70\x94"
31236                         "\xa0\x1c\x90\x41\xfd\x99\xd7\x5a"
31237                         "\x31\xef\xaa\x25\xd0\x7f\x4f\xea"
31238                         "\x1d\x55\x42\xe5\x49\xb0\xd0\x46"
31239                         "\x62\x36\x43\xb2\x82\x15\x75\x50"
31240                         "\xa4\x72\xeb\x54\x27\x1f\x8a\xe4"
31241                         "\x7d\xe9\x66\xc5\xf1\x53\xa4\xd1"
31242                         "\x0c\xeb\xb8\xf8\xbc\xd4\xe2\xe7"
31243                         "\xe1\xf8\x4b\xcb\xa9\xa1\xaf\x15"
31244                         "\x83\xcb\x72\xd0\x33\x79\x00\x2d"
31245                         "\x9f\xd7\xf1\x2e\x1e\x10\xe4\x45"
31246                         "\xc0\x75\x3a\x39\xea\x68\xf7\x5d"
31247                         "\x1b\x73\x8f\xe9\x8e\x0f\x72\x47"
31248                         "\xae\x35\x0a\x31\x7a\x14\x4d\x4a"
31249                         "\x6f\x47\xf7\x7e\x91\x6e\x74\x8b"
31250                         "\x26\x47\xf9\xc3\xf9\xde\x70\xf5"
31251                         "\x61\xab\xa9\x27\x9f\x82\xe4\x9c"
31252                         "\x89\x91\x3f\x2e\x6a\xfd\xb5\x49"
31253                         "\xe9\xfd\x59\x14\x36\x49\x40\x6d"
31254                         "\x32\xd8\x85\x42\xf3\xa5\xdf\x0c"
31255                         "\xa8\x27\xd7\x54\xe2\x63\x2f\xf2"
31256                         "\x7e\x8b\x8b\xe7\xf1\x9a\x95\x35"
31257                         "\x43\xdc\x3a\xe4\xb6\xf4\xd0\xdf"
31258                         "\x9c\xcb\x94\xf3\x21\xa0\x77\x50"
31259                         "\xe2\xc6\xc4\xc6\x5f\x09\x64\x5b"
31260                         "\x92\x90\xd8\xe1\xd1\xed\x4b\x42"
31261                         "\xd7\x37\xaf\x65\x3d\x11\x39\xb6"
31262                         "\x24\x8a\x60\xae\xd6\x1e\xbf\x0e"
31263                         "\x0d\xd7\xdc\x96\x0e\x65\x75\x4e"
31264                         "\x29\x06\x9d\xa4\x51\x3a\x10\x63"
31265                         "\x8f\x17\x07\xd5\x8e\x3c\xf4\x28"
31266                         "\x00\x5a\x5b\x05\x19\xd8\xc0\x6c"
31267                         "\xe5\x15\xe4\x9c\x9d\x71\x9d\x5e"
31268                         "\x94\x29\x1a\xa7\x80\xfa\x0e\x33"
31269                         "\x03\xdd\xb7\x3e\x9a\xa9\x26\x18"
31270                         "\x37\xa9\x64\x08\x4d\x94\x5a\x88"
31271                         "\xca\x35\xce\x81\x02\xe3\x1f\x1b"
31272                         "\x89\x1a\x77\x85\xe3\x41\x6d\x32"
31273                         "\x42\x19\x23\x7d\xc8\x73\xee\x25"
31274                         "\x85\x0d\xf8\x31\x25\x79\x1b\x6f"
31275                         "\x79\x25\xd2\xd8\xd4\x23\xfd\xf7"
31276                         "\x82\x36\x6a\x0c\x46\x22\x15\xe9"
31277                         "\xff\x72\x41\x91\x91\x7d\x3a\xb7"
31278                         "\xdd\x65\x99\x70\xf6\x8d\x84\xf8"
31279                         "\x67\x15\x20\x11\xd6\xb2\x55\x7b"
31280                         "\xdb\x87\xee\xef\x55\x89\x2a\x59"
31281                         "\x2b\x07\x8f\x43\x8a\x59\x3c\x01"
31282                         "\x8b\x65\x54\xa1\x66\xd5\x38\xbd"
31283                         "\xc6\x30\xa9\xcc\x49\xb6\xa8\x1b"
31284                         "\xb8\xc0\x0e\xe3\x45\x28\xe2\xff"
31285                         "\x41\x9f\x7e\x7c\xd1\xae\x9e\x25"
31286                         "\x3f\x4c\x7c\x7c\xf4\xa8\x26\x4d"
31287                         "\x5c\xfd\x4b\x27\x18\xf9\x61\x76"
31288                         "\x48\xba\x0c\x6b\xa9\x4d\xfc\xf5"
31289                         "\x3b\x35\x7e\x2f\x4a\xa9\xc2\x9a"
31290                         "\xae\xab\x86\x09\x89\xc9\xc2\x40"
31291                         "\x39\x2c\x81\xb3\xb8\x17\x67\xc2"
31292                         "\x0d\x32\x4a\x3a\x67\x81\xd7\x1a"
31293                         "\x34\x52\xc5\xdb\x0a\xf5\x63\x39"
31294                         "\xea\x1f\xe1\x7c\xa1\x9e\xc1\x35"
31295                         "\xe3\xb1\x18\x45\x67\xf9\x22\x38"
31296                         "\x95\xd9\x34\x34\x86\xc6\x41\x94"
31297                         "\x15\xf9\x5b\x41\xa6\x87\x8b\xf8"
31298                         "\xd5\xe1\x1b\xe2\x5b\xf3\x86\x10"
31299                         "\xff\xe6\xae\x69\x76\xbc\x0d\xb4"
31300                         "\x09\x90\x0c\xa2\x65\x0c\xad\x74"
31301                         "\xf5\xd7\xff\xda\xc1\xce\x85\xbe"
31302                         "\x00\xa7\xff\x4d\x2f\x65\xd3\x8c"
31303                         "\x86\x2d\x05\xe8\xed\x3e\x6b\x8b"
31304                         "\x0f\x3d\x83\x8c\xf1\x1d\x5b\x96"
31305                         "\x2e\xb1\x9c\xc2\x98\xe1\x70\xb9"
31306                         "\xba\x5c\x8a\x43\xd6\x34\xa7\x2d"
31307                         "\xc9\x92\xae\xf2\xa5\x7b\x05\x49"
31308                         "\xa7\x33\x34\x86\xca\xe4\x96\x23"
31309                         "\x76\x5b\xf2\xc6\xf1\x51\x28\x42"
31310                         "\x7b\xcc\x76\x8f\xfa\xa2\xad\x31"
31311                         "\xd4\xd6\x7a\x6d\x25\x25\x54\xe4"
31312                         "\x3f\x50\x59\xe1\x5c\x05\xb7\x27"
31313                         "\x48\xbf\x07\xec\x1b\x13\xbe\x2b"
31314                         "\xa1\x57\x2b\xd5\xab\xd7\xd0\x4c"
31315                         "\x1e\xcb\x71\x9b\xc5\x90\x85\xd3"
31316                         "\xde\x59\xec\x71\xeb\x89\xbb\xd0"
31317                         "\x09\x50\xe1\x16\x3f\xfd\x1c\x34"
31318                         "\xc3\x1c\xa1\x10\x77\x53\x98\xef"
31319                         "\xf2\xfd\xa5\x01\x59\xc2\x9b\x26"
31320                         "\xc7\x42\xd9\x49\xda\x58\x2b\x6e"
31321                         "\x9f\x53\x19\x76\x7e\xd9\xc9\x0e"
31322                         "\x68\xc8\x7f\x51\x22\x42\xef\x49"
31323                         "\xa4\x55\xb6\x36\xac\x09\xc7\x31"
31324                         "\x88\x15\x4b\x2e\x8f\x3a\x08\xf7"
31325                         "\xd8\xf7\xa8\xc5\xa9\x33\xa6\x45"
31326                         "\xe4\xc4\x94\x76\xf3\x0d\x8f\x7e"
31327                         "\xc8\xf6\xbc\x23\x0a\xb6\x4c\xd3"
31328                         "\x6a\xcd\x36\xc2\x90\x5c\x5c\x3c"
31329                         "\x65\x7b\xc2\xd6\xcc\xe6\x0d\x87"
31330                         "\x73\x2e\x71\x79\x16\x06\x63\x28"
31331                         "\x09\x15\xd8\x89\x38\x38\x3d\xb5"
31332                         "\x42\x1c\x08\x24\xf7\x2a\xd2\x9d"
31333                         "\xc8\xca\xef\xf9\x27\xd8\x07\x86"
31334                         "\xf7\x43\x0b\x55\x15\x3f\x9f\x83"
31335                         "\xef\xdc\x49\x9d\x2a\xc1\x54\x62"
31336                         "\xbd\x9b\x66\x55\x9f\xb7\x12\xf3"
31337                         "\x1b\x4d\x9d\x2a\x5c\xed\x87\x75"
31338                         "\x87\x26\xec\x61\x2c\xb4\x0f\x89"
31339                         "\xb0\xfb\x2e\x68\x5d\x15\xc7\x8d"
31340                         "\x2e\xc0\xd9\xec\xaf\x4f\xd2\x25"
31341                         "\x29\xe8\xd2\x26\x2b\x67\xe9\xfc"
31342                         "\x2b\xa8\x67\x96\x12\x1f\x5b\x96"
31343                         "\xc6\x14\x53\xaf\x44\xea\xd6\xe2"
31344                         "\x94\x98\xe4\x12\x93\x4c\x92\xe0"
31345                         "\x18\xa5\x8d\x2d\xe4\x71\x3c\x47"
31346                         "\x4c\xf7\xe6\x47\x9e\xc0\x68\xdf"
31347                         "\xd4\xf5\x5a\x74\xb1\x2b\x29\x03"
31348                         "\x19\x07\xaf\x90\x62\x5c\x68\x98"
31349                         "\x48\x16\x11\x02\x9d\xee\xb4\x9b"
31350                         "\xe5\x42\x7f\x08\xfd\x16\x32\x0b"
31351                         "\xd0\xb3\xfa\x2b\xb7\x99\xf9\x29"
31352                         "\xcd\x20\x45\x9f\xb3\x1a\x5d\xa2"
31353                         "\xaf\x4d\xe0\xbd\x42\x0d\xbc\x74"
31354                         "\x99\x9c\x8e\x53\x1a\xb4\x3e\xbd"
31355                         "\xa2\x9a\x2d\xf7\xf8\x39\x0f\x67"
31356                         "\x63\xfc\x6b\xc0\xaf\xb3\x4b\x4f"
31357                         "\x55\xc4\xcf\xa7\xc8\x04\x11\x3e"
31358                         "\x14\x32\xbb\x1b\x38\x77\xd6\x7f"
31359                         "\x54\x4c\xdf\x75\xf3\x07\x2d\x33"
31360                         "\x9b\xa8\x20\xe1\x7b\x12\xb5\xf3"
31361                         "\xef\x2f\xce\x72\xe5\x24\x60\xc1"
31362                         "\x30\xe2\xab\xa1\x8e\x11\x09\xa8"
31363                         "\x21\x33\x44\xfe\x7f\x35\x32\x93"
31364                         "\x39\xa7\xad\x8b\x79\x06\xb2\xcb"
31365                         "\x4e\xa9\x5f\xc7\xba\x74\x29\xec"
31366                         "\x93\xa0\x4e\x54\x93\xc0\xbc\x55"
31367                         "\x64\xf0\x48\xe5\x57\x99\xee\x75"
31368                         "\xd6\x79\x0f\x66\xb7\xc6\x57\x76"
31369                         "\xf7\xb7\xf3\x9c\xc5\x60\xe8\x7f"
31370                         "\x83\x76\xd6\x0e\xaa\xe6\x90\x39"
31371                         "\x1d\xa6\x32\x6a\x34\xe3\x55\xf8"
31372                         "\x58\xa0\x58\x7d\x33\xe0\x22\x39"
31373                         "\x44\x64\x87\x86\x5a\x2f\xa7\x7e"
31374                         "\x0f\x38\xea\xb0\x30\xcc\x61\xa5"
31375                         "\x6a\x32\xae\x1e\xf7\xe9\xd0\xa9"
31376                         "\x0c\x32\x4b\xb5\x49\x28\xab\x85"
31377                         "\x2f\x8e\x01\x36\x38\x52\xd0\xba"
31378                         "\xd6\x02\x78\xf8\x0e\x3e\x9c\x8b"
31379                         "\x6b\x45\x99\x3f\x5c\xfe\x58\xf1"
31380                         "\x5c\x94\x04\xe1\xf5\x18\x6d\x51"
31381                         "\xb2\x5d\x18\x20\xb6\xc2\x9a\x42"
31382                         "\x1d\xb3\xab\x3c\xb6\x3a\x13\x03"
31383                         "\xb2\x46\x82\x4f\xfc\x64\xbc\x4f"
31384                         "\xca\xfa\x9c\xc0\xd5\xa7\xbd\x11"
31385                         "\xb7\xe4\x5a\xf6\x6f\x4d\x4d\x54"
31386                         "\xea\xa4\x98\x66\xd4\x22\x3b\xd3"
31387                         "\x8f\x34\x47\xd9\x7c\xf4\x72\x3b"
31388                         "\x4d\x02\x77\xf6\xd6\xdd\x08\x0a"
31389                         "\x81\xe1\x86\x89\x3e\x56\x10\x3c"
31390                         "\xba\xd7\x81\x8c\x08\xbc\x8b\xe2"
31391                         "\x53\xec\xa7\x89\xee\xc8\x56\xb5"
31392                         "\x36\x2c\xb2\x03\xba\x99\xdd\x7c"
31393                         "\x48\xa0\xb0\xbc\x91\x33\xe9\xa8"
31394                         "\xcb\xcd\xcf\x59\x5f\x1f\x15\xe2"
31395                         "\x56\xf5\x4e\x01\x35\x27\x45\x77"
31396                         "\x47\xc8\xbc\xcb\x7e\x39\xc1\x97"
31397                         "\x28\xd3\x84\xfc\x2c\x3e\xc8\xad"
31398                         "\x9c\xf8\x8a\x61\x9c\x28\xaa\xc5"
31399                         "\x99\x20\x43\x85\x9d\xa5\xe2\x8b"
31400                         "\xb8\xae\xeb\xd0\x32\x0d\x52\x78"
31401                         "\x09\x56\x3f\xc7\xd8\x7e\x26\xfc"
31402                         "\x37\xfb\x6f\x04\xfc\xfa\x92\x10"
31403                         "\xac\xf8\x3e\x21\xdc\x8c\x21\x16"
31404                         "\x7d\x67\x6e\xf6\xcd\xda\xb6\x98"
31405                         "\x23\xab\x23\x3c\xb2\x10\xa0\x53"
31406                         "\x5a\x56\x9f\xc5\xd0\xff\xbb\xe4"
31407                         "\x98\x3c\x69\x1e\xdb\x38\x8f\x7e"
31408                         "\x0f\xd2\x98\x88\x81\x8b\x45\x67"
31409                         "\xea\x33\xf1\xeb\xe9\x97\x55\x2e"
31410                         "\xd9\xaa\xeb\x5a\xec\xda\xe1\x68"
31411                         "\xa8\x9d\x3c\x84\x7c\x05\x3d\x62"
31412                         "\x87\x8f\x03\x21\x28\x95\x0c\x89"
31413                         "\x25\x22\x4a\xb0\x93\xa9\x50\xa2"
31414                         "\x2f\x57\x6e\x18\x42\x19\x54\x0c"
31415                         "\x55\x67\xc6\x11\x49\xf4\x5c\xd2"
31416                         "\xe9\x3d\xdd\x8b\x48\x71\x21\x00"
31417                         "\xc3\x9a\x6c\x85\x74\x28\x83\x4a"
31418                         "\x1b\x31\x05\xe1\x06\x92\xe7\xda"
31419                         "\x85\x73\x78\x45\x20\x7f\xae\x13"
31420                         "\x7c\x33\x06\x22\xf4\x83\xf9\x35"
31421                         "\x3f\x6c\x71\xa8\x4e\x48\xbe\x9b"
31422                         "\xce\x8a\xba\xda\xbe\x28\x08\xf7"
31423                         "\xe2\x14\x8c\x71\xea\x72\xf9\x33"
31424                         "\xf2\x88\x3f\xd7\xbb\x69\x6c\x29"
31425                         "\x19\xdc\x84\xce\x1f\x12\x4f\xc8"
31426                         "\xaf\xa5\x04\xba\x5a\xab\xb0\xd9"
31427                         "\x14\x1f\x6c\x68\x98\x39\x89\x7a"
31428                         "\xd9\xd8\x2f\xdf\xa8\x47\x4a\x25"
31429                         "\xe2\xfb\x33\xf4\x59\x78\xe1\x68"
31430                         "\x85\xcf\xfe\x59\x20\xd4\x05\x1d"
31431                         "\x80\x99\xae\xbc\xca\xae\x0f\x2f"
31432                         "\x65\x43\x34\x8e\x7e\xac\xd3\x93"
31433                         "\x2f\xac\x6d\x14\x3d\x02\x07\x70"
31434                         "\x9d\xa4\xf3\x1b\x5c\x36\xfc\x01"
31435                         "\x73\x34\x85\x0c\x6c\xd6\xf1\xbd"
31436                         "\x3f\xdf\xee\xf5\xd9\xba\x56\xef"
31437                         "\xf4\x9b\x6b\xee\x9f\x5a\x78\x6d"
31438                         "\x32\x19\xf4\xf7\xf8\x4c\x69\x0b"
31439                         "\x4b\xbc\xbb\xb7\xf2\x85\xaf\x70"
31440                         "\x75\x24\x6c\x54\xa7\x0e\x4d\x1d"
31441                         "\x01\xbf\x08\xac\xcf\x7f\x2c\xe3"
31442                         "\x14\x89\x5e\x70\x5a\x99\x92\xcd"
31443                         "\x01\x84\xc8\xd2\xab\xe5\x4f\x58"
31444                         "\xe7\x0f\x2f\x0e\xff\x68\xea\xfd"
31445                         "\x15\xb3\x17\xe6\xb0\xe7\x85\xd8"
31446                         "\x23\x2e\x05\xc7\xc9\xc4\x46\x1f"
31447                         "\xe1\x9e\x49\x20\x23\x24\x4d\x7e"
31448                         "\x29\x65\xff\xf4\xb6\xfd\x1a\x85"
31449                         "\xc4\x16\xec\xfc\xea\x7b\xd6\x2c"
31450                         "\x43\xf8\xb7\xbf\x79\xc0\x85\xcd"
31451                         "\xef\xe1\x98\xd3\xa5\xf7\x90\x8c"
31452                         "\xe9\x7f\x80\x6b\xd2\xac\x4c\x30"
31453                         "\xa7\xc6\x61\x6c\xd2\xf9\x2c\xff"
31454                         "\x30\xbc\x22\x81\x7d\x93\x12\xe4"
31455                         "\x0a\xcd\xaf\xdd\xe8\xab\x0a\x1e"
31456                         "\x13\xa4\x27\xc3\x5f\xf7\x4b\xbb"
31457                         "\x37\x09\x4b\x91\x6f\x92\x4f\xaf"
31458                         "\x52\xee\xdf\xef\x09\x6f\xf7\x5c"
31459                         "\x6e\x12\x17\x72\x63\x57\xc7\xba"
31460                         "\x3b\x6b\x38\x32\x73\x1b\x9c\x80"
31461                         "\xc1\x7a\xc6\xcf\xcd\x35\xc0\x6b"
31462                         "\x31\x1a\x6b\xe9\xd8\x2c\x29\x3f"
31463                         "\x96\xfb\xb6\xcd\x13\x91\x3b\xc2"
31464                         "\xd2\xa3\x31\x8d\xa4\xcd\x57\xcd"
31465                         "\x13\x3d\x64\xfd\x06\xce\xe6\xdc"
31466                         "\x0c\x24\x43\x31\x40\x57\xf1\x72"
31467                         "\x17\xe3\x3a\x63\x6d\x35\xcf\x5d"
31468                         "\x97\x40\x59\xdd\xf7\x3c\x02\xf7"
31469                         "\x1c\x7e\x05\xbb\xa9\x0d\x01\xb1"
31470                         "\x8e\xc0\x30\xa9\x53\x24\xc9\x89"
31471                         "\x84\x6d\xaa\xd0\xcd\x91\xc2\x4d"
31472                         "\x91\xb0\x89\xe2\xbf\x83\x44\xaa"
31473                         "\x28\x72\x23\xa0\xc2\xad\xad\x1c"
31474                         "\xfc\x3f\x09\x7a\x0b\xdc\xc5\x1b"
31475                         "\x87\x13\xc6\x5b\x59\x8d\xf2\xc8"
31476                         "\xaf\xdf\x11\x95",
31477                 .rlen   = 4100,
31478                 .np     = 2,
31479                 .tap    = { 4064, 36 },
31480         },
31481 };
31482
31483 #define CHACHA20_ENC_TEST_VECTORS 4
31484 static struct cipher_testvec chacha20_enc_tv_template[] = {
31485         { /* RFC7539 A.2. Test Vector #1 */
31486                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
31487                           "\x00\x00\x00\x00\x00\x00\x00\x00"
31488                           "\x00\x00\x00\x00\x00\x00\x00\x00"
31489                           "\x00\x00\x00\x00\x00\x00\x00\x00",
31490                 .klen   = 32,
31491                 .iv     = "\x00\x00\x00\x00\x00\x00\x00\x00"
31492                           "\x00\x00\x00\x00\x00\x00\x00\x00",
31493                 .input  = "\x00\x00\x00\x00\x00\x00\x00\x00"
31494                           "\x00\x00\x00\x00\x00\x00\x00\x00"
31495                           "\x00\x00\x00\x00\x00\x00\x00\x00"
31496                           "\x00\x00\x00\x00\x00\x00\x00\x00"
31497                           "\x00\x00\x00\x00\x00\x00\x00\x00"
31498                           "\x00\x00\x00\x00\x00\x00\x00\x00"
31499                           "\x00\x00\x00\x00\x00\x00\x00\x00"
31500                           "\x00\x00\x00\x00\x00\x00\x00\x00",
31501                 .ilen   = 64,
31502                 .result = "\x76\xb8\xe0\xad\xa0\xf1\x3d\x90"
31503                           "\x40\x5d\x6a\xe5\x53\x86\xbd\x28"
31504                           "\xbd\xd2\x19\xb8\xa0\x8d\xed\x1a"
31505                           "\xa8\x36\xef\xcc\x8b\x77\x0d\xc7"
31506                           "\xda\x41\x59\x7c\x51\x57\x48\x8d"
31507                           "\x77\x24\xe0\x3f\xb8\xd8\x4a\x37"
31508                           "\x6a\x43\xb8\xf4\x15\x18\xa1\x1c"
31509                           "\xc3\x87\xb6\x69\xb2\xee\x65\x86",
31510                 .rlen   = 64,
31511         }, { /* RFC7539 A.2. Test Vector #2 */
31512                 .key    = "\x00\x00\x00\x00\x00\x00\x00\x00"
31513                           "\x00\x00\x00\x00\x00\x00\x00\x00"
31514                           "\x00\x00\x00\x00\x00\x00\x00\x00"
31515                           "\x00\x00\x00\x00\x00\x00\x00\x01",
31516                 .klen   = 32,
31517                 .iv     = "\x01\x00\x00\x00\x00\x00\x00\x00"
31518                           "\x00\x00\x00\x00\x00\x00\x00\x02",
31519                 .input  = "\x41\x6e\x79\x20\x73\x75\x62\x6d"
31520                           "\x69\x73\x73\x69\x6f\x6e\x20\x74"
31521                           "\x6f\x20\x74\x68\x65\x20\x49\x45"
31522                           "\x54\x46\x20\x69\x6e\x74\x65\x6e"
31523                           "\x64\x65\x64\x20\x62\x79\x20\x74"
31524                           "\x68\x65\x20\x43\x6f\x6e\x74\x72"
31525                           "\x69\x62\x75\x74\x6f\x72\x20\x66"
31526                           "\x6f\x72\x20\x70\x75\x62\x6c\x69"
31527                           "\x63\x61\x74\x69\x6f\x6e\x20\x61"
31528                           "\x73\x20\x61\x6c\x6c\x20\x6f\x72"
31529                           "\x20\x70\x61\x72\x74\x20\x6f\x66"
31530                           "\x20\x61\x6e\x20\x49\x45\x54\x46"
31531                           "\x20\x49\x6e\x74\x65\x72\x6e\x65"
31532                           "\x74\x2d\x44\x72\x61\x66\x74\x20"
31533                           "\x6f\x72\x20\x52\x46\x43\x20\x61"
31534                           "\x6e\x64\x20\x61\x6e\x79\x20\x73"
31535                           "\x74\x61\x74\x65\x6d\x65\x6e\x74"
31536                           "\x20\x6d\x61\x64\x65\x20\x77\x69"
31537                           "\x74\x68\x69\x6e\x20\x74\x68\x65"
31538                           "\x20\x63\x6f\x6e\x74\x65\x78\x74"
31539                           "\x20\x6f\x66\x20\x61\x6e\x20\x49"
31540                           "\x45\x54\x46\x20\x61\x63\x74\x69"
31541                           "\x76\x69\x74\x79\x20\x69\x73\x20"
31542                           "\x63\x6f\x6e\x73\x69\x64\x65\x72"
31543                           "\x65\x64\x20\x61\x6e\x20\x22\x49"
31544                           "\x45\x54\x46\x20\x43\x6f\x6e\x74"
31545                           "\x72\x69\x62\x75\x74\x69\x6f\x6e"
31546                           "\x22\x2e\x20\x53\x75\x63\x68\x20"
31547                           "\x73\x74\x61\x74\x65\x6d\x65\x6e"
31548                           "\x74\x73\x20\x69\x6e\x63\x6c\x75"
31549                           "\x64\x65\x20\x6f\x72\x61\x6c\x20"
31550                           "\x73\x74\x61\x74\x65\x6d\x65\x6e"
31551                           "\x74\x73\x20\x69\x6e\x20\x49\x45"
31552                           "\x54\x46\x20\x73\x65\x73\x73\x69"
31553                           "\x6f\x6e\x73\x2c\x20\x61\x73\x20"
31554                           "\x77\x65\x6c\x6c\x20\x61\x73\x20"
31555                           "\x77\x72\x69\x74\x74\x65\x6e\x20"
31556                           "\x61\x6e\x64\x20\x65\x6c\x65\x63"
31557                           "\x74\x72\x6f\x6e\x69\x63\x20\x63"
31558                           "\x6f\x6d\x6d\x75\x6e\x69\x63\x61"
31559                           "\x74\x69\x6f\x6e\x73\x20\x6d\x61"
31560                           "\x64\x65\x20\x61\x74\x20\x61\x6e"
31561                           "\x79\x20\x74\x69\x6d\x65\x20\x6f"
31562                           "\x72\x20\x70\x6c\x61\x63\x65\x2c"
31563                           "\x20\x77\x68\x69\x63\x68\x20\x61"
31564                           "\x72\x65\x20\x61\x64\x64\x72\x65"
31565                           "\x73\x73\x65\x64\x20\x74\x6f",
31566                 .ilen   = 375,
31567                 .result = "\xa3\xfb\xf0\x7d\xf3\xfa\x2f\xde"
31568                           "\x4f\x37\x6c\xa2\x3e\x82\x73\x70"
31569                           "\x41\x60\x5d\x9f\x4f\x4f\x57\xbd"
31570                           "\x8c\xff\x2c\x1d\x4b\x79\x55\xec"
31571                           "\x2a\x97\x94\x8b\xd3\x72\x29\x15"
31572                           "\xc8\xf3\xd3\x37\xf7\xd3\x70\x05"
31573                           "\x0e\x9e\x96\xd6\x47\xb7\xc3\x9f"
31574                           "\x56\xe0\x31\xca\x5e\xb6\x25\x0d"
31575                           "\x40\x42\xe0\x27\x85\xec\xec\xfa"
31576                           "\x4b\x4b\xb5\xe8\xea\xd0\x44\x0e"
31577                           "\x20\xb6\xe8\xdb\x09\xd8\x81\xa7"
31578                           "\xc6\x13\x2f\x42\x0e\x52\x79\x50"
31579                           "\x42\xbd\xfa\x77\x73\xd8\xa9\x05"
31580                           "\x14\x47\xb3\x29\x1c\xe1\x41\x1c"
31581                           "\x68\x04\x65\x55\x2a\xa6\xc4\x05"
31582                           "\xb7\x76\x4d\x5e\x87\xbe\xa8\x5a"
31583                           "\xd0\x0f\x84\x49\xed\x8f\x72\xd0"
31584                           "\xd6\x62\xab\x05\x26\x91\xca\x66"
31585                           "\x42\x4b\xc8\x6d\x2d\xf8\x0e\xa4"
31586                           "\x1f\x43\xab\xf9\x37\xd3\x25\x9d"
31587                           "\xc4\xb2\xd0\xdf\xb4\x8a\x6c\x91"
31588                           "\x39\xdd\xd7\xf7\x69\x66\xe9\x28"
31589                           "\xe6\x35\x55\x3b\xa7\x6c\x5c\x87"
31590                           "\x9d\x7b\x35\xd4\x9e\xb2\xe6\x2b"
31591                           "\x08\x71\xcd\xac\x63\x89\x39\xe2"
31592                           "\x5e\x8a\x1e\x0e\xf9\xd5\x28\x0f"
31593                           "\xa8\xca\x32\x8b\x35\x1c\x3c\x76"
31594                           "\x59\x89\xcb\xcf\x3d\xaa\x8b\x6c"
31595                           "\xcc\x3a\xaf\x9f\x39\x79\xc9\x2b"
31596                           "\x37\x20\xfc\x88\xdc\x95\xed\x84"
31597                           "\xa1\xbe\x05\x9c\x64\x99\xb9\xfd"
31598                           "\xa2\x36\xe7\xe8\x18\xb0\x4b\x0b"
31599                           "\xc3\x9c\x1e\x87\x6b\x19\x3b\xfe"
31600                           "\x55\x69\x75\x3f\x88\x12\x8c\xc0"
31601                           "\x8a\xaa\x9b\x63\xd1\xa1\x6f\x80"
31602                           "\xef\x25\x54\xd7\x18\x9c\x41\x1f"
31603                           "\x58\x69\xca\x52\xc5\xb8\x3f\xa3"
31604                           "\x6f\xf2\x16\xb9\xc1\xd3\x00\x62"
31605                           "\xbe\xbc\xfd\x2d\xc5\xbc\xe0\x91"
31606                           "\x19\x34\xfd\xa7\x9a\x86\xf6\xe6"
31607                           "\x98\xce\xd7\x59\xc3\xff\x9b\x64"
31608                           "\x77\x33\x8f\x3d\xa4\xf9\xcd\x85"
31609                           "\x14\xea\x99\x82\xcc\xaf\xb3\x41"
31610                           "\xb2\x38\x4d\xd9\x02\xf3\xd1\xab"
31611                           "\x7a\xc6\x1d\xd2\x9c\x6f\x21\xba"
31612                           "\x5b\x86\x2f\x37\x30\xe3\x7c\xfd"
31613                           "\xc4\xfd\x80\x6c\x22\xf2\x21",
31614                 .rlen   = 375,
31615         }, { /* RFC7539 A.2. Test Vector #3 */
31616                 .key    = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
31617                           "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
31618                           "\x47\x39\x17\xc1\x40\x2b\x80\x09"
31619                           "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
31620                 .klen   = 32,
31621                 .iv     = "\x2a\x00\x00\x00\x00\x00\x00\x00"
31622                           "\x00\x00\x00\x00\x00\x00\x00\x02",
31623                 .input  = "\x27\x54\x77\x61\x73\x20\x62\x72"
31624                           "\x69\x6c\x6c\x69\x67\x2c\x20\x61"
31625                           "\x6e\x64\x20\x74\x68\x65\x20\x73"
31626                           "\x6c\x69\x74\x68\x79\x20\x74\x6f"
31627                           "\x76\x65\x73\x0a\x44\x69\x64\x20"
31628                           "\x67\x79\x72\x65\x20\x61\x6e\x64"
31629                           "\x20\x67\x69\x6d\x62\x6c\x65\x20"
31630                           "\x69\x6e\x20\x74\x68\x65\x20\x77"
31631                           "\x61\x62\x65\x3a\x0a\x41\x6c\x6c"
31632                           "\x20\x6d\x69\x6d\x73\x79\x20\x77"
31633                           "\x65\x72\x65\x20\x74\x68\x65\x20"
31634                           "\x62\x6f\x72\x6f\x67\x6f\x76\x65"
31635                           "\x73\x2c\x0a\x41\x6e\x64\x20\x74"
31636                           "\x68\x65\x20\x6d\x6f\x6d\x65\x20"
31637                           "\x72\x61\x74\x68\x73\x20\x6f\x75"
31638                           "\x74\x67\x72\x61\x62\x65\x2e",
31639                 .ilen   = 127,
31640                 .result = "\x62\xe6\x34\x7f\x95\xed\x87\xa4"
31641                           "\x5f\xfa\xe7\x42\x6f\x27\xa1\xdf"
31642                           "\x5f\xb6\x91\x10\x04\x4c\x0d\x73"
31643                           "\x11\x8e\xff\xa9\x5b\x01\xe5\xcf"
31644                           "\x16\x6d\x3d\xf2\xd7\x21\xca\xf9"
31645                           "\xb2\x1e\x5f\xb1\x4c\x61\x68\x71"
31646                           "\xfd\x84\xc5\x4f\x9d\x65\xb2\x83"
31647                           "\x19\x6c\x7f\xe4\xf6\x05\x53\xeb"
31648                           "\xf3\x9c\x64\x02\xc4\x22\x34\xe3"
31649                           "\x2a\x35\x6b\x3e\x76\x43\x12\xa6"
31650                           "\x1a\x55\x32\x05\x57\x16\xea\xd6"
31651                           "\x96\x25\x68\xf8\x7d\x3f\x3f\x77"
31652                           "\x04\xc6\xa8\xd1\xbc\xd1\xbf\x4d"
31653                           "\x50\xd6\x15\x4b\x6d\xa7\x31\xb1"
31654                           "\x87\xb5\x8d\xfd\x72\x8a\xfa\x36"
31655                           "\x75\x7a\x79\x7a\xc1\x88\xd1",
31656                 .rlen   = 127,
31657         }, { /* Self-made test vector for long data */
31658                 .key    = "\x1c\x92\x40\xa5\xeb\x55\xd3\x8a"
31659                           "\xf3\x33\x88\x86\x04\xf6\xb5\xf0"
31660                           "\x47\x39\x17\xc1\x40\x2b\x80\x09"
31661                           "\x9d\xca\x5c\xbc\x20\x70\x75\xc0",
31662                 .klen   = 32,
31663                 .iv     = "\x1c\x00\x00\x00\x00\x00\x00\x00"
31664                           "\x00\x00\x00\x00\x00\x00\x00\x01",
31665                 .input  = "\x49\xee\xe0\xdc\x24\x90\x40\xcd"
31666                           "\xc5\x40\x8f\x47\x05\xbc\xdd\x81"
31667                           "\x47\xc6\x8d\xe6\xb1\x8f\xd7\xcb"
31668                           "\x09\x0e\x6e\x22\x48\x1f\xbf\xb8"
31669                           "\x5c\xf7\x1e\x8a\xc1\x23\xf2\xd4"
31670                           "\x19\x4b\x01\x0f\x4e\xa4\x43\xce"
31671                           "\x01\xc6\x67\xda\x03\x91\x18\x90"
31672                           "\xa5\xa4\x8e\x45\x03\xb3\x2d\xac"
31673                           "\x74\x92\xd3\x53\x47\xc8\xdd\x25"
31674                           "\x53\x6c\x02\x03\x87\x0d\x11\x0c"
31675                           "\x58\xe3\x12\x18\xfd\x2a\x5b\x40"
31676                           "\x0c\x30\xf0\xb8\x3f\x43\xce\xae"
31677                           "\x65\x3a\x7d\x7c\xf4\x54\xaa\xcc"
31678                           "\x33\x97\xc3\x77\xba\xc5\x70\xde"
31679                           "\xd7\xd5\x13\xa5\x65\xc4\x5f\x0f"
31680                           "\x46\x1a\x0d\x97\xb5\xf3\xbb\x3c"
31681                           "\x84\x0f\x2b\xc5\xaa\xea\xf2\x6c"
31682                           "\xc9\xb5\x0c\xee\x15\xf3\x7d\xbe"
31683                           "\x9f\x7b\x5a\xa6\xae\x4f\x83\xb6"
31684                           "\x79\x49\x41\xf4\x58\x18\xcb\x86"
31685                           "\x7f\x30\x0e\xf8\x7d\x44\x36\xea"
31686                           "\x75\xeb\x88\x84\x40\x3c\xad\x4f"
31687                           "\x6f\x31\x6b\xaa\x5d\xe5\xa5\xc5"
31688                           "\x21\x66\xe9\xa7\xe3\xb2\x15\x88"
31689                           "\x78\xf6\x79\xa1\x59\x47\x12\x4e"
31690                           "\x9f\x9f\x64\x1a\xa0\x22\x5b\x08"
31691                           "\xbe\x7c\x36\xc2\x2b\x66\x33\x1b"
31692                           "\xdd\x60\x71\xf7\x47\x8c\x61\xc3"
31693                           "\xda\x8a\x78\x1e\x16\xfa\x1e\x86"
31694                           "\x81\xa6\x17\x2a\xa7\xb5\xc2\xe7"
31695                           "\xa4\xc7\x42\xf1\xcf\x6a\xca\xb4"
31696                           "\x45\xcf\xf3\x93\xf0\xe7\xea\xf6"
31697                           "\xf4\xe6\x33\x43\x84\x93\xa5\x67"
31698                           "\x9b\x16\x58\x58\x80\x0f\x2b\x5c"
31699                           "\x24\x74\x75\x7f\x95\x81\xb7\x30"
31700                           "\x7a\x33\xa7\xf7\x94\x87\x32\x27"
31701                           "\x10\x5d\x14\x4c\x43\x29\xdd\x26"
31702                           "\xbd\x3e\x3c\x0e\xfe\x0e\xa5\x10"
31703                           "\xea\x6b\x64\xfd\x73\xc6\xed\xec"
31704                           "\xa8\xc9\xbf\xb3\xba\x0b\x4d\x07"
31705                           "\x70\xfc\x16\xfd\x79\x1e\xd7\xc5"
31706                           "\x49\x4e\x1c\x8b\x8d\x79\x1b\xb1"
31707                           "\xec\xca\x60\x09\x4c\x6a\xd5\x09"
31708                           "\x49\x46\x00\x88\x22\x8d\xce\xea"
31709                           "\xb1\x17\x11\xde\x42\xd2\x23\xc1"
31710                           "\x72\x11\xf5\x50\x73\x04\x40\x47"
31711                           "\xf9\x5d\xe7\xa7\x26\xb1\x7e\xb0"
31712                           "\x3f\x58\xc1\x52\xab\x12\x67\x9d"
31713                           "\x3f\x43\x4b\x68\xd4\x9c\x68\x38"
31714                           "\x07\x8a\x2d\x3e\xf3\xaf\x6a\x4b"
31715                           "\xf9\xe5\x31\x69\x22\xf9\xa6\x69"
31716                           "\xc6\x9c\x96\x9a\x12\x35\x95\x1d"
31717                           "\x95\xd5\xdd\xbe\xbf\x93\x53\x24"
31718                           "\xfd\xeb\xc2\x0a\x64\xb0\x77\x00"
31719                           "\x6f\x88\xc4\x37\x18\x69\x7c\xd7"
31720                           "\x41\x92\x55\x4c\x03\xa1\x9a\x4b"
31721                           "\x15\xe5\xdf\x7f\x37\x33\x72\xc1"
31722                           "\x8b\x10\x67\xa3\x01\x57\x94\x25"
31723                           "\x7b\x38\x71\x7e\xdd\x1e\xcc\x73"
31724                           "\x55\xd2\x8e\xeb\x07\xdd\xf1\xda"
31725                           "\x58\xb1\x47\x90\xfe\x42\x21\x72"
31726                           "\xa3\x54\x7a\xa0\x40\xec\x9f\xdd"
31727                           "\xc6\x84\x6e\xca\xae\xe3\x68\xb4"
31728                           "\x9d\xe4\x78\xff\x57\xf2\xf8\x1b"
31729                           "\x03\xa1\x31\xd9\xde\x8d\xf5\x22"
31730                           "\x9c\xdd\x20\xa4\x1e\x27\xb1\x76"
31731                           "\x4f\x44\x55\xe2\x9b\xa1\x9c\xfe"
31732                           "\x54\xf7\x27\x1b\xf4\xde\x02\xf5"
31733                           "\x1b\x55\x48\x5c\xdc\x21\x4b\x9e"
31734                           "\x4b\x6e\xed\x46\x23\xdc\x65\xb2"
31735                           "\xcf\x79\x5f\x28\xe0\x9e\x8b\xe7"
31736                           "\x4c\x9d\x8a\xff\xc1\xa6\x28\xb8"
31737                           "\x65\x69\x8a\x45\x29\xef\x74\x85"
31738                           "\xde\x79\xc7\x08\xae\x30\xb0\xf4"
31739                           "\xa3\x1d\x51\x41\xab\xce\xcb\xf6"
31740                           "\xb5\xd8\x6d\xe0\x85\xe1\x98\xb3"
31741                           "\x43\xbb\x86\x83\x0a\xa0\xf5\xb7"
31742                           "\x04\x0b\xfa\x71\x1f\xb0\xf6\xd9"
31743                           "\x13\x00\x15\xf0\xc7\xeb\x0d\x5a"
31744                           "\x9f\xd7\xb9\x6c\x65\x14\x22\x45"
31745                           "\x6e\x45\x32\x3e\x7e\x60\x1a\x12"
31746                           "\x97\x82\x14\xfb\xaa\x04\x22\xfa"
31747                           "\xa0\xe5\x7e\x8c\x78\x02\x48\x5d"
31748                           "\x78\x33\x5a\x7c\xad\xdb\x29\xce"
31749                           "\xbb\x8b\x61\xa4\xb7\x42\xe2\xac"
31750                           "\x8b\x1a\xd9\x2f\x0b\x8b\x62\x21"
31751                           "\x83\x35\x7e\xad\x73\xc2\xb5\x6c"
31752                           "\x10\x26\x38\x07\xe5\xc7\x36\x80"
31753                           "\xe2\x23\x12\x61\xf5\x48\x4b\x2b"
31754                           "\xc5\xdf\x15\xd9\x87\x01\xaa\xac"
31755                           "\x1e\x7c\xad\x73\x78\x18\x63\xe0"
31756                           "\x8b\x9f\x81\xd8\x12\x6a\x28\x10"
31757                           "\xbe\x04\x68\x8a\x09\x7c\x1b\x1c"
31758                           "\x83\x66\x80\x47\x80\xe8\xfd\x35"
31759                           "\x1c\x97\x6f\xae\x49\x10\x66\xcc"
31760                           "\xc6\xd8\xcc\x3a\x84\x91\x20\x77"
31761                           "\x72\xe4\x24\xd2\x37\x9f\xc5\xc9"
31762                           "\x25\x94\x10\x5f\x40\x00\x64\x99"
31763                           "\xdc\xae\xd7\x21\x09\x78\x50\x15"
31764                           "\xac\x5f\xc6\x2c\xa2\x0b\xa9\x39"
31765                           "\x87\x6e\x6d\xab\xde\x08\x51\x16"
31766                           "\xc7\x13\xe9\xea\xed\x06\x8e\x2c"
31767                           "\xf8\x37\x8c\xf0\xa6\x96\x8d\x43"
31768                           "\xb6\x98\x37\xb2\x43\xed\xde\xdf"
31769                           "\x89\x1a\xe7\xeb\x9d\xa1\x7b\x0b"
31770                           "\x77\xb0\xe2\x75\xc0\xf1\x98\xd9"
31771                           "\x80\x55\xc9\x34\x91\xd1\x59\xe8"
31772                           "\x4b\x0f\xc1\xa9\x4b\x7a\x84\x06"
31773                           "\x20\xa8\x5d\xfa\xd1\xde\x70\x56"
31774                           "\x2f\x9e\x91\x9c\x20\xb3\x24\xd8"
31775                           "\x84\x3d\xe1\x8c\x7e\x62\x52\xe5"
31776                           "\x44\x4b\x9f\xc2\x93\x03\xea\x2b"
31777                           "\x59\xc5\xfa\x3f\x91\x2b\xbb\x23"
31778                           "\xf5\xb2\x7b\xf5\x38\xaf\xb3\xee"
31779                           "\x63\xdc\x7b\xd1\xff\xaa\x8b\xab"
31780                           "\x82\x6b\x37\x04\xeb\x74\xbe\x79"
31781                           "\xb9\x83\x90\xef\x20\x59\x46\xff"
31782                           "\xe9\x97\x3e\x2f\xee\xb6\x64\x18"
31783                           "\x38\x4c\x7a\x4a\xf9\x61\xe8\x9a"
31784                           "\xa1\xb5\x01\xa6\x47\xd3\x11\xd4"
31785                           "\xce\xd3\x91\x49\x88\xc7\xb8\x4d"
31786                           "\xb1\xb9\x07\x6d\x16\x72\xae\x46"
31787                           "\x5e\x03\xa1\x4b\xb6\x02\x30\xa8"
31788                           "\x3d\xa9\x07\x2a\x7c\x19\xe7\x62"
31789                           "\x87\xe3\x82\x2f\x6f\xe1\x09\xd9"
31790                           "\x94\x97\xea\xdd\x58\x9e\xae\x76"
31791                           "\x7e\x35\xe5\xb4\xda\x7e\xf4\xde"
31792                           "\xf7\x32\x87\xcd\x93\xbf\x11\x56"
31793                           "\x11\xbe\x08\x74\xe1\x69\xad\xe2"
31794                           "\xd7\xf8\x86\x75\x8a\x3c\xa4\xbe"
31795                           "\x70\xa7\x1b\xfc\x0b\x44\x2a\x76"
31796                           "\x35\xea\x5d\x85\x81\xaf\x85\xeb"
31797                           "\xa0\x1c\x61\xc2\xf7\x4f\xa5\xdc"
31798                           "\x02\x7f\xf6\x95\x40\x6e\x8a\x9a"
31799                           "\xf3\x5d\x25\x6e\x14\x3a\x22\xc9"
31800                           "\x37\x1c\xeb\x46\x54\x3f\xa5\x91"
31801                           "\xc2\xb5\x8c\xfe\x53\x08\x97\x32"
31802                           "\x1b\xb2\x30\x27\xfe\x25\x5d\xdc"
31803                           "\x08\x87\xd0\xe5\x94\x1a\xd4\xf1"
31804                           "\xfe\xd6\xb4\xa3\xe6\x74\x81\x3c"
31805                           "\x1b\xb7\x31\xa7\x22\xfd\xd4\xdd"
31806                           "\x20\x4e\x7c\x51\xb0\x60\x73\xb8"
31807                           "\x9c\xac\x91\x90\x7e\x01\xb0\xe1"
31808                           "\x8a\x2f\x75\x1c\x53\x2a\x98\x2a"
31809                           "\x06\x52\x95\x52\xb2\xe9\x25\x2e"
31810                           "\x4c\xe2\x5a\x00\xb2\x13\x81\x03"
31811                           "\x77\x66\x0d\xa5\x99\xda\x4e\x8c"
31812                           "\xac\xf3\x13\x53\x27\x45\xaf\x64"
31813                           "\x46\xdc\xea\x23\xda\x97\xd1\xab"
31814                           "\x7d\x6c\x30\x96\x1f\xbc\x06\x34"
31815                           "\x18\x0b\x5e\x21\x35\x11\x8d\x4c"
31816                           "\xe0\x2d\xe9\x50\x16\x74\x81\xa8"
31817                           "\xb4\x34\xb9\x72\x42\xa6\xcc\xbc"
31818                           "\xca\x34\x83\x27\x10\x5b\x68\x45"
31819                           "\x8f\x52\x22\x0c\x55\x3d\x29\x7c"
31820                           "\xe3\xc0\x66\x05\x42\x91\x5f\x58"
31821                           "\xfe\x4a\x62\xd9\x8c\xa9\x04\x19"
31822                           "\x04\xa9\x08\x4b\x57\xfc\x67\x53"
31823                           "\x08\x7c\xbc\x66\x8a\xb0\xb6\x9f"
31824                           "\x92\xd6\x41\x7c\x5b\x2a\x00\x79"
31825                           "\x72",
31826                 .ilen   = 1281,
31827                 .result = "\x45\xe8\xe0\xb6\x9c\xca\xfd\x87"
31828                           "\xe8\x1d\x37\x96\x8a\xe3\x40\x35"
31829                           "\xcf\x5e\x3a\x46\x3d\xfb\xd0\x69"
31830                           "\xde\xaf\x7a\xd5\x0d\xe9\x52\xec"
31831                           "\xc2\x82\xe5\x3e\x7d\xb2\x4a\xd9"
31832                           "\xbb\xc3\x9f\xc0\x5d\xac\x93\x8d"
31833                           "\x0e\x6f\xd3\xd7\xfb\x6a\x0d\xce"
31834                           "\x92\x2c\xf7\xbb\x93\x57\xcc\xee"
31835                           "\x42\x72\x6f\xc8\x4b\xd2\x76\xbf"
31836                           "\xa0\xe3\x7a\x39\xf9\x5c\x8e\xfd"
31837                           "\xa1\x1d\x41\xe5\x08\xc1\x1c\x11"
31838                           "\x92\xfd\x39\x5c\x51\xd0\x2f\x66"
31839                           "\x33\x4a\x71\x15\xfe\xee\x12\x54"
31840                           "\x8c\x8f\x34\xd8\x50\x3c\x18\xa6"
31841                           "\xc5\xe1\x46\x8a\xfb\x5f\x7e\x25"
31842                           "\x9b\xe2\xc3\x66\x41\x2b\xb3\xa5"
31843                           "\x57\x0e\x94\x17\x26\x39\xbb\x54"
31844                           "\xae\x2e\x6f\x42\xfb\x4d\x89\x6f"
31845                           "\x9d\xf1\x16\x2e\xe3\xe7\xfc\xe3"
31846                           "\xb2\x4b\x2b\xa6\x7c\x04\x69\x3a"
31847                           "\x70\x5a\xa7\xf1\x31\x64\x19\xca"
31848                           "\x45\x79\xd8\x58\x23\x61\xaf\xc2"
31849                           "\x52\x05\xc3\x0b\xc1\x64\x7c\x81"
31850                           "\xd9\x11\xcf\xff\x02\x3d\x51\x84"
31851                           "\x01\xac\xc6\x2e\x34\x2b\x09\x3a"
31852                           "\xa8\x5d\x98\x0e\x89\xd9\xef\x8f"
31853                           "\xd9\xd7\x7d\xdd\x63\x47\x46\x7d"
31854                           "\xa1\xda\x0b\x53\x7d\x79\xcd\xc9"
31855                           "\x86\xdd\x6b\x13\xa1\x9a\x70\xdd"
31856                           "\x5c\xa1\x69\x3c\xe4\x5d\xe3\x8c"
31857                           "\xe5\xf4\x87\x9c\x10\xcf\x0f\x0b"
31858                           "\xc8\x43\xdc\xf8\x1d\x62\x5e\x5b"
31859                           "\xe2\x03\x06\xc5\x71\xb6\x48\xa5"
31860                           "\xf0\x0f\x2d\xd5\xa2\x73\x55\x8f"
31861                           "\x01\xa7\x59\x80\x5f\x11\x6c\x40"
31862                           "\xff\xb1\xf2\xc6\x7e\x01\xbb\x1c"
31863                           "\x69\x9c\xc9\x3f\x71\x5f\x07\x7e"
31864                           "\xdf\x6f\x99\xca\x9c\xfd\xf9\xb9"
31865                           "\x49\xe7\xcc\x91\xd5\x9b\x8f\x03"
31866                           "\xae\xe7\x61\x32\xef\x41\x6c\x75"
31867                           "\x84\x9b\x8c\xce\x1d\x6b\x93\x21"
31868                           "\x41\xec\xc6\xad\x8e\x0c\x48\xa8"
31869                           "\xe2\xf5\x57\xde\xf7\x38\xfd\x4a"
31870                           "\x6f\xa7\x4a\xf9\xac\x7d\xb1\x85"
31871                           "\x7d\x6c\x95\x0a\x5a\xcf\x68\xd2"
31872                           "\xe0\x7a\x26\xd9\xc1\x6d\x3e\xc6"
31873                           "\x37\xbd\xbe\x24\x36\x77\x9f\x1b"
31874                           "\xc1\x22\xf3\x79\xae\x95\x78\x66"
31875                           "\x97\x11\xc0\x1a\xf1\xe8\x0d\x38"
31876                           "\x09\xc2\xee\xb7\xd3\x46\x7b\x59"
31877                           "\x77\x23\xe8\xb4\x92\x3d\x78\xbe"
31878                           "\xe2\x25\x63\xa5\x2a\x06\x70\x92"
31879                           "\x32\x63\xf9\x19\x21\x68\xe1\x0b"
31880                           "\x9a\xd0\xee\x21\xdb\x1f\xe0\xde"
31881                           "\x3e\x64\x02\x4d\x0e\xe0\x0a\xa9"
31882                           "\xed\x19\x8c\xa8\xbf\xe3\x2e\x75"
31883                           "\x24\x2b\xb0\xe5\x82\x6a\x1e\x6f"
31884                           "\x71\x2a\x3a\x60\xed\x06\x0d\x17"
31885                           "\xa2\xdb\x29\x1d\xae\xb2\xc4\xfb"
31886                           "\x94\x04\xd8\x58\xfc\xc4\x04\x4e"
31887                           "\xee\xc7\xc1\x0f\xe9\x9b\x63\x2d"
31888                           "\x02\x3e\x02\x67\xe5\xd8\xbb\x79"
31889                           "\xdf\xd2\xeb\x50\xe9\x0a\x02\x46"
31890                           "\xdf\x68\xcf\xe7\x2b\x0a\x56\xd6"
31891                           "\xf7\xbc\x44\xad\xb8\xb5\x5f\xeb"
31892                           "\xbc\x74\x6b\xe8\x7e\xb0\x60\xc6"
31893                           "\x0d\x96\x09\xbb\x19\xba\xe0\x3c"
31894                           "\xc4\x6c\xbf\x0f\x58\xc0\x55\x62"
31895                           "\x23\xa0\xff\xb5\x1c\xfd\x18\xe1"
31896                           "\xcf\x6d\xd3\x52\xb4\xce\xa6\xfa"
31897                           "\xaa\xfb\x1b\x0b\x42\x6d\x79\x42"
31898                           "\x48\x70\x5b\x0e\xdd\x3a\xc9\x69"
31899                           "\x8b\x73\x67\xf6\x95\xdb\x8c\xfb"
31900                           "\xfd\xb5\x08\x47\x42\x84\x9a\xfa"
31901                           "\xcc\x67\xb2\x3c\xb6\xfd\xd8\x32"
31902                           "\xd6\x04\xb6\x4a\xea\x53\x4b\xf5"
31903                           "\x94\x16\xad\xf0\x10\x2e\x2d\xb4"
31904                           "\x8b\xab\xe5\x89\xc7\x39\x12\xf3"
31905                           "\x8d\xb5\x96\x0b\x87\x5d\xa7\x7c"
31906                           "\xb0\xc2\xf6\x2e\x57\x97\x2c\xdc"
31907                           "\x54\x1c\x34\x72\xde\x0c\x68\x39"
31908                           "\x9d\x32\xa5\x75\x92\x13\x32\xea"
31909                           "\x90\x27\xbd\x5b\x1d\xb9\x21\x02"
31910                           "\x1c\xcc\xba\x97\x5e\x49\x58\xe8"
31911                           "\xac\x8b\xf3\xce\x3c\xf0\x00\xe9"
31912                           "\x6c\xae\xe9\x77\xdf\xf4\x02\xcd"
31913                           "\x55\x25\x89\x9e\x90\xf3\x6b\x8f"
31914                           "\xb7\xd6\x47\x98\x26\x2f\x31\x2f"
31915                           "\x8d\xbf\x54\xcd\x99\xeb\x80\xd7"
31916                           "\xac\xc3\x08\xc2\xa6\x32\xf1\x24"
31917                           "\x76\x7c\x4f\x78\x53\x55\xfb\x00"
31918                           "\x8a\xd6\x52\x53\x25\x45\xfb\x0a"
31919                           "\x6b\xb9\xbe\x3c\x5e\x11\xcc\x6a"
31920                           "\xdd\xfc\xa7\xc4\x79\x4d\xbd\xfb"
31921                           "\xce\x3a\xf1\x7a\xda\xeb\xfe\x64"
31922                           "\x28\x3d\x0f\xee\x80\xba\x0c\xf8"
31923                           "\xe9\x5b\x3a\xd4\xae\xc9\xf3\x0e"
31924                           "\xe8\x5d\xc5\x5c\x0b\x20\x20\xee"
31925                           "\x40\x0d\xde\x07\xa7\x14\xb4\x90"
31926                           "\xb6\xbd\x3b\xae\x7d\x2b\xa7\xc7"
31927                           "\xdc\x0b\x4c\x5d\x65\xb0\xd2\xc5"
31928                           "\x79\x61\x23\xe0\xa2\x99\x73\x55"
31929                           "\xad\xc6\xfb\xc7\x54\xb5\x98\x1f"
31930                           "\x8c\x86\xc2\x3f\xbe\x5e\xea\x64"
31931                           "\xa3\x60\x18\x9f\x80\xaf\x52\x74"
31932                           "\x1a\xfe\x22\xc2\x92\x67\x40\x02"
31933                           "\x08\xee\x67\x5b\x67\xe0\x3d\xde"
31934                           "\x7a\xaf\x8e\x28\xf3\x5e\x0e\xf4"
31935                           "\x48\x56\xaa\x85\x22\xd8\x36\xed"
31936                           "\x3b\x3d\x68\x69\x30\xbc\x71\x23"
31937                           "\xb1\x6e\x61\x03\x89\x44\x03\xf4"
31938                           "\x32\xaa\x4c\x40\x9f\x69\xfb\x70"
31939                           "\x91\xcc\x1f\x11\xbd\x76\x67\xe6"
31940                           "\x10\x8b\x29\x39\x68\xea\x4e\x6d"
31941                           "\xae\xfb\x40\xcf\xe2\xd0\x0d\x8d"
31942                           "\x6f\xed\x9b\x8d\x64\x7a\x94\x8e"
31943                           "\x32\x38\x78\xeb\x7d\x5f\xf9\x4d"
31944                           "\x13\xbe\x21\xea\x16\xe7\x5c\xee"
31945                           "\xcd\xf6\x5f\xc6\x45\xb2\x8f\x2b"
31946                           "\xb5\x93\x3e\x45\xdb\xfd\xa2\x6a"
31947                           "\xec\x83\x92\x99\x87\x47\xe0\x7c"
31948                           "\xa2\x7b\xc4\x2a\xcd\xc0\x81\x03"
31949                           "\x98\xb0\x87\xb6\x86\x13\x64\x33"
31950                           "\x4c\xd7\x99\xbf\xdb\x7b\x6e\xaa"
31951                           "\x76\xcc\xa0\x74\x1b\xa3\x6e\x83"
31952                           "\xd4\xba\x7a\x84\x9d\x91\x71\xcd"
31953                           "\x60\x2d\x56\xfd\x26\x35\xcb\xeb"
31954                           "\xac\xe9\xee\xa4\xfc\x18\x5b\x91"
31955                           "\xd5\xfe\x84\x45\xe0\xc7\xfd\x11"
31956                           "\xe9\x00\xb6\x54\xdf\xe1\x94\xde"
31957                           "\x2b\x70\x9f\x94\x7f\x15\x0e\x83"
31958                           "\x63\x10\xb3\xf5\xea\xd3\xe8\xd1"
31959                           "\xa5\xfc\x17\x19\x68\x9a\xbc\x17"
31960                           "\x30\x43\x0a\x1a\x33\x92\xd4\x2a"
31961                           "\x2e\x68\x99\xbc\x49\xf0\x68\xe3"
31962                           "\xf0\x1f\xcb\xcc\xfa\xbb\x05\x56"
31963                           "\x46\x84\x8b\x69\x83\x64\xc5\xe0"
31964                           "\xc5\x52\x99\x07\x3c\xa6\x5c\xaf"
31965                           "\xa3\xde\xd7\xdb\x43\xe6\xb7\x76"
31966                           "\x4e\x4d\xd6\x71\x60\x63\x4a\x0c"
31967                           "\x5f\xae\x25\x84\x22\x90\x5f\x26"
31968                           "\x61\x4d\x8f\xaf\xc9\x22\xf2\x05"
31969                           "\xcf\xc1\xdc\x68\xe5\x57\x8e\x24"
31970                           "\x1b\x30\x59\xca\xd7\x0d\xc3\xd3"
31971                           "\x52\x9e\x09\x3e\x0e\xaf\xdb\x5f"
31972                           "\xc7\x2b\xde\x3a\xfd\xad\x93\x04"
31973                           "\x74\x06\x89\x0e\x90\xeb\x85\xff"
31974                           "\xe6\x3c\x12\x42\xf4\xfa\x80\x75"
31975                           "\x5e\x4e\xd7\x2f\x93\x0b\x34\x41"
31976                           "\x02\x85\x68\xd0\x03\x12\xde\x92"
31977                           "\x54\x7a\x7e\xfb\x55\xe7\x88\xfb"
31978                           "\xa4\xa9\xf2\xd1\xc6\x70\x06\x37"
31979                           "\x25\xee\xa7\x6e\xd9\x89\x86\x50"
31980                           "\x2e\x07\xdb\xfb\x2a\x86\x45\x0e"
31981                           "\x91\xf4\x7c\xbb\x12\x60\xe8\x3f"
31982                           "\x71\xbe\x8f\x9d\x26\xef\xd9\x89"
31983                           "\xc4\x8f\xd8\xc5\x73\xd8\x84\xaa"
31984                           "\x2f\xad\x22\x1e\x7e\xcf\xa2\x08"
31985                           "\x23\x45\x89\x42\xa0\x30\xeb\xbf"
31986                           "\xa1\xed\xad\xd5\x76\xfa\x24\x8f"
31987                           "\x98",
31988                 .rlen   = 1281,
31989         },
31990 };
31991
31992 /*
31993  * CTS (Cipher Text Stealing) mode tests
31994  */
31995 #define CTS_MODE_ENC_TEST_VECTORS 6
31996 #define CTS_MODE_DEC_TEST_VECTORS 6
31997 static struct cipher_testvec cts_mode_enc_tv_template[] = {
31998         { /* from rfc3962 */
31999                 .klen   = 16,
32000                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32001                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
32002                 .ilen   = 17,
32003                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32004                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32005                           "\x20",
32006                 .rlen   = 17,
32007                 .result = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
32008                           "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
32009                           "\x97",
32010         }, {
32011                 .klen   = 16,
32012                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32013                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
32014                 .ilen   = 31,
32015                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32016                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32017                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32018                           "\x20\x47\x61\x75\x27\x73\x20",
32019                 .rlen   = 31,
32020                 .result = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
32021                           "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
32022                           "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32023                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
32024         }, {
32025                 .klen   = 16,
32026                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32027                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
32028                 .ilen   = 32,
32029                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32030                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32031                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32032                           "\x20\x47\x61\x75\x27\x73\x20\x43",
32033                 .rlen   = 32,
32034                 .result = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32035                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32036                           "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32037                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
32038         }, {
32039                 .klen   = 16,
32040                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32041                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
32042                 .ilen   = 47,
32043                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32044                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32045                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32046                           "\x20\x47\x61\x75\x27\x73\x20\x43"
32047                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32048                           "\x70\x6c\x65\x61\x73\x65\x2c",
32049                 .rlen   = 47,
32050                 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32051                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32052                           "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
32053                           "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
32054                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32055                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
32056         }, {
32057                 .klen   = 16,
32058                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32059                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
32060                 .ilen   = 48,
32061                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32062                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32063                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32064                           "\x20\x47\x61\x75\x27\x73\x20\x43"
32065                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32066                           "\x70\x6c\x65\x61\x73\x65\x2c\x20",
32067                 .rlen   = 48,
32068                 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32069                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32070                           "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32071                           "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
32072                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32073                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
32074         }, {
32075                 .klen   = 16,
32076                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32077                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
32078                 .ilen   = 64,
32079                 .input  = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32080                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32081                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32082                           "\x20\x47\x61\x75\x27\x73\x20\x43"
32083                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32084                           "\x70\x6c\x65\x61\x73\x65\x2c\x20"
32085                           "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
32086                           "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
32087                 .rlen   = 64,
32088                 .result = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32089                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32090                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32091                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32092                           "\x48\x07\xef\xe8\x36\xee\x89\xa5"
32093                           "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
32094                           "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32095                           "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
32096         }
32097 };
32098
32099 static struct cipher_testvec cts_mode_dec_tv_template[] = {
32100         { /* from rfc3962 */
32101                 .klen   = 16,
32102                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32103                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
32104                 .rlen   = 17,
32105                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32106                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32107                           "\x20",
32108                 .ilen   = 17,
32109                 .input  = "\xc6\x35\x35\x68\xf2\xbf\x8c\xb4"
32110                           "\xd8\xa5\x80\x36\x2d\xa7\xff\x7f"
32111                           "\x97",
32112         }, {
32113                 .klen   = 16,
32114                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32115                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
32116                 .rlen   = 31,
32117                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32118                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32119                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32120                           "\x20\x47\x61\x75\x27\x73\x20",
32121                 .ilen   = 31,
32122                 .input  = "\xfc\x00\x78\x3e\x0e\xfd\xb2\xc1"
32123                           "\xd4\x45\xd4\xc8\xef\xf7\xed\x22"
32124                           "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32125                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5",
32126         }, {
32127                 .klen   = 16,
32128                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32129                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
32130                 .rlen   = 32,
32131                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32132                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32133                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32134                           "\x20\x47\x61\x75\x27\x73\x20\x43",
32135                 .ilen   = 32,
32136                 .input  = "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32137                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32138                           "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32139                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84",
32140         }, {
32141                 .klen   = 16,
32142                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32143                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
32144                 .rlen   = 47,
32145                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32146                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32147                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32148                           "\x20\x47\x61\x75\x27\x73\x20\x43"
32149                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32150                           "\x70\x6c\x65\x61\x73\x65\x2c",
32151                 .ilen   = 47,
32152                 .input  = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32153                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32154                           "\xb3\xff\xfd\x94\x0c\x16\xa1\x8c"
32155                           "\x1b\x55\x49\xd2\xf8\x38\x02\x9e"
32156                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32157                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5",
32158         }, {
32159                 .klen   = 16,
32160                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32161                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
32162                 .rlen   = 48,
32163                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32164                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32165                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32166                           "\x20\x47\x61\x75\x27\x73\x20\x43"
32167                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32168                           "\x70\x6c\x65\x61\x73\x65\x2c\x20",
32169                 .ilen   = 48,
32170                 .input  = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32171                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32172                           "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32173                           "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8"
32174                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32175                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8",
32176         }, {
32177                 .klen   = 16,
32178                 .key    = "\x63\x68\x69\x63\x6b\x65\x6e\x20"
32179                           "\x74\x65\x72\x69\x79\x61\x6b\x69",
32180                 .rlen   = 64,
32181                 .result = "\x49\x20\x77\x6f\x75\x6c\x64\x20"
32182                           "\x6c\x69\x6b\x65\x20\x74\x68\x65"
32183                           "\x20\x47\x65\x6e\x65\x72\x61\x6c"
32184                           "\x20\x47\x61\x75\x27\x73\x20\x43"
32185                           "\x68\x69\x63\x6b\x65\x6e\x2c\x20"
32186                           "\x70\x6c\x65\x61\x73\x65\x2c\x20"
32187                           "\x61\x6e\x64\x20\x77\x6f\x6e\x74"
32188                           "\x6f\x6e\x20\x73\x6f\x75\x70\x2e",
32189                 .ilen   = 64,
32190                 .input  = "\x97\x68\x72\x68\xd6\xec\xcc\xc0"
32191                           "\xc0\x7b\x25\xe2\x5e\xcf\xe5\x84"
32192                           "\x39\x31\x25\x23\xa7\x86\x62\xd5"
32193                           "\xbe\x7f\xcb\xcc\x98\xeb\xf5\xa8"
32194                           "\x48\x07\xef\xe8\x36\xee\x89\xa5"
32195                           "\x26\x73\x0d\xbc\x2f\x7b\xc8\x40"
32196                           "\x9d\xad\x8b\xbb\x96\xc4\xcd\xc0"
32197                           "\x3b\xc1\x03\xe1\xa1\x94\xbb\xd8",
32198         }
32199 };
32200
32201 /*
32202  * Compression stuff.
32203  */
32204 #define COMP_BUF_SIZE           512
32205
32206 struct comp_testvec {
32207         int inlen, outlen;
32208         char input[COMP_BUF_SIZE];
32209         char output[COMP_BUF_SIZE];
32210 };
32211
32212 struct pcomp_testvec {
32213         const void *params;
32214         unsigned int paramsize;
32215         int inlen, outlen;
32216         char input[COMP_BUF_SIZE];
32217         char output[COMP_BUF_SIZE];
32218 };
32219
32220 /*
32221  * Deflate test vectors (null-terminated strings).
32222  * Params: winbits=-11, Z_DEFAULT_COMPRESSION, MAX_MEM_LEVEL.
32223  */
32224
32225 #define DEFLATE_COMP_TEST_VECTORS 2
32226 #define DEFLATE_DECOMP_TEST_VECTORS 2
32227
32228 static struct comp_testvec deflate_comp_tv_template[] = {
32229         {
32230                 .inlen  = 70,
32231                 .outlen = 38,
32232                 .input  = "Join us now and share the software "
32233                         "Join us now and share the software ",
32234                 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
32235                           "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
32236                           "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
32237                           "\x48\x55\x28\xce\x4f\x2b\x29\x07"
32238                           "\x71\xbc\x08\x2b\x01\x00",
32239         }, {
32240                 .inlen  = 191,
32241                 .outlen = 122,
32242                 .input  = "This document describes a compression method based on the DEFLATE"
32243                         "compression algorithm.  This document defines the application of "
32244                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
32245                 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
32246                           "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
32247                           "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
32248                           "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
32249                           "\x68\x12\x51\xae\x76\x67\xd6\x27"
32250                           "\x19\x88\x1a\xde\x85\xab\x21\xf2"
32251                           "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
32252                           "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
32253                           "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
32254                           "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
32255                           "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
32256                           "\x52\x37\xed\x0e\x52\x6b\x59\x02"
32257                           "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
32258                           "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
32259                           "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
32260                           "\xfa\x02",
32261         },
32262 };
32263
32264 static struct comp_testvec deflate_decomp_tv_template[] = {
32265         {
32266                 .inlen  = 122,
32267                 .outlen = 191,
32268                 .input  = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
32269                           "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
32270                           "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
32271                           "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
32272                           "\x68\x12\x51\xae\x76\x67\xd6\x27"
32273                           "\x19\x88\x1a\xde\x85\xab\x21\xf2"
32274                           "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
32275                           "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
32276                           "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
32277                           "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
32278                           "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
32279                           "\x52\x37\xed\x0e\x52\x6b\x59\x02"
32280                           "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
32281                           "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
32282                           "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
32283                           "\xfa\x02",
32284                 .output = "This document describes a compression method based on the DEFLATE"
32285                         "compression algorithm.  This document defines the application of "
32286                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
32287         }, {
32288                 .inlen  = 38,
32289                 .outlen = 70,
32290                 .input  = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
32291                           "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
32292                           "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
32293                           "\x48\x55\x28\xce\x4f\x2b\x29\x07"
32294                           "\x71\xbc\x08\x2b\x01\x00",
32295                 .output = "Join us now and share the software "
32296                         "Join us now and share the software ",
32297         },
32298 };
32299
32300 #define ZLIB_COMP_TEST_VECTORS 2
32301 #define ZLIB_DECOMP_TEST_VECTORS 2
32302
32303 static const struct {
32304         struct nlattr nla;
32305         int val;
32306 } deflate_comp_params[] = {
32307         {
32308                 .nla = {
32309                         .nla_len        = NLA_HDRLEN + sizeof(int),
32310                         .nla_type       = ZLIB_COMP_LEVEL,
32311                 },
32312                 .val                    = Z_DEFAULT_COMPRESSION,
32313         }, {
32314                 .nla = {
32315                         .nla_len        = NLA_HDRLEN + sizeof(int),
32316                         .nla_type       = ZLIB_COMP_METHOD,
32317                 },
32318                 .val                    = Z_DEFLATED,
32319         }, {
32320                 .nla = {
32321                         .nla_len        = NLA_HDRLEN + sizeof(int),
32322                         .nla_type       = ZLIB_COMP_WINDOWBITS,
32323                 },
32324                 .val                    = -11,
32325         }, {
32326                 .nla = {
32327                         .nla_len        = NLA_HDRLEN + sizeof(int),
32328                         .nla_type       = ZLIB_COMP_MEMLEVEL,
32329                 },
32330                 .val                    = MAX_MEM_LEVEL,
32331         }, {
32332                 .nla = {
32333                         .nla_len        = NLA_HDRLEN + sizeof(int),
32334                         .nla_type       = ZLIB_COMP_STRATEGY,
32335                 },
32336                 .val                    = Z_DEFAULT_STRATEGY,
32337         }
32338 };
32339
32340 static const struct {
32341         struct nlattr nla;
32342         int val;
32343 } deflate_decomp_params[] = {
32344         {
32345                 .nla = {
32346                         .nla_len        = NLA_HDRLEN + sizeof(int),
32347                         .nla_type       = ZLIB_DECOMP_WINDOWBITS,
32348                 },
32349                 .val                    = -11,
32350         }
32351 };
32352
32353 static struct pcomp_testvec zlib_comp_tv_template[] = {
32354         {
32355                 .params = &deflate_comp_params,
32356                 .paramsize = sizeof(deflate_comp_params),
32357                 .inlen  = 70,
32358                 .outlen = 38,
32359                 .input  = "Join us now and share the software "
32360                         "Join us now and share the software ",
32361                 .output = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
32362                           "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
32363                           "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
32364                           "\x48\x55\x28\xce\x4f\x2b\x29\x07"
32365                           "\x71\xbc\x08\x2b\x01\x00",
32366         }, {
32367                 .params = &deflate_comp_params,
32368                 .paramsize = sizeof(deflate_comp_params),
32369                 .inlen  = 191,
32370                 .outlen = 122,
32371                 .input  = "This document describes a compression method based on the DEFLATE"
32372                         "compression algorithm.  This document defines the application of "
32373                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
32374                 .output = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
32375                           "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
32376                           "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
32377                           "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
32378                           "\x68\x12\x51\xae\x76\x67\xd6\x27"
32379                           "\x19\x88\x1a\xde\x85\xab\x21\xf2"
32380                           "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
32381                           "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
32382                           "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
32383                           "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
32384                           "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
32385                           "\x52\x37\xed\x0e\x52\x6b\x59\x02"
32386                           "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
32387                           "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
32388                           "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
32389                           "\xfa\x02",
32390         },
32391 };
32392
32393 static struct pcomp_testvec zlib_decomp_tv_template[] = {
32394         {
32395                 .params = &deflate_decomp_params,
32396                 .paramsize = sizeof(deflate_decomp_params),
32397                 .inlen  = 122,
32398                 .outlen = 191,
32399                 .input  = "\x5d\x8d\x31\x0e\xc2\x30\x10\x04"
32400                           "\xbf\xb2\x2f\xc8\x1f\x10\x04\x09"
32401                           "\x89\xc2\x85\x3f\x70\xb1\x2f\xf8"
32402                           "\x24\xdb\x67\xd9\x47\xc1\xef\x49"
32403                           "\x68\x12\x51\xae\x76\x67\xd6\x27"
32404                           "\x19\x88\x1a\xde\x85\xab\x21\xf2"
32405                           "\x08\x5d\x16\x1e\x20\x04\x2d\xad"
32406                           "\xf3\x18\xa2\x15\x85\x2d\x69\xc4"
32407                           "\x42\x83\x23\xb6\x6c\x89\x71\x9b"
32408                           "\xef\xcf\x8b\x9f\xcf\x33\xca\x2f"
32409                           "\xed\x62\xa9\x4c\x80\xff\x13\xaf"
32410                           "\x52\x37\xed\x0e\x52\x6b\x59\x02"
32411                           "\xd9\x4e\xe8\x7a\x76\x1d\x02\x98"
32412                           "\xfe\x8a\x87\x83\xa3\x4f\x56\x8a"
32413                           "\xb8\x9e\x8e\x5c\x57\xd3\xa0\x79"
32414                           "\xfa\x02",
32415                 .output = "This document describes a compression method based on the DEFLATE"
32416                         "compression algorithm.  This document defines the application of "
32417                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
32418         }, {
32419                 .params = &deflate_decomp_params,
32420                 .paramsize = sizeof(deflate_decomp_params),
32421                 .inlen  = 38,
32422                 .outlen = 70,
32423                 .input  = "\xf3\xca\xcf\xcc\x53\x28\x2d\x56"
32424                           "\xc8\xcb\x2f\x57\x48\xcc\x4b\x51"
32425                           "\x28\xce\x48\x2c\x4a\x55\x28\xc9"
32426                           "\x48\x55\x28\xce\x4f\x2b\x29\x07"
32427                           "\x71\xbc\x08\x2b\x01\x00",
32428                 .output = "Join us now and share the software "
32429                         "Join us now and share the software ",
32430         },
32431 };
32432
32433 /*
32434  * LZO test vectors (null-terminated strings).
32435  */
32436 #define LZO_COMP_TEST_VECTORS 2
32437 #define LZO_DECOMP_TEST_VECTORS 2
32438
32439 static struct comp_testvec lzo_comp_tv_template[] = {
32440         {
32441                 .inlen  = 70,
32442                 .outlen = 57,
32443                 .input  = "Join us now and share the software "
32444                         "Join us now and share the software ",
32445                 .output = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
32446                           "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
32447                           "\x64\x20\x73\x68\x61\x72\x65\x20"
32448                           "\x74\x68\x65\x20\x73\x6f\x66\x74"
32449                           "\x77\x70\x01\x32\x88\x00\x0c\x65"
32450                           "\x20\x74\x68\x65\x20\x73\x6f\x66"
32451                           "\x74\x77\x61\x72\x65\x20\x11\x00"
32452                           "\x00",
32453         }, {
32454                 .inlen  = 159,
32455                 .outlen = 131,
32456                 .input  = "This document describes a compression method based on the LZO "
32457                         "compression algorithm.  This document defines the application of "
32458                         "the LZO algorithm used in UBIFS.",
32459                 .output = "\x00\x2c\x54\x68\x69\x73\x20\x64"
32460                           "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
32461                           "\x64\x65\x73\x63\x72\x69\x62\x65"
32462                           "\x73\x20\x61\x20\x63\x6f\x6d\x70"
32463                           "\x72\x65\x73\x73\x69\x6f\x6e\x20"
32464                           "\x6d\x65\x74\x68\x6f\x64\x20\x62"
32465                           "\x61\x73\x65\x64\x20\x6f\x6e\x20"
32466                           "\x74\x68\x65\x20\x4c\x5a\x4f\x20"
32467                           "\x2a\x8c\x00\x09\x61\x6c\x67\x6f"
32468                           "\x72\x69\x74\x68\x6d\x2e\x20\x20"
32469                           "\x2e\x54\x01\x03\x66\x69\x6e\x65"
32470                           "\x73\x20\x74\x06\x05\x61\x70\x70"
32471                           "\x6c\x69\x63\x61\x74\x76\x0a\x6f"
32472                           "\x66\x88\x02\x60\x09\x27\xf0\x00"
32473                           "\x0c\x20\x75\x73\x65\x64\x20\x69"
32474                           "\x6e\x20\x55\x42\x49\x46\x53\x2e"
32475                           "\x11\x00\x00",
32476         },
32477 };
32478
32479 static struct comp_testvec lzo_decomp_tv_template[] = {
32480         {
32481                 .inlen  = 133,
32482                 .outlen = 159,
32483                 .input  = "\x00\x2b\x54\x68\x69\x73\x20\x64"
32484                           "\x6f\x63\x75\x6d\x65\x6e\x74\x20"
32485                           "\x64\x65\x73\x63\x72\x69\x62\x65"
32486                           "\x73\x20\x61\x20\x63\x6f\x6d\x70"
32487                           "\x72\x65\x73\x73\x69\x6f\x6e\x20"
32488                           "\x6d\x65\x74\x68\x6f\x64\x20\x62"
32489                           "\x61\x73\x65\x64\x20\x6f\x6e\x20"
32490                           "\x74\x68\x65\x20\x4c\x5a\x4f\x2b"
32491                           "\x8c\x00\x0d\x61\x6c\x67\x6f\x72"
32492                           "\x69\x74\x68\x6d\x2e\x20\x20\x54"
32493                           "\x68\x69\x73\x2a\x54\x01\x02\x66"
32494                           "\x69\x6e\x65\x73\x94\x06\x05\x61"
32495                           "\x70\x70\x6c\x69\x63\x61\x74\x76"
32496                           "\x0a\x6f\x66\x88\x02\x60\x09\x27"
32497                           "\xf0\x00\x0c\x20\x75\x73\x65\x64"
32498                           "\x20\x69\x6e\x20\x55\x42\x49\x46"
32499                           "\x53\x2e\x11\x00\x00",
32500                 .output = "This document describes a compression method based on the LZO "
32501                         "compression algorithm.  This document defines the application of "
32502                         "the LZO algorithm used in UBIFS.",
32503         }, {
32504                 .inlen  = 46,
32505                 .outlen = 70,
32506                 .input  = "\x00\x0d\x4a\x6f\x69\x6e\x20\x75"
32507                           "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
32508                           "\x64\x20\x73\x68\x61\x72\x65\x20"
32509                           "\x74\x68\x65\x20\x73\x6f\x66\x74"
32510                           "\x77\x70\x01\x01\x4a\x6f\x69\x6e"
32511                           "\x3d\x88\x00\x11\x00\x00",
32512                 .output = "Join us now and share the software "
32513                         "Join us now and share the software ",
32514         },
32515 };
32516
32517 /*
32518  * Michael MIC test vectors from IEEE 802.11i
32519  */
32520 #define MICHAEL_MIC_TEST_VECTORS 6
32521
32522 static struct hash_testvec michael_mic_tv_template[] = {
32523         {
32524                 .key = "\x00\x00\x00\x00\x00\x00\x00\x00",
32525                 .ksize = 8,
32526                 .plaintext = zeroed_string,
32527                 .psize = 0,
32528                 .digest = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
32529         },
32530         {
32531                 .key = "\x82\x92\x5c\x1c\xa1\xd1\x30\xb8",
32532                 .ksize = 8,
32533                 .plaintext = "M",
32534                 .psize = 1,
32535                 .digest = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
32536         },
32537         {
32538                 .key = "\x43\x47\x21\xca\x40\x63\x9b\x3f",
32539                 .ksize = 8,
32540                 .plaintext = "Mi",
32541                 .psize = 2,
32542                 .digest = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
32543         },
32544         {
32545                 .key = "\xe8\xf9\xbe\xca\xe9\x7e\x5d\x29",
32546                 .ksize = 8,
32547                 .plaintext = "Mic",
32548                 .psize = 3,
32549                 .digest = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
32550         },
32551         {
32552                 .key = "\x90\x03\x8f\xc6\xcf\x13\xc1\xdb",
32553                 .ksize = 8,
32554                 .plaintext = "Mich",
32555                 .psize = 4,
32556                 .digest = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
32557         },
32558         {
32559                 .key = "\xd5\x5e\x10\x05\x10\x12\x89\x86",
32560                 .ksize = 8,
32561                 .plaintext = "Michael",
32562                 .psize = 7,
32563                 .digest = "\x0a\x94\x2b\x12\x4e\xca\xa5\x46",
32564         }
32565 };
32566
32567 /*
32568  * CRC32 test vectors
32569  */
32570 #define CRC32_TEST_VECTORS 14
32571
32572 static struct hash_testvec crc32_tv_template[] = {
32573         {
32574                 .key = "\x87\xa9\xcb\xed",
32575                 .ksize = 4,
32576                 .psize = 0,
32577                 .digest = "\x87\xa9\xcb\xed",
32578         },
32579         {
32580                 .key = "\xff\xff\xff\xff",
32581                 .ksize = 4,
32582                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
32583                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
32584                              "\x11\x12\x13\x14\x15\x16\x17\x18"
32585                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
32586                              "\x21\x22\x23\x24\x25\x26\x27\x28",
32587                 .psize = 40,
32588                 .digest = "\x3a\xdf\x4b\xb0",
32589         },
32590         {
32591                 .key = "\xff\xff\xff\xff",
32592                 .ksize = 4,
32593                 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
32594                              "\x31\x32\x33\x34\x35\x36\x37\x38"
32595                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
32596                              "\x41\x42\x43\x44\x45\x46\x47\x48"
32597                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
32598                 .psize = 40,
32599                 .digest = "\xa9\x7a\x7f\x7b",
32600         },
32601         {
32602                 .key = "\xff\xff\xff\xff",
32603                 .ksize = 4,
32604                 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
32605                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
32606                              "\x61\x62\x63\x64\x65\x66\x67\x68"
32607                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
32608                              "\x71\x72\x73\x74\x75\x76\x77\x78",
32609                 .psize = 40,
32610                 .digest = "\xba\xd3\xf8\x1c",
32611         },
32612         {
32613                 .key = "\xff\xff\xff\xff",
32614                 .ksize = 4,
32615                 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
32616                              "\x81\x82\x83\x84\x85\x86\x87\x88"
32617                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
32618                              "\x91\x92\x93\x94\x95\x96\x97\x98"
32619                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
32620                 .psize = 40,
32621                 .digest = "\xa8\xa9\xc2\x02",
32622         },
32623         {
32624                 .key = "\xff\xff\xff\xff",
32625                 .ksize = 4,
32626                 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
32627                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
32628                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
32629                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
32630                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
32631                 .psize = 40,
32632                 .digest = "\x27\xf0\x57\xe2",
32633         },
32634         {
32635                 .key = "\xff\xff\xff\xff",
32636                 .ksize = 4,
32637                 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
32638                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
32639                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
32640                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
32641                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
32642                 .psize = 40,
32643                 .digest = "\x49\x78\x10\x08",
32644         },
32645         {
32646                 .key = "\x80\xea\xd3\xf1",
32647                 .ksize = 4,
32648                 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
32649                              "\x31\x32\x33\x34\x35\x36\x37\x38"
32650                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
32651                              "\x41\x42\x43\x44\x45\x46\x47\x48"
32652                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
32653                 .psize = 40,
32654                 .digest = "\x9a\xb1\xdc\xf0",
32655         },
32656         {
32657                 .key = "\xf3\x4a\x1d\x5d",
32658                 .ksize = 4,
32659                 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
32660                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
32661                              "\x61\x62\x63\x64\x65\x66\x67\x68"
32662                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
32663                              "\x71\x72\x73\x74\x75\x76\x77\x78",
32664                 .psize = 40,
32665                 .digest = "\xb4\x97\xcc\xd4",
32666         },
32667         {
32668                 .key = "\x2e\x80\x04\x59",
32669                 .ksize = 4,
32670                 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
32671                              "\x81\x82\x83\x84\x85\x86\x87\x88"
32672                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
32673                              "\x91\x92\x93\x94\x95\x96\x97\x98"
32674                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
32675                 .psize = 40,
32676                 .digest = "\x67\x9b\xfa\x79",
32677         },
32678         {
32679                 .key = "\xa6\xcc\x19\x85",
32680                 .ksize = 4,
32681                 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
32682                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
32683                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
32684                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
32685                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
32686                 .psize = 40,
32687                 .digest = "\x24\xb5\x16\xef",
32688         },
32689         {
32690                 .key = "\x41\xfc\xfe\x2d",
32691                 .ksize = 4,
32692                 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
32693                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
32694                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
32695                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
32696                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
32697                 .psize = 40,
32698                 .digest = "\x15\x94\x80\x39",
32699         },
32700         {
32701                 .key = "\xff\xff\xff\xff",
32702                 .ksize = 4,
32703                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
32704                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
32705                              "\x11\x12\x13\x14\x15\x16\x17\x18"
32706                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
32707                              "\x21\x22\x23\x24\x25\x26\x27\x28"
32708                              "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
32709                              "\x31\x32\x33\x34\x35\x36\x37\x38"
32710                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
32711                              "\x41\x42\x43\x44\x45\x46\x47\x48"
32712                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
32713                              "\x51\x52\x53\x54\x55\x56\x57\x58"
32714                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
32715                              "\x61\x62\x63\x64\x65\x66\x67\x68"
32716                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
32717                              "\x71\x72\x73\x74\x75\x76\x77\x78"
32718                              "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
32719                              "\x81\x82\x83\x84\x85\x86\x87\x88"
32720                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
32721                              "\x91\x92\x93\x94\x95\x96\x97\x98"
32722                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
32723                              "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
32724                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
32725                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
32726                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
32727                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
32728                              "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
32729                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
32730                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
32731                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
32732                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
32733                 .psize = 240,
32734                 .digest = "\x6c\xc6\x56\xde",
32735                 .np = 2,
32736                 .tap = { 31, 209 }
32737         }, {
32738                 .key = "\xff\xff\xff\xff",
32739                 .ksize = 4,
32740                 .plaintext =    "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
32741                                 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
32742                                 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
32743                                 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
32744                                 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
32745                                 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
32746                                 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
32747                                 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
32748                                 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
32749                                 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
32750                                 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
32751                                 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
32752                                 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
32753                                 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
32754                                 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
32755                                 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
32756                                 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
32757                                 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
32758                                 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
32759                                 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
32760                                 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
32761                                 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
32762                                 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
32763                                 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
32764                                 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
32765                                 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
32766                                 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
32767                                 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
32768                                 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
32769                                 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
32770                                 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
32771                                 "\x47\xde\x75\x0c\x80\x17\xae\x22"
32772                                 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
32773                                 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
32774                                 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
32775                                 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
32776                                 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
32777                                 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
32778                                 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
32779                                 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
32780                                 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
32781                                 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
32782                                 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
32783                                 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
32784                                 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
32785                                 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
32786                                 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
32787                                 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
32788                                 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
32789                                 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
32790                                 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
32791                                 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
32792                                 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
32793                                 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
32794                                 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
32795                                 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
32796                                 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
32797                                 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
32798                                 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
32799                                 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
32800                                 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
32801                                 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
32802                                 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
32803                                 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
32804                                 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
32805                                 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
32806                                 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
32807                                 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
32808                                 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
32809                                 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
32810                                 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
32811                                 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
32812                                 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
32813                                 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
32814                                 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
32815                                 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
32816                                 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
32817                                 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
32818                                 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
32819                                 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
32820                                 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
32821                                 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
32822                                 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
32823                                 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
32824                                 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
32825                                 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
32826                                 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
32827                                 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
32828                                 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
32829                                 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
32830                                 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
32831                                 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
32832                                 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
32833                                 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
32834                                 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
32835                                 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
32836                                 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
32837                                 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
32838                                 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
32839                                 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
32840                                 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
32841                                 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
32842                                 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
32843                                 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
32844                                 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
32845                                 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
32846                                 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
32847                                 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
32848                                 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
32849                                 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
32850                                 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
32851                                 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
32852                                 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
32853                                 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
32854                                 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
32855                                 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
32856                                 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
32857                                 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
32858                                 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
32859                                 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
32860                                 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
32861                                 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
32862                                 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
32863                                 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
32864                                 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
32865                                 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
32866                                 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
32867                                 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
32868                                 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
32869                                 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
32870                                 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
32871                                 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
32872                                 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
32873                                 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
32874                                 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
32875                                 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
32876                                 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
32877                                 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
32878                                 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
32879                                 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
32880                                 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
32881                                 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
32882                                 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
32883                                 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
32884                                 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
32885                                 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
32886                                 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
32887                                 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
32888                                 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
32889                                 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
32890                                 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
32891                                 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
32892                                 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
32893                                 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
32894                                 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
32895                                 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
32896                                 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
32897                                 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
32898                                 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
32899                                 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
32900                                 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
32901                                 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
32902                                 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
32903                                 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
32904                                 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
32905                                 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
32906                                 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
32907                                 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
32908                                 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
32909                                 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
32910                                 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
32911                                 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
32912                                 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
32913                                 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
32914                                 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
32915                                 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
32916                                 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
32917                                 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
32918                                 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
32919                                 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
32920                                 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
32921                                 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
32922                                 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
32923                                 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
32924                                 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
32925                                 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
32926                                 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
32927                                 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
32928                                 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
32929                                 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
32930                                 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
32931                                 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
32932                                 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
32933                                 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
32934                                 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
32935                                 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
32936                                 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
32937                                 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
32938                                 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
32939                                 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
32940                                 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
32941                                 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
32942                                 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
32943                                 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
32944                                 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
32945                                 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
32946                                 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
32947                                 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
32948                                 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
32949                                 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
32950                                 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
32951                                 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
32952                                 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
32953                                 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
32954                                 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
32955                                 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
32956                                 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
32957                                 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
32958                                 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
32959                                 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
32960                                 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
32961                                 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
32962                                 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
32963                                 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
32964                                 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
32965                                 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
32966                                 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
32967                                 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
32968                                 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
32969                                 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
32970                                 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
32971                                 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
32972                                 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
32973                                 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
32974                                 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
32975                                 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
32976                                 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
32977                                 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
32978                                 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
32979                                 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
32980                                 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
32981                                 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
32982                                 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
32983                                 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
32984                                 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
32985                                 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
32986                                 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
32987                                 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
32988                                 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
32989                                 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
32990                                 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
32991                                 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
32992                                 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
32993                                 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
32994                                 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
32995                                 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
32996                 .psize = 2048,
32997                 .digest = "\xfb\x3a\x7a\xda",
32998         }
32999 };
33000
33001 /*
33002  * CRC32C test vectors
33003  */
33004 #define CRC32C_TEST_VECTORS 15
33005
33006 static struct hash_testvec crc32c_tv_template[] = {
33007         {
33008                 .psize = 0,
33009                 .digest = "\x00\x00\x00\x00",
33010         },
33011         {
33012                 .key = "\x87\xa9\xcb\xed",
33013                 .ksize = 4,
33014                 .psize = 0,
33015                 .digest = "\x78\x56\x34\x12",
33016         },
33017         {
33018                 .key = "\xff\xff\xff\xff",
33019                 .ksize = 4,
33020                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33021                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33022                              "\x11\x12\x13\x14\x15\x16\x17\x18"
33023                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33024                              "\x21\x22\x23\x24\x25\x26\x27\x28",
33025                 .psize = 40,
33026                 .digest = "\x7f\x15\x2c\x0e",
33027         },
33028         {
33029                 .key = "\xff\xff\xff\xff",
33030                 .ksize = 4,
33031                 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33032                              "\x31\x32\x33\x34\x35\x36\x37\x38"
33033                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33034                              "\x41\x42\x43\x44\x45\x46\x47\x48"
33035                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
33036                 .psize = 40,
33037                 .digest = "\xf6\xeb\x80\xe9",
33038         },
33039         {
33040                 .key = "\xff\xff\xff\xff",
33041                 .ksize = 4,
33042                 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
33043                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33044                              "\x61\x62\x63\x64\x65\x66\x67\x68"
33045                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33046                              "\x71\x72\x73\x74\x75\x76\x77\x78",
33047                 .psize = 40,
33048                 .digest = "\xed\xbd\x74\xde",
33049         },
33050         {
33051                 .key = "\xff\xff\xff\xff",
33052                 .ksize = 4,
33053                 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33054                              "\x81\x82\x83\x84\x85\x86\x87\x88"
33055                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33056                              "\x91\x92\x93\x94\x95\x96\x97\x98"
33057                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
33058                 .psize = 40,
33059                 .digest = "\x62\xc8\x79\xd5",
33060         },
33061         {
33062                 .key = "\xff\xff\xff\xff",
33063                 .ksize = 4,
33064                 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33065                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33066                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33067                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33068                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
33069                 .psize = 40,
33070                 .digest = "\xd0\x9a\x97\xba",
33071         },
33072         {
33073                 .key = "\xff\xff\xff\xff",
33074                 .ksize = 4,
33075                 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33076                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33077                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33078                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33079                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33080                 .psize = 40,
33081                 .digest = "\x13\xd9\x29\x2b",
33082         },
33083         {
33084                 .key = "\x80\xea\xd3\xf1",
33085                 .ksize = 4,
33086                 .plaintext = "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33087                              "\x31\x32\x33\x34\x35\x36\x37\x38"
33088                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33089                              "\x41\x42\x43\x44\x45\x46\x47\x48"
33090                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50",
33091                 .psize = 40,
33092                 .digest = "\x0c\xb5\xe2\xa2",
33093         },
33094         {
33095                 .key = "\xf3\x4a\x1d\x5d",
33096                 .ksize = 4,
33097                 .plaintext = "\x51\x52\x53\x54\x55\x56\x57\x58"
33098                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33099                              "\x61\x62\x63\x64\x65\x66\x67\x68"
33100                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33101                              "\x71\x72\x73\x74\x75\x76\x77\x78",
33102                 .psize = 40,
33103                 .digest = "\xd1\x7f\xfb\xa6",
33104         },
33105         {
33106                 .key = "\x2e\x80\x04\x59",
33107                 .ksize = 4,
33108                 .plaintext = "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33109                              "\x81\x82\x83\x84\x85\x86\x87\x88"
33110                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33111                              "\x91\x92\x93\x94\x95\x96\x97\x98"
33112                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0",
33113                 .psize = 40,
33114                 .digest = "\x59\x33\xe6\x7a",
33115         },
33116         {
33117                 .key = "\xa6\xcc\x19\x85",
33118                 .ksize = 4,
33119                 .plaintext = "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33120                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33121                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33122                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33123                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8",
33124                 .psize = 40,
33125                 .digest = "\xbe\x03\x01\xd2",
33126         },
33127         {
33128                 .key = "\x41\xfc\xfe\x2d",
33129                 .ksize = 4,
33130                 .plaintext = "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33131                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33132                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33133                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33134                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33135                 .psize = 40,
33136                 .digest = "\x75\xd3\xc5\x24",
33137         },
33138         {
33139                 .key = "\xff\xff\xff\xff",
33140                 .ksize = 4,
33141                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33142                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33143                              "\x11\x12\x13\x14\x15\x16\x17\x18"
33144                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33145                              "\x21\x22\x23\x24\x25\x26\x27\x28"
33146                              "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33147                              "\x31\x32\x33\x34\x35\x36\x37\x38"
33148                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33149                              "\x41\x42\x43\x44\x45\x46\x47\x48"
33150                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
33151                              "\x51\x52\x53\x54\x55\x56\x57\x58"
33152                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33153                              "\x61\x62\x63\x64\x65\x66\x67\x68"
33154                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33155                              "\x71\x72\x73\x74\x75\x76\x77\x78"
33156                              "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33157                              "\x81\x82\x83\x84\x85\x86\x87\x88"
33158                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33159                              "\x91\x92\x93\x94\x95\x96\x97\x98"
33160                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
33161                              "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33162                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33163                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33164                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33165                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
33166                              "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33167                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33168                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33169                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33170                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33171                 .psize = 240,
33172                 .digest = "\x75\xd3\xc5\x24",
33173                 .np = 2,
33174                 .tap = { 31, 209 }
33175         }, {
33176                 .key = "\xff\xff\xff\xff",
33177                 .ksize = 4,
33178                 .plaintext =    "\x6e\x05\x79\x10\xa7\x1b\xb2\x49"
33179                                 "\xe0\x54\xeb\x82\x19\x8d\x24\xbb"
33180                                 "\x2f\xc6\x5d\xf4\x68\xff\x96\x0a"
33181                                 "\xa1\x38\xcf\x43\xda\x71\x08\x7c"
33182                                 "\x13\xaa\x1e\xb5\x4c\xe3\x57\xee"
33183                                 "\x85\x1c\x90\x27\xbe\x32\xc9\x60"
33184                                 "\xf7\x6b\x02\x99\x0d\xa4\x3b\xd2"
33185                                 "\x46\xdd\x74\x0b\x7f\x16\xad\x21"
33186                                 "\xb8\x4f\xe6\x5a\xf1\x88\x1f\x93"
33187                                 "\x2a\xc1\x35\xcc\x63\xfa\x6e\x05"
33188                                 "\x9c\x10\xa7\x3e\xd5\x49\xe0\x77"
33189                                 "\x0e\x82\x19\xb0\x24\xbb\x52\xe9"
33190                                 "\x5d\xf4\x8b\x22\x96\x2d\xc4\x38"
33191                                 "\xcf\x66\xfd\x71\x08\x9f\x13\xaa"
33192                                 "\x41\xd8\x4c\xe3\x7a\x11\x85\x1c"
33193                                 "\xb3\x27\xbe\x55\xec\x60\xf7\x8e"
33194                                 "\x02\x99\x30\xc7\x3b\xd2\x69\x00"
33195                                 "\x74\x0b\xa2\x16\xad\x44\xdb\x4f"
33196                                 "\xe6\x7d\x14\x88\x1f\xb6\x2a\xc1"
33197                                 "\x58\xef\x63\xfa\x91\x05\x9c\x33"
33198                                 "\xca\x3e\xd5\x6c\x03\x77\x0e\xa5"
33199                                 "\x19\xb0\x47\xde\x52\xe9\x80\x17"
33200                                 "\x8b\x22\xb9\x2d\xc4\x5b\xf2\x66"
33201                                 "\xfd\x94\x08\x9f\x36\xcd\x41\xd8"
33202                                 "\x6f\x06\x7a\x11\xa8\x1c\xb3\x4a"
33203                                 "\xe1\x55\xec\x83\x1a\x8e\x25\xbc"
33204                                 "\x30\xc7\x5e\xf5\x69\x00\x97\x0b"
33205                                 "\xa2\x39\xd0\x44\xdb\x72\x09\x7d"
33206                                 "\x14\xab\x1f\xb6\x4d\xe4\x58\xef"
33207                                 "\x86\x1d\x91\x28\xbf\x33\xca\x61"
33208                                 "\xf8\x6c\x03\x9a\x0e\xa5\x3c\xd3"
33209                                 "\x47\xde\x75\x0c\x80\x17\xae\x22"
33210                                 "\xb9\x50\xe7\x5b\xf2\x89\x20\x94"
33211                                 "\x2b\xc2\x36\xcd\x64\xfb\x6f\x06"
33212                                 "\x9d\x11\xa8\x3f\xd6\x4a\xe1\x78"
33213                                 "\x0f\x83\x1a\xb1\x25\xbc\x53\xea"
33214                                 "\x5e\xf5\x8c\x00\x97\x2e\xc5\x39"
33215                                 "\xd0\x67\xfe\x72\x09\xa0\x14\xab"
33216                                 "\x42\xd9\x4d\xe4\x7b\x12\x86\x1d"
33217                                 "\xb4\x28\xbf\x56\xed\x61\xf8\x8f"
33218                                 "\x03\x9a\x31\xc8\x3c\xd3\x6a\x01"
33219                                 "\x75\x0c\xa3\x17\xae\x45\xdc\x50"
33220                                 "\xe7\x7e\x15\x89\x20\xb7\x2b\xc2"
33221                                 "\x59\xf0\x64\xfb\x92\x06\x9d\x34"
33222                                 "\xcb\x3f\xd6\x6d\x04\x78\x0f\xa6"
33223                                 "\x1a\xb1\x48\xdf\x53\xea\x81\x18"
33224                                 "\x8c\x23\xba\x2e\xc5\x5c\xf3\x67"
33225                                 "\xfe\x95\x09\xa0\x37\xce\x42\xd9"
33226                                 "\x70\x07\x7b\x12\xa9\x1d\xb4\x4b"
33227                                 "\xe2\x56\xed\x84\x1b\x8f\x26\xbd"
33228                                 "\x31\xc8\x5f\xf6\x6a\x01\x98\x0c"
33229                                 "\xa3\x3a\xd1\x45\xdc\x73\x0a\x7e"
33230                                 "\x15\xac\x20\xb7\x4e\xe5\x59\xf0"
33231                                 "\x87\x1e\x92\x29\xc0\x34\xcb\x62"
33232                                 "\xf9\x6d\x04\x9b\x0f\xa6\x3d\xd4"
33233                                 "\x48\xdf\x76\x0d\x81\x18\xaf\x23"
33234                                 "\xba\x51\xe8\x5c\xf3\x8a\x21\x95"
33235                                 "\x2c\xc3\x37\xce\x65\xfc\x70\x07"
33236                                 "\x9e\x12\xa9\x40\xd7\x4b\xe2\x79"
33237                                 "\x10\x84\x1b\xb2\x26\xbd\x54\xeb"
33238                                 "\x5f\xf6\x8d\x01\x98\x2f\xc6\x3a"
33239                                 "\xd1\x68\xff\x73\x0a\xa1\x15\xac"
33240                                 "\x43\xda\x4e\xe5\x7c\x13\x87\x1e"
33241                                 "\xb5\x29\xc0\x57\xee\x62\xf9\x90"
33242                                 "\x04\x9b\x32\xc9\x3d\xd4\x6b\x02"
33243                                 "\x76\x0d\xa4\x18\xaf\x46\xdd\x51"
33244                                 "\xe8\x7f\x16\x8a\x21\xb8\x2c\xc3"
33245                                 "\x5a\xf1\x65\xfc\x93\x07\x9e\x35"
33246                                 "\xcc\x40\xd7\x6e\x05\x79\x10\xa7"
33247                                 "\x1b\xb2\x49\xe0\x54\xeb\x82\x19"
33248                                 "\x8d\x24\xbb\x2f\xc6\x5d\xf4\x68"
33249                                 "\xff\x96\x0a\xa1\x38\xcf\x43\xda"
33250                                 "\x71\x08\x7c\x13\xaa\x1e\xb5\x4c"
33251                                 "\xe3\x57\xee\x85\x1c\x90\x27\xbe"
33252                                 "\x32\xc9\x60\xf7\x6b\x02\x99\x0d"
33253                                 "\xa4\x3b\xd2\x46\xdd\x74\x0b\x7f"
33254                                 "\x16\xad\x21\xb8\x4f\xe6\x5a\xf1"
33255                                 "\x88\x1f\x93\x2a\xc1\x35\xcc\x63"
33256                                 "\xfa\x6e\x05\x9c\x10\xa7\x3e\xd5"
33257                                 "\x49\xe0\x77\x0e\x82\x19\xb0\x24"
33258                                 "\xbb\x52\xe9\x5d\xf4\x8b\x22\x96"
33259                                 "\x2d\xc4\x38\xcf\x66\xfd\x71\x08"
33260                                 "\x9f\x13\xaa\x41\xd8\x4c\xe3\x7a"
33261                                 "\x11\x85\x1c\xb3\x27\xbe\x55\xec"
33262                                 "\x60\xf7\x8e\x02\x99\x30\xc7\x3b"
33263                                 "\xd2\x69\x00\x74\x0b\xa2\x16\xad"
33264                                 "\x44\xdb\x4f\xe6\x7d\x14\x88\x1f"
33265                                 "\xb6\x2a\xc1\x58\xef\x63\xfa\x91"
33266                                 "\x05\x9c\x33\xca\x3e\xd5\x6c\x03"
33267                                 "\x77\x0e\xa5\x19\xb0\x47\xde\x52"
33268                                 "\xe9\x80\x17\x8b\x22\xb9\x2d\xc4"
33269                                 "\x5b\xf2\x66\xfd\x94\x08\x9f\x36"
33270                                 "\xcd\x41\xd8\x6f\x06\x7a\x11\xa8"
33271                                 "\x1c\xb3\x4a\xe1\x55\xec\x83\x1a"
33272                                 "\x8e\x25\xbc\x30\xc7\x5e\xf5\x69"
33273                                 "\x00\x97\x0b\xa2\x39\xd0\x44\xdb"
33274                                 "\x72\x09\x7d\x14\xab\x1f\xb6\x4d"
33275                                 "\xe4\x58\xef\x86\x1d\x91\x28\xbf"
33276                                 "\x33\xca\x61\xf8\x6c\x03\x9a\x0e"
33277                                 "\xa5\x3c\xd3\x47\xde\x75\x0c\x80"
33278                                 "\x17\xae\x22\xb9\x50\xe7\x5b\xf2"
33279                                 "\x89\x20\x94\x2b\xc2\x36\xcd\x64"
33280                                 "\xfb\x6f\x06\x9d\x11\xa8\x3f\xd6"
33281                                 "\x4a\xe1\x78\x0f\x83\x1a\xb1\x25"
33282                                 "\xbc\x53\xea\x5e\xf5\x8c\x00\x97"
33283                                 "\x2e\xc5\x39\xd0\x67\xfe\x72\x09"
33284                                 "\xa0\x14\xab\x42\xd9\x4d\xe4\x7b"
33285                                 "\x12\x86\x1d\xb4\x28\xbf\x56\xed"
33286                                 "\x61\xf8\x8f\x03\x9a\x31\xc8\x3c"
33287                                 "\xd3\x6a\x01\x75\x0c\xa3\x17\xae"
33288                                 "\x45\xdc\x50\xe7\x7e\x15\x89\x20"
33289                                 "\xb7\x2b\xc2\x59\xf0\x64\xfb\x92"
33290                                 "\x06\x9d\x34\xcb\x3f\xd6\x6d\x04"
33291                                 "\x78\x0f\xa6\x1a\xb1\x48\xdf\x53"
33292                                 "\xea\x81\x18\x8c\x23\xba\x2e\xc5"
33293                                 "\x5c\xf3\x67\xfe\x95\x09\xa0\x37"
33294                                 "\xce\x42\xd9\x70\x07\x7b\x12\xa9"
33295                                 "\x1d\xb4\x4b\xe2\x56\xed\x84\x1b"
33296                                 "\x8f\x26\xbd\x31\xc8\x5f\xf6\x6a"
33297                                 "\x01\x98\x0c\xa3\x3a\xd1\x45\xdc"
33298                                 "\x73\x0a\x7e\x15\xac\x20\xb7\x4e"
33299                                 "\xe5\x59\xf0\x87\x1e\x92\x29\xc0"
33300                                 "\x34\xcb\x62\xf9\x6d\x04\x9b\x0f"
33301                                 "\xa6\x3d\xd4\x48\xdf\x76\x0d\x81"
33302                                 "\x18\xaf\x23\xba\x51\xe8\x5c\xf3"
33303                                 "\x8a\x21\x95\x2c\xc3\x37\xce\x65"
33304                                 "\xfc\x70\x07\x9e\x12\xa9\x40\xd7"
33305                                 "\x4b\xe2\x79\x10\x84\x1b\xb2\x26"
33306                                 "\xbd\x54\xeb\x5f\xf6\x8d\x01\x98"
33307                                 "\x2f\xc6\x3a\xd1\x68\xff\x73\x0a"
33308                                 "\xa1\x15\xac\x43\xda\x4e\xe5\x7c"
33309                                 "\x13\x87\x1e\xb5\x29\xc0\x57\xee"
33310                                 "\x62\xf9\x90\x04\x9b\x32\xc9\x3d"
33311                                 "\xd4\x6b\x02\x76\x0d\xa4\x18\xaf"
33312                                 "\x46\xdd\x51\xe8\x7f\x16\x8a\x21"
33313                                 "\xb8\x2c\xc3\x5a\xf1\x65\xfc\x93"
33314                                 "\x07\x9e\x35\xcc\x40\xd7\x6e\x05"
33315                                 "\x79\x10\xa7\x1b\xb2\x49\xe0\x54"
33316                                 "\xeb\x82\x19\x8d\x24\xbb\x2f\xc6"
33317                                 "\x5d\xf4\x68\xff\x96\x0a\xa1\x38"
33318                                 "\xcf\x43\xda\x71\x08\x7c\x13\xaa"
33319                                 "\x1e\xb5\x4c\xe3\x57\xee\x85\x1c"
33320                                 "\x90\x27\xbe\x32\xc9\x60\xf7\x6b"
33321                                 "\x02\x99\x0d\xa4\x3b\xd2\x46\xdd"
33322                                 "\x74\x0b\x7f\x16\xad\x21\xb8\x4f"
33323                                 "\xe6\x5a\xf1\x88\x1f\x93\x2a\xc1"
33324                                 "\x35\xcc\x63\xfa\x6e\x05\x9c\x10"
33325                                 "\xa7\x3e\xd5\x49\xe0\x77\x0e\x82"
33326                                 "\x19\xb0\x24\xbb\x52\xe9\x5d\xf4"
33327                                 "\x8b\x22\x96\x2d\xc4\x38\xcf\x66"
33328                                 "\xfd\x71\x08\x9f\x13\xaa\x41\xd8"
33329                                 "\x4c\xe3\x7a\x11\x85\x1c\xb3\x27"
33330                                 "\xbe\x55\xec\x60\xf7\x8e\x02\x99"
33331                                 "\x30\xc7\x3b\xd2\x69\x00\x74\x0b"
33332                                 "\xa2\x16\xad\x44\xdb\x4f\xe6\x7d"
33333                                 "\x14\x88\x1f\xb6\x2a\xc1\x58\xef"
33334                                 "\x63\xfa\x91\x05\x9c\x33\xca\x3e"
33335                                 "\xd5\x6c\x03\x77\x0e\xa5\x19\xb0"
33336                                 "\x47\xde\x52\xe9\x80\x17\x8b\x22"
33337                                 "\xb9\x2d\xc4\x5b\xf2\x66\xfd\x94"
33338                                 "\x08\x9f\x36\xcd\x41\xd8\x6f\x06"
33339                                 "\x7a\x11\xa8\x1c\xb3\x4a\xe1\x55"
33340                                 "\xec\x83\x1a\x8e\x25\xbc\x30\xc7"
33341                                 "\x5e\xf5\x69\x00\x97\x0b\xa2\x39"
33342                                 "\xd0\x44\xdb\x72\x09\x7d\x14\xab"
33343                                 "\x1f\xb6\x4d\xe4\x58\xef\x86\x1d"
33344                                 "\x91\x28\xbf\x33\xca\x61\xf8\x6c"
33345                                 "\x03\x9a\x0e\xa5\x3c\xd3\x47\xde"
33346                                 "\x75\x0c\x80\x17\xae\x22\xb9\x50"
33347                                 "\xe7\x5b\xf2\x89\x20\x94\x2b\xc2"
33348                                 "\x36\xcd\x64\xfb\x6f\x06\x9d\x11"
33349                                 "\xa8\x3f\xd6\x4a\xe1\x78\x0f\x83"
33350                                 "\x1a\xb1\x25\xbc\x53\xea\x5e\xf5"
33351                                 "\x8c\x00\x97\x2e\xc5\x39\xd0\x67"
33352                                 "\xfe\x72\x09\xa0\x14\xab\x42\xd9"
33353                                 "\x4d\xe4\x7b\x12\x86\x1d\xb4\x28"
33354                                 "\xbf\x56\xed\x61\xf8\x8f\x03\x9a"
33355                                 "\x31\xc8\x3c\xd3\x6a\x01\x75\x0c"
33356                                 "\xa3\x17\xae\x45\xdc\x50\xe7\x7e"
33357                                 "\x15\x89\x20\xb7\x2b\xc2\x59\xf0"
33358                                 "\x64\xfb\x92\x06\x9d\x34\xcb\x3f"
33359                                 "\xd6\x6d\x04\x78\x0f\xa6\x1a\xb1"
33360                                 "\x48\xdf\x53\xea\x81\x18\x8c\x23"
33361                                 "\xba\x2e\xc5\x5c\xf3\x67\xfe\x95"
33362                                 "\x09\xa0\x37\xce\x42\xd9\x70\x07"
33363                                 "\x7b\x12\xa9\x1d\xb4\x4b\xe2\x56"
33364                                 "\xed\x84\x1b\x8f\x26\xbd\x31\xc8"
33365                                 "\x5f\xf6\x6a\x01\x98\x0c\xa3\x3a"
33366                                 "\xd1\x45\xdc\x73\x0a\x7e\x15\xac"
33367                                 "\x20\xb7\x4e\xe5\x59\xf0\x87\x1e"
33368                                 "\x92\x29\xc0\x34\xcb\x62\xf9\x6d"
33369                                 "\x04\x9b\x0f\xa6\x3d\xd4\x48\xdf"
33370                                 "\x76\x0d\x81\x18\xaf\x23\xba\x51"
33371                                 "\xe8\x5c\xf3\x8a\x21\x95\x2c\xc3"
33372                                 "\x37\xce\x65\xfc\x70\x07\x9e\x12"
33373                                 "\xa9\x40\xd7\x4b\xe2\x79\x10\x84"
33374                                 "\x1b\xb2\x26\xbd\x54\xeb\x5f\xf6"
33375                                 "\x8d\x01\x98\x2f\xc6\x3a\xd1\x68"
33376                                 "\xff\x73\x0a\xa1\x15\xac\x43\xda"
33377                                 "\x4e\xe5\x7c\x13\x87\x1e\xb5\x29"
33378                                 "\xc0\x57\xee\x62\xf9\x90\x04\x9b"
33379                                 "\x32\xc9\x3d\xd4\x6b\x02\x76\x0d"
33380                                 "\xa4\x18\xaf\x46\xdd\x51\xe8\x7f"
33381                                 "\x16\x8a\x21\xb8\x2c\xc3\x5a\xf1"
33382                                 "\x65\xfc\x93\x07\x9e\x35\xcc\x40"
33383                                 "\xd7\x6e\x05\x79\x10\xa7\x1b\xb2"
33384                                 "\x49\xe0\x54\xeb\x82\x19\x8d\x24"
33385                                 "\xbb\x2f\xc6\x5d\xf4\x68\xff\x96"
33386                                 "\x0a\xa1\x38\xcf\x43\xda\x71\x08"
33387                                 "\x7c\x13\xaa\x1e\xb5\x4c\xe3\x57"
33388                                 "\xee\x85\x1c\x90\x27\xbe\x32\xc9"
33389                                 "\x60\xf7\x6b\x02\x99\x0d\xa4\x3b"
33390                                 "\xd2\x46\xdd\x74\x0b\x7f\x16\xad"
33391                                 "\x21\xb8\x4f\xe6\x5a\xf1\x88\x1f"
33392                                 "\x93\x2a\xc1\x35\xcc\x63\xfa\x6e"
33393                                 "\x05\x9c\x10\xa7\x3e\xd5\x49\xe0"
33394                                 "\x77\x0e\x82\x19\xb0\x24\xbb\x52"
33395                                 "\xe9\x5d\xf4\x8b\x22\x96\x2d\xc4"
33396                                 "\x38\xcf\x66\xfd\x71\x08\x9f\x13"
33397                                 "\xaa\x41\xd8\x4c\xe3\x7a\x11\x85"
33398                                 "\x1c\xb3\x27\xbe\x55\xec\x60\xf7"
33399                                 "\x8e\x02\x99\x30\xc7\x3b\xd2\x69"
33400                                 "\x00\x74\x0b\xa2\x16\xad\x44\xdb"
33401                                 "\x4f\xe6\x7d\x14\x88\x1f\xb6\x2a"
33402                                 "\xc1\x58\xef\x63\xfa\x91\x05\x9c"
33403                                 "\x33\xca\x3e\xd5\x6c\x03\x77\x0e"
33404                                 "\xa5\x19\xb0\x47\xde\x52\xe9\x80"
33405                                 "\x17\x8b\x22\xb9\x2d\xc4\x5b\xf2"
33406                                 "\x66\xfd\x94\x08\x9f\x36\xcd\x41"
33407                                 "\xd8\x6f\x06\x7a\x11\xa8\x1c\xb3"
33408                                 "\x4a\xe1\x55\xec\x83\x1a\x8e\x25"
33409                                 "\xbc\x30\xc7\x5e\xf5\x69\x00\x97"
33410                                 "\x0b\xa2\x39\xd0\x44\xdb\x72\x09"
33411                                 "\x7d\x14\xab\x1f\xb6\x4d\xe4\x58"
33412                                 "\xef\x86\x1d\x91\x28\xbf\x33\xca"
33413                                 "\x61\xf8\x6c\x03\x9a\x0e\xa5\x3c"
33414                                 "\xd3\x47\xde\x75\x0c\x80\x17\xae"
33415                                 "\x22\xb9\x50\xe7\x5b\xf2\x89\x20"
33416                                 "\x94\x2b\xc2\x36\xcd\x64\xfb\x6f"
33417                                 "\x06\x9d\x11\xa8\x3f\xd6\x4a\xe1"
33418                                 "\x78\x0f\x83\x1a\xb1\x25\xbc\x53"
33419                                 "\xea\x5e\xf5\x8c\x00\x97\x2e\xc5"
33420                                 "\x39\xd0\x67\xfe\x72\x09\xa0\x14"
33421                                 "\xab\x42\xd9\x4d\xe4\x7b\x12\x86"
33422                                 "\x1d\xb4\x28\xbf\x56\xed\x61\xf8"
33423                                 "\x8f\x03\x9a\x31\xc8\x3c\xd3\x6a"
33424                                 "\x01\x75\x0c\xa3\x17\xae\x45\xdc"
33425                                 "\x50\xe7\x7e\x15\x89\x20\xb7\x2b"
33426                                 "\xc2\x59\xf0\x64\xfb\x92\x06\x9d"
33427                                 "\x34\xcb\x3f\xd6\x6d\x04\x78\x0f"
33428                                 "\xa6\x1a\xb1\x48\xdf\x53\xea\x81"
33429                                 "\x18\x8c\x23\xba\x2e\xc5\x5c\xf3"
33430                                 "\x67\xfe\x95\x09\xa0\x37\xce\x42"
33431                                 "\xd9\x70\x07\x7b\x12\xa9\x1d\xb4"
33432                                 "\x4b\xe2\x56\xed\x84\x1b\x8f\x26"
33433                                 "\xbd\x31\xc8\x5f\xf6\x6a\x01\x98",
33434                 .psize = 2048,
33435                 .digest = "\xec\x26\x4d\x95",
33436         }
33437 };
33438
33439 /*
33440  * Blakcifn CRC test vectors
33441  */
33442 #define BFIN_CRC_TEST_VECTORS 6
33443
33444 static struct hash_testvec bfin_crc_tv_template[] = {
33445         {
33446                 .psize = 0,
33447                 .digest = "\x00\x00\x00\x00",
33448         },
33449         {
33450                 .key = "\x87\xa9\xcb\xed",
33451                 .ksize = 4,
33452                 .psize = 0,
33453                 .digest = "\x87\xa9\xcb\xed",
33454         },
33455         {
33456                 .key = "\xff\xff\xff\xff",
33457                 .ksize = 4,
33458                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33459                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33460                              "\x11\x12\x13\x14\x15\x16\x17\x18"
33461                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33462                              "\x21\x22\x23\x24\x25\x26\x27\x28",
33463                 .psize = 40,
33464                 .digest = "\x84\x0c\x8d\xa2",
33465         },
33466         {
33467                 .key = "\xff\xff\xff\xff",
33468                 .ksize = 4,
33469                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33470                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33471                              "\x11\x12\x13\x14\x15\x16\x17\x18"
33472                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33473                              "\x21\x22\x23\x24\x25\x26",
33474                 .psize = 38,
33475                 .digest = "\x8c\x58\xec\xb7",
33476         },
33477         {
33478                 .key = "\xff\xff\xff\xff",
33479                 .ksize = 4,
33480                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33481                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33482                              "\x11\x12\x13\x14\x15\x16\x17\x18"
33483                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33484                              "\x21\x22\x23\x24\x25\x26\x27",
33485                 .psize = 39,
33486                 .digest = "\xdc\x50\x28\x7b",
33487         },
33488         {
33489                 .key = "\xff\xff\xff\xff",
33490                 .ksize = 4,
33491                 .plaintext = "\x01\x02\x03\x04\x05\x06\x07\x08"
33492                              "\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10"
33493                              "\x11\x12\x13\x14\x15\x16\x17\x18"
33494                              "\x19\x1a\x1b\x1c\x1d\x1e\x1f\x20"
33495                              "\x21\x22\x23\x24\x25\x26\x27\x28"
33496                              "\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30"
33497                              "\x31\x32\x33\x34\x35\x36\x37\x38"
33498                              "\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40"
33499                              "\x41\x42\x43\x44\x45\x46\x47\x48"
33500                              "\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50"
33501                              "\x51\x52\x53\x54\x55\x56\x57\x58"
33502                              "\x59\x5a\x5b\x5c\x5d\x5e\x5f\x60"
33503                              "\x61\x62\x63\x64\x65\x66\x67\x68"
33504                              "\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70"
33505                              "\x71\x72\x73\x74\x75\x76\x77\x78"
33506                              "\x79\x7a\x7b\x7c\x7d\x7e\x7f\x80"
33507                              "\x81\x82\x83\x84\x85\x86\x87\x88"
33508                              "\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90"
33509                              "\x91\x92\x93\x94\x95\x96\x97\x98"
33510                              "\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0"
33511                              "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8"
33512                              "\xa9\xaa\xab\xac\xad\xae\xaf\xb0"
33513                              "\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8"
33514                              "\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0"
33515                              "\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8"
33516                              "\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0"
33517                              "\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8"
33518                              "\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0"
33519                              "\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8"
33520                              "\xe9\xea\xeb\xec\xed\xee\xef\xf0",
33521                 .psize = 240,
33522                 .digest = "\x10\x19\x4a\x5c",
33523                 .np = 2,
33524                 .tap = { 31, 209 }
33525         },
33526
33527 };
33528
33529 #define LZ4_COMP_TEST_VECTORS 1
33530 #define LZ4_DECOMP_TEST_VECTORS 1
33531
33532 static struct comp_testvec lz4_comp_tv_template[] = {
33533         {
33534                 .inlen  = 70,
33535                 .outlen = 45,
33536                 .input  = "Join us now and share the software "
33537                           "Join us now and share the software ",
33538                 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33539                           "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33540                           "\x64\x20\x73\x68\x61\x72\x65\x20"
33541                           "\x74\x68\x65\x20\x73\x6f\x66\x74"
33542                           "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33543                           "\x77\x61\x72\x65\x20",
33544         },
33545 };
33546
33547 static struct comp_testvec lz4_decomp_tv_template[] = {
33548         {
33549                 .inlen  = 45,
33550                 .outlen = 70,
33551                 .input  = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33552                           "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33553                           "\x64\x20\x73\x68\x61\x72\x65\x20"
33554                           "\x74\x68\x65\x20\x73\x6f\x66\x74"
33555                           "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33556                           "\x77\x61\x72\x65\x20",
33557                 .output = "Join us now and share the software "
33558                           "Join us now and share the software ",
33559         },
33560 };
33561
33562 #define LZ4HC_COMP_TEST_VECTORS 1
33563 #define LZ4HC_DECOMP_TEST_VECTORS 1
33564
33565 static struct comp_testvec lz4hc_comp_tv_template[] = {
33566         {
33567                 .inlen  = 70,
33568                 .outlen = 45,
33569                 .input  = "Join us now and share the software "
33570                           "Join us now and share the software ",
33571                 .output = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33572                           "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33573                           "\x64\x20\x73\x68\x61\x72\x65\x20"
33574                           "\x74\x68\x65\x20\x73\x6f\x66\x74"
33575                           "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33576                           "\x77\x61\x72\x65\x20",
33577         },
33578 };
33579
33580 static struct comp_testvec lz4hc_decomp_tv_template[] = {
33581         {
33582                 .inlen  = 45,
33583                 .outlen = 70,
33584                 .input  = "\xf0\x10\x4a\x6f\x69\x6e\x20\x75"
33585                           "\x73\x20\x6e\x6f\x77\x20\x61\x6e"
33586                           "\x64\x20\x73\x68\x61\x72\x65\x20"
33587                           "\x74\x68\x65\x20\x73\x6f\x66\x74"
33588                           "\x77\x0d\x00\x0f\x23\x00\x0b\x50"
33589                           "\x77\x61\x72\x65\x20",
33590                 .output = "Join us now and share the software "
33591                           "Join us now and share the software ",
33592         },
33593 };
33594
33595 #endif  /* _CRYPTO_TESTMGR_H */